Close
0%
0%

A poor man's FPV journey

If you want to enter FPV world in a cheap way, read these pages !

Similar projects worth following
I have been flying all kind of RC "vehicules" for years and wanted to explore a little FPV possibilities before buying expensive planes or drones.

You will see:
- how I customized FPV goggles (for less than 20$)
- how I can fly almost any plane with a regular joystick (captain chair mode !) (for less than 10$)
- how I can fly a virtual DJI Avata with my RC radio in full FPV mode (for less than 5$)

My advice, not to be lost into the various pages and logs, would be to read the whole description (this long page!) and then jump into the logs.

Alternatively here is a Table of Content that you can follow to directly access specific topic into logs.


Logs Table of Content


FPV goggles (first try)

I already had a DJI mavic mini1. Like all these drones ready to fly, you have a nice video return on your smartphone but no way to put your phone in front of your eyes to enter "fpv mode".

So I started to look at what I had into my home that could be used as a pair of FPV goggles... And I started using a magnifying glasses set.

You could possibly still find them for cheap while searching for  "2LED headband illuminated magnifier" model. Search on google, it is really popular and cheap. Be sure to get the model with detachable leds and x3,5 magnifier.

I then tried to choose the right lens to fit with my old eyes, and made a simple 3D printed adapter for my smartphone.

here is the result seen from side view.

All the details to build yours can be found on thingiverse.

The result is an impressively clear image, very sharp and perfectly focussed even if you wear glasses.

BUT the smartphone is rather far away from your head, resulting in weight (and more precisely torque) on your head.

Furthermore, a lot of light is entering on the sides leading to a rather poor immersion.

However the concept was working and thus I tried a second design.


FPV glasses (second try)

I wanted to correct the caveats of my first design, I found a pair of clever glasses made with two mirrors at 45° reflecting the smartphone and allowing to optically "push forward" the phone whitin a compact form factor. 

These glasses can be found searching for "AR-X FIIT glasses" on google. I found mines for less than 20$ end of 2021.... before inflation...

I made a few modifications on the glasses:

  • add full protections to avoid light
  • add lenses to correct hyperopia

The 3D printed parts can be found on my Thingiverse, they snap on the goggles (no glue, no screws)

the bottom is made with black fabric and is hold in place with magnets glued on the sides and on the 3d printed parts.

  • These goggles fit very well my face (although not exactely nice !). The image is really clear, sharp and the screen is almost totally visible with very little distorsion.
  • The added lens gives more confort for my eyes, but are also optionnal (for normal eyes !).
  • The goggles are still a little heavy, but not too much
  • No light is entering provided that you cut the fabric at the exact size of your noze/face.

Poor man's FPV goggles flying DJI drone

And here is the result, when flying a DJI Mavic Mini

You can see the shape of the added lens and, in the background, the smartphone screen.

Of course the result, in real life, is much better than this picture, as it is almost impossible to take a good picture inside the goggles... But it gives an idea of what it could be !

When installed on your nose, you only see the screen "full size" it looks like a 1m HD screen floating in front of you !

Needless to say that any flying system with a video link return on a smartphone is also available to be used with these goggles.

So most of ready to fly drones fall into this category. For instance I have a Parrot Disco flying wing. It is controlled via a "Sky Controller" with the freeFlightPro application. It is fully working with my goggles!

Here at landing !


Flying any RC plane with a joystick

Having learnt how to pilot "real planes" 30 years ago I wanted to feel back...

Read more »

ESP32_PPM2Joystick.rar

ESP32 PPM2Joystick V2 eagle files

RAR Archive - 35.12 kB - 12/19/2022 at 13:22

Download

Firmware.rar

Joystick2PPM V1 firmware and source code

RAR Archive - 143.85 kB - 12/18/2022 at 13:57

Download

PPM2Joystick_eagle_files.rar

Joystick2PPM Version1 eagles files for PCB and schematics

RAR Archive - 47.57 kB - 12/18/2022 at 11:14

Download

  • DJI Virtual Flight RC radio interface -3.3V logic-

    JP Gleyzes12/27/2022 at 17:33 0 comments

    My previous setup needed a level shifter to accomodate 5V logic of my receiver...

    But most of radio today have a "buddy box" mode where they output directly PPM signal from the trainer port.

    And these radios are today with 3.3V logic, like the ESP32.

    So you can directly connect  the PPM jack cable to any IO pin of the ESP32. No more PCB, direct connection :-)

    Schematics

    Difficult to have something simpler...

    Firmware

    The firmware provided here on my Github is compatible with this 3.3V setup.

    Simply be sure to uncomment this line

  • DJI Virtual Flight RC radio interface

    JP Gleyzes12/24/2022 at 14:00 0 comments

    Principle of operations

    I got a friend's remote controller2 and here is what it gives when connected to a PC

    It's an HID Joystick with X, Y, Z, Rx and Ry "analog sticks" and 7 active buttons. 

    Here is the law table to map the actions on the remote2 to the corresponding joystick events.

    • All sticks output values between +-660
    • Right stick
      • Left/right: Joystick X axis
      • Up/Down: Joystick Y axis
    • Left stick
      • Left/Right: Joystick Rx axis
      • Up/Down: Joystick Z axis
    • gimbal wheel: Joystick Ry
    • buttons
      • C1: Joystick button 1
      • Start: Joystick button 2
      • home: Joystick button 3
      • photo: Joystick button 4
    • gimbal 3 states: 
      • Up: joystick button 5 = 0 and button 6 = 0
      • center: Joystick button 5 = 1 and button 6 = 0
      • Down: Joystick button 5 = 0 and button 6 = 1
    • Mode Fly:
      • Normal: Joystick button 7 = 0 and button 8 = 1
      • Sport: Joystick button 7 = 0 and button 8 = 0
      • Manual: Joystick button 7 = 1 and button 8 = 0

    This being known it is easy to reproduce a Bluetooth Low Energy Joystick!

    Schematics

    Once again the heart of the system is an ESP32 MCU. The radio receiver or the trainer port output of my radio being 5V devices, I needed a level shifter to accomodate with the 3.3V IO of the ESP32.

    And that's it for the schematics: one single pin used as input for the PPM train and the rest over the air via BLE!

    PCB

    As you may imagine the PCB is also very simple. My receiver is simply put on the side of the ESP32

    The board and the receiver are powered by a 5V powerbank and no other connection is needed!

    Firmware

    Most of the difficulty of this project was not in the hardware side but rather in the software one. 

    It was really simple to emulate a BLE gamepad, but much more difficult to find the right combination of channels to be accepted by the DJI Virtual Flight. So after a lot of trial and errors I succeeded (see above) !

    The code is mostly using the excellent LemingDev BLEgamepad library.

    I have only added an interrupt routine to decommutate the PPM train. Only a few lines of code:

    void IRAM_ATTR ppmISR() {
      // Remember the current micros() and calculate the time since the last pulseReceived()
      unsigned long previousMicros = microsAtLastPulse;
      microsAtLastPulse = micros();
      unsigned long pulseDuration = microsAtLastPulse - previousMicros;
    
      if (pulseDuration < MIN_TIME)
      {
        microsAtLastPulse = previousMicros; //cancel the pulse
      }
      else if (pulseDuration > BLANK_TIME)
      {
        currentChannel = 0; // Blank detected: restart from channel 1
        digitalWrite (LED_PIN, !digitalRead(LED_PIN));
      }
      else
      {
        // Store times between pulses as channel values
        if (currentChannel < NB_CHANNELS)
        {
          if ((pulseDuration > 900) && (pulseDuration < 2500))
          {
            rawValues[currentChannel] = pulseDuration;
          }
        }
        currentChannel++ ;
      }
    }

    The rawValues of the Tx are stored in microsecond reprensenting the duration of each pulse.

    then the conversion into gamepad events is also straightforward:

     

          //bleGamepad.press(BUTTON_1); //C1 button       //bleGamepad.press(BUTTON_2); //Sart button       //bleGamepad.press(BUTTON_3); //Pause/home button       //bleGamepad.press(BUTTON_4); //photo button       //bleGamepad.press(BUTTON_5); //gimbal Up       //bleGamepad.press(BUTTON_6); //gimbal Down. And buttons 5 and 6 released = gimbal center       //bleGamepad.pressHome(); //exit App releaseHome();       if ((rawValues[5] - 1500) > 250) //trainer button toggle       {         bleGamepad.press(BUTTON_7);     //toggle Manual to S       }       else bleGamepad.release(BUTTON_7);       //map(value, fromLow, fromHigh, toLow, toHigh)       bleGamepad.setX(map(rawValues[3],1000, 2000, -660, 660)); //Right Stick horizontal #ifdef MODE_1       bleGamepad.setY(-map(rawValues[2],1000, 2000, -660, 660)); ...

    Read more »

  • ESP32 Joystick2PPM board V2

    JP Gleyzes12/18/2022 at 17:01 3 comments

    Principle of operations

    Like the V1 board a PPM frame is generated by the MCU. 

    I have choosen an ESP32 board for that (more modern than the old PIC18F4550).

    As this MCU does not have an USB interface, I have connected it to a mini USB host shield based on the MAX3421 chip

    The ESP32 lolin Lite board is mounted in "Mezzanine" above this shield, the result is a quite compact device that can be powered by a USB powerbank.

    It has a USB A female port to connect the joystick and a Jack female port to connect to the radio's trainer port.

    All this can be hidden into a 3D printed case which is available on Thingiverse.

    Configuring the board

    As this new setup works without Android App, I had to find a way to introduce a kind of Man Machine Interface to configure the board.

    I have simply used the ESP32 WifiManager  library capabilities to do this.

    So if you boot the board (or reset it with the reset button) while touching the small pin close to the jack connector, then the ESP32 exposes a Wifi hotspot on which you can connect any smartphone (or PC)

    Connecting to it will automatically open a configuration window

    You then have to choose an exisitng wifi network for which you have the credentials, enter them into the form 

    Then you can change the magic sentence "RETAUL13" to configure the 8 channels of your board.

    You can affect any stick, any button( 1 to 8) and hat to any channel. The syntax is simple :

    REATUL12 meens:

    • Channel 1 of PPM will be affected to Rudder
    • Channel 2 of PPM will be affected to Elevons
    • Channel 3 of PPM  will be affected to Throttle
    • Channel 4 of PPM  will be affected to Ailerons
    • Channel 5 of PPM  will be affected to Up/down button of the hat stick
    • Channel 6 of PPM  will be affected to Left/right button of the hat stick
    • Channel 7 of PPM  will be affected to button 1
    • Channel 8 of PPM  will be affected to button 3

    And that's it, click on save and wifi will disapper while the board reboots and outputs the PPM signal.

    So if you want to change this setting you can for intance write : TRAE123L

    This will configure this way:

    • Ch1 to Throttle
    • Ch2 to Rudder
    • Ch3 to Ailerons
    • Ch4 to Elevons
    • Ch5 to button1
    • Ch6 to button2
    • Ch7 to button3
    • Ch8 to Left/right hat

    Schematics

    Well nothing complex here. Just connect the ESP32 board to the USB Host shield...

    SImply note that the 5V supply for the shield is pick up after the USB plug of the EPS32 board. (red wire on the photo). SO a single USB power bank will power both the ESP32 and the USB shield.

    PCB 

    A quite simple PCB has been home made. 

    leading to a very compact form factor

    You can download the eagle files here

  • Joystick2PPM board V1

    JP Gleyzes12/17/2022 at 21:06 0 comments

    Principle of operations

    Most RC radio accept PPM signal as input on their trainer port.

    PPM signal is a Pulse Position Modulation signal. When applied to RC rdaio it simply consist in adding the 8 channels of the servos into a single frame.

    Each frame has 20ms length

    The channels are simply added one after the other whithin this 20 ms frame.

    A pulse (0.5 ms) is generated to start a new channel. The duration from the start of the pulse to the next one is equal to the servo value (1 ms to 2 ms).

    A little board has been made to generate the PPM train.

    It is a USB HID device and can be connected to any USB host plug. So this board may work connected to a PC but also connected to the USB host of an Android phone.

    The board then communicates with the host via a custom HID protocol embedded into the firmware.

    The other side (host) of the protocol is handled by the android App : JG Joystick2PPM

    Schematics

    The heart of the system is a PIC18F4550 microcontroller. 

    The schematics is quite simple and implements the basic circuitry of a HID device proposed by Microchip.


    PCB

    The PCB has been manufactured and all the eagle files are available if you want to reproduce it.

    Firmware

    The board is programmed in C under MPLAB-IDE.

    FIrmware is avalable here including .hex file and all source code

    Please note that this code is provided under the Cecill V2 open source licence. Details regarding this licence are available here .

View all 4 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates