Society of Robots - Robot Forum
Software => Software => Topic started by: Roboteccan on November 12, 2010, 01:03:25 PM
-
hi I need regulate 5,2.5 and 0 voltages in axon microcontroller, because I have a motor DC controller that you put 5v and the motor DC turn to left, when you put 2.5v the motor DC is stop, when you put 0v(off)turn right, then I need regulate signals in the pins from axon microcontroller for I controller those motor.
-
What you really mean is how to output an analog voltage. The easiest method is to use PWM: a 100% duty cycle is 5v, a 50% duty cycle is 2.5v, a 0% duty cycle is 0v. It's proportional, so take a look at the documentation. Are you using webbotlib or the original avrlib?
-
Can you link us to the DC motor controller you are using?
That just sounds very odd of a way to control a motor . . .
-
this is the link http://www.dimensionengineering.com/datasheets/Sabertooth2x10.pdf (http://www.dimensionengineering.com/datasheets/Sabertooth2x10.pdf)
watch the Mode 1: Analog Input
-
In that case, the proper way would be to use either the RC or serial mode. You don't want to use the analog method.