10v to 5v Arduino Analog Input Help

Hi!

Firstly, please excuse my fairly basic knowledge of electronics :slight_smile:

I have a pressure sensor hooked up to a vacuum tank that outputs a 0-10v signal depending on the internal pressure (0v = 1bar abs, 10v = 0bar abs). Obviously, the arduino needs this converting into a 0-5v signal for the analog pins on the board. I tried to use two 330ohm resistors for this purpose in a 'voltage divider' systsm that I thought would be bulletproof, but have not managed to get it working :frowning: It seems that at low voltages (>1.5v) the arduino reads the signal correctly, however the voltage at A0 seems to max out at approx 0.87 volts, after the vacuum tank reaches 0.85 Bar abs. Pulling any more vacuum results in no increase in the voltage even though I know the pressure sensor is outputting 10V at full vacuum. So basically I ask why is my potential divider circuit not working in this case? I created a wiring diagram below to show my setup, and would really appreciate any advice you may have - I may have missed something completely obvious so please don't hesitate to point out anything I've done wrong!

Thanks so much in advance.

George.

Use higher value resistors, 10k each.
And you need GND from the pressure sensor brought over to the Arduino too.

1 Like

Cheers for the advice mate, can i ask what the reason is for needing higher resistor values?

Understood with the common ground, I will make the changes and report back :slight_smile:

George.

Hi, welcome to the forum.

Please use red and black for the power. The GND of the pressure sensor should be connected to the GND of the Arduino board. The value of 330Ī© is too low.

A higher value for the resistors is safer, for example when the sensor is still on and the Arduino is turned off.
A higher value is more accurate, because the sensor output does not drop so much, depending on how much current it can give at the output.
A value of of 1MĪ© is too high, the Arduino board reads more noise with such high values.
A good value somewhere between 330Ī© and 1MĪ© is 10k :wink:

Do you have a datasheet for this sensor?

Hi mate, thanks for your reply!

Appreciate your explanation as well - i will make the change to 10K resistors and see how i get on! And yes i wasn't sure whether i should use a common GND for the sensor and the arduino so i will also do this :smiley:

George.

That depends on the sensor. There are cases where you should not connect grounds.

Of course! I can't attach it, but you can find it here:

https://uk.rs-online.com/web/p/vacuum-switches/1259974?gb=s

(Note the part number SPTE-V1R-Q4-V-2.5K)

According to the data sheet, the minimum load is 15K, so 2x330=660 is way to small.
30K is twice the minimum, so I would use two 15K resistors just to be safe.

2 Likes

Hi Jim,

Ah - makes sense, I must confess I didn't spot that. I will get hold of these resistors and give it a go :slight_smile:

Thanks for your help!

George.

Well, if you were not looking for it ...