The general setup is a pair of nema-17 motors, being run by dSpin motor drivers. Nice chips, you can set them up with your parameters in terms of what acceleration and max speed you want as well as the micro-step mode and after that you just tell it to move forward X steps. It handles all the movement profile and it also has a full suite of protection systems built in. They communicate over SPI to an Arduino, which is then hooked up over USB/serial to a laptop running Processing. Yup its definitely convoluted but oddly functional. The laptop is used to convert and process an image, and send the required movements line by line to the Arduino which just relays it to the dSpin boards. I will be posting code a bit later once I make it slightly more friendly than the convoluted mess it is in now. You can see the set up to the left.
One important note, if you use a solenoid for the pen lifter you need a really good diode to drain the current when you depower it otherwise the back EMF does bad things. I blew up the pull up resistor on two output pins on my arduino before I figured out that my 1N4004 diode just wasn't working. In the interests of overkill I added an optical isolator and a schottky diode rated at 600v and 4amps with a 4ns response time. Over-specced, but only $1.20 delivered.
Here are some videos, first the movement test:
First drawing:
After that first test, and showing the project off at my first makers faire, I rewrote the code so it automatically converts the coordinates from polar to cartesian so it gets rid of the distortion. I still get a few rounding errors as you can tell by the slightly wavy baseline, it also now skips over white space and goes a whole heck of a lot faster.
As for the build. I will start with the easy part, carpentry. Because my pen holder design has limited travel I needed a fairly flat and true surface or else I would end up with gaps and extra lines in my drawing. I decided to go with a torsion box design build out of a bunch of scrap 1/4" baltic birch I had in my shop. Its slightly overkill.
I should note around this point that I wasn't really working from plans, or a design, my process for prototypes like this is more.. I don't know.. industrial jazz? Winging it while machining? Something like that. The goal was to get it working and then worry about making it pretty, which I will get to eventually.
You can see the rotation axis in the image on the right. General plan is that I have a large lazy susan bearing attached to the base. Also attached and stationary is a 52 tooth gear off a 1970's bike. The gear and chain are basically stationary while the motor runs around on the inside of the chain. I built my own jackshaft assembly that lets me hook up the 11 toothed sprocket off a rear derailer to a 60 tooth timing belt pulley, this is in turn hooked up to a belt and an 18 tooth pulley on the motor. Simple right? The reason for the arrangement was to gear down the motor and get a bit more resolution on the arm. Trade off is that I have about an inch of backlash. I need to build in an idler tensioner so I can tighten the chain without it binding and that should cut it down some. If that doesn't I will just measure the error and write it into the code.
The image to the left gives you an idea on the resolution I am getting, the scale is in centimeters. This is with me running the motors at 1/16 microstepping, the dSpin drivers let me go up to 1/128th so its possible to get really really fine resolution out of it.
Oh, and as for suppliers (I have no connection to any of these companies but I am posting links so it might help you chase down some of the more obscure parts).
Sparkfun for the dspin driver breakout boards
Solarbotics motors electronics etc - also carries the sparkfun dspin breakout boards, based in Calgary.
Misumi - Motion control components so all the pulleys, belts, linear slides, bearings etc.
Lee valley carries the big lazy susan bearings.
Digikey canda - the old standby, now has a Canadian warehouse. Their catalog and inventory is the most overwhelming thing I have ever seen but they carry everything. I got most of my electronic components, and a big 12v 6a power transformer from them.
Amazing!
ReplyDeleteMvorisek
I love this design. Excellent work. Is there anyway you can comment on the software and methods used to control the movements?
ReplyDeleteI am trying to figure out how to get the stepper motors programmed to work independently in Arduino via dSPIN commands. I know the post is old - but I hope many find it - this is (to me) a FASCINATING and well done project!!!
ReplyDeleteRuss from Coral Springs, Florida, USA
G-code support? It would be great to extend the applications for this bot.
ReplyDeleteHello everybody, I just want to give this great testimony to the whole public about a great man who helped me out of a serious illness. I have had HSV-1 AND HSV-2 VIRUS for good 2 years now and I was almost going to the end of my life due to the illness. All I have in my mind is, let me just give up because life is not interesting for me any longer and i also pray that God should accept my soul when ever I’m gone luckily for me, my kid sister run to me that she found a doctor in the INTERNET who can cure HSV-1 AND HSV-2 VIRUS. She helped me out with everything, the man asked for my details so he can prepare herbal medicine for me. After he was done consulting on my details he told me how my medicine will be prepare, after he was done preparing my medicine he sent me my medication and after using it for 7 days i later started noticing something different in my blood so I went for my HSV-1 AND HSV-2 VIRUS test and I was tested Negative, I’m so happy that I can say I’m not patient of HSV-1 AND HSV-2 anymore. If you have HSV-1 AND HSV-2 or any sickness,HIV/AID,HPV,CANCER,HEPATITIS B DIABETICS ALS,PENIS ENLARGEMENT please for your safety, contact DR.OLUTA VIA email address (dr.olutaspellcaster@gmail.com) or whats APP number +2349065326267
ReplyDelete