Showing posts with label belt and pulley. Show all posts
Showing posts with label belt and pulley. Show all posts

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!



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.


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!




Monday, 22 August 2011

What now? More CNC goodness!

The whole miniature instruments project grinds to a halt, while we wait for the postie to bring us a whole load of goodies to finish them off.
The drums need piezos for the underside of the drumheads (to send a strike signal back to the microcontroller when each drum is hit), the guitars are awaiting double-sided PCBs for the guitar neck, and the synth needs a miniature rotary pot and some LEDs.

So while we're waiting for all these bits and bobs to arrive from a variety of sources (mainly Farnell and eBay) we're starting to think about production. While it's easy enough to get things made cheaply overseas, we're a bit nervous about committing thousands of pounds to get hundreds of miniature instruments made. That's money that would be better spent on tools and equipment for other projects! Also, by committing to having loads of the same thing made, the options for customising them is greatly reduced. By manufacturing the little instruments ourselves, we can offer a full customisation service - and keep initial costs down (even if it means the cost to manufacture each one increases).

What we'd love to have/make is a pick-n-place machine for putting all those fiddly little SMT components in place on the PCB. If the same machine could also drop blobs of solder paste in the right place too, all the better.

We've already had a play with CNC machinery and on the face of it, creating and controlling a CNC machine shouldn't be too great a problem. Unlike a CNC router, we don't have to move large, heavy, cutting heads, or worry too much about external/twisting stresses on the machine joints.

Thanks to the guys at Oomlout, we've got pretty much all we need as far as servos and control gear goes. Stepper motors can be salvaged from old printers and scanners (we will be re-subscribing to the Freecycle mailing list to see what comes up!). We're considering a belt-drive rather than a threaded-rod for driving each axis. Lead-screws are great for low-speed, high-precision work, where high torque and large stresses and strains are used. Belt-driven control means faster rates of movement.

Although this is still in the early stages, here's what we've come up with:
Firstly, we're going to use stepper motors for controlling each axis. This is a no-brainer! BUT - CNC software (Mach3, MasterCAM, RouteOut etc) is notoriously difficult to get started with. So while using a Mach3-compatible control board (there are loads on eBay) means we can have something up and running very quickly, the finished product is then dependent on Mach3 (or similar software) which needs lots of parameters setting to configure correctly. Great if you're into that sort of thing, buy we'd just like to make a device you can plug in and drive!
The other issue with most CNC homebrew software is that it requires a "real" parallel port. Something our little laptops don't have! And we'd like everyone at nerd club to be able to use the machine, without having to have a dedicated CNC controller PC.

All this means that we're looking at creating our own (PIC-based, USB driven) stepper motor control board, as well as our own custom controller software. Because we don't want to draw fancy shapes, circles and arcs - we just want to control an x and y axis - we're pretty confident that our own custom drivers should be feasible. For this project, ease of use (and ease of understanding) is key to everything!

We're already familiar with the ULN2003A darlington array chips, so we'll use those to actually drive each stepper motor.


Now a belt-driven approach is a pretty new concept at Nerd Towers, so we're deliberately choosing values and ratios that make things easy to understand. They may not be the most efficient, or "best" choice for a particular purpose, but because we're building the driver board and driving software ourselves, it needs to be easy to understand (and easy to debug when things go wrong - as they invariably will!)

We're using 1.8 degree stepper motors.
This means it takes 200 steps to perform a single rotation (360 / 1.8 = 200).
We're also going to be using 5mm pitch belt (because it's easy to get hold of)



So if we have 5mm pitch belt, and use a gear/cog with 20 teeth, this means that in one rotation (200 steps) we can move our belt (5x20) 100mm. Which gives our CNC type machine 200 steps to move 100mm - or 1 step moves (100/200) = 0.5mm.
This is pretty good precision. If we drive the motors in "half-step" mode, we can get this precision down to 0.25mm

Many belt-driven CNC machines (laser cutters for example) can acheive precision of 0.1mm, using micro-stepping. While that level of precison would be a nice aim, our core driving principle is "easy-to-understand" so we'll accept slightly less precision for a much simpler machine! After all, a quarter of a millimetre is pretty precise when it comes to dropping SMT components onto a PCB.