Sunday, January 31, 2010
"Ola" with two arms..
This effort resulted in this simple board; one LED, two photo-transistors.
Today, I went further, since the test board could detect a white/black edge printed on my inkjet. I made a 6 photo-transistor device using ordinary stripboard; still one LED, as these things produce a LOT of light. The reason for so many photo-transistors : the tranistors create pairs of voltages that a comparator will use to decide which one is looking at blackness, and which looking at white. Using two in this way reduces the effects of ambient lighting, ink reflectivity variations. Two pairs will provide Quadruture encoding, and the third pair will decode digitally printed absolute position markers.
Here's a more wide-angle shot to give an idea on the size of these components. The 6 transistor board is a bit longer than I wanted, but I still think it will work, and doing it this way allows a larger margin of error when I print the encoder wheels.
On the mechanics front, I finally got the 1.2 motherboard to drive the stepper motors. I found programming it much less intuitive compared to the Mega; you have to manually reset the board and get the timing just right in order to upload new firmware; it does appear there is an 'auto-reset' jumper, but the pre-assembled electronics does not include the jumper pins. I may eventually add a switch here to ease programming. Oh, and it took me an hour to figure out why the firmware did not download to the board. After I got a successful firmware download, I went searching for pin numbers so I could create a simple motor test, and eventually (after 3 hours) cobbled something together that worked. When I looked at the firmware source, I originally missed the #if guards, and mistakenly copied in the pin numbers for the 1.0 motherboard; needless to say, this worked for the X-Axis, but Y gave me a silent treatment, whereas and Z screamed painfully in a high pitch voice. There went another 2 hours testing cables and boards and trying this and than thinking I did something wrong when setting the signals in firmware.
I've uploaded a video of both axis turning; one continuously in one direction, and the radial arm reversing back and forth. Note that I turned the speed way down on this test; I had done this as part of diagnosing the problems I experienced when using the wrong pin numbers; I left it slower under the false impression that they would skip less -- unfortunately, they still skip a little at this slower speed when reversing. I intend on getting cubic splines up as quickly as possible, since these will integrate accelleration directly into the stepper logic.
It will be the most adictive thing to watch when you add an extruder to it and start printing.
Links to this post: