I just had an idea (not again... ) to make simple robot. It should have only two wheels (right & left) and low-profile chassis (~1 mm above floor) and should fit inside Insalatissime Rio Mare can (turned upside down). Because I plan only two wheels, it should simply drag the can on the floor.
For the beginning I would like it to go straight = to have both wheels turn at the same speed. When this is accomplished, I would push limits.
What I have:
can
arduino (duemilanove for now, probably something smaller in final build)
motors (cca 5mm diameter, 15mm length high rev; bigger version of vibrator motor from cell phone)
What I think about:
driving ~3cm diameter rubber wheels not directly from motor, but by attaching motor axis to the wheel from outside (something like this except that I won't use toothed wheels)
counting revolutions by using scavenged parts from old computer mouse (using this and attached to wheel in the same way as motor axis)
arduino should count revolutions of each wheel and set PWM signals accordingly to turn motors at the same speed
My biggest concerns:
I'm not handy, I'm rather theoretical person (obviously, you can't help me with that )
Is arduino capable of counting revolutions of two wheels at once at high speeds? I suppose that motors turn 10k rpm and optical sensor would run at ~1k RPM, which means 200 per second, which means around (I really don't know) 20000 pulses from optical sensor per second
I plan to add (in the faaaar future) IR or ultrasonic distance sensor to prevent bumping into obstacles and magnetic compass to turn precise turns and help keeping straight line. Is Arduino capable of counting revolutions (as described above) and managing these sensors at the same time?
Should I be afraid of these potential problems? Better to know before starting making something (have I already said that I'm not handy?).
I would like to make it the way I described it. I wouldn't like some big changes in the concept/idea, I just wish to create it myself (teoretically and technically).
Thank you for your time and for any possible answers.
PS: Tips for the right thread name are also appreciated.
1 Question one: there are some wheels encoders based on IR which Arduino can handle (just like your picture). Max speed? I dont know, but I handle the encoder with external interruptions, and I've managed 100 pulses per second without trouble.
Arduino can handle the encoder and the proximity sensor easily. But I dont know anything about magnet compass.
Setting both wheels at the same speed with pwm: Arduino can handle this too including all the stuff before, BUT you should calibrate manually the pwm to get both speed he same. Or you can implement a PID on arduino which manipulates pwm and controls speed. This calibration can be done for each wheel separately before mounting the final code, I dont know if arduino is capable of auto regulating speed and handle the previous stuff.
Is arduino capable of counting revolutions of two wheels at once at high speeds? I suppose that motors turn 10k rpm and optical sensor would run at ~1k RPM, which means 200 per second, which means around (I really don't know) 20000 pulses from optical sensor per second
(...)
20k pulse per second for a board that have a clock speed of 16kHz it seams to me too much. Check the specifications of the Arduino Duemilanove in the link below: http://arduino.cc/en/Main/arduinoBoardDuemilanove
luisilva: Sorry, I have to correct myself - it would be 2000 pulses per second (my bad, it seems I can't even calculate well ).
mart256:
There are various parts on the market, but not here (Czech Republic). I would have to order them from somewhere, preferably low-priced and with free international shipping. The reason for that is simple - I would make a toy. It won't do anything useful except teaching me something along the way, so my goal is to make it with the lowest possible money input (preferably by scavenging parts from old electronics).
Thanks for info. If I have to, I can place the encoder right on the wheel axis and thus reduce revolutions (and precision of this counter, but that's still ok).
I will experimetn with this. If Arduino can't do it on-the-fly, I will measure and set speeds by hand (hardcode them).
So generally you think it is possible (= not really bad idea) to make it this way?
With only 3cm wheels, you only about 12 counts per revolution. That's about 8mm travel per count. How fast do you want to run the robot? Performance will be reduced at faster speeds.
steinie44: I will read revolutions with optical sensors from standard ball PC mouse. There are those discs with (I really dont know) ~100 holes and that is precise enough. See my first post, there is link to image of this disc.
Speed is not concern. The robot could run at 50cm per seond or 1cm per second. I will adjust the maximum speed after some initial tests. It shouldn't be racer The goal would be to run straight and the final speed would be altered to get to that goal.