Pages: [1]   Go Down
Author Topic: Arduino controlling 2.4GHz R/C Helicopter  (Read 1359 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey guys, I am a software developer by trade and I'm trying to earn my hardware hacking merit badge smiley-wink

Please talk to me like I'm totally ignorant. smiley The last electronics project I did was building a TV transmitter from a kit with my dad (and I helped!), and that was years ago.

I am attempting to connect an Arduino to a 2.4GHz R/C controller for a sick co-axial helicopter I have. It is important to note that this helicopter features a 4 channel controller (Throttle, Yaw, Pitch, Roll). I cracked this baby open and (no big surprise) found 4 potentiometers. I grabbed my volt meter and played around with each. From testing the middle (wiper?) pin I was able to determine that the voltage to these pots ranges from 0 to 4v. Using analogRead with the Arduino I am able to detect the position of the joysticks and their potentiometers pretty reliably.

However, I would now like to supply power from the Arduino to each pot and bypass the sticks to allow controlling the Heli from the Arduino. I tapped in to the middle pin on the throttle and things work semi-ok using analogWrite; However the rotors have a kind of pulsing effect I am curious if this is due to the PWM. I have also run in to another issue where the right joystick has springs on it that keep it centered. This means that the pot sits at about 2v, if I send 4v from the Arduino, wouldn't that total 6v and cause problems? I am thinking I might need to short-circuit the pot's positive pin to the pot's ground pin, but that feels dirty. Ideally any modifications I make to the transmitter would not prevent it from working in the future. So far all I have done is tapped in to the wiper pins on the pot and run wires outside the transmitter.

My Questions (TL;DR)
  • Is the effect of the PWM noticeable when using analogWrite as a potentiometer?
  • Is there an easy way to short circuit a pot and reset it's voltage to 0?
« Last Edit: June 04, 2012, 07:20:18 pm by greensamuelm » Logged

UK
Offline Offline
Shannon Member
****
Karma: 223
Posts: 12630
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

AnalogWrite does not output an analog voltage - it outputs a voltage which switches between 0V and 5V. This is not suitable as input to a circuit which is expecting to read a potentiometer value.

You could use a hardware smoothing circuit to convert the Arduino's output pulses to a true analog voltage, or use a digital-to-analog converter to do the job properly.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

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

Thanks for your response. As I said, I'm still pretty new to most of this.

Does this describe what you are suggesting? http://provideyourown.com/2011/analogwrite-convert-pwm-to-voltage/
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 496
Posts: 19047
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes that page looks pretty good.

Quote
wouldn't that total 6v and cause problems?

Where would the extra 2V come from?
Logged


Topsham, Vermont USA
Offline Offline
Edison Member
*
Karma: 33
Posts: 1926
... in The Woods In Vermont
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, Here's another How-To on Analog Output:
http://arduino-info.wikispaces.com/Analog-Output
Logged

Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

Pages: [1]   Go Up
Jump to: