Turnigy 9x Modifications

In this little hack

**- 6 position switch to select Mode on Ardupilot

  • Sceen to display mode
  • Barometer altitude and temperature display
  • List of hardware** at bottom of page

6 position switch

Check out this great how too for adding the 6 position switch. I couldn’t explain it better

For resistor selection I found there was room for some optimisation.
I added a little excel sheet calc on git for optimum resistor selection for ardupilots expected ppm

Screen

OLED SCREEN

The OLED screen I used is i2c controlled which minimises wires. My previous hack used an old nokia screen which was not as wire efficient.

- look at all those yellow wires :confused:

ARDUINO

The Arduino which drives the sceen is a Pro Mini Clone. But any ardunio you can fit in the case will do.
Head over to Git for the arduino sketch. - probably the easiest to download the whole git and unzip into your arduino sketch folder. If you already have a ‘library’ folder make sure you merge them. Alternatively the adventurous can unpack it manually.

BAROMETER

The barometer used to measure the pressure relative altitude and temperature is a BMP085. The BMP180 is the updated version of this chip and the same libraries will work with it :smile: which is handy because it can be found a bit cheaper.

WIRING

The screen and barometer are 3.3V compliant but not 5v compliant. So be careful

Both the screen and barometer wire into the arduino’s i2c pins plus the power and ground.

To measure the 6 position switch, which runs at 5v, on your 3v arduino we will require a voltage divider. The middle of the divider (between the resistors) is where the arduino will sense the voltage on pin A0.
The code is commented to assist with alternate resister selection. Make sure you use resistors which are in the 100’s of kilo ohms added together. You don’t want to affect the radios ability to sense the switch. I used 150kohm and 3.3kohm but i suggest you choose your own and do the math :stuck_out_tongue_winking_eye:

To measure the battery another voltage divider is needed. This time we will use pin A1. Look at the commented code and do the math. I used a 3s Lipo so my high is 12.6V and low 9.3V.

Be sure not to fry your arduino by plugging 12v into it!

I managed to sandwich the boards together quite nicely. Held apart with headers wires and tape. held together with hopes and dreams.

POWERING UP

I used a little voltage regulator which I could select the voltage I wanted. Rather than trusting the on board ardunio, regulator I set it to 3.3V and wired it into the VCC pin. The power voltage divider can be wired to the input of the Voltage regulator to reduce wires everywhere.

After cutting out the turnigy badge i hot glued the screen in place then wrapped all the electronics in tape and poked it in. Ready to go fly :smiley:


**Happy Hacking,**

Hally

Next mod will be to use the arduino to read a gyro and send a pan signal down one of the channels for my gymbal camera. Stay tuned




Hardware

5 Likes

Thanks for providing this information. Ofcourse it will help us to build our own hack. Also you mentioned the whole part list here. That is too good. I want to know the procedure to connect the barometer with the arduino. What code it will use and what interface it requires?

china pcb assembly

Thanks PetaLue

Sorry I didn’t go into much detail how to find all the information, its far from an instructable.

The code for this project can be found on GitHub here - https://github.com/iHally/9xModeDisplay
Select ‘Clone to desktop’ or ‘Download as zip’ and extract the files into your arduino sketch folder. Open the Arduino IDE and you should find all my poorly written code ready to send to your arduino.

Adafruit has this nice tutorial https://learn.adafruit.com/bmp085/wiring-the-bmp085 for wiring the barometer to the arduino

Good luck with your project. Look forward to hearing how you go with it, keep me updated!

Update to code on github with better graph management. Big flaw in graph scaling fixed / now has it.