Originally Posted by sonicj
i had a bit of a mechanical hurdle to deal with... i disassembled my donor joystick some time ago but with plans to use the insides from a rc tx. piecing it all back together proved to be a challenge! the sucky part is that it already had the option for analog outputs at the flip of a switch before i went in and started hacking up wires
anywho, i'll get some pics up as soon as it starts looking a little less like a squirrel's nest!
do you happen to have a simple schematic for your setup? i saw on your first design you had a cap on the 5v to the pots and a cap on the 12v to the tx... do you feed the buttons +5v? how should i go about calibrating the pots? right now, im only getting movement from the servos when the pots are in the middle half of their travel.
my serial lcd is currently displaying rates and voltage, but it looks whacked out at the moment. (sparkfun 16x2). i'll have to adapt your code to accommodate the SF LCD driver. did you consider moving the lcd to its own digital pin? i think that should take care of your problem with the updates confusing the lcd.
i think my slow stick is gonna be the guinea pig for the maiden. good stuff!
The input range of the analogue inputs is 0-5vdc, so your pots must sit at around +2.5vdc in their centre position, going to 0vdc one way and +5vdc the other way. So you have 3 wires to each pot.......+5vdc, signal, 0vdc.
The buttons are easy, the Arduino digital inputs have pull up resistors internally, so you basically hook the switch up to 0vdc. So you have 2 wires to each switch.......signal & 0vdc.
The caps on the +5vdc etc are just to help smooth out the supply. Pick any size you like.
Calibrating the pots isn't easy......but then again, you don't really have to as I found the stick doesn't have to be so precise, especially if like mine you remove the spring-to-centre.
If you do want to calibrate the pots then you'll have to modify the code to write the pot value to your LCD then tweak the code till you get centres correct. But like I said, I don't think you need to as long as your mechanical setup is good and you are getting near 2.5vdc at stick centres.
Be careful with LCD drivers, as some of them I found can interfere with the timing and what you end up is a glitching PPM. The serial LCD that I use doesn't suffer this at all. Timing is important for this project.