Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: Daanii on August 24, 2009, 10:21:20 PM
-
I want to use a microcontroller to output a 0 to 5k Ohm analog signal as a throttle signal for a motor controller. The motor controller is an ALLtrax AXE-4834 that drives a large golf cart-type motor. The motor controller also allows, alternatively, a 0 to 5 Volt signal for the throttle.
Not your typical robot application, I know, but I wonder if anyone can help me figure out a way to get an analog signal out of a microcontroller. Analog signals are easy to get in, but hard to get out. The digital to analog converters I can find seem to be expensive overkill, but maybe that's the only solution.
I saw somewhere a recommendation to use a resistor and capacitor to make a crude low-pass filter that can be hooked up to a microcontroller's pulse width modulator output and used as an analog output. But the recommender did not offer any details, and I could not figure out how to do that.
Any ideas? Thanks.
-
I have never heard of that sort of signal, So you are talking about a resistance signal in an analouge form being sent from the MCU.
I don't understand.
-
If it helps there are inexpensive digital potentiometers out there that can change the resistance between two points digitally.
-
So you are talking about a resistance signal in an analouge form being sent from the MCU.
Yes, that's right. A golf cart has a throttle mechanically linked to a 0 to 5k Ohm potentiometer. The potentiometer is connected to a motor controller and provides the throttle signal. I want to put a microcontroller between the throttle and the motor controller. Then I can digitally process the throttle signal.
If it helps there are inexpensive digital potentiometers out there that can change the resistance between two points digitally.
That's a good idea. I think that might work. Thanks.
-
the potentiometers sound like the way to go
-
Just a question, could it be that the potentiometer is set up in a voltage divider circuit, thus providing a variable voltage to the motor controller? I think this is the situation because analogue signals are based on voltages. You are not able to "send" a resistance signal because resistance is a physical property of an object, although you may be able to change the resistance using one of those digital potentiometers mentioned earlier.
Outputting an analogue voltage using a uC indeed requires a digital-to-analogue converter. I don't know where you've been looking, but this doesn't seem like expensive overkill to me:
http://www.sparkfun.com/commerce/product_info.php?products_id=8736 (http://www.sparkfun.com/commerce/product_info.php?products_id=8736)
I've also gotten DAC chips from TI as samples, so you could try that.
-
I don't know where you've been looking . . .
I've clearly been looking in all the wrong places. Thanks for the link to the reasonably-priced digital to analog converter. That looks like a good solution. I have looked into the digital potentiometers, and they will work too. Two very good ideas to solve a problem that had me stumped.
Just a question, could it be that the potentiometer is set up in a voltage divider circuit, thus providing a variable voltage to the motor controller? I think this is the situation because analogue signals are based on voltages. You are not able to "send" a resistance signal because resistance is a physical property of an object, although you may be able to change the resistance using one of those digital potentiometers mentioned earlier.
I don't know how the motor controller works inside, but I suspect you are right. That is, I suspect the resistance is used to generate a variable voltage inside the motor controller. In fact, with the motor controller I am using you can modify the controller to accept a voltage signal of 0 to 5 Volts instead of varying the resistance.