S2000 Electronics Information and discussion related to S2000 electronics such as ICE, GPS, and alarms.

My Arduino based datalogging project

Thread Tools
 
Old 02-18-2020, 07:51 AM
  #1  

Thread Starter
 
_valtsu_'s Avatar
 
Join Date: Nov 2016
Location: Finland
Posts: 191
Received 21 Likes on 19 Posts
Default My Arduino based datalogging project

I wanted to share project I have been working on.
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.
There is similar and inexpensive device that does the same and even more on the market: RaceDAC - Makes you go Faster!

I wanted to log oil pressure and oil temp on my 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/discuss...-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. I will add pictures from these later on.

I haven't tested this device on street yet, because car is on winter storage, but I tested it on the garage and it seemed to work. Last summer I had earlier prototype just logging oil pressure and it worked great.
I will update how it works when I get to test it on the road and track.

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

Components:


Wiring diagram:


After soldering:


HC-06 connected:


In enclosure:
The following users liked this post:
Rubens Prohaska (03-25-2020)
Old 02-18-2020, 11:18 AM
  #2  

 
flanders's Avatar
 
Join Date: Aug 2013
Location: Sweden
Posts: 4,059
Received 426 Likes on 362 Posts
Default

Nice job and thanks for sharing.
Is there an easy way to display the values (and maybe more) on your phone without starting a log with Racehrono?

Old 02-18-2020, 02:29 PM
  #3  

 
Chuck S's Avatar
 
Join Date: Jul 2014
Location: Chesterfield VA
Posts: 12,533
Received 1,133 Likes on 996 Posts
Default

OOOOOOOO! Thanks for sharing. Neat project! I'm playing with a Raspberry Pi4 controlled tracked robot (still in construction) so the Arduino is a bit foreign.

(Bookmarked this page.)

-- Chuck
Old 02-18-2020, 10:41 PM
  #4  

Thread Starter
 
_valtsu_'s Avatar
 
Join Date: Nov 2016
Location: Finland
Posts: 191
Received 21 Likes on 19 Posts
Default

Originally Posted by flanders
Nice job and thanks for sharing.
Is there an easy way to display the values (and maybe more) on your phone without starting a log with Racehrono?
Yes when running Racechrono session you can modify the display to show data you want. In this case oil pressure is named Analog 1 and -temp. Analog 2. Hopefully in the future channel names can be modified.
Both are on bottom of the screen:


Logging is always on and you cannot switch it off.
Old 02-18-2020, 10:51 PM
  #5  

Thread Starter
 
_valtsu_'s Avatar
 
Join Date: Nov 2016
Location: Finland
Posts: 191
Received 21 Likes on 19 Posts
Default

Originally Posted by Chuck S
OOOOOOOO! Thanks for sharing. Neat project! I'm playing with a Raspberry Pi4 controlled tracked robot (still in construction) so the Arduino is a bit foreign.

(Bookmarked this page.)

-- Chuck

I'm have been playing a bit with Raspberry pi. Now it's logging my garage temperature and the data can be accessed from the internet.
For me Arduinos C-code felt more simple than Raspberrys Python.
Old 02-18-2020, 10:54 PM
  #6  

Thread Starter
 
_valtsu_'s Avatar
 
Join Date: Nov 2016
Location: Finland
Posts: 191
Received 21 Likes on 19 Posts
Default

There is similar and inexpensive device that does the same and even more on the market: RaceDAC - Makes you go Faster!
Old 02-18-2020, 11:01 PM
  #7  

Thread Starter
 
_valtsu_'s Avatar
 
Join Date: Nov 2016
Location: Finland
Posts: 191
Received 21 Likes on 19 Posts
Default

I modified the text so that hopefyllu it's less confusing.
Data is actually logged by the phone. So Arduino device isn't actually the datalogger.
Old 03-25-2020, 02:47 PM
  #8  
Registered User
 
Rubens Prohaska's Avatar
 
Join Date: Mar 2020
Posts: 1
Received 0 Likes on 0 Posts
Default

nice Job, I'm study arduino and AP2 CLuster from a 07 to create some features for "transplant" this cluster for other cars... include a 07 cluster into a older S2k... I'll create another post and show some things like a arduino VSS and ECT (from a under 2006) conversion bord (I'll take it into a civic ej1 1995). but I'll ask for some help with a K-line CODES
Old 04-05-2020, 12:44 PM
  #9  

Thread Starter
 
_valtsu_'s Avatar
 
Join Date: Nov 2016
Location: Finland
Posts: 191
Received 21 Likes on 19 Posts
Default

Originally Posted by Rubens Prohaska
nice Job, I'm study arduino and AP2 CLuster from a 07 to create some features for "transplant" this cluster for other cars... include a 07 cluster into a older S2k... I'll create another post and show some things like a arduino VSS and ECT (from a under 2006) conversion bord (I'll take it into a civic ej1 1995). but I'll ask for some help with a K-line CODES
Wow! That's ambitious project. Please keep us updated!
Old 04-05-2020, 01:41 PM
  #10  

Thread Starter
 
_valtsu_'s Avatar
 
Join Date: Nov 2016
Location: Finland
Posts: 191
Received 21 Likes on 19 Posts
Default

Looks like the device is working.
Sample video from city driving:
Oil pressure is Analog 1 in bar
Oil temp. is Analog 2 in celcius

Some pictures:

Temp. sensor. AC compressor at top left.


Pressure sensor:
Hardware used:
Motamec -03AN/JIC Stainless Steel Braided PTFE Brake Hose
Motamec AN JIC -3 AN3 Straight Teflon PTFE Hose Fitting End Alloy 2pcs
Motamec AN -3 AN3 JIC To 1/8" BSPT Thread 1/8x28 Alloy Fitting Adapter (to block)
AN -3 (AN3 AN 03) to 1/8" NPT Female (to sensor)





Switch for Arduino:

Last edited by _valtsu_; 04-05-2020 at 01:50 PM.


Quick Reply: My Arduino based datalogging project



All times are GMT -8. The time now is 10:10 AM.