Editing Two Axis Stepper Controller
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
= What = | = What = | ||
− | For some time I have wanted to aim a laser with good precision across a room. Long time ago I did this with servo motors, Worked fine excpt for the good precision. I thought that steppers might do better. The problem is that steppers move ( typically ) over a degree per step. Gearing the motor down decreases the speed, but improves the precision. And these motors, with built in gears are available, and they can be cheap ( '''[https://www.amazon.com/gp/product/B015RQ97W8 Amazon.com : Longruner 5x Geared Stepper Motor 28byj 48 Uln2003 5v Stepper Motor Uln2003 Driver Board for arduino LK67 : Camera & Photo ]''' ) | + | For some time I have wanted to aim a laser with good precision across a room. Long time ago I did this with servo motors, Worked fine excpt for the good precision. I thought that steppers might do better. The problem is that steppers move ( typically ) over a degree per step. Gearing the motor down decreases the speed, but improves the precision. And these motors, with built in gears are available, and they can be cheap ( '''[https://www.amazon.com/gp/product/B015RQ97W8 Amazon.com : Longruner 5x Geared Stepper Motor 28byj 48 Uln2003 5v Stepper Motor Uln2003 Driver Board for arduino LK67 : Camera & Photo ]''' ) With these in hand and a 3D printed mount ( *'''[https://www.thingiverse.com/thing:794786 Bare Bones 28BYJ-48 Gimbal. by mmontee - Thingiverse ]''' ) for them I went forward with the software. |
You can aim the laser in both altitude and azimuth. Once you get it to a place you want the program can memorize the location as a target and then go back there on demand. | You can aim the laser in both altitude and azimuth. Once you get it to a place you want the program can memorize the location as a target and then go back there on demand. | ||
Line 14: | Line 14: | ||
== Laser/Motor Mount == | == Laser/Motor Mount == | ||
− | + | These can be cheap ( Amazon.com : Longruner 5x Geared Stepper Motor 28byj 48 Uln2003 5v Stepper Motor Uln2003 Driver Board for arduino LK67 : Camera & Photo ) With these in hand and a 3D printed mount ( *Bare Bones 28BYJ-48 Gimbal. by mmontee - Thingiverse ) for them I went forward with the software. | |
− | |||
− | |||
== Arduino and Driver == | == Arduino and Driver == | ||
− | + | These can be cheap ( Amazon.com : Longruner 5x Geared Stepper Motor 28byj 48 Uln2003 5v Stepper Motor Uln2003 Driver Board for arduino LK67 : Camera & Photo ) With these in hand and a 3D printed mount ( *Bare Bones 28BYJ-48 Gimbal. by mmontee - Thingiverse ) for them I went forward with the software. | |
− | |||
− | |||
== Arduino Software == | == Arduino Software == | ||
Line 48: | Line 44: | ||
</pre> | </pre> | ||
− | Here is a bit more detail on the commands. | + | Here is a bit more detail on the commands. |
− | |||
− | |||
After a command is sent the software usually replies with some confirming message. The whole command may take awhile if the position is changed by a lot. In any case the arduino should finally respond with "ok". Each motor has its own position, speed and acceleration settings. You can choose which motor to manipulate with the m1 and m2 commands. Other commands like t ( target ) act on both motors. | After a command is sent the software usually replies with some confirming message. The whole command may take awhile if the position is changed by a lot. In any case the arduino should finally respond with "ok". Each motor has its own position, speed and acceleration settings. You can choose which motor to manipulate with the m1 and m2 commands. Other commands like t ( target ) act on both motors. | ||
Line 69: | Line 63: | ||
=== Status Report Example === | === Status Report Example === | ||
− | + | ||
Note that the position of each target is given, it is also give in the form of a c++ array that can be plugged back into the code to make the target setting "permanent". | Note that the position of each target is given, it is also give in the form of a c++ array that can be plugged back into the code to make the target setting "permanent". | ||
Line 99: | Line 93: | ||
</pre> | </pre> | ||
+ | |||
+ | |||
=== Code Explanation === | === Code Explanation === | ||
− | The code is quite straight forward, | + | The code is quite straight forward. Email me if you have questions, or post to the github location. |
− | + | ||
− | |||
− | |||
[[Category:Arduino/RaspberryPi]] [[Category:Arduino]] | [[Category:Arduino/RaspberryPi]] [[Category:Arduino]] |