# Using Arduino as throttle to an Alltrax AXE 4834



## Daanii (Sep 3, 2009)

I have an Alltrax AXE 4834 (golf cart controller) that I want to throttle using an Arduino. 

I can use an Arduino analog output that puts out a small current between 0 and 5 volts. Then I can program the 4834 controller so that it takes a throttle input of between 0 and 5 volts. 

The problem is how to wire this up. Any ideas?


----------



## rwaudio (May 22, 2008)

There are some arduino sketches that use a Pot input to fade an LED via PWM, I'm sure you could tweak the sketch to match the range and Pot you would be using. (You might require a little something extra to smooth the pwm depending on what the input circuit of the Alltrax looks like)

Here's some info on Pots (this is assuming you will be using a pot to control the arduino which in turn controls the Alltrax)
http://www.arduino.cc/playground/Code/Potentiometer

And the PWM LED sketch
http://www.andrewfrueh.com/electronics/?pageContent=fade_LED_with_knob.html

PS. Make sure you try this in a safe manor, it's hard to say how it will behave.


----------



## adamj12b (May 4, 2009)

Its not Arduino, but I think it will help: http://www.avrfreaks.net/modules/FreaksFiles/files/424/DN_033.pdf

Its for AVR which the Arduino is based off of. You connect an extra ADC to the pwm. The pwm charged the cap and discharges through the resistor into to ADC. This will allow you to use the ADC reading as a closed loop feedback and you can modify you pwm to maintain voltage.

-Adam


----------



## Daanii (Sep 3, 2009)

Adam, that's a very interesting approach. I'll look into it some more. Thanks for the suggestion.


----------



## frodus (Apr 12, 2008)

The throttle on the Alltrax references Pack negative. The other end of the pot references an internal 14V supply. When its loaded, it goes between 3V and 0V. I got this information for Davide at Elithion directly from one of the engineers at Alltrax.
more here:
http://lithiumate.elithion.com/php/alltrax.php


So be careful, now you reference pack negative, so its not isolated.

What I'd do? Use a digital potentiometer and "send" it a resistance.

http://www.google.com/search?hl=en&tbs=shop%3A1&q=digital+potentiometer+5k&aq=f&aqi=&aql=&oq=&gs_rfai=

there are some that are SPI and some that are I2C.

Then you could potentially be isolated on the data side.


----------



## Daanii (Sep 3, 2009)

Thanks for that information. Very helpful. 

You said, "What I'd do? Use a digital potentiometer and "send" it a resistance."

That seems a good solution. But can I use a digital potentiometer that can only handle up to 5.5V?


----------



## Snakub (Sep 8, 2008)

Why do you want to use an arduino board with an Alltrax? Do you have a bad intelligence board? Get ready for an annoying whine to the motor standard arduino frequency is 500 or 1000 hertz depending on if you choose a fast or "slow" pwm pin. Anyone know any commands to change the pwm frequency preferably ones that don't involve manually changing the output compare register? Also I don't think the fade program will give very good performance I have used a program like this and I was unhappy with top speed but I did notice a LOT more performance with a bit bang code that I used it would turn the pin on then off(only problem was that when you first started out you were full ON) instead of using the pwm function of the micro I don't fully understand why I got better performance either but maybe it turned ON "harder" at the pwm peak or saw a full 5v from the micro every time I think an ideal code would be to have a soft start using an analogRead/Write code then after the pot goes past a certain value say 300( just guessing) you turn the pin on and off manually and having a command to select any frequency you like just by changing a number or two would be nice too.


----------

