Engine Sensors with arduinoMega, need help

Hello everyone.

I'm trying to read the engine sensors of an old car (not OBD or similar) with arduino mega. The problem is that the sensors are single-wire and threaded in the engine, so when I want to read a sensor, for example the coolant temperature, I have a constant 12v of the positive and it is the negative that varies the value on the resistance (coolant sensor) giving the voltage that I must interpret with respect to a temperature. So far so good. I have the code worked out and it seems to work fine.

I use a voltage divider to be able to manage the values, and when I try to read only one sensor it seems to work well with arduino (remember that it is the negative that varies), but when I try to read more than one sensor at a time disaster occurs.

Two sensors give two different voltage values varying the negative, thatÂŽs right because are different sensors (for example coolant sensor and oil press sensor) but when I connect the voltage divider with the negative to the arduino board, the voltages that should be different from each other are equalized and the reading is not correct.

I tried running the sensors through FZ0430 to see if I could make the voltages independent, but more of the same, having to connect them to the arduino GND the voltage equalizes again.

I've read hundreds of posts in the forums trying to find a possible solution without success.

Any ideas on how I can fix the problem?

Thank you in advance

Sorry not without more information. Post an annotated schematic showing exactly how you have wired it. Be sure to show all connections, power, ground and power sources. Is this going to be in an operating vehicle powered by its electrical system?

Give us the output range of several sensors, that would also help. Also do they change with the battery voltage?

1 Like

Hi @gilshultz . Thanks for your help!!

The system is powered by the car's own battery. The battery is connected to the motor and the sensors are original. I have obtained the necessary voltages through the original dashboard of the car. Use the original sensor and the original electrical connectors to obtain the values in volts. (12v from battery and ground from sensor wich is a variable resistor)

The values are, for example:

Coolant Temp;
0ÂșCelsius - 1.90 volts
0ÂșCelsius - 1.90 volts

Sorry. I continue with the values;

Coolant:
0ÂșCelsius - 1.90 volts
60ÂșCelsius - 6.30 volts
80ÂșCelsius - 6.93 volts
110ÂșCelsius - 7.79 volts
130ÂșCelsius - 8.68 volts

Oil Press:

0 Bar - 6.37 volts
1.5 Bar - 7.53 volts
3 Bar - 8.07 volts
6 Bar - 11.8 volts

Oil Temp:

0ÂșCelsius - 1.87 volts
60ÂșCelsius - 5.28 volts
100ÂșCelsius - 8.12 volts
130ÂșCelsius - 9.42 volts
160ÂșCelsius - 10.52 volts

My connections:

This wiring is for one sensor. If I connect mores sensors the ground to arduino is the problem. All the sensors values going to equal. I use a voltage divider to convert the 12volts max of the sensor in 5 volts max for handle with the arduino board

Hello dvesa

Welcome to the world's best Arduino forum ever.

Check this wiring proposal:

Have a nice day and enjoy coding in C++.

Hi,
I assume the guages that the sensors were connected to battery positive have been removed.

If so you need to include a resistor from the sensor to battery positive to have current flowing through the sensor.
This is a suggestion, open to all who want to add/remove/change elements

The resistors RM are the replacement for the meters.
The potential dividers R1/R2, R3/R4, R5/R6 are to scale down the voltages on the sensor terminals.
The potential divider R7/R8 monitors the battery voltage to help calibrate the other analog inputs as the battery voltage varies from 12 to over 14V.

Just a suggestion, feel free to comment.

Tom.. :grinning: :+1: :coffee: :australia:

1 Like

Hello guys. Thanks for your reply.

@paulpaulson your wiring seems conect 12v battery to engine block. In the engine block is the negative of the battery connected already. This proposal not shortcircuit or damage any elements?

@TomGeorge Thanks a lot for your proposal. Looks similar to @paulpaulson with a few variations.

Maybe I don't explain everything well. My plan is to eliminate the original gauges in the car and use an arduino to read the sensors. Then send the information to a nextion screen with the values.

Do you think I still need the RM?. Another question. Maybe my mistake is not having connected the negative of the motor to GND on the arduino, and then connecting the negatives of the voltage divider to negative as well instead of sending them directly to the GND of the arduino?. Could it be?.

I really appreciate your help with this project. I've been working on it for a long time and I still can't get it to work well.

Hello dvesa

Forward the datasheets of sensors used.

That explains a lot, you are sort of using the Arduino as a power supply. Ground is the reference for all of the measurements and the sensors, they should all be connected together. I found this drawing, and it shows a constant voltage regulator. If my memory is correct the gauges also worked in current mode IE mill amp meters.

What are the values of the resistors? What protection have you added to protect for such things as a reverse battery or load dump? Here is a bit of information that may help you keep your system working. There is a good app note AN2689 by ST on automotive electronics. reading it will help you a lot.
https://www.st.com/resource/en/application_note/cd00181783-protection-of-automotive-electronics-from-electrical-hazards-guidelines-for-design-and-component-selection-stmicroelectronics.pdf
Also take a look at this: Distilled Automotive Electronics Design | Analog Devices and then there is this one.
Transient Voltage Suppression in Automotive Applications

1 Like

Hi.

I spend lot of hours searching for any information like datasheet of the sensors or equivalent with no luck at all

The sensors are:
FAE 31280 (Coolant Temp)
FAE 14520 (Oil press)
FAE 31610 (Oil Temp

Also searching for original Renault OEM with the same luck.

Hi gilshultz!

For the protection of the sistem I think to use a recycled electronic of on cigarrete mobile charger, because is something very simple and I can suply to it directly from the car to give back 5v., also all the protections are integrated in it.

The value of the resistors of the voltage divider are 1000 ohm and 630 ohm. the value of the gauge resistor is unknow. At the moment I donÂŽt have here the gauge to measure it. As soon as i can take here the gauge I will measure it.

Tomorrow I will make some tests in the breadboard following your electronic suggestions and let you know the progress

Thanks in advice.

1 Like

Hi @TomGeorge

I Make a test in the breadboard. All the connections done excepts the RM resistor put in place.

When I connect the breadboard to the arduino board the volts of the sensors grows up between 2 or 5 volts.

Could the problem no put the RM resistors?
What would be doing wrong? Any idea

Thanks a lot

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.