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

My Arduino based datalogging project

Thread Tools
 
Old Jun 22, 2020 | 12:20 PM
  #11  
_valtsu_'s Avatar
Thread Starter
5 Year Member
Liked
Loved
 
Joined: Nov 2016
Posts: 192
Likes: 22
From: Finland
Default

I did small update to the code. There was a problem with update rate being about 9hz and it caused data to be out of sync.
I changed it to 10hz and now data should stay at sync.

edit. still needed small fix, but now it should be ok.

Last edited by _valtsu_; Jun 23, 2020 at 02:36 AM.
Reply
Old Aug 17, 2020 | 10:18 AM
  #12  
_valtsu_'s Avatar
Thread Starter
5 Year Member
Liked
Loved
 
Joined: Nov 2016
Posts: 192
Likes: 22
From: Finland
Default

Code updated. Still had some problems with update rate what caused sensor data to be out of sync.
Now I 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.
Reply
Old Aug 17, 2020 | 01:11 PM
  #13  
alSpeed2k's Avatar
Community Organizer
15 Year Member
Photogenic
Loved
Community Favorite
 
Joined: Sep 2007
Posts: 10,599
Likes: 79
From: The 604
Default

I'd like to datalog my oil pressure and temp too, I should look into this; I'm a total newb when it comes to all of this though, any idea if this would work on an iphone (BT likely not going to be usable though)? Also, the gauge is optional right?
Reply
Old Aug 18, 2020 | 06:54 AM
  #14  
_valtsu_'s Avatar
Thread Starter
5 Year Member
Liked
Loved
 
Joined: Nov 2016
Posts: 192
Likes: 22
From: Finland
Default

Doesn't work with iPhone because of old Bluetooth protocol. You would need to use Bluetooth Low Energy protocol. Code needs to be totally different and Bluetooth module should be compatible with Bluetooth LE.
One project where Bluetooth LE is used: https://github.com/aollin/racechrono-ble-diy-device/

Yes the gauge is optional. I wanted gauge because I replaced oil pressure switch with pressure sensor.

Last edited by _valtsu_; Aug 18, 2020 at 07:05 AM.
Reply
Old Aug 18, 2020 | 05:35 PM
  #15  
alSpeed2k's Avatar
Community Organizer
15 Year Member
Photogenic
Loved
Community Favorite
 
Joined: Sep 2007
Posts: 10,599
Likes: 79
From: The 604
Default

OOF! Damn, oh well, too complicated for me to figure out. My friend suggested that I get the RaceCapture/Track and add the AnalogX, which will allow me to connect upto 4 sensors. That seems like the most cost effective solution, the only thing is that it's not exactly plug and play either. Keep up the good work though!
Reply
Old Apr 27, 2021 | 06:19 AM
  #16  
Jomppe Nurmi's Avatar
Registered User
 
Joined: Apr 2021
Posts: 5
Likes: 0
Default

I have copied this code to my arduino.
Only the temp sensors code.
​​​​​​
I have now a problem. I want to use 3 same kind of temp sensors. Radiator coolant sensor down and radiator coolant sensor in the top of the radiator. Also i want to plug a oil temp sensor.

I have now a problem. I print the temps to lcd but somewhere in the code there is a fault that if i have only one sensor pluged in so it show the current temp but the sensor 2 will show 10 grades higher temperature even its not connected to analogread input. Can someone tell me why?

If i only copy the temp of the starters code once with only one temp sensor and i take the analog read wire out the temp goes to 0°c. Thats good but why if i have 2 sensors in the code and i take all of the analogread wires out the temp of the both analogreads clibs to 100°c....?
I can link my code if someone can help me do the code right that i can control my radiator fans
Reply
Old Apr 27, 2021 | 11:33 PM
  #17  
_valtsu_'s Avatar
Thread Starter
5 Year Member
Liked
Loved
 
Joined: Nov 2016
Posts: 192
Likes: 22
From: Finland
Default

So you are not using Racechrono on your project? In this case my project won't help much.

With adc pins without any kind of pull up / pull down resistors there can appear some floating voltages that cause fault readings if there isn't anything connected.

Please share your project goal, code and wiring. I can take a look.
Reply
Old Apr 28, 2021 | 12:33 AM
  #18  
Jomppe Nurmi's Avatar
Registered User
 
Joined: Apr 2021
Posts: 5
Likes: 0
Default

Originally Posted by _valtsu_
So you are not using Racechrono on your project? In this case my project won't help much.

With adc pins without any kind of pull up / pull down resistors there can appear some floating voltages that cause fault readings if there isn't anything connected.

Please share your project goal, code and wiring. I can take a look.
At the start i want to se my temperatures in LCD. Upper radiator/bottom of the radiator and maybe the oil temp.
then i will control my fan relay via a mosfet.
The code is now littlebit hazard because i have tryed everything...
Dont no how to attach the. .ino file here but i can send it to email?
Reply
Old Apr 28, 2021 | 01:11 AM
  #19  
_valtsu_'s Avatar
Thread Starter
5 Year Member
Liked
Loved
 
Joined: Nov 2016
Posts: 192
Likes: 22
From: Finland
Default

You could use file sharing service like Google Drive, Dropbox etc.
https://blog.bit.ai/free-file-sharing-sites/
Reply
Old Apr 28, 2021 | 04:17 AM
  #20  
Jomppe Nurmi's Avatar
Registered User
 
Joined: Apr 2021
Posts: 5
Likes: 0
Default

Originally Posted by _valtsu_
You could use file sharing service like Google Drive, Dropbox etc.
https://blog.bit.ai/free-file-sharing-sites/
https://drive.google.com/file/d/1Vad...w?usp=drivesdk

There you can see the code
Reply



All times are GMT -8. The time now is 08:11 PM.