DIY Lap Timer


When you start thinking (fantasizing?) of being a drone racer, you will want to know how fast you are around your home track: You need a lap timer to record the time elapsed from the time you leave the starting gate to the time you pass it again. There are usually two ways of doing this: attaching a transponder (additional equipment) or using the RF signal of the VTX (no additional equipment). Needless to say, we will be doing the latter approach.

The key component is the RX5808 module which is the heart of most, if not all, video receivers in the market. The module receives the VTX signal and converts it to audio and video. It also measures and provide the signal strength (RSSI value). What the lap timer does is to compare the RSSI with a set threshold. If the RSSI value is above the threshold, the corresponding drone is considered passing a finish gate and the time elapsed is recorded.

There are two maybe three active lap timer projects online: Chorus RF Laptimer and PIDFlight Lap. For this project, we will adopt the schematic and use the software and firmware of PIDFlight Lap. However, to keep things simple for now, we will simplify the schematic and use connected mode where the lap timer is connected directly to and powered from a computer or  Android phone (via OTG).

Parts and Equipment

  1. Arduino Nano V3 or compatible
  2. RX5808 FPV Receiver Module
  3. Buzzer
  4. Breadboard (or PCB)
  5. Header pins (and optional header sockets if using PCB)
  6. Arduino Nano FTDI driver (or CH340/341 driver for clones)
  7. Arduino IDE

If you’re working with the PCB, you’ll need the following:

  1. Soldering iron
  2. Soldering wire
  3. Desoldering pump
  4. Flux
  5. Wire snips

Procedure

  1. Review revised schematic
  2. Prepare header pins for the RX5808 module. You need 9 pins
  3. Solder header pins to RX5805 receiver module

  4. Prepare buzzer. The short leg is ground, the long leg is positive. This is also indicated on the top of the buzzer body.
  5. Following the schematic, insert the components to the breadboard
  6. Install Arduino Nano driver
  7. Install Arduino IDE
  8. Install the appropriate firmware.For Chorus RF Laptimer, you can download the Arduino sketch, load it on the Arduino IDE, and upload to the Arduino nano. For PIDFlight Lap, you will get a .hex file and you will need to upload manually. You can use XLoader on Windows or Hex Uploader on the Mac. Or use avrdude directly:

    /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -carduino -P/dev/cu.wchusbserial410 -b57600 -D -Uflash:w:pidflightlap_2.2.0_PDFL.hex:i

  9. Install and run the appropriate software.
  10. Connect
  11. Activate and calibrate lap timer device for target VTX
  12. Set threshold. The higher the threshold, the less sensitive and more precise. The lower, the more sensitive and less accurate.
  13. Race!






Flashing FlyPlus With A MacBook

FlyPlus is firmware for the entry-level Flysky i6 transmitter. It transforms the humble but capable 6-channel transmitter into a powerful 14-channel transmitter with timer and alarms among others.

Unfortunately, it wasn’t very straightforward on the Mac, for me at least. The available updaters are for Windows and Linux. I tried Wine, setting it up to no avail. Finally, I stumbled on the discussion thread on this issue on github repository of the original Flysky i6 Mod. And that finally did it for me.

Parts and Equipment

Flysky i6 Transmitter
Flysky FS-i6 FS-T6 Firmware Update USB Cable

Procedure

  1. Download and install the Silicon Labs CP210x driver from https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers
  2. Download the latest FlyPlus release from https://github.com/qba667/FlySkyI6/releases and put it to the folder ~/Flysky
  3. Download file “flysky_updater.go” from https://github.com/mhils/flysky-updater and put it to the same folder ~/Flysky
  4. Install Golang with dependencies:
    cd ~/Flysky
    brew install go
    go get github.com/cheggaaa/pb
    go get github.com/tarm/serial
    go get gopkg.in/alecthomas/kingpin.v2
    go get github.com/AlecAivazis/survey.
  5. Connect the firmware update cable and run firmware update mode. Throttle trim down, yaw trim right, power on:
  6. Run updater with command: go run flysky_updater.go:

Links

FlyPlus firmware mod for the Flysky i6: https://github.com/qba667/FlySkyI6
Original firmware mod for the Flysky i6 Mod: https://github.com/benb0jangles/FlySky-i6-Mod-
Cross-platform open source updater for the Flysky i6: https://github.com/mhils/flysky-updater