Here is a DYI build I have been working on recently and would like to share with the RaceChrono community.

The main board is a TTGO-T-Beam (rev. T22_v1.0-20190612 ) which holds a GPS M8-N from U-Blox. The board also holds an unused LORA module (deactivated by software).

The main microcontroller is an ESP32, which is responsible for the BLE communication and advertising of the required characteristics which are updated using the data received from the GPS module.

The current code running on this hardware is available on my repository (https://github.com/0x8008135/RaceChronoDYI-TBeam).
!!! If you are planning to use it, do not forget to change the device_name variable or you will have a random id after each reboot !!!

From a program PoV:
- Configuration of the power management IC (AXP202)
- Set voltage of the various ICs (ESP32/UBLOX M8N)
- Disable LORA Module
- Configure the LED behaviour
*Requirements: https://github.com/lewisxhe/AXP202X_Library

- Configuration of the GPS receiver (UBLOX M8-N) :
- Set frequency to 10Hz
- Set UART baudrate to 115200
- Remove unused message types (e.g. NMEA)

- Configuration of the main microcontroller (ESP32)
- Set UART baudrate to 115200 (both GPS and computer communication
- BLE communication and advertisement (device, service and characteristics)
- Processing data from GPS to RC format

From a user PoV :
- Waiting for connection => The blue LED flashes rapidly (4Hz)
- Client connected => The blue LED flashes slowly (1Hz)
- GPS has fix => The red LED next to the GPS module flash

Further development:
- Investigate the possibility to replace the LORA module by an accelerometer/gyroscope/magnetometer
- Use the ESP32 GPIO ADC to collect additional values
- Handling of CAN-BUS messages

I would like to thank https://github.com/aollin/racechrono-ble-diy-device for his tutorial/build for his tutorial and part of the code.

Any feedback, comments are welcome.



  • edited March 2020
    Great job! This seems so good, that I'm tempted to try this hardware on my next project. How's the BLE connection, is it reliable?

    If you go for IMU, I suggest you do research on these 9DoF ones that do sensor fusion on board.
  • Unfortunately, we could not test it in real conditions yet due to the current worldwide context. However, we perform some initial tests while driving a car which tempt to prove that BLE is quite reliable.

    In addition, we improved the GPS reception by switching to a bigger antenna. As the antenna is magnetic it can be easily fixed on a car or motorcycle metallic surface.

    Thanks for the heads-up on the IMU, I will probably order one of these boards to perform some initial tests. The goal would be to produce a custom castellated PCB which can replace the LoRa module with the correct pinout.

    BTW, @aol, Do you know where can I find the full documentation of the API which is supported by the RC app and can be used to ingest data originating from DYI modules ?

    Thank you in advance

  • edited April 2020
    @azox there's the old RC2/RC3 API and then there's the ones documented in that project: https://racechrono.com/article/2572

    I'm creating new APIs based on Bluetooth LE when ever I have time to build new "reference" devices. For now there's only CAN-Bus and GPS. But notice, the CAN-Bus API can carry basically any data, not just CAN-Bus.
Sign In or Register to comment.