Reading car OEM pressure sensor

Hi everyone,

I am trying to read the signal output out of the stock turbo (boost) pressure sensor, which is also connected to a stock analog boost gauge that came with my car.

The sensor is a 3 wire sensor; 12v supply, ground and signal output. The signal output varies from 0-5 volts. I know what voltage corresponds to what pressure reading so that's fine.

For example when there is power to the sensor the analog gauge reads 0 PSI and voltmeter reads 2.3 volts.

The issues are as follows:

  1. With the gauge connected to the sensor, I try to also read the signal output from the sensor with an Arduino analog input pin, the readings however are very erratic. They jump from 2.3 volts to 3.3 volts erratically and not stable at all.

Voltmeter reads the voltage as a stable voltage of 2.3 volts.

  1. When I disconnect the gauge completely and apply power to the sensor it really should read 2.3 volts at 0 PSI but it reads more like 3.5 volts, that's about 1 volts more! This measurement is taken using my voltmeter.

Any ideas on first of all how to rectify the erratic readings and then any ideas why the voltage doesn't read correctly without the gauge connected?

Any help is much appreciated.

Thanks.

Have you looked at the output on an oscilloscope? It's possible the output is PWM and your integrating voltmeter is showing you the waveform average, but your ADC is reading high or low values or somewhere in between, depending on the when the SAH takes its snapshot.

Have you got your grounds connected appropriately ?

Billysugger:
Have you looked at the output on an oscilloscope? It's possible the output is PWM and your integrating voltmeter is showing you the waveform average, but your ADC is reading high or low values or somewhere in between, depending on the when the SAH takes its snapshot.

I haven't tested with an oscilloscope, but I am 100% sure the output from the sensor is analog output.

michinyon:
Have you got your grounds connected appropriately ?

Yes, grounds are connected appropriately.

I haven't tested with an oscilloscope, but I am 100% sure the output from the sensor is analog output.

Then take a look with a 'scope anyway to see what the input voltage looks like when you expect a steady reading and your ADC reads variations. Either your expectation or the ADC is wrong, and the 'scope will reveal which is which.

From many years of fault finding, 100% certainty in anything leaves a blind spot in which the answer can evade you. Always double check everything you think you know.

Thank you ever so much for the advice. I will for sure connect to the 'scope and check.

Something else came to my mind; I use an L7809 voltage regulator to power up the Arduino in the car. I use a diode for reverse polarity on the input pin and a ceramic 100nF capacitor on the ground pin and the voltage output. Do you think this could be my issue with having noise on the Arduino side? Or Arduino has enough capacitors etc to make the readings on analog input pins clean?

Thanks.

You probably need 100nF across both input and output of the L7809 to ensure stability, and if you're going to power this when the engine's running, a larger capacitor (100uF perhaps) also across the input, and between that and your +12V fuse (you do have a fuse, yes?) an inductor (often called a choke when used like this). This will keep other noise from the engine electronics away from your supply.

I doubt that supply noise is causing your issues. You have a L7809 before the board, then the board has a 7805 with capacitors, then the processor has its own supply decoupling, and (not that I know the specific circuit), the ADC reference is likely to have its own decoupling too.

What's more likely, if it's noise, is routing of your wiring from the sensor. You must have a good, solid connection between your sensor 0V and the Arduino 0V, and keep the 0V wire close to the signal wire. If the two are apart, then they form a pickup inductance, where the noise pickup is proportional to the magnetic flux passing through the loop area. The larger the loop area, the more noise you'll get. Good practice is to twist these two wires together along their length, with a twist perhaps every 2.5cm or 1". Phone wires, USB and Ethernet wires are twisted like this for the same reason. And keep the wiring well away from ignition wiring and injector wiring.

Similarly, when looking for noise on the oscilloscope, connect the probe ground to you 0V close to where you're probing for a signal, and keep the ground wire short and close to the probe.

By the way, Arduino Community: the number of in-car applications here suggests that a good fused, transient suppressed, filtered, regulated Arduino supply for vehicle use might be a product worth making available. Anyone who wants to market such a thing, and needs help with the design, let me know.

Thanks again. I shall do some extensive tests and see what's what. I may even try and remove the sensor from the car and power it up with a clean power supply to see if it's the car environment or not.

While we're talking about the voltage regulators etc. I use the output from the voltage regulator mentioned and connect to the jack of the Arduino to power it up. This makes the voltage regulator closest to the jack super hot. To avoid this is it better to power the Arduino via the VIN pin with an L7805 instead?

Thank you.

This makes the voltage regulator closest to the jack super hot

Well it depends what you mean by super hot. If you lick your finger, dab it on the regulator plastic and it either boils or dries in a few seconds, then yes it's too hot.

If so, then that sounds more like you're drawing excessive current. The recommended Arduino input voltage range is 7V to 12V, so feeding it from a 9V regulator is almost a luxury. Using an external 7805 will just move the problem, not solve it.

As no doubt you know, the power in watts dissipated by a linear regulator is the voltage dropped multiplied by the current in amps. So use a meter to measure the current and see if it seems reasonable. Without driving anything exsternal in particular, the Arduino core itself will take around 25mA when running. But if you've got an LCD display, a bright backlight, and enough LEDs to light a Christmas tree, and are running all that from the Arduino's Vcc, then you're not being very fair to it. In that case it would be better to work out how much extra current you need, add a good margin for variation, and get a decent switch mode dc-dc converter to supply the 5V. There are plenty on Ebay, and some have been recommended in other threads here recently.

Anyhow, step 1 is finding out why it's getting hot, and measuring current is the key to that. Good luck :slight_smile:

Did some tests. Actually the voltage regulator closest to the jack on the Arduino doesn't get nearly as hot as the actual L7809 regulator!

So I measured the current between the output of the L7809 and the Arduino when nothing is connected to the board. This is about 76mA (0.076A). And the regulator outputs about 8.87v. So from my calculations at room temperature of about 20'C the voltage regulator gets to around 53'C!

With an LCD connected (from 4d systems) to the board, then the current increases to 100mA (0.1A). So at room temperature of around 20'C the voltage regulator gets hot at around 64'C.

Best is to use a switching regulator rather than a voltage regulator?

Ah, I wouldn't be too concerned about those temperatures if they're measured in conditions somewhere near representative of the final installation. Switching regulators are usually far more efficient than linear regulators, and would be a good choice if starting over. But, "if it ain't broke, don't fix it". :grin:

I've tested the sensor on the bench with a clean power supply.

Issue #1 doesn't exists on the bench, no erratic readings.

Issue #2 however still exists, when the output of the sensor is connected to the Arduino we read 3 volts. When I connect my voltmeter also we read 2.2 volts both on the voltmeter and the Arduino, which is correct. I then disconnected the voltmeter and put a 100ohm resistor from GND to the analog input and that corrects the readings. Is this correct what I've done?

Thanks.

Anyone?

I then disconnected the voltmeter and put a 100ohm resistor from GND to the analog input and that corrects the readings. Is this correct what I've done?

That's difficult to comment on without knowing precisely what the sensor is. It sounds like your sensor needs to drive a load, which either your voltmeter or your 100R resistor is providing. Not knowing the output specification, I suggest you try various resistor values over a wide range, and see which ones give you good ADC values across the input pressure range you expect to see. Then choose a resistor value in the middle of the successful range.

I actually got it sorted with a 100ohm resistor and it is working beautifully.

Thanks for your help, much appreciated. I may come back to you for power supply stuff :slight_smile:

Actually I've bought a couple of ready made switching regulator from ebay. As soon as they arrive I will test them.

Thank you.