Step 9: Arduino Software

The Arduino sketch is attached.

Comments: I used the stepper motor library for the stepper motors. I 'borrowed' this interface from another Instructable or off the Internet but can't remember where. There is an abundance of information on driving stepper motors, though.

The accelerometer zero values for North-South(Y) and East-West(X) have to be determined for each fixture. My plan was to store the ‘zero’ values in EEPROM so the fixture could automatically calibrate itself and store the zero values in EEPROM. But I couldn’t get this to work. So I settled for a version that could autocalibrate and find the zero values but it wouldn’t save them if power was lost or reset. The next step explains how to calibrate the zero values.

<p>I love the &quot;over complicated-ness&quot; of this build. Using an Arduino just because you can!.</p><p>A simpler solution to avoid the Autocalibration process from 'over correcting' itself would have been to use a simple gimble with a rod protruding straight and a heavy weight on the end. This would 'Auto-level' automatically due to gravity.</p><p>Love this! </p>
<p>Nice project!</p><p>Hint: you can find the MMA7361 and other sensors for cheap on this website:</p><p></p><p><a href="http://voltatek.com/en/sensors/82-mma7361-angle-sensor-accelerometer-inclination-module.html" rel="nofollow">http://voltatek.com/en/sensors/82-mma7361-angle-se...</a></p><p>They ship from Canada.</p>
<p>Thanks,</p><p>Here's a cheaper one:</p><p><a href="http://www.ebay.com/itm/Arduino-MMA7361-Angle-Sensor-Inclination-3-axis-Accelerometer-Module-/130982828723?pt=LH_DefaultDomain_0&hash=item1e7f2f5ab3" rel="nofollow">http://www.ebay.com/itm/Arduino-MMA7361-Angle-Sens...</a></p><p>But prices are pretty volatile.</p><p>LOG</p>
dude your a genius
Great project, thank you, but how does this apparatus help you aline stuff on your drill press?<br><br>Seems like it needs to be turned 90˚ to aline with a drill press table.<br><br>It looks like you are projecting against a wall.<br><br>Ralph
Yes, for the picture, I am projecting it against a door. It shows up better.<br>Since I built the automated version, I haven't actually used it with my drill press. I did use the manual version to line up some PVC I was drilling.<br><br>LOG
Cool. Lots of technology and and know-how all coming together in a rather complex project. You gave me a good idea on how to make good mechanical use out of stepper motors (rotary motion into linear motion via the screw and nut).<br><br>Hope you can tweak this project to make it reliable and work for you . . . <br><br>Thanks for sharing.
Thanks,<br><br>Actually, I got the concept from a lot of the DIY CNC Instructables. Most of them use steppers with a threaded shaft.<br><br>LOG

About This Instructable




Bio: Lazy Old Geek
More by msuzuki777:Senior Moments Weather Station 5 IP Time Clock Part 2 
Add instructable to: