In true Nerd Club fashion, no sooner have we decided to start (or re-start) a project, and something else comes along and takes our attention away. This time, it was the postie bringing us a clutch of four floppy disk drives, won off eBay just 48 hours earlier.
Why would anyone want such old crappy hardware?
Well, for a start the winning bid was just 1p, so even allowing £3 for delivery, they came to less than a pound each. (if you're ever at a car boot, and someone is selling off job-lots of drives as they often do, for 50p or so, it's worth grabbing a few). But that's not the main reason - we actually went out looking for old floppies, as a source of cheap stepper motors.
Here's what we found in one of our floppy drives:
The bit we're interested in is the stepper motor - usually seen at the back, next to the IDE cable connector. Whip the lid off and take a look. The motor usually has a corkscrew shaft and a bit of grease on it. These aren't important right now.
Normally two screws is all it takes to get the motor out of the casing. The other end of the shaft is usually in a part moulded into the actual casing. If the shaft and casing are all one unit (as often found in low voltage or portable/laptop drives) you'll need to undo a few more screws. But 99% of drives are built like this one.
Undo the two screws and pull the stepper motor backwards. Eventually it will stop. That's the flexible ribbon cable holding it in place. Pull until it comes free.
If your motor still has the ribbon cable attached, you can use this to connect to a PCB in future. But most messing about with steppers is first done on a breadboard/prototyping board, in which case simply solder some wires onto each of the four connection points.
The rest of the drive can be junked. We've got what we came for. But if you're in a scavenging mood, there's plenty more to be had from these little things. Get rid of the disk caddy and moving parts...
Remove the plate above the spinning head and pull. The actual spinning head should come off in your hands. It's a doughnut-shaped magnet with a spindle in the middle. It should just lift off. Undo a few screws from the bit it's sitting on and you should see some cool coils.
It's these coils that control how the head spins. As each coil is activated in a particular sequence, it can attract or repel the magnets inside the spinny head thing. If you really wanted to, you could use this as another crude stepper motor. But it's probably more hassle than it's worth. The coils themselves, however, might be useful in other projects.
Let's take a quick look at what we've scavenged from our floppy disk drive:
In our drive (though not all) we found some useful 0.1" pitch flexible ribbon cables. These are useful for joining two or more PCBs together, especially if soldering isn't your strong point - they're quite easy to work with.
There were a few springs, used to pull the disk drawer in and out, and a few "peg-style" clip springs too.
The rod that the disk head was on could always come in useful for something robot-y.
Of course, the stepper motor is going to come in handy - that's what we came for in the first place! And there were also a few "self-tapping" screws which might be handy in future. They have a slightly wider thread than normal screws and are perfect for fixing into plastic or acrylic (where they make their own thread as they are screwed into place, hence the name)
Not a bad haul for a few minutes work.
Get yourself some component bins, a few cheap drives and get to work!
Friday, 30 September 2011
Back to business - little guitars again
It's been a disruptive couple of weeks - the move from Brighton to North Wales was ok, but finding everything in the aftermath has proved a nightmare! So what better way to find out what's here, what's missing, and what's still somewhere in the depths of our monster Transit Van than to actually get making stuff.
Not having access to the tools (nor even the internet for most of the last few weeks) means quite a bit of software development has been going on. We've been working quite a bit of late on
Setting up HackLlan - a new "hackspace" in the mountains
Creating a time-line-driven sequencer for players to create and share music over the 'web
But now we've got some of our stuff out of boxes and into the hack-cupboard, it's time to get making again.
Not having access to the tools (nor even the internet for most of the last few weeks) means quite a bit of software development has been going on. We've been working quite a bit of late on
Setting up HackLlan - a new "hackspace" in the mountains
Creating a time-line-driven sequencer for players to create and share music over the 'web
But now we've got some of our stuff out of boxes and into the hack-cupboard, it's time to get making again.
a state of chaos in the new cupboard-come-office
if you can't find it, look in one of those stacking boxes...
We're actually quite excited about how well the software development is coming along, even though it's not much more than an array of samples and a piano-roll style screen. Our current guitar prototype works quite well with the software, but we're still having a few teething problems. Whether this is the software, the hardware or the firmware, we've yet to resolve. So in true "hacker" style, we've attacked all three at once.
Here's the new pcb layout, etched and ready to solder.
Before we left Brighton we were working on using a solder pot to connect the tiny fine-pitch multi-core wires to the circuit boards. We've got everything ready to go - except the components box with all our SMT stuff isn't immediately to hand. That doesn't mean it's not here. But it could just as easily mean it's somewhere in the back of a van, under a heap of household items and bedding....
Thursday, 22 September 2011
Llangollen canal
Having lived aboard a narrowboat, a few of us nerdy types already knew what a beautiful place the canal can be - especially at this time of year, as the autumn leaves paint everything a red-and-gold colour. After moving to Llangollen, we took a bike ride along the canal, to the Trevor Basin.
British Waterways have made an excellent job of upgrading the tow-path along the full length of the canal, and riding it was fantastic (helped, of course, because it's all absolutely level and flat). It took about an hour to meander along - rarely travelling faster than the boats on the canal!
What was so impressive were the views - so, inspired by Barney at BuildBrighton, we've decided to have a go at making a time-lapse camera that can be mounted onto a bike. The idea being that the next time we go for a bike ride, we can create a video to show everyone else what they are missing! We might even add in some GPS position recording, so that the cue points in the video can be tied in with an automatically updating Google map. But for now, we'll stick with making a camera that takes pictures every few seconds, and doesn't freak out when we ride over a few bumps (the towpath is lovely and smooth, but sometimes you have to go "off road" to cycle around obstacles such as dog walkers, moored boats, horses and woodland detritus).
(this was the start of our bike ride in Llangollen)
British Waterways have made an excellent job of upgrading the tow-path along the full length of the canal, and riding it was fantastic (helped, of course, because it's all absolutely level and flat). It took about an hour to meander along - rarely travelling faster than the boats on the canal!
What was so impressive were the views - so, inspired by Barney at BuildBrighton, we've decided to have a go at making a time-lapse camera that can be mounted onto a bike. The idea being that the next time we go for a bike ride, we can create a video to show everyone else what they are missing! We might even add in some GPS position recording, so that the cue points in the video can be tied in with an automatically updating Google map. But for now, we'll stick with making a camera that takes pictures every few seconds, and doesn't freak out when we ride over a few bumps (the towpath is lovely and smooth, but sometimes you have to go "off road" to cycle around obstacles such as dog walkers, moored boats, horses and woodland detritus).
Tuesday, 20 September 2011
Nerd Club has a new home
There's little to report on the maker front this week;
We've been pretty well tied up with firstly moving, and secondly, finding a new workshop. It's been an arduous few days but finally things are looking a bit more positive.
This is mainly because we've secured a unit (well, ok, a cupboard) in the Llangollen Malthouse. So now we've somewhere to get making again, we're hoping to run a few workshops and build up a community to support HackLlan - the new hackspace for North Wales
We've been pretty well tied up with firstly moving, and secondly, finding a new workshop. It's been an arduous few days but finally things are looking a bit more positive.
This is mainly because we've secured a unit (well, ok, a cupboard) in the Llangollen Malthouse. So now we've somewhere to get making again, we're hoping to run a few workshops and build up a community to support HackLlan - the new hackspace for North Wales
Wednesday, 14 September 2011
Nerd Club is moving
After three fantastic years down here in Brighton, we're on the move.
Hopefully it'll only be a temporary move, but with work and family commitments, we're having to decamp for a while and move up to North Wales.
It's not all doom and gloom of course!
First up, we're looking to start a hackspace/maker group up in the mountains. As members and regular visitors to BuildBrighton, we'd love to see something similar, albeit on a slightly smaller scale (BuildBrighton have just taken over a large part of the Rodhus Art Studio and arranged the 2011 Brighton Mini MakerFaire thanks to their increasing subscriber base and growing community - it'll take us quite a while to get to that level!)
And, of course, once the move is over and we've settled into our new space (wherever that may be) we're hoping to get making, blogging and video-ing all over again. With a new bunch of nerds and geeks.
So while it may be a bit quiet on the blog for a while, it's not an indication that nothing is going on - there'll be plenty of news, when we're back up-and-nerding in a few short days...
Monday, 12 September 2011
Soldering quarter pitch multi-core cable
Matt turned up at the last BuildBrighton meeting with two solder pots from DealExtreme. I'm a little disappointed with DealExtreme - they may be cheap, but you've got to be prepared for a long wait; these 'pots have been on order for about five or six weeks and there were no email updates to say where the order was up to (unlike PCBCart - another China-based supplier - who have excellent order status updates).
Anyway, the solder pot arrived and no sooner had I cut my finger on the sharp exposed edges around the pot than I had it up and running (careful of these cheaply-manufactured electronic tools - reminiscent of those nastily made PC cases that flooded the market in the early 90s, some of those edges can be razor sharp!). The moulded Australian style plug had to be cut off and a UK style plug fitted, but it didn't take long for the sharp tang of a new heater coil to fill the air.
The pot holds LOADS of solder - about quarter of a coil of regular solder wire and there was still only a small lump of molten solder in the bottom of the pot. The rosin/flux inside the solder didn't half smoke! And it created a tarry brown coating over the exposed parts of the pot. But once the solder was molten, it was easy enough to use.
(picture taken after solder has cooled, to show the rosin tarring inside the pot)
First, cut some multicore wire to length and strip back to expose the ends.
(we use quarter-pitch IDE cable - the sort of stuff you find in "round" IDE cables)
Dip the exposed copper into the solder, leave for a second or two, then remove.
The ends are perfectly tinned with just the right amount of solder.
Place the cable onto the tiny-pitch PCB connectors and heat with the tip of a soldering iron. Easy peasy - every wire connected first time, with no bridges or lumps of solder like we usually get when trying to solder these by hand.
We're still having to connect each wire one-at-a-time, but it's relatively easy. Ideally we'd like to get a really wide (15mm) chisel tip on the iron, so all wires can be connected in one go. But so far, the solder pot looks like it's going to be a useful addition to our arsenal of tools!
Anyway, the solder pot arrived and no sooner had I cut my finger on the sharp exposed edges around the pot than I had it up and running (careful of these cheaply-manufactured electronic tools - reminiscent of those nastily made PC cases that flooded the market in the early 90s, some of those edges can be razor sharp!). The moulded Australian style plug had to be cut off and a UK style plug fitted, but it didn't take long for the sharp tang of a new heater coil to fill the air.
(picture taken after solder has cooled, to show the rosin tarring inside the pot)
First, cut some multicore wire to length and strip back to expose the ends.
(we use quarter-pitch IDE cable - the sort of stuff you find in "round" IDE cables)
Dip the exposed copper into the solder, leave for a second or two, then remove.
The ends are perfectly tinned with just the right amount of solder.
Place the cable onto the tiny-pitch PCB connectors and heat with the tip of a soldering iron. Easy peasy - every wire connected first time, with no bridges or lumps of solder like we usually get when trying to solder these by hand.
We're still having to connect each wire one-at-a-time, but it's relatively easy. Ideally we'd like to get a really wide (15mm) chisel tip on the iron, so all wires can be connected in one go. But so far, the solder pot looks like it's going to be a useful addition to our arsenal of tools!
Sunday, 11 September 2011
Choosing the stepper motor resistors
Using a combination of L293D stepper controller ICs and IRF640 mosfets, we've now got a way of controlling both unipolar and bipolar stepper motors - so no matter where you salvage your motors from, we should have a way of offering a way of controlling them.
Now we have to get a bit nerdy and re-visit old school topics.
Back in the dark ages, those of us of a certain age will remember electronics, or even physics, lessons where we learned Ohm's Law.
Ohm's Law helps us to work out current and power requirements for controlling our stepper motors. We already know - from bitter experience - that if you ignore you basic power requirements, you'll quickly get through quite a few components, as you let the magic smoke out after just a few seconds of driving the motors!
We need to look at the things we can't change, and introduce elements to control those that we can.
For example, we're using the L293D stepper controller. It has a maximum current rating of 600mA (0.6A) per channel. That means, if we push more than 0.6A through the chip, it'll get hot, start to smell, and eventually burst into flames with a pop and a rush of smoke. Understandably, we don't want this to happen, so we need to introduce some resistors to limit the current.
This is where Ohm's Law comes in. Simply put:
V = IR where V=voltage, I=current, R=resistance
P = IV where P=power, I=current, V=voltage
Using these two equations, we can work out what type of resistors we need to use to limit current through the motor coils, to keep everything within safe limits.
As our stepper controller chip L293D has a current rating of 0.6A, ideally we want to drive the motors at not more than about half this (so that if the motor "spikes" or draws more current, to suddenly change direction, for example, we're still within safe limits).
We're going to use a 12V supply for driving the motors (because at a lower voltage, and lower current, the motor loses torque and can slip when driving a load). Now we just need to fill in the missing value:
V = IR; 12 = 0.3 * R; R = 12/0.3 = 40
So we know we want to use a resistor of roughly 40 ohms.
Common resistor values are 22R, 33R, 47R. If we increase the resistance too much, the motor will stall, so let's see what happens if we choose the 33R resistor:
V = IR; 12 = I*33; I = 12/33 = 0.36A
This equation has used only the resistance of the resistor. But we're putting the resistor in series with the motor coil - so we need to factor in the resistance across the coil(s) in the stepper motor.
The motor we're using has a coil resistance of 5 ohms (measure the resistance across your steppers with a simple multimeter - they're all different) so our total resistance is actually 38R.
So to find the current consumption, if we use a 33R resistor in series with the stepper motor coil(s):
V = IR; 12 = I*38; I = 12/38 = 0.32A
It seems that a 33ohm resistor in series with one side of each of the stepper coils results in the motor drawing just over 0.3A per phase. This is half of the current rating of the L293D driver chip, and seems like an ideal value.
BUT
Just shoving a regular 33R resistor in-line isn't going to do much good.
We know - from experience - that using puny little resistors with stepper motors means bad smells and lots of smoke! Why? Well, a typical resistor (the type you normally use with breadboard/prototyping boards) can have a resistance of between a few ohms, up to a few million ohms, but typically only handle about 0.25W
Watts are the units of power that the resistor can handle.
Watts are a product of voltage and current.
Ohm's Law tells us that P = IV (power = current * voltage).
So in our example here, we've a 12V supply and a 0.32A current draw.
The total power requirement is 12*0.32 = 3.84W
So we need a resistor with a power rating of at least 4W - ideally more.
It's no wonder that when we pushed current through our 0.25W resistor to drive the motors, they got hot and started to smoke very, very quickly! We're going to need to get hold of some power resistors and maybe a couple of heatsinks, to help keep them from getting too hot while in use.
Now we have to get a bit nerdy and re-visit old school topics.
Back in the dark ages, those of us of a certain age will remember electronics, or even physics, lessons where we learned Ohm's Law.
Ohm's Law helps us to work out current and power requirements for controlling our stepper motors. We already know - from bitter experience - that if you ignore you basic power requirements, you'll quickly get through quite a few components, as you let the magic smoke out after just a few seconds of driving the motors!
We need to look at the things we can't change, and introduce elements to control those that we can.
For example, we're using the L293D stepper controller. It has a maximum current rating of 600mA (0.6A) per channel. That means, if we push more than 0.6A through the chip, it'll get hot, start to smell, and eventually burst into flames with a pop and a rush of smoke. Understandably, we don't want this to happen, so we need to introduce some resistors to limit the current.
This is where Ohm's Law comes in. Simply put:
V = IR where V=voltage, I=current, R=resistance
P = IV where P=power, I=current, V=voltage
Using these two equations, we can work out what type of resistors we need to use to limit current through the motor coils, to keep everything within safe limits.
As our stepper controller chip L293D has a current rating of 0.6A, ideally we want to drive the motors at not more than about half this (so that if the motor "spikes" or draws more current, to suddenly change direction, for example, we're still within safe limits).
We're going to use a 12V supply for driving the motors (because at a lower voltage, and lower current, the motor loses torque and can slip when driving a load). Now we just need to fill in the missing value:
V = IR; 12 = 0.3 * R; R = 12/0.3 = 40
So we know we want to use a resistor of roughly 40 ohms.
Common resistor values are 22R, 33R, 47R. If we increase the resistance too much, the motor will stall, so let's see what happens if we choose the 33R resistor:
V = IR; 12 = I*33; I = 12/33 = 0.36A
This equation has used only the resistance of the resistor. But we're putting the resistor in series with the motor coil - so we need to factor in the resistance across the coil(s) in the stepper motor.
The motor we're using has a coil resistance of 5 ohms (measure the resistance across your steppers with a simple multimeter - they're all different) so our total resistance is actually 38R.
So to find the current consumption, if we use a 33R resistor in series with the stepper motor coil(s):
V = IR; 12 = I*38; I = 12/38 = 0.32A
It seems that a 33ohm resistor in series with one side of each of the stepper coils results in the motor drawing just over 0.3A per phase. This is half of the current rating of the L293D driver chip, and seems like an ideal value.
BUT
Just shoving a regular 33R resistor in-line isn't going to do much good.
We know - from experience - that using puny little resistors with stepper motors means bad smells and lots of smoke! Why? Well, a typical resistor (the type you normally use with breadboard/prototyping boards) can have a resistance of between a few ohms, up to a few million ohms, but typically only handle about 0.25W
Watts are the units of power that the resistor can handle.
Watts are a product of voltage and current.
Ohm's Law tells us that P = IV (power = current * voltage).
So in our example here, we've a 12V supply and a 0.32A current draw.
The total power requirement is 12*0.32 = 3.84W
So we need a resistor with a power rating of at least 4W - ideally more.
It's no wonder that when we pushed current through our 0.25W resistor to drive the motors, they got hot and started to smoke very, very quickly! We're going to need to get hold of some power resistors and maybe a couple of heatsinks, to help keep them from getting too hot while in use.
Saturday, 10 September 2011
Stepper motor control 2-phase 4-phase
Critical to getting our CNC-based pick-and-place machine working is driving the stepper motors.
We've already managed to get some 4-phase, six-wire motors spinning using a ULN2803A darlington array. But the problem was the current was too great and they started to smell really quickly. Not much longer after that, the magic smoke get let out.
We stripped a Lexmark Z73 printer scanner and salvaged some motors, and even stripped the steppers from old floppy disk drives. So we've no end of stepper motors to play with, but not much luck in getting them turning. The main problem has been that the motors we took from the old hardware and donated stuff off Freecycle are all 4-wire 2-phase/bipolar motors.
We upgraded the original stepper circuit, replacing the ULN2803A with 4 x IRF640 mosfets. The IRF640 chips have built-in fly-back diodes (they're designed for driving inductive loads) so we don't have to worry about any extra external components. The "gate" is isolated and can use logic-level (5V) voltages to switch them on.
This allows beefier stepper motors to be controlled (up to about 16A) but they are set up to drive 6-wire/4 phase/unipolar steppers. We still didn't have a way of driving 4-wire/2 phase bipolar motors correctly.
Until today.
Thanks to Jason at BuildBrighton, we've got a few L293D half-H-bridge chips to play with. And they work perfectly for driving scavenged stepper motors. Here's how we connected each IC to the coils on a bipolar stepper motor.
So now we've got a way of driving both 4-wire, 5-wire and 6-wire stepper motors.
We've got a nice beefy PC power supply to provide the power without having to worry about running more than two motors together (the earlier 500mA phone-charger just wasn't up to the job!) and the stepper driver chips can handle up to 1A per channel (4-wire/biopolar) and a massive 16A or more for six-wire (unipolar) motors.
The trick is to make our driver board(s) compatible with any combination of steppers so that anyone else who wants to make one of these machines can source parts for it cheaply and easily.
At the minute we're trying out a number of different ideas and don't have enough time to devote to developing each idea, AND write it up on the blog with photos/diagrams/full descriptions. So over the next few days, we're going to play about with a few ideas then write up the most successful ones here......
We've already managed to get some 4-phase, six-wire motors spinning using a ULN2803A darlington array. But the problem was the current was too great and they started to smell really quickly. Not much longer after that, the magic smoke get let out.
We stripped a Lexmark Z73 printer scanner and salvaged some motors, and even stripped the steppers from old floppy disk drives. So we've no end of stepper motors to play with, but not much luck in getting them turning. The main problem has been that the motors we took from the old hardware and donated stuff off Freecycle are all 4-wire 2-phase/bipolar motors.
We upgraded the original stepper circuit, replacing the ULN2803A with 4 x IRF640 mosfets. The IRF640 chips have built-in fly-back diodes (they're designed for driving inductive loads) so we don't have to worry about any extra external components. The "gate" is isolated and can use logic-level (5V) voltages to switch them on.
This allows beefier stepper motors to be controlled (up to about 16A) but they are set up to drive 6-wire/4 phase/unipolar steppers. We still didn't have a way of driving 4-wire/2 phase bipolar motors correctly.
Until today.
Thanks to Jason at BuildBrighton, we've got a few L293D half-H-bridge chips to play with. And they work perfectly for driving scavenged stepper motors. Here's how we connected each IC to the coils on a bipolar stepper motor.
So now we've got a way of driving both 4-wire, 5-wire and 6-wire stepper motors.
We've got a nice beefy PC power supply to provide the power without having to worry about running more than two motors together (the earlier 500mA phone-charger just wasn't up to the job!) and the stepper driver chips can handle up to 1A per channel (4-wire/biopolar) and a massive 16A or more for six-wire (unipolar) motors.
The trick is to make our driver board(s) compatible with any combination of steppers so that anyone else who wants to make one of these machines can source parts for it cheaply and easily.
At the minute we're trying out a number of different ideas and don't have enough time to devote to developing each idea, AND write it up on the blog with photos/diagrams/full descriptions. So over the next few days, we're going to play about with a few ideas then write up the most successful ones here......
Friday, 9 September 2011
CNC pick and place machine update
After an evening at BuildBrighton, exchanging ideas and motor control circuits, we've had a re-think about our CNC-based pick-and-place machine. In fact, we've had several re-thinks, returned to abandoned ideas, discarded previously agreed ideas and gone around in circles enough times to make everyone very, very dizzy!
At first, we concentrated on making a machine that would be simple to understand during it's construction.
We concentrated on theoretical accuracy - using a small angle stepper motor, relatively few teeth on the cog, sticking to numbers that were easily divisible and so on. The problem with this approach is that actually obtaining parts is quite difficult - 1.8deg steppers are quite expensive (£20/unit) wereas cheaper, salvageable motors (from printers, cd drives etc) are more difficult to drive, and have peculiar voltage requirements.
Our compromise is this -
Where possible, use parts that can be salvaged from easily obtained hardware.
An old, obsolete PC could be a major source of parts - the power supply gives us multiple 5V and 12V supplies, the CD and floppy drives provide 4-wire (2 phase) stepper motors, specifically designed to run on 5V/12V. The IDE cables are perfect for connecting homemade PCBs to other parts on the machine (old hard drive cables use 0.1" pitch, the same as breadboard prototyping and lots of through-hole components, pin-headers etc).
Rather than concentrating on using motors and belts that make the maths for calculating steps per mm easier, we're going to build a machine that works with mostly salvaged parts. The final device will be a "puppet and playback" machine - the user will manually position the picking head either using buttons on the machine, or using a PC/software interface, then record the co-ordinates (in terms of steps rather than mm from a known origin) back to the PC/eeprom memory. Once one complete "animation" has been recorded, the script can be played back over and over again.
This way, the actual accuracy of the device becomes less important - it just has to be "accurate enough" to pick up a component and place it on the board. We're not going to be loading g-code type files into the device, or have to do tricky conversions from one format to another. The machine will simply use a record-the-steps-and-play-them-back approach for placing the components. So the actual distances travelled and units used won't matter; if you're using 1.8 deg steppers and half-stepping to give 400 steps/rev, with a 5mm belt, it doesn't matter how far between components the head moves: the machine will simply remember x number of steps on the x-axis and y number of steps along the y-axis. Someone using a machine with 7.5 deg steppers will simply have fewer steps in each axis to travel the same physical distance.
Talking of belts, we've decided to ditch them and go with a rack-and-pinion system.
This means we're removing another potentially costly part from the bill of materials - a 1.25mm belt can be had from a printer or a scanner, but it may be 1.2mm, or 1.25mm, or the imperial equivalent, a 0.05" pitch belt. All these belts need to have the right pulley or cog, with the teeth exactly spaced to match the belt.
By using a rack and pinion approach, everyone can use the same set of laser-cutting templates, and matching the right pulley/cog to your (possibly unknown) belt is no longer an issue.
At first, we concentrated on making a machine that would be simple to understand during it's construction.
We concentrated on theoretical accuracy - using a small angle stepper motor, relatively few teeth on the cog, sticking to numbers that were easily divisible and so on. The problem with this approach is that actually obtaining parts is quite difficult - 1.8deg steppers are quite expensive (£20/unit) wereas cheaper, salvageable motors (from printers, cd drives etc) are more difficult to drive, and have peculiar voltage requirements.
Our compromise is this -
Where possible, use parts that can be salvaged from easily obtained hardware.
An old, obsolete PC could be a major source of parts - the power supply gives us multiple 5V and 12V supplies, the CD and floppy drives provide 4-wire (2 phase) stepper motors, specifically designed to run on 5V/12V. The IDE cables are perfect for connecting homemade PCBs to other parts on the machine (old hard drive cables use 0.1" pitch, the same as breadboard prototyping and lots of through-hole components, pin-headers etc).
Rather than concentrating on using motors and belts that make the maths for calculating steps per mm easier, we're going to build a machine that works with mostly salvaged parts. The final device will be a "puppet and playback" machine - the user will manually position the picking head either using buttons on the machine, or using a PC/software interface, then record the co-ordinates (in terms of steps rather than mm from a known origin) back to the PC/eeprom memory. Once one complete "animation" has been recorded, the script can be played back over and over again.
This way, the actual accuracy of the device becomes less important - it just has to be "accurate enough" to pick up a component and place it on the board. We're not going to be loading g-code type files into the device, or have to do tricky conversions from one format to another. The machine will simply use a record-the-steps-and-play-them-back approach for placing the components. So the actual distances travelled and units used won't matter; if you're using 1.8 deg steppers and half-stepping to give 400 steps/rev, with a 5mm belt, it doesn't matter how far between components the head moves: the machine will simply remember x number of steps on the x-axis and y number of steps along the y-axis. Someone using a machine with 7.5 deg steppers will simply have fewer steps in each axis to travel the same physical distance.
Talking of belts, we've decided to ditch them and go with a rack-and-pinion system.
This means we're removing another potentially costly part from the bill of materials - a 1.25mm belt can be had from a printer or a scanner, but it may be 1.2mm, or 1.25mm, or the imperial equivalent, a 0.05" pitch belt. All these belts need to have the right pulley or cog, with the teeth exactly spaced to match the belt.
By using a rack and pinion approach, everyone can use the same set of laser-cutting templates, and matching the right pulley/cog to your (possibly unknown) belt is no longer an issue.
Thursday, 8 September 2011
CNC pick-and-place update
We've spent a few days scavenging stepper motors from a variety of sources, and looking at what's available on eBay and other online sources. It's proved a bit tricky to decide exactly what to use for our pick-and-place machine; there are just too many options available!
It's a fine balance between scavenging and ease-of-use.
Typically, the easily accessible stuff (stepper motors from floppy drives, old printers and so on) is not so easy to drive - mostly they're high voltage (24V, 36V etc) and bipolar (2-phase, 4-wire) motors. While these are not impossible to use, they're more difficult to drive than our preferred uni-polar (5 or 6 wire) motors, which we've discovered can be run at lower voltages, using less current.
Current draw is proving to be an important consideration.
We've spent ages getting multiple motors working - albeit one at a time. When we introduced more than one motor at a time, our power supply (a 500mA phone charger providing 5V) wasn't up to the job. So we've upgraded the power supply and salvaged a PC power unit (PSU) which is good up to 400W, and gives us plenty of 12V and 5V power connectors.
The idea now is to use a PC supply (which should be easy to get hold of) and concentrate on 5V or 12V motors.
Unfortunately, we soon discovered that our original circuit was no good for higher voltage motors.
After beefing up the actual power supply, we managed to get more than one motor turning, but at a cost - a funny smell and a lot of smoke! It turns out that the ULN2803A chips we were using to drive the motors can only handle up to 500mA. And the motors were drawing 1A at 12V. Hence the darlington arrays blew after only a few seconds of usage.
This chip didn't just smell and smoke, it actually scorched the breadboard and blew the bottom off the chip when we tried to force it to drive two 1A motors at full belt!
All this means we've had to upgrade our stepper motor circuit.
We've replaced the ULN2380A chip with a series of IRF640 mosfets.
We need a single mosfet on each phase of the stepper motor coil(s) - i.e. four per motor (for a 4-phase unipolar motor). They include internal fly-back diodes and accept 5V logic level inputs, so are quite easy to use and require no extra components.
Here's a photo of the breadboard with the darlington arrays replaced with mosfets.
The benefit of this approach is that the mosfets can be used with low-power motors as well as the bigger ones, so the stepper motor driver will be compatible with a wider range of motors once complete.
The schematic is here - showing how to connect 4 pins from a PIC to 4 mosfets, for driving a single 6-wire/4-phase stepper motor.
[schematic pdf goes here]
Once we got the motor turning again, it was time to build the pulley for the belt-drive system.
We're using one of the belts we got out of the Lexmark Z73 - it's got a really fine tooth-pitch, about 1.2mm. So our cog/pulley needs to have a similar pitch to make the belt teeth fit snugly without slipping. We wanted as large a cog as possible, so that one single rotation moves the belt as far as possible. The larger to cog, the lower the precision, so like everything else, it's a fine balancing act to get the right combination.
Here's how we decided what to use:
The stepper motor is a 1.8 degree motor. This means 200 steps per revolution.
We're using half-stepping, so 400 steps/rev. The tooth-pitch is 1.2mm, or maybe 1.25 if the belt is imperial rather than metric (we can't be sure at this stage, so we're going to make the system, try it out and if there's any slippage, replace the cog/pulley for one with more/fewer teeth).
If we say our pitch is 1.25mm, then a cog with 40 teeth would move 40*1.25 = 50mm per revolution. At 400 steps per revolution, this means each step moves 50/400 = 0.125mm per step. This seems quite quite a nice level of accuracy.
The photo above shows a 40-tooth cog with a pitch of 1.25mm. It's pretty small.
So we thought, if we used an 80-tooth cog, we'd double the speed of the movement (80*1.25 = 100mm per revolution, or 100/400 = 0.25mm per step). Although not as precise, moving a head to within a quarter of a millimetre seems precise enough for a pick-and-place machine, so we decided to make a cog with 80 teeth.
Why pink? Just using up scraps of left over acrylic from a previous job! It wasn't a conscious decision to use pink over any other colour!
We added the disks above and below the cog to stop the belt slipping off the pulley during use. In fact, we found that our belt was every so slightly wider than 3mm (the thickness of the acrylic) so we created little spacer disks from cardboard, and used these between the disks and the cogs, to space them apart slightly.
With all the centre holes lined up, we stuck the multiple layers together and fitted to the stepper motor shaft (although the datasheet said the shaft was 6.25mm, we had to cut our holes 6.35mm to get them to fit and even then, it took some effort to get them onto the shaft!)
We made our cogs using InkScape.
It has a built-in gear maker. On a new document, go to the Extensions menu, Render, Gears:
By default, Inkscape uses 90 pixels per inch resolution. We decided that our belt is probably 0.05" pitch, so the circular pitch in pixels is 0.05*90 = 4.5
I found this diagram when looking for definitions such as circular pitch and pressure angle (I didn't know what they meant either!)
With the parameters in InkScape set, it was just a case of letting it create our gear by hitting apply:
With the gear created, we just needed to add the hole for the shaft. After much trial and error, we discovered that the ideal sized hole for the shaft was 6.35mm. We drew a circle with no fill colour and set the height and width to 6.35, then placed it inside the cog:
With both items selected, go to Object, Align and Distribute. Set "relative to" the biggest object. Then centre along both the x and y axis:
The end result is a cog with a perfectly centred hole for the shaft:
Which fits perfectly with our tiny-toothed timing belt. Or so it seems. We'll know for sure, once we've got the CNC machine up and running!
It's a fine balance between scavenging and ease-of-use.
Typically, the easily accessible stuff (stepper motors from floppy drives, old printers and so on) is not so easy to drive - mostly they're high voltage (24V, 36V etc) and bipolar (2-phase, 4-wire) motors. While these are not impossible to use, they're more difficult to drive than our preferred uni-polar (5 or 6 wire) motors, which we've discovered can be run at lower voltages, using less current.
Current draw is proving to be an important consideration.
We've spent ages getting multiple motors working - albeit one at a time. When we introduced more than one motor at a time, our power supply (a 500mA phone charger providing 5V) wasn't up to the job. So we've upgraded the power supply and salvaged a PC power unit (PSU) which is good up to 400W, and gives us plenty of 12V and 5V power connectors.
The idea now is to use a PC supply (which should be easy to get hold of) and concentrate on 5V or 12V motors.
Unfortunately, we soon discovered that our original circuit was no good for higher voltage motors.
After beefing up the actual power supply, we managed to get more than one motor turning, but at a cost - a funny smell and a lot of smoke! It turns out that the ULN2803A chips we were using to drive the motors can only handle up to 500mA. And the motors were drawing 1A at 12V. Hence the darlington arrays blew after only a few seconds of usage.
This chip didn't just smell and smoke, it actually scorched the breadboard and blew the bottom off the chip when we tried to force it to drive two 1A motors at full belt!
All this means we've had to upgrade our stepper motor circuit.
We've replaced the ULN2380A chip with a series of IRF640 mosfets.
We need a single mosfet on each phase of the stepper motor coil(s) - i.e. four per motor (for a 4-phase unipolar motor). They include internal fly-back diodes and accept 5V logic level inputs, so are quite easy to use and require no extra components.
Here's a photo of the breadboard with the darlington arrays replaced with mosfets.
The benefit of this approach is that the mosfets can be used with low-power motors as well as the bigger ones, so the stepper motor driver will be compatible with a wider range of motors once complete.
The schematic is here - showing how to connect 4 pins from a PIC to 4 mosfets, for driving a single 6-wire/4-phase stepper motor.
[schematic pdf goes here]
Once we got the motor turning again, it was time to build the pulley for the belt-drive system.
We're using one of the belts we got out of the Lexmark Z73 - it's got a really fine tooth-pitch, about 1.2mm. So our cog/pulley needs to have a similar pitch to make the belt teeth fit snugly without slipping. We wanted as large a cog as possible, so that one single rotation moves the belt as far as possible. The larger to cog, the lower the precision, so like everything else, it's a fine balancing act to get the right combination.
Here's how we decided what to use:
The stepper motor is a 1.8 degree motor. This means 200 steps per revolution.
We're using half-stepping, so 400 steps/rev. The tooth-pitch is 1.2mm, or maybe 1.25 if the belt is imperial rather than metric (we can't be sure at this stage, so we're going to make the system, try it out and if there's any slippage, replace the cog/pulley for one with more/fewer teeth).
If we say our pitch is 1.25mm, then a cog with 40 teeth would move 40*1.25 = 50mm per revolution. At 400 steps per revolution, this means each step moves 50/400 = 0.125mm per step. This seems quite quite a nice level of accuracy.
The photo above shows a 40-tooth cog with a pitch of 1.25mm. It's pretty small.
So we thought, if we used an 80-tooth cog, we'd double the speed of the movement (80*1.25 = 100mm per revolution, or 100/400 = 0.25mm per step). Although not as precise, moving a head to within a quarter of a millimetre seems precise enough for a pick-and-place machine, so we decided to make a cog with 80 teeth.
Why pink? Just using up scraps of left over acrylic from a previous job! It wasn't a conscious decision to use pink over any other colour!
We added the disks above and below the cog to stop the belt slipping off the pulley during use. In fact, we found that our belt was every so slightly wider than 3mm (the thickness of the acrylic) so we created little spacer disks from cardboard, and used these between the disks and the cogs, to space them apart slightly.
With all the centre holes lined up, we stuck the multiple layers together and fitted to the stepper motor shaft (although the datasheet said the shaft was 6.25mm, we had to cut our holes 6.35mm to get them to fit and even then, it took some effort to get them onto the shaft!)
We made our cogs using InkScape.
It has a built-in gear maker. On a new document, go to the Extensions menu, Render, Gears:
I found this diagram when looking for definitions such as circular pitch and pressure angle (I didn't know what they meant either!)
With the parameters in InkScape set, it was just a case of letting it create our gear by hitting apply:
With the gear created, we just needed to add the hole for the shaft. After much trial and error, we discovered that the ideal sized hole for the shaft was 6.35mm. We drew a circle with no fill colour and set the height and width to 6.35, then placed it inside the cog:
With both items selected, go to Object, Align and Distribute. Set "relative to" the biggest object. Then centre along both the x and y axis:
The end result is a cog with a perfectly centred hole for the shaft:
Tuesday, 6 September 2011
CNC pick-and-place machine needed!
After spending hours and hours last night assembling and soldering just a couple of PCBs, the need for some sort of automation is growing - especially if we're going to realise the dream of actually making and selling a few miniature instruments.
So we're back to investigating a miniature CNC-type pick-and-place machine.
We've already got some stepper motors working and pulled apart a few printers and scanners, and have had no luck in finding exactly the types of steppers, belts and pulleys we were hoping to use.
Which has lead us down a slightly different path - instead of determining which types of stepper motors and belt-drive system we're going to use up-front, we're going to build a system which anyone else can build too - but using parts that can easily be scavenged from old computer hardware.
We dismantled an old Lexmark Z73 and found some useful looking stuff - stepper motors, carriage rods, belts and so on. None of these match our original cnc requirements (1.8deg steppers, 20-tooth pulley, 5mm pitch belts) but we've decided to change our approach, and build a machine using the parts we can get hold of. We'll write some software to drive our custom-made stepper board, so that you can simply enter a few parameters and let the computer do all the tricky calculations.
This sounds like we're heading towards Mach3/traditional CNC type ground - the original plan was to just build something that would work "out-of-the-box" without lots of difficult setting up and parameter fiddling. But then again, buying all new hardware is going to get quite costly for us, or anyone else wanting to make a similar machine, whereas re-using and recycling old computer hardware is a much more eco-friendly way to go about making stuff in general.
Here's our starting point - a stepper motor and a timing belt.
To find out the pitch of the belt, we need to measure from the centre of one tooth to the centre of another. This belt has tiny teeth, so we marked out 20 teeth using some masking tape and measured across the tops of the teeth with a steel rule (marked in 0.5mm spacing). Despite the photo's appearance, we made it 24mm across 20 teeth, making the belt pitch 1.2mm
This may or may not be correct. The belt may even use imperial measurement (e.g. 1.2mm = 0.0472 inches - it may be a 0.05" pitch belt and we've just not measured it properly!) All this can hopefully be corrected in software once we've actually got the machine built, entered a few parameters and calibrated everything fully!
So we're back to investigating a miniature CNC-type pick-and-place machine.
We've already got some stepper motors working and pulled apart a few printers and scanners, and have had no luck in finding exactly the types of steppers, belts and pulleys we were hoping to use.
Which has lead us down a slightly different path - instead of determining which types of stepper motors and belt-drive system we're going to use up-front, we're going to build a system which anyone else can build too - but using parts that can easily be scavenged from old computer hardware.
We dismantled an old Lexmark Z73 and found some useful looking stuff - stepper motors, carriage rods, belts and so on. None of these match our original cnc requirements (1.8deg steppers, 20-tooth pulley, 5mm pitch belts) but we've decided to change our approach, and build a machine using the parts we can get hold of. We'll write some software to drive our custom-made stepper board, so that you can simply enter a few parameters and let the computer do all the tricky calculations.
This sounds like we're heading towards Mach3/traditional CNC type ground - the original plan was to just build something that would work "out-of-the-box" without lots of difficult setting up and parameter fiddling. But then again, buying all new hardware is going to get quite costly for us, or anyone else wanting to make a similar machine, whereas re-using and recycling old computer hardware is a much more eco-friendly way to go about making stuff in general.
Here's our starting point - a stepper motor and a timing belt.
The stepper motor is a Mitsumi M42SP-6NK.
A quick look on Google returns the datasheet, telling us that it's a 7.5 degree motor, runs at 12V and has a peak current of 400mA. We marked one of the teeth on the cog, then counted them clockwise, and discovered that this motor is fitted with a 15-tooth pulley
The timing belt didn't reveal much - the serial number OPM 300766 returned nothing of interest, so we had to do a bit of investigating....
To find out the pitch of the belt, we need to measure from the centre of one tooth to the centre of another. This belt has tiny teeth, so we marked out 20 teeth using some masking tape and measured across the tops of the teeth with a steel rule (marked in 0.5mm spacing). Despite the photo's appearance, we made it 24mm across 20 teeth, making the belt pitch 1.2mm
This may or may not be correct. The belt may even use imperial measurement (e.g. 1.2mm = 0.0472 inches - it may be a 0.05" pitch belt and we've just not measured it properly!) All this can hopefully be corrected in software once we've actually got the machine built, entered a few parameters and calibrated everything fully!
Miniature Explorer and Flying V
Following the Brighton Mini MakerFaire, and taking a few days off to help out at BuildBrighton (setting up stalls, packing away again, moving to the new hackspace and so on) it's time to concentrate on actually getting these miniature instruments finished!
Aaron from Oomlout came all the way down from Halifax to Brighton, especially for the MakerFaire but had already expressed an interest in the miniature guitars, so we demonstrated our early prototype. He wanted to buy one there and then! So we've set about making a few different guitars.
Here's a Flying V being put together in green. We've only got 1.5mm in white, so all the scratchplates and accessories have to be white for now - so we're trying to pick colours that will show up the scratchplate well (we're sick of making stuff out of red, black would be a bit boring, blue a bit dark....)
Below is an Explorer-shaped guitar (as played by U2's The Edge, and James Hetfield of Metallica - although they tend to stick to black rather than bright sunshine yellow!)
Then we had to make a whole load of pick-ups and embellishments.
In this case, we're cutting them from 3mm black acrylic - the square-shaped ones at the bottom are humbuckers and the middle bits get covered in chrome sticker to make them look authentic (although for a Les Paul type guitar, the pick-ups are usually gold coloured, rather than silver, but we've only got silver!)
A few different guitar accessories - single-coil pick-ups, humbuckers, and bridge supports
The guitars being assembled - the red stratocaster is our working prototype. The others are new designs, which have taken quite a bit of trial-and-error to get right!
Aaron from Oomlout came all the way down from Halifax to Brighton, especially for the MakerFaire but had already expressed an interest in the miniature guitars, so we demonstrated our early prototype. He wanted to buy one there and then! So we've set about making a few different guitars.
Here's a Flying V being put together in green. We've only got 1.5mm in white, so all the scratchplates and accessories have to be white for now - so we're trying to pick colours that will show up the scratchplate well (we're sick of making stuff out of red, black would be a bit boring, blue a bit dark....)
Sunday, 4 September 2011
Brighton Mini MakerFaire
This Saturday, 3rd September 2011, saw the first Mini MakerFaire come to Brighton.
And what a fantastic makerfaire it was - with over 5,000 people attending the one day event, running from 10am to 6pm. There are loads of photos all over the 'net, but videos are harder to come by - perhaps because it was such a hot and noisy event!
It was really nice to see so many HackSpaces attending - some of the more established ones like London and Nottingham, as well as the newer fledgling spaces like Manchester (Hac-Man, you gotta love it!)
There were some fantastic individual people displaying weird and wonderful gadgets too. There were loads of midi- and arduino- based music making machines...
...a guy in a white coat so he must have been a bona-fida scientist...
...wasn't the only person creating weird and wonderful hats....
...a soldering workshop and drop-in hack room...
...a whole world of craft and techo-textile mash-ups...
... including beautiful flowers from recycled materials...
... and workshops where you could sit and make your own...
There were stunning mosiacs....
...chain-mail-like metallic textiles...
...knitted and felt-making classes...
... rampaging robots who squirted unsuspecting passers-by, and blew smoke rings at them from behind!
There were intricate gingerbread mini-masterpieces...
... geeks....
... and nerds of all ages!
There was loads more besides - but by this point I'd just forgotten all about the camera and was wandering around, staring in wide-eyed marvel at all the brilliant (and bizarre) things there.
One of the best things about the makerfaire is that it was a truly family event - mums and dads were amazed at the technology and work that had gone into a lot of the exhibits, while the kids laughed and squealed at anything that beeped, farted, or flashed. The overall feeling at the makerfaire was that the Maker Movement in the UK has finally got a bit of momentum behind it. And with so many kids taking an interest, it's not just a middle-aged big-boys-club of shed-dwellers: making stuff is really accessible to everyone now - it's an exciting time to be a geek or a nerd!
And what a fantastic makerfaire it was - with over 5,000 people attending the one day event, running from 10am to 6pm. There are loads of photos all over the 'net, but videos are harder to come by - perhaps because it was such a hot and noisy event!
It was really nice to see so many HackSpaces attending - some of the more established ones like London and Nottingham, as well as the newer fledgling spaces like Manchester (Hac-Man, you gotta love it!)
There were some fantastic individual people displaying weird and wonderful gadgets too. There were loads of midi- and arduino- based music making machines...
...magic mouldable rubber compounds for hacking even greater ideas....
...create-your-own-furniture design and prototyping services...
...amazing self-balancing skateboards...
...H2O-based music making (probably playing Hadel's Water Music - see what I did there?)....
...local celebrity Jane Bom Bane...
...wasn't the only person creating weird and wonderful hats....
Everyone had their own personal favourites. For me, the robotic drawing arm, part of the AI-Kon Project was just incredible to watch. Stylised drawing - with a biro no less!
There were 3D-printers...
...a whole world of craft and techo-textile mash-ups...
... and workshops where you could sit and make your own...
There were stunning mosiacs....
...knitted and felt-making classes...
... rampaging robots who squirted unsuspecting passers-by, and blew smoke rings at them from behind!
There were intricate gingerbread mini-masterpieces...
... a giant etch-a-sketch...
... and nerds of all ages!
There was loads more besides - but by this point I'd just forgotten all about the camera and was wandering around, staring in wide-eyed marvel at all the brilliant (and bizarre) things there.
One of the best things about the makerfaire is that it was a truly family event - mums and dads were amazed at the technology and work that had gone into a lot of the exhibits, while the kids laughed and squealed at anything that beeped, farted, or flashed. The overall feeling at the makerfaire was that the Maker Movement in the UK has finally got a bit of momentum behind it. And with so many kids taking an interest, it's not just a middle-aged big-boys-club of shed-dwellers: making stuff is really accessible to everyone now - it's an exciting time to be a geek or a nerd!