You don't say what kind of DC motor. If it's a 'regular'
two wire kind of thing, then a Pulse Width Modulation (PWM)
driver is probably what you want. That will allow you to
vary the speed, as a varying pulse width integrates to a
varying DC voltage which affects the speed of the motor
in some wonderful non-linear way. But if you want good speed
control, then you will need encoder feedback and all sorts
of other fancy stuff.
If you only want to go one direction then a simple transistor
can be used to amplify the current from a mote binary out pin.
Googling "common-emitter" or "open collector" "transistor"
should prove enlightening...If you need to reverse the motor's
direction you need an "H-bridge" circuit, which you can get on
chips or build yourself.
The actual design for the output driver depends on the
motor power and voltage...
There is a class of DC motors called "Hobby Servos" that have
the drivers built-in and run directly off the mote's output
pins (with separate battery/power wires). They conveniently
change both speed and direction with the pulse width, but
they require some mechanical fiddling to work for running
car wheels, and they are fairly low power (for vehicles
weighing a couple pounds at most), and you loose any advantages
that the word "servo" may conjure vis speed control and feedback
when you fiddle them for wheeled use.
Finally there are DC stepper motors which are driven by a
sequence of pulses on multiple wires. I haven't seen any
code for running steppers from motes, but there is a lot
out there for PIC chips and there are chips for running
them from a simple pulse-train. You get good control over
speed and direction, and position for that matter, but
they are more complicated to operate.
If we're talking small robot cars then this site sells
a bunch of useful stuff and is a good info source:
http://www.junun.org/MarkIII/Store.jsp
Also my (as I keep harping on...) code has a PWM module
for running hobby servos (strangely, the ones sold above),
which could easily be used for the open-loop driver as well:
http://www.etantdonnes.com/Motes/robocode.tar.gz
If you have some specifics about the motors I may be
able to dump more information on you...
MS
Rohan Mudholkar wrote:
Hi everyone,
I am currently doing a project on motes which involves
the controlling of a DC motor electric car through a
mote. I want the car to stop, move forward and
backward at my command, I needed help with the
programming part and also the hardware needed for this
purpose.
sincerely,
Rohan Mudholkar
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help