DYI on TTGO T-BEAM

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) :
- Enable UBX-NAV-PVT and UBX-NAV-DOP
- 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.

Cheers

Comments

  • aolaol
    edited March 25
    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.
Sign In or Register to comment.