My Arduino based datalogging project

I wanted to share project I have been working on. I have wrote this s2ki.com forum for people in mind who dont know what kind Racechrono is.

This isn't actually diy for everyone. Some basic knowledge of electronics and Arduino is useful. Of course if you have
enough curiosity and you want to learn then this isn't actually that hard.

I wanted to log oil pressure and oil temp on my Honda S2000, but didn't want to pay many hundred euros for race car
datalogger. I have been using Racechrono laptimer on my Android phone and found out that Racechono supports diy
sensors via Bluetooth.
I found this datalogging project and it inspired and helped me to build my own: https://racechrono.com/forum/discussion/1590/diy-data-collection-with-link-to-working-code-for-arduino-and-bluetooth/
Arduino is cheap programmable microcontroller. For more info: https://www.arduino.cc/
In this case Arduino is reading sensor data, converting it to actual reading and sending it with Bluetooth
to Android phone running Racechrono. Connection method is RFCOMM and data format is RC3. More info:
https://racechrono.com/article/2572
Data is logged and stored by the phone, so Arduino isn't storing the data.

Parts used:
Arduino Uno
Cytron Arduino proto shield
HC-06 Bluetooth module
0,6 w resistors (10k 2pcs, 5,1k and 1k)
2ch dip switch (has to be switched off when uploading code to arduino)
Angled female pin header R2,54
0,6mm2 single core wire for proto shield
JST-SM connectors with wires
0,75mm2 wires for power, ground and temperature sensor wiring
Junction box
Bosch NTC M12-H oil temperature sensor and compatible Bosch compact connector
AEM X-series oil pressure gauge 0-100psi / 0-7bar (30-0301)
Components excluding temp. sensor and oil pressure gauge cost around 50€.
Racehrono Pro is needed and it's 20€
Bosch oil temp sensor was about 25€.
AEM oil pressure gauge was around 200€ including shipping.
AEM oil pressure gauge has option to output 0-5v analog signal for datalogger.

First I changed baud rate to 115200 on HC-06 module with AT-commands using Arduino IDE serial monitor. I used
Arduino Uno as USB to TTL converter using this guide: https://create.arduino.cc/projecthub...nverter-475533
Arduino is running on 5v voltage, but HC-06 supports only 3,3v so i used voltage divider circuit on txd pin to lower
5v to 3,3v (same as in diagram lower). In this case connect txd to txd and rxd to rxd.
More info of the AT-commands: HC-06 hc01.comV2.0 | Martyn Currey
Only command i used was: AT+BAUD8.

After this I soldered parts and wires to proto shield, uploaded code to Arduino and fitted the device inside typical
junction box. Power for the device comes from drivers foot well fuse box ignition connector. I added 2A fuse for
protection.
The device is fitted on drivers footwell, oil temp sensor is measuring temp from oil pan and oil pressure is measured
from oem oil pressure switch location.

Code for arduino: https://filedn.com/lKOo3aQn9ubHtKC7DXLEkHh/Datalogger/DataloggerCode.txt
Oil pressure is logged at 10hz updating frequency and oil temp with 1hz.

Pictures and more info: https://www.s2ki.com/forums/s2000-electronics-26/my-arduino-based-datalogging-project-1199899/

Comments

  • edited April 2020
    Hopefully in the future we can change channel names for this kind of DIY devices :wink:
  • Great project! I just started experimenting with Arduino recently and also thinking about making my own device to work with RaceChrono. thanks for sharing!
  • I had some problems with update rate which caused the data to be out of sync. I modified the code and used millis function instead of delay. It helped quite a lot. Still not perfect. After 30min logging session data is out of sync by 2 seconds. This is probably best what I can achieve with Arduino hardware without rtc or gps.
  • Have you considered using the BLE protocol instead? In that case the RaceChrono app will take care of calculating the timestamps.
    I wrote this Arduino library for interactions with RaceChrono via BLE: https://github.com/timurrrr/arduino-RaceChrono
  • I was wondering about this post too, RaceChrono should really not go out of sync when RC2/RC3 is done correctly...
  • Well I'm kind of noobie with coding and BLE protocol seemed too complicated for me. I will look in to this Arduino library. Thanks!

    Well maybe there is still some issue with my code what causes this data sync issue. On Racechrono website Tutorial: DIY devices it does say " So pick update rate that is close as possible to 1/5/10/20/30/40/50/100 Hz". This is why I assumed that update rate is the issue. Earlier code had flaw that caused update rate about 9hz and data was way out of sync. Now it's much closer to 10hz, but still isn't stable all the time (probable because of Arduinos oscillator).
    I have also noticed from incar videos, that on Racechrono screen the sensor data stays at sync, but on logs it's out of sync.
  • Have you implemented the "counter" field correctly?
  • Yes I think so. I can post tomorrow what serial data looks like.
Sign In or Register to comment.