Using and Arduino for temperature sensing and control
After playing with some cardboard box prototypes, I finally finished the engine compartment wiring and added a prototype display to where the radio usually goes. This enables real-time, accurate monitoring of one or multiple temperature sensors, one or more bright visual alert bars, a vacuum sensor, data-logging, and whatever else I want to add. Here's the plastic and electrical tape prototype. I need to 3D print a radio-face sized housing once I figure out which OLED display to use that best matches the stock interior.
Here are the teaser photos.
In my 80, I noticed that there was a large gap at the sides of the radiator, where the air conditioning condensor once was. So I made sure the thermocouple on the upper radiator hose stayed attached this time, and I ran two passes on an identical driving loop within few minutes of each other. The loop featured some city driving, and then a blast down the highway, ending in a slow crawl through town. At no time did the coolant temperature rise above 180 degrees F, and my electric fans never turned on (195 F on, 185 F off, both switched together on separate relays).
Other than the carb intake air temp, the plots show that the air bypassing the radiator didn't really matter for this drive.
The thermocouple shield on the Arduino took over most of the Arduino's functionality. I could add another sensor, perhaps, but not display anything. I needed an actual coolant temperature sensor, and I needed a real-time display. Fortunately, I had these items, I just needed to write a new set of code, and wire everything up.
The teaser images in the first post show the result of all of that. I used a Wells SU109 2-wire ECT to take temperature measurements, and I added a Wells SU105 MAP sensor from a 1982 Corvette. I spliced the appropriate connectors to 18 gauge GXL-rated wire and ran it to an Arduino fitted with an OSEPP LCD 16x2 display shield.
All of the HVAC components are currently removed from the car. While I hope to have heat again someday, I removed the heater core bypass components, plugged the return port in the water pump, and used the ouput port in the intake manifold to hold the ECT. I needed a 3/8" NPT female to 1/2" NPT male adaptor to make the transition. Since the ECT is a two-wire system, there was no problem using pipe tape. The image shows the ECT, the plug in the water pump, and the temperature switch used to trigger the dual-Spal fans (2 wires for two relays).





Have merged DBL TRBL's Mazda PWM code with his test code for the stock sender using a C6 controller along with other snippets I have found on the Arduino sites.
Not finished yet but seems to be able to read the sender voltage ok so far and convert it to a temperature.
Will post it when I am done.
The Best of Corvette for Corvette Enthusiasts
https://www.corvetteforum.com/forums...oft-start.html
Have merged DBL TRBL's Mazda PWM code with his test code for the stock sender using a C6 controller along with other snippets I have found on the Arduino sites.
Not finished yet but seems to be able to read the sender voltage ok so far and convert it to a temperature.
Will post it when I am done.
https://pe-ltd.com/assets/coolant_temp.pdf
I pulled numbers from the datasheet, centered at 180 degrees F, and used this website to get the β model coefficients.
Thermistor Calculator
This gave me β, T_0,and R_0, which I define in my Arduino code:
#define SU109_ECT 4117.31f,298.15f,2896.96f // B,T0,R0
I could probably tweak the model a bit, or use the Steinhart-Hart model and melt my Arduino, but this seems to work fine for a car that rarely sees more than 190 F.
I used this code as an example
https://playground.arduino.cc/ComponentLib/Thermistor2/
And wrote my own version of the function.
Example Function call:
ect1degF = Temperature(1, 3, SU109_ECT, 330.0f); //ECT1 is on analog pin 1
And the function
// Temperature function inputs
// 1. AnalogInputNumber - analog input to read from
// 2. OuputUnit - output in celsius, kelvin or fahrenheit
// 3. Thermistor B parameter - calculated
// 4. Manufacturer T0 parameter - calculated at 25 C (but in Kelvin)
// 5. Manufacturer R0 parameter - calculated (ohms)
// 6. Your balance resistor resistance in ohms
float Temperature(int AnalogInputNumber, int OutputUnit, float B, float T0, float R0, float R_Balance)
{
float R, T;
R = R_Balance * (1024.0f / float(analogRead(AnalogInputNumber)) - 1);
T = 1.0f / (1.0f / T0 + (1.0f / B) * log(R / R0));
// Default OutputUnit = Kelvin
// OutputUnit = 2, Celsius
// OutputUnit = 3, Farenheit
if (OutputUnit == 2) {
T -= 273.15f;
}
if (OutputUnit == 3) {
T = 9.0f * (T - 273.15f) / 5.0f + 32.0f;
}
return T;
}
Last edited by Bikespace; Oct 26, 2021 at 11:02 AM.
In this image, I unplugged the ECT, and have about a 125 Ω equivalent resistor plugged into the ECT connector, which the Arduino interprets as 234 F.
It doesn't come across well in this photo, but I am using an Adafruit Neopixel 8 element stick to digitally display temperature. I can pick the color and intensity (and could even change the brightness if the headlights are on or off, or from a brighness sensor on the dash). As the temperatures go above where my fans kick-in, the colors get more red, and much brighter. At full-brightness, an over-temp situation looks like a shift-light. You won't miss it, as you might with a gauge. I am also monitoring vacuum (here, the car is not running), but the Arduino could easily measure oil pressure, and have a similar bright display.
Let us know which Oled you're leaning towards. I went with a 7" Nextion display cause it saved me lots of work and it's a touchscreen. Down side is it's not easy to read in direct sun.
Let us know which Oled you're leaning towards. I went with a 7" Nextion display cause it saved me lots of work and it's a touchscreen. Down side is it's not easy to read in direct sun.
I've reached the limit a few times with Arduino Unos, so I'm glad I'm not trying to use them for fuel injection or ignition timing. Rather than an all-in-one solution, I'll likely use separate ones for different major sets of instruments.
For example, it was all one of these Arduinos could do to calculate display real-time GPS speed. (My dining room table was moving at zero mph). The other one used most of its pins just talking to the LCD display, but perhaps it could handle a sensor or two. I don't know about its daylight visibility, though, hence the idea of using OLEDs.
Last edited by Bikespace; Oct 26, 2021 at 09:00 PM.
I've reached the limit a few times with Arduino Unos, so I'm glad I'm not trying to use them for fuel injection or ignition timing. Rather than an all-in-one solution, I'll likely use separate ones for different major sets of instruments.
For example, it was all one of these Arduinos could do to calculate display real-time GPS speed. (My dining room table was moving at zero mph). The other one used most of its pins just talking to the LCD display, but perhaps it could handle a sensor or two. I don't know about its daylight visibility, though, hence the idea of using OLEDs.
I like the idea of having separate processors do separate tasks, but I'm having a hard time understanding how you maxed out an Uno with just a gps and a display. Maybe the libraries are taking lots of resources or some other reasons.
The mega will give you more pins and more memory. But the mega speed is pretty much the same as an Uno. With careful design and execution, you would be amazed at how much one board can do.
If you do end up dividing the tasks among multiple boards, then I suggest using CANBUS to share the information.
I like the use of the Arduino for measuring and showing the active temperatures! Your intake air is cool and cooler is better!. Is there any way to help get ambient air into the intake, directly? That is what I like so much about the L88 Hoods that GM designed and built back in the 1960's. I have wanted to generate that type of data you are showing but with my L88 Intake setup. I want to see the air temperature as it enters the throttle body on my High Compression C3. Getting the coldest air possible was why they designed it the way they did as it is critical when racing a Big Hot engine.
I have been using a pair of thermo-couples on my Radiator IN and OUT to see just how efficient my BeCool Radiator really is using the EVAN's NPG in it. As soon as I am done with the Radiator I will focus on the temperature of the incoming combustion air. I will then move on to get the fuel as cool as I can before introducing it to the engine.
Being a Private Pilot and being aware of the "engine monitoring devices" they use in the aviation industry I have always wanted something like one of those watching over the Corvette's engine all the time. They are monitoring the vacuum, the temperatures, operating temperature and individual exhaust temperatures. I have headers now but am contemplating going back to the factory exhaust manifolds as they were a kind of a header in 1968 on the 427's. I will drill it out for a thermo-couple and have it Ceramic Coated with the Higher than Normal temperature Ceramic coatings. My Headman headers are over 25 years old and showing their age a bit.
The Holley Sniper System uses CANBUS and it is really a great way for things to communicate. I am sure that you know far more about it than I do but it is very handy and easy to setup. I am still learning....
My Son is a Computer Software Code writer and he absolutely LOVES the Arduinos and other PLC's. He writes software for them and has dozens doing little tasks for him all over his house. He can't understand why I don't use them as much, it happens to have something to do with I was taught COBOL and FORTRAN. These newer programming languages are much better and easier to use (IF they make sense to you).
Thanks for Educating Us!
Chris
Thanks for Educating Us!
Chris
I like the idea of having separate processors do separate tasks, but I'm having a hard time understanding how you maxed out an Uno with just a gps and a display. Maybe the libraries are taking lots of resources or some other reasons.
The mega will give you more pins and more memory. But the mega speed is pretty much the same as an Uno. With careful design and execution, you would be amazed at how much one board can do.
If you do end up dividing the tasks among multiple boards, then I suggest using CANBUS to share the information.
I'll have to revisit the GPS issue again. I had thought that the bottleneck was actually the Arduino doing math. The GPS receiver can operate at 10 Hz, but connected to the Arduino I was lucky to get 1 Hz. Perhaps I have something wrong in my code, or it's actually the receiver that's the problem, or I'll just switch to a Raspberry Pi for that application. Having a 3-axis accelerometer connected would be pretty nice, if I can get back to a 10 Hz update rate.
I like the use of the Arduino for measuring and showing the active temperatures! Your intake air is cool and cooler is better!. Is there any way to help get ambient air into the intake, directly? That is what I like so much about the L88 Hoods that GM designed and built back in the 1960's. I have wanted to generate that type of data you are showing but with my L88 Intake setup. I want to see the air temperature as it enters the throttle body on my High Compression C3. Getting the coldest air possible was why they designed it the way they did as it is critical when racing a Big Hot engine.
I have been using a pair of thermo-couples on my Radiator IN and OUT to see just how efficient my BeCool Radiator really is using the EVAN's NPG in it. As soon as I am done with the Radiator I will focus on the temperature of the incoming combustion air. I will then move on to get the fuel as cool as I can before introducing it to the engine.
Being a Private Pilot and being aware of the "engine monitoring devices" they use in the aviation industry I have always wanted something like one of those watching over the Corvette's engine all the time. They are monitoring the vacuum, the temperatures, operating temperature and individual exhaust temperatures. I have headers now but am contemplating going back to the factory exhaust manifolds as they were a kind of a header in 1968 on the 427's. I will drill it out for a thermo-couple and have it Ceramic Coated with the Higher than Normal temperature Ceramic coatings. My Headman headers are over 25 years old and showing their age a bit.
The Holley Sniper System uses CANBUS and it is really a great way for things to communicate. I am sure that you know far more about it than I do but it is very handy and easy to setup. I am still learning....
My Son is a Computer Software Code writer and he absolutely LOVES the Arduinos and other PLC's. He writes software for them and has dozens doing little tasks for him all over his house. He can't understand why I don't use them as much, it happens to have something to do with I was taught COBOL and FORTRAN. These newer programming languages are much better and easier to use (IF they make sense to you).
Thanks for Educating Us!
Chris
As for the CAI question, in both cars I installed the L82 system as designed, and only modified the dual-snorkel assembly to remove restrictions, and block off extra ports. I did NOT seal the gaps where the plastic pieces join to go around the (nonexistant) AC compressor, for example, but that would certainly help. As it is, the system gets cold air from the front of the car, but it is above the radiator. It has a long, uninsulated, and slightly leaky path to follow to get to the carb. You can clearly see in the data when I had to stop at a stoplilght. The intake air temp creeps up, as does the engine compartment temp.
Using a better-sealed system, an insulated system, or a system like @pauldana sells, might help, as would plumbing the intake down low behind the grilles in the front bumper. A friend of mine totaled his C5 when he drove through a puddle with a similar CAI setup, so I won't be doing that.
If your son is an Arduino wiz already, give him a list of requirements, and you'll quickly end up with a system 10-times better than anything I can write.
Last edited by Bikespace; Oct 27, 2021 at 02:25 PM.















