Page 4 of 4
Re: Multiple temperature sensors (Arduino)
Posted: Thu Jul 05, 2012 5:29 pm
by Driver+Passengers
Another type of sensor to integrate - coolant pressure.
viewtopic.php?f=3&t=56588
Re: Multiple temperature sensors (Arduino)
Posted: Mon Jul 16, 2012 10:55 pm
by Driver+Passengers
I've got the arduino logging to SD card. Performed minor brain surgery on the Bongo this evening, including tapping off the TPS voltage from one of the ECU connectors. A couple of dozen zip ties and a meter or two of electrical tape later, here is what I've got...

Re: Multiple temperature sensors (Arduino)
Posted: Tue Jul 17, 2012 9:28 am
by peterrc
Driver+Passengers wrote:I've got the arduino logging to SD card. Performed minor brain surgery on the Bongo this evening, including tapping off the TPS voltage from one of the ECU connectors. A couple of dozen zip ties and a meter or two of electrical tape later, here is what I've got...

Hi Matt, did you get my e-mail? Have you thought of selling this as 'Pop Art'?
Peter
Re: Multiple temperature sensors (Arduino)
Posted: Tue Jul 17, 2012 9:53 am
by Driver+Passengers
peterrc wrote:Hi Matt, did you get my e-mail? Have you thought of selling this as 'Pop Art'?
Peter
I did get it, Peter - I'm just cogitating the permutations...
The graphs are cool, aren't they?!

Re: Multiple temperature sensors (Arduino)
Posted: Tue Jul 17, 2012 9:55 am
by Driver+Passengers
The big blue LCD requires a -14V supply to drive the LCD. I'd previously had this connected from a bench supply but was concerned how I was going to provide -14V in the vehicle. However, just discovered that the LCD board has it's own negative supply - just a case of attaching a pot to control contrast. Well chuffed.
Re: Multiple temperature sensors (Arduino)
Posted: Tue Jul 17, 2012 10:26 pm
by Rhinoman
Can you get the scaling correct? I'm wondering why the battery voltage is dropping when you accelerate, where is the load coming from?
Re: Multiple temperature sensors (Arduino)
Posted: Tue Jul 17, 2012 10:59 pm
by Driver+Passengers
Rhinoman wrote:Can you get the scaling correct? I'm wondering why the battery voltage is dropping when you accelerate, where is the load coming from?
Engine was not running, I was checking the TPS voltage with a multimeter as my mate tickled the peddle - I did not have a read out on the arduino itself at the time, we were just checking the 12V inputs were being scaled down correctly. We heard a buzzing with the throttle somewhere around half way down, but could not locate it - no doubt linked to the voltage drop. Good spot - I'm not sure...
I'll need to do a couple of tests to calibrate the scale, but I'll try zooming in on that section and see what shows.
Edit: you can see three levels for the battery - corresponding with key position I, II and running. The initial drop might be glow plugs, then some additional load once they're out - not sure. You can see the same sort of the thing on the TPS voltage - one of the levels corresponds with ignition off/TPS unpowered.
Re: Multiple temperature sensors (Arduino)
Posted: Wed Jul 18, 2012 12:01 am
by Northern Bongolow
if cold matt the glowplugs come back on occassionally until the engine is deemed warm, unless the revs rise above 900 if i remember right, above that they turn off, if the revs drop, like at the traffic lights they come on again then when warm the egr will be activated.
knowing how your throttle is set up this could be your fly in your soup mate.
Re: Multiple temperature sensors (Arduino)
Posted: Wed Jul 18, 2012 12:06 am
by Driver+Passengers
Northern Bongolow wrote:if cold matt the glowplugs come back on occassionally until the engine is deemed warm, unless the revs rise above 900 if i remember right, above that they turn off, if the revs drop, like at the traffic lights they come on again then when warm the egr will be activated.
knowing how your throttle is set up this could be your fly in your soup mate.
Glow plug relay is already near the top of the list to sample.
Re: Multiple temperature sensors (Arduino)
Posted: Mon Oct 15, 2012 11:03 am
by Driver+Passengers
Spent a bit of time over the weekend getting the code on the Arduino sorted. There's no point in fitting sensors to the vehicle if they're not being read. And there's no point reading sensors if you're not going to alarm on them, by the time you read off an overheat on the LCD screen, it's too late.
Given another overheat a couple of weeks ago, I'm getting the code to a point where I can fit it all back in the van for the next long drive later this week.
For any C++/Arduino bods reading, I'm writing the code such that I can do this...
Code: Select all
class SensorArray
{
public:
DallasTemperatureSensor tSensorHead;
DallasTemperatureSensor tSensorAmbient;
FreescalePressureSensor pSensorHeaderTank;
SensorArray()
: tSensorHead ("Cyl. head #1", HEAD_TEMPSENSOR_ADDRESS),
tSensorAmbient ("Ambient", AMBIENT_TEMPSENSOR_ADDRESS),
pSensorHeaderTank("Header tank", PIN_7)
{}
};
SensorArray sensors;
//AlarmType Name Sensor, MIN, MAX
Alarm<Temperature> CoolantTemperatureAlarm (sensors.tSensorHead, 2 * degC, 90 * degC);
Alarm<Temperature> FrostAlarm (sensors.tSensorAmbient, 1 * degC, DONT_CARE);
Alarm<Pressure> HeaderTankCapAlarm (sensors.pSensorHeaderTank, -1 * psi, 15 * psi);
The current Alarm template class simply compares the current sensor value against minimum and maximum thresholds. I will write another class to alarm when the 1st time derivative exceeds a particular threshold, eg "pressure has risen more than 2 psi in the last 20 seconds", "pressure has dropped more than 2 psi in the last 2 seconds", or "temperature rise exceeds 0.3 deg/second". Whatever those thresholds are.
Realtime clock and SD card still todo, as well as the physical wiring to the interface components I used in an earlier prototype.
Re: Multiple temperature sensors (Arduino)
Posted: Mon Oct 15, 2012 5:32 pm
by Driver+Passengers
I'll forget this otherwise, so posting it here.
On the SainSmart 3.2" LCD panel and adapter shield, pins 51/52 are swapped (SCK/MOSI) which means SD card will not work out of the box.
Solution:
"SD/utility/Sd2PinMap.h"
- swap MOSI and SCK pin values
"SD/utility/Sd2Card.h"
- force Mega to Software SPI.
Could avoid the software SPI and pin assignment changes with some creative soldering. Next time, perhaps.
Also some voltage level stuff involving bridging/replacing resistors here...
See
http://arduino.cc/forum/index.php?actio ... c=120599.0