My school recently purchased some Arduinos as well as some little 1.5-3V motors from Radioshack. I and another student have been charged with the task of figuring out what is needed to get the motors to work with the Arduino for a potential competition.
We have already looked at the L293 and L293D micro-controllers; however, we are worried about the fact that they output at their lowest 5V and our motors are rated up to 3V. I am inexperienced in the world of electronics, at least when it comes to voltages, so I don't know if this is a problem or not.
The only thing that I can say with the motors is that there really isn't an option to get new motors, so we really need to work with what we have. If anyone knows of some controller boards that would work with the motors we have, I would be most appreciative.
Not a problem. First of all, the L293 drivers drop voltage internally so even if powered with 5V, the motors will only see about 3V.
Second, you can control the effective current (which is what really matters) by using PWM. Have a look at any of the numerous tutorials on-line for doing this (basically, use analogWrite() to generate a PWM waveform on the ENABLE line). A waveform with 50% duty cycle at 5V is equivalent to 100% duty cycle at 2.5V so you can easily limit your current this way.
--
The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, light sensor, potentiometers, pushbuttons
I wouldn't even worry about "over volting" the motors, actually; I remember as a kid taking small 3-6 volt motors and hooking them up to 9-12 volt batteries. The worst thing that ever happened was the bearings (oilite bushings, really) would dry up and you'd get a loud squeal. 3V motors at 4.5-5.0V won't even notice the difference, honestly (especially for the length of time you would be using them for; maybe if you ran them for hours on end, there might be an issue).
This isn't to say you should "ignore specs" - its more of case of knowing when to ignore them and why; cheapo motors are a dime a dozen, and really should be pulled from old toys, not purchased (unless matching new motors are important to the application).
According to the manufacturer's datasheet, the L293 is not designed to drop any more than one transistor's worth (0.6V) through the motor driver circuit.
The SGS-Thomson datasheet says typical 1.4V drop on the high side, and 1.2V on the low side, with a max of 1.8V for each.
So a 5V motor supply input would produce about 2.4V or so across the motor.
Two important mistakes for newbies to avoid: low-voltage motors very often draw more current than the L293 can safely supply. And they usually draw more current than the onboard regulator on the Arduino can comfortably supply. The results are burnt-out L293s and/or unreliable operation because the motors drag down the 5V supply when they're running.
It's always better to run the motor(s) off a separate power supply if you can. Next best is to run them off the unregulated input to the Arduino (but make sure it has the needed current capacity).
I should like to second cr0sh. Voltage is really not such an important issue with DC motors or relays (-50% to +200% of the nominal value should be fine...)
Let's be sure they understand that SOME components are tolerant of overvoltage, etc. but others will turn to trash just by touching them wrong.
I fully agree, and I feel a little bit guilty of not always speaking strictly upto the book. I have two excuses:
When troubleshooting, the fear of not having stuck strictly to some datasheet limitations is often barking up the wrong tree. The problem generally turns out to be much more elementary...
Especially "nominal values" often turn out to be marketing data. 6 volt motors are meant to be powered by 4 AA cells - among others. 5 volt motors are sold to appease the owners of 5 volt equipment.
After reading them all, we've decided to go ahead and try to use discrete transistors to create some sort of control circuit. With this decision comes the need for the knowledge of how to do this.
We have started looking at Grumpy_Mike's tutorials; however, if any one has any help to offer, then please, we're all ears.
Thank you again to those who have all ready posted and we can't wait (however, we will) to hear from you again!