Motorized mayhem

Caution!  Hyperbole warning!

All right, so there is no mayhem involved.  But there are motors.  Stepper motors, to be exact.  Four of them.  Over the weekend I built my RAMPS module (Aah, solder fumes!) and I am pleased to crow about the fact that it worked first time.  In case you don’t know, this is an arduino shield which integrates the majority of the external components required for a 3d printer.  It can host 5 stepper motor drivers (I only need 4 at the moment, but it gives me the option to add a second extruder), manage the inputs from end stops, thermistors and other safety devices, and can provide power for a heated base on which to print.  Each stepper motor has its own little daughter board, a pololu A4988 which handles the slightly complex business of powering the coils on the motor.  Driving stepper motors is different to driving simple DC motors – they have two or more (sets of) coils, which are powered in sequence (and with varying polarity) to move the rotor in discrete steps.  The motors I have have two sets of coils, and have a resolution of 200 steps per revolution.  The Pololu driver boards are sophisticated, and by manipulating the voltages over both sets of coils at once, can make the stepper motors turn in increments of as little as 1/16th of a step (which gives the motor a resolution of 3200 steps per revolution).  The completed board with its steppers attached looks like this:

WP_20130218_001 (1)

Yes, I know it’s out of focus.  My camera seems to have developed a very irritating fault, and every photo I take is slightly blurry.  The lack of focus doesn’t show up on the LCD viewfinder, because the resolution is insufficient.  It’s like going back to the old days of taking photos on film and not discovering that they were out of focus until a week later, when the film was developed.  I don’t really want to buy a new camera, so you might have to put up with soft focus images for a while.

Back to the point: the RAMPS board works perfectly.  To test it, I’ve loaded Marlin firmware into my Arduino.  Marlin is the program which takes more-or-less standard ‘G-code’ instructions (G-codes are widely used in the manufacturing industry to tell computer controlled machine tools how to act) and converts them to stepper motor steps.  I’m going to have to hack the Marlin source code a bit, because it’s designed for printers which have one motor for each of the x, y, and z axes.  Delta printers have more complex geometry, and that’s what my next post will be about.  Marlin in turn listens to a PC over a USB connection and gets its instructions from Pronterface, which allows me to test the movements of the motors.  It does a lot more than this, in fact.  Its true purpose is to drive the printer mechanics over the whole print run – but more of that when I’ve got something to print with.  For now, just marvel at the lovely UI, and accept that it allows me to test that all four motors work properly.

Pronterface

A note on power supplies

Stepper motors take electricity.  This may not be a revelation to you.  What you may not know is that they take quite a bit of electricity, even when they are not moving.  Especially if you are using micro stepping, the motor coils need to be energised (Mr Scott) simply to hold the motor in a given position.  Four motors can easily eat a few amps.  A very easy way to get a relatively high current power supply is to use one from and old PC.  I’ve got more of those than you can shake a stick at, so the whole printer will be driven from an old ATX PSU.  Easy.

Something for the weekend, Sir?

I love the smell of solder fumes in the morning.

Raw materials for my 3D printer keep arriving.  It’s not surprising, as I keep ordering them, but it is fun.  I’ve now received the aluminium extrusions I’m going to use for the vertical posts in my design.  I ordered them from a place in Surrey, and was a amused to watch their delivery progress on the UPS website.  Amused, because they started their journey in Austria, stopped off in Germany, then briefly visited Barking, Tamworth and Dewsbury before ending up in Hull.  And I thought I was ordering from the UK.  Never mind, I’m now the proud possessor of three 1-meter lengths of extrusion, which looks like this (the penny is just for scale):

WP_20130215_005

A carriage (to be printed by Rob) will run up and down each of these posts, and will be linked to the print head by parallelogram arms.  I really must post an image of the design soon.

One metre length doesn’t sound much, but I have a suspicion that this printer is going to end up quite big.  This weekend’s tasks are to (1) cut the base and top of the assembly out of nice stiff plywood and (2) to assemble the RAMPS kit which will control the stepper motors.  It’ll be nice to get soldering again. 

WP_20130211_006 

The kit is very well packaged and looks a doddle to make, so it shouldn’t take long.  Once it’s up and running, I’ll put some firmware (probably Marlin) on to the Arduino and see if I can get it to drive the stepper motors.  Watch this space.  Unless you have better things to do, which I really hope you have.

Printer Claus has come to town!

As you know (because you follow my blog very closely), I’m building my own 3D printer.  Today I received a box of stepper motors, an Arduino Mega 2560 board and a RAMPS controller board kit.  These are the major items that I had to buy (rather than getting Rob to print for me).  Having spent actual money, I’m now really committed to building the printer.  Any day now I should receive the aluminium extruded sections I am using as vertical struts.  Watch this space.

WP_20130211_001

WP_20130211_004

Jumping Jack Flash

It’s a gas, gas, gas…

OK, so the title’s rubbish.  I’m open to suggestions for a better one which includes the word ‘gas’ or ‘meter’.  Except the Beatles song ‘From me to you’, of course, because that would be a dreadful pun.  And so to the point, which is that this blog post talks about using Gadgeteer kit to periodically read a gas meter, and send the data to a server for further use.

Continue reading Jumping Jack Flash

Breaking out of bondage

Let my inputs go!

The Gadgeteer system is great; there are loads of modules that you can easily use to do a range of interesting things. There’s a ‘but’ coming here, of course, and it is this: there’s no obvious way of connecting things which are not already Gadgeteer modules. For example, suppose you want to put a switch on your fridge door, so that you can trigger a Gadgeteer camera to take a picture of the person who is surreptitiously drinking all your milk. Or maybe you want to connect multiple switches, perhaps to determine the ammunition remaining in your USB missile launcher. The Gadgeteer buttons are not really suited to the task. Even if you can physically fit them where you want them, and you’ve got long enough cables, each module only has one switch on it. There’s a solution to this, and that’s what this post will start to cover – adding your own devices to the Gadgeteer system.

Continue reading Breaking out of bondage

Tracking fast moving targets with a Gadgeteer camera…

…is completely impractical.

In my last post, I briefly described a simple hack which allowed the Gadgeteer system to control the bearing and azimuth of an old USB missile launcher by using a joystick.  Manual control like this is all very well, but it would be much more entertaining if the systems could track a target automatically before raining down atomic retribution on it.  I use the words ‘would be’ advisedly, because as we shall see this is fairly impractical with the Gadgeteer kit I have to hand.  Even so, there’s a lot to be learned from the process of trying.

Continue reading Tracking fast moving targets with a Gadgeteer camera…

1080p HD TV on a Gadgeteer system

Oh, and ‘orange’ sounds like ‘gullible’ if you say it slowly…

In this post, I am not going to show you how to do HDTV on a Gadgeteer system. I am, however, going to do some stuff with the Sytech LCD touch panel, and show you how to do some simple (and rather rubbish, if truth be told) user interface interactions for your Gadgeteer projects.

Continue reading 1080p HD TV on a Gadgeteer system

Buttons and bows

Or lights, at least

In this post, I’m going to do a walkthrough of creating a very simple Gadgeteer prototype. It will not do a great deal, other than make some lights change when a button is pressed, but it will serve as an introduction to illustrate the Gadgeteer development process.

First, get a telegraph pole…

When I was a kid, I had a book called something like ‘Four thousand projects for inquisitive young minds’. Amongst the ideas for healthy, practical things to amuse children who should know better was a project called ‘Make your own totem pole’ (if you don’t know what a totem pole is, wikipedia will help). Anyway, the instructions began with something like ‘First, get an old telegraph pole…’, at which point the project became rather more difficult than a ten year old child could manage. And that’s before the talk of axes and chainsaws. The point of this rambling is that before you can start playing with the Gadgeteer hardware, there is some software you need to download and install. Rest assured that it’s easier to acquire and set up than a telegraph pole.

Continue reading Buttons and bows