Ardu Pilot Mega Telemetry-Wifi bridge with ESP8266

If you have an APM (or compatible) flight controller, and Telemetry set, chances are, you’ve hooked it to your smart phone. You need a special USB cable, called usb OTG cable. It convinces your phone’s usb controller to read other peripherals. But cables break, right? Well, mine did… I couldn’t bother fixing it, so I did something better! Ardu Pilot Mega Telemetry-Wifi bridge with ESP8266… it reads APM’s telemetry, and forwards it to ESP8266. ESP creates a Wifi access point, you can connect to, so Tower app can bind to that IP, and control the craft. It’s basically a wireless USB cable 🙂

What we need (Parts List)

ESP8266 (I have ESP01) with NodeMCU,
Telemetry module (preferably air module-without usb),
0.9V-5V to 5V DC-DC Booster Module
1 cell LiPO battery charger,,
1 cell LiPo (mine has 650mah-lasts for hours)
3.3v voltage regulator- LM1117 3v3 0.5A should do
a case (I used 2xAA battery case)

booster, ESP, telemetry module, charger with battery

booster, ESP, telemetry module, charger with battery

 

Prepare the ESP8266

Flash the ESP with NodeMCU, I use Terminal, but it can also be done with NodeMCU flasher in Windows. Then use Esplorer, to upload the program, or sketch for Arduino folk 🙂

Esplorer to upload Sketches

Esplorer to upload Sketches

On the right pane, select your serial adaptor, 9600 baud and click open. If you can’t see the adapter, click the refresh button. After connecting, if you see the “Can’t autodetect firmware, because proper answer not received.” error, don’t worry, it’s because ESP has initialised before you connected to it. Just click reload on the right, or reset the ESP.

Once you are connectred to it, you need to upload the program to forward data from telemetry to wifi. Download Init.lua.zip and unzip it (I do not claim credit for that init.lua, as it was downloaded from the internet, sadly I forgot where I found it. If you know, drop a comment, I will give credit). In Esplorer, the left pane, Open the init.lua, and it should show the contents in the panel. You can change the AccessPoint name and password. To upload it to ESP, click on Save to ESP. That’s it for the ESP, set it aside for now.

 

Prepare the enclosure

As I said, I used 2xAA battery case from christmas LED lights. I think the price for that was about 2eur, and it also has a switch :). Chop off the LED strip.

Battery enclosure without LEDs

Battery enclosure without LEDs

Open it, remove every bit of plastic, except the switch retainers.

Unnecessary plastic removed, left some around the switch

Unnecessary plastic removed, left some around the switch

 

Charger and Booster

For this step, we need the LiPo charger, 3.3v to 5v booster and a LiPo battery. If you use air Telemetry module without the USB connector, you can hack the 5v booster. Just chop off the connector, it makes it a lot smaller. Be careful and leave the four tiny through-holes.

5v booster hack

5v booster hack

For the charger, I had the ides to put it at the bottom and also see the status lights. I removed the smd LEDs, and soldered an RGB led. I used common ground led. You can leave it as is.

Hacked LiPo charger with rgb LED

Hacked LiPo charger with rgb LED

Solder the three together. Battery to Charger, charger to booster, switch between charger and booster.

Battery circuit, soldered

Battery circuit, soldered

 

Crude schematic of battery circuit

Crude schematic of battery circuit

 

Connecting everything together

The telemetry also works on 3.3v but the module has its own voltage regulator, and I didn’t want to hack the module. We need another 3.3v voltage regulator to power the ESP8266, so we stick it between booster 5v and ESP8266. It’s also smart to use a capacitor on the regulator output line, something around 10uF should be ok. Also connect Telemetry TX to ESP Rx, and Telemetry RX to ESP Tx.

Final schematics

Final schematics

DO NOT POWER ON WITHOUT ANTENNA, OR YOU MAY DAMAGE THE TELEMETRY!

 

Put it in a box

I placed the battery circuit on the bottom, placed a slab of veroboard on top, on which I glued/soldered ESP and Telemetry.

Circuit-in-a-box

Circuit-in-a-box

Be sure to make holes for usb and led. I used my soldering iron to melt the plastics, be creative 🙂

USB and LED openings

USB and LED openings

LM1117 3v3 voltage regulator is soldered on the bottom of veroboard with some other connections, just to make thing nice (notice the tiny smd capacitor between Gnd and 3v3).

LM1117 3.3 on the bottom

LM1117 3.3 on the bottom

Connect like in the schematics in the picture and hot-glue everything together. Notice the hole for telemetry antenna on the left.

Telemetry and ESP on the top

Telemetry and ESP on the top

I wanted to see the smd led through to top, so i poked some holes with my trusty iron tip again.

Holes on the top for SMD leds

Holes on the top for SMD leds

 

Configuring the Tower app

With your smart phone, find the APM Telemetry wifi, and connect to it. Name and password are in the init.lua. Change to whatever you wish.  Open the Tower app, and go to Settings

Tower app settings

Tower app settings

Change Telemetry Connection Type to TCP

Open USB, TCP and UDP settings, and make it look like that

USB, TCP and UDP settings

USB, TCP and UDP settings

 

That’s it. Click Connect and you should be ready to go… or fly…

Tower Connection successfull

Tower Connection successfull

 

10 Comments

  1. Hi Sirs,
    I read this one carefuly, but I don’t understand some matter:
    1/ Did you using Telemetry Usb (Ground) connect with phone via OTG cable ?
    2/ How to the APM transfer signal with esp ? I don’t see wiring from Telem (apm) to esp.

    • hello
      No, there is NO cable from the phone. Phone connects to ESP via WIFI. I broke my OTG cable, faster to build something than buying new cable 🙂
      Signal, I don’t know, this bridge/box is usually besides me.
      wifi-esp connection is on one of the pictures (wifi to esp connection)
      I understand pictures sometimes don’t show, please refresh page.

      OH, I think maybe you understood this wrong
      Drone has telemetry module, sends telemetry out over air. There is NO ESP on the drone.
      My bridge box reads telemetry from drone with telemetry module, relays it to ESP. ESP sends telemetry out wia WIFI. Telemetry and ESP are on the same board.
      Phone connects to ESP via wifi, reads telemtry.

  2. Nice solution, well done.
    I only have a pair of radios at hand. ie an airborne module and a USB module.
    Do you know how I can utilise the USB module in your setup?

    • Thank you 🙂
      Yes, if you have serial to usb converter, you could connect the USB telem to serial converter, and the rest should be the same.
      I did actually started making a PNP module just for that, but never quite finished it…
      I can whip up the schematics, if you want to try it yourself 🙂
      pic1
      pic2
      pic3

  3. Great idea, thanks. I do have a couple of ftdi converters here so that is an option. I will breadboard it up today and see how it goes.
    I like your PnP option too. Is that a usbotg cable to the radio module?
    I think that would be a great final solution for me.

  4. I have also looked at the data sheet for the FT232RL chip on the radio module and I could tap into pins 1 and 5 which are the tx/rx inputs and then continue on as above.

  5. Hi. By default, wifi works on the first channel. My friend has the same bridge, when used nearby we will interfere with each other. How to change the wifi work channel? Thank you.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.