Pages: [1]   Go Down
Author Topic: rc hack arduino as a variable resistor  (Read 2459 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 1
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everyone
I am working on a rc car transmitter hack where I can control a RC car with a controller with considerable range (later plans of fpv)
xbox 360 controller ---> xbox 360 reciever ---> usb hosting shield + arduino ---> 2 channel radio transmitter ---> rc car

the RC transmitter uses 2 variable resistors as joysticks. My plan is to remove the joysticks and have the arduino acting as the variable resistors.

how do i make the arduino act as variable resistors? can i  just use pwm or do i need a low-pass filter?
and how do i wire it to the arduino? as i believe a variable resistor is read be passing electricity from one side to the other and the middle lead reads the resistance, do i just need a common ground or
Logged

The Netherlands
Offline Offline
Edison Member
*
Karma: 50
Posts: 1706
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I can't tell you how to do the connections, i'd need to see the schematics of the transmitter you want to hack (and am not sure that tells me enough).
But PWM lets you send 255 values (8 bit).
Will that do ?
An Arduino reads resistors (well, analog vaues) in 1024 steps (10 bits), but can create only 8 bits analog values, and you do indeed need to use a filter to actually create analog values from that.
Logged

Have a look at "blink without delay".
Did you connect the grounds ?
Je kunt hier ook in het Nederlands terecht: http://arduino.cc/forum/index.php/board,77.0.html

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 631
Posts: 34488
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
can i  just use pwm
No.
Quote
can i  just use pwm with a low-pass filter?
No.

You need something like this:-
http://arduino.cc/en/Tutorial/SPIDigitalPot
Logged

Los Angeles
Offline Offline
Full Member
***
Karma: 1
Posts: 148
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Grumpy Mike is correct.
I did this hack not too long ago and found that even with filtering the arduino could not control the RC transmitter (arruming your tapping into the pot/joystick leads.
The unfiltered PWM is digital and the radio is able to detect the highs and lows and get confused.
The pwm filtered approach made it better but by the time it was filtered enough it also caused significant lag in response.

Using a real digital resistor is the way to go.  I was able to get very clean results.  I believe I found ones that could do SPI and I2C
the if you need lots of digital pots the I2C didn't have enough addresses so I couldn't use it.
Also some arduino bords have digital pots built in I believe so if you only need 1 or 2 you might be able to get it done without any additional work.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There are a number of different chips on the market, check here for examples..

http://www.ebay.co.uk/sch/i.html?_odkw=digital+potentiometer+!knob&_sop=15&_osacat=0&_from=R40&_trksid=p2045573.m570.l1313.TR0.TRC0.H0.Xdigital+potentiometer+-knob&_nkw=digital+potentiometer+-knob&_sacat=0

Without seeing the transmitter in question, it is difficult to suggest which one to try, or exactly how to wire it, but if you can't figure it out, then send some close-up pictures of the transmitter PCB or a schematic diagram if available and someone can advise.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 10
Probier's mal mit Gemütlichkeit...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
i have an unusual but simple approach for you. You could attach 2 normal RC servos to Arduino (using the servo library; don't forget to power the Servos externally and not with the 5V from Arduino!). Then use the servos to drive the joysticks on your transmitter. This was you don't even need to open the transmitter and - if you fit them removable - won't even lose garanty...The main advantage is that you don't need to hamper with the correct values of digitals potentiometers and how to fit in your concrete transmitter. Ok, it's not so elegant, but who cares...
Best regards   Mekanax
Logged

Pages: [1]   Go Up
Jump to: