![]() |
|||
Measuring RPM via Photo reflector
Computer
Interface
|
Don't expect miracles from this simple hardware: it can crawl for an hour or so at its top speed of a few cm per second provided that the underground is smooth and level. The steppers deliver just enough power to move the vehicle, so it will not ride over any substantial obstacle. A toothpick in its path can be enough to block it. The three stepbots shown below use essentially the same hardware. The first (left) one was build on a piece of wood using a solderless breadboard for easy modification. A battery pack can be put on its back. The middle one has its electronics (on a small PCB), the two steppers and a battery pack in a small gray case. Both use 12V steppers from 5.25 inch drives. The right one uses smaller 5V steppers from a small printer. It is not succesfull because the steppers do not deliver enough pull and I could not find a suitable rear wheel. The essence of a simple Jal program to move the robot is shown below. The delay can be varied to find the minimal step interval which can start the robot. The library procedure stepper_motor_full_forward produces the sequence 0001, 0010, 0100, 1000. Similar procedures are available for half stepping and for stepping backward. The initial values can be changed to 0b_0011 to get a two coil sequence. -- a robot that just rides at a constant speed A more interesting but still very simple robot follows a line on a piece of paper. I use a black line on white paper. The line is approximately 5 mm wide. The robot is placed on the line before it is started. The main problem is to follow a line which bends abruptly. One sensor could be used, but this requires the robot to sweep left and right to keep locked onto the line. I used two (reflective) sensors. -- a robot that follows a line using two sensors |
||