Hello. I'd really appreciate some guidance. Been googling for some time, but my newbieness kinda prevents me from really understanding what needs to be improved exactly.
I have a small project to monitor oil and coolant temperature in my old-school carbureated car that has no electronics except for ignition and lamps.
I have an UNO, 2 Thermocouples with MAX6675 modules and a DC-DC step down converter set to 9 volts to power it all up without spikes in voltage. At least I hope that it does so.
Since my thermocouples are of grounded type and they are physically connected to engine, If I'm powering the circuit from the car battery through DC-DC converter they read zeroes only.
Am I correct, that I can eliminate this issue either by using external power supply (some battery) or by isolating thermocouples' tips from the metal?
If I go with isolating the thermocouples and using DC-DC converter:
Is it correct to feed power from DC-DC converter to barrel connector on arduino or should I have gone for VIN pin directly setting the converter output to 5V?
In principle, my circuit works - I tried it on my car already, powering with a 9V battery - but if I run the engine, ignition creates too much noise and all readings are messed up.
How do I protect the signal? I read here about using ceramic capacitors. But where in the circuit do I put them and what capacity they should be?
I don't get any issues with engine noise and it's really easy to find library code and demonstrations online to help with the setup. I also like using a standard automotive part readily available at most any parts stores.
Your coding will need to incorporate the Steinhart-Hart Coefficient Equation. It's fairly straightforward. Here's the weblink to assist: Steinhart-Hart Calculator
Here's a nice library that also shows the Voltage Divider circuitry: Steinhart library
To get the resistance/temp measurements, just put the sensor in an icewater bath (0C), then in boiling water (100C), and then in something inbetween (usually around 25C). Measure the resistance and plug that info into the calculator. The 3 coefficients are used in the coding equation.
There is a good app note AN2689 by ST on automotive electronics. reading it will help you a lot. Your old-school carbureted car will have a lot more noise problems then the newer ones.
You need the shielded cable to the thermocouple to be long enough so the amplifier module is as close as possible to your Arduino. Do not use ordinary shielded wire, but special wire made for thermocouple use.
Review the range of temperatures you are going to measure and look for a suitable RTD (Resistance Temperature Detector) type.
A thermocouple is a bit of overkill and the voltage from the couple is way down in the possible noise from an IC engine.
@Bwanna suggestion, using existing automotive conditioned sensors is probably the best solution.
The sensor will most likely be a thermistor, which although on-linear will give a much bigger voltage change than your thermocouple. As @TomGeorge says you will get major problems trying to extract sensibl;e values from a thermocouple in a noisy environment.
A suitable sensor will give you values you can measure without amplification.
If you haven't already may also want to research noise suppression techniques on classic cars. This was a common issue back then and there are many tried and proven techniques. Here's an interesting link that gives a nice overview. Noise Suppression
We used to also add Grounding straps to/from the engine and body frame... sometimes that helped as well.
Adding 2 Exhaust Gas thermocouples to a Rotax mounted in an experimental airplane was somewhat painless. MAX31855 (2) were used as the instrumentation amps. Proper grounding and project in aluminum project box with bypass caps due to RF aviation radios.
A custom board is highly recommended with appropriate screw-down terminals to terminate the thermocouples.
I dont call that painless, compared to using thermistors! (which are purpose made for the job, and dont need much signal conditioning)
Temperature response
Most NTC thermistors are typically suitable for use within a temperature range between −55 and 200 °C, where they give their most precise readings. There are special families of NTC thermistors that can be used at temperatures approaching absolute zero (-273.15 °C) as well as those specifically designed for use above 150 °C.
The temperature sensitivity of an NTC sensor is expressed as “percentage change per degree C" or "percentage change per degree K". Depending on the materials used and the specifics of the production process, the typical values of temperature sensitivities range from -3% to -6% / °C.
Characteristic NTC curve
As can be seen from the figure, the NTC thermistors have a much steeper resistance-temperature slope compared to platinum alloy RTDs, which translates to better temperature sensitivity. Even so, RTDs remain the most accurate sensors with their accuracy being ±0.5 % of the measured temperature, and they are useful in the temperature range between -200 and 800 °C, a much wider range than that of NTC temperature sensors.
Comparison to other temperature sensors
The precision of NTC thermistors is similar to thermocouples. However thermocouples, can withstand very high temperatures (in the order of 600 °C) and are used in these applications instead of NTC thermistors. Even so, NTC thermistors provide greater sensitivity, stability and accuracy than thermocouples at lower temperatures and are used with less additional circuitry and therefore at a lower total cost. The cost is additionally lowered by the lack of need for signal conditioning circuits (amplifiers, level translators, etc.) that are often needed when dealing with RTDs and always needed for thermocouples.
You could be getting a ground loop causing or contributing to your noise. I would have the Max, Uno, and converter going to a common ground bus and then going directly back to the battery. Try to run a block ground close to your sensor directly to the battery as well.
You can also try wrapping the whole thing in aluminum foil and then ground only one end at the battery ground to reduce EMI. It's important to only do one end as to prevent another possible ground loop. It's also a cheap test which is nice. If the aluminum foil works, you could use aluminum tape or other similar solution for the long term.
Everything works fine right till... you start the engine. I can share this much with you. I have one of those DC to DC converters laying here just like the one you are using. Interesting as it I measure resistance between - Vin and -Vout I get bouncing numbers leading me to believe they are not common to each other. However when I power it up and adjust for 12 volts in and 5 volts out (or any voltage out) it matters not which common I measure from, I get the same Vout voltsge.
Next I would use decoupling caps on everything. I would use a 100 uF and a 100 nF on each power input including the DC / DC converter and the MAX6675 modules.
The actual MAX6675 chip itself data sheet does not reflect T- being grounded, however, the typical application circuit reflects -T being grounded. You may want to see how your modules are configured.
As you already know you apparently have grounded thermocouples.
Given a choice in applications like you have I prefer ungrounded with the sheath grounded and armored cable right to my temp transducer. This is where a scope would be nice to look for noise on supply side or sensor side. Keeping in mind everything works fine right till the engine is running and external power removed and you are on automotive system. Automotive electrical systems, especially older ones are known for noise. Start with decoupling capacitors.