Adding constant voltage ofsset to analog sensor

Hi

I am making a project with capacitive soil moisture sensor
(similar to: https://www.aliexpress.com/item/32886868425.html).

The signal produces by this sensor is 0-3v. There will be a lot of interference between sensor and Arduino + distance is up to 5m.

I was thinking to use DS2438 (DS2438 Smart Battery Monitor | Maxim Integrated) to read the signal and then communicate the results over one-wire. Seems like a decent idea to me except, the accuracy this chip ADC provides at low voltages is very poor.

Is there a way how to raise soil sensor output 0-3v to let say 6-9v which is much better for DS2438?

Thank you

There will be a lot of interference between sensor and Arduino + distance is up to 5m.

Not if you use shielded cable.

There will be intereference at Arduino location and I generally want to avoid this solution. My priority is to read and digitalize the sensor output near the sensor itself. Also I plan to have several sensors and don´t want to get into multiplexing, etc.

There will be intereference at Arduino location

Not if you use shielded cable + shielded enclosure.

For help on this forum, please read and follow the directions in the "How to use this forum" post.

Thank you for advice. I truly apperiate that you want to help. However the question I had was about voltage levels, not about intereference... What makes you believe that power supply of my Arduino is rock solid, etc.?
I have had a lot of fun with both external ADC and Arduino built-in ADC and I made it pretty clear in the question this is not the way I wanna go.

jremington:
For help on this forum, please read and follow the directions in the "How to use this forum" post.

If there is something I have done wrong, please let me know what exactly I have done. I am just human and make mistakes.

PErhaps we don't understand why you want to add to the base voltage. If the EMI is a 4 volt peak signal, it will be ADDED to what ever voltage is on the wire. 3 volts + interfering signal = 7 volts. If you raise the wire voltage to 6 volts, 6 +4 = 10 volts max.

Paul

Paul_KD7HB:
PErhaps we don't understand why you want to add to the base voltage.

Ok, I will explain in a different way. :slight_smile:

Sensor produces signal 0 to 3V
DS2438 can read 0 to 10V theoretically
DS2438 can read 2 to 10V accurately

My goal is, thus to add permanent 2 or 3V to the sensor output so I get voltage, where DS2438 provides accurate output. I hope this helped :wink:

Let me see if I get this right.
You worry about sending a most likely low-impedance (opamp output) DC signal over a 5 meter distance.
So you first want to convert it with a coulomb counter to a more vulnerable digital signal.
Leo…

We do not know what your actual problem is, only some vague notions about your proposed solution, and that "solution" does not make much sense. Please explain and provide evidence for the actual problem.

To read a 0-3V signal in a noisy environment, a sensible approach would be to use shielded cable to send the signal to an Arduino in a shielded enclosure, and use the built in ADC to convert it.

The Arduino ADC is equally accurate over its full range, which could be 0-3V using a 3V ADC reference voltage.

Do not waste everyone's time by posting links to devices that are "similar" to the ones you will be using.

similar to: Analog Capacitive Soil Moisture Sensor V1.2 3.3~5.5V Corrosion Resistant With Gravity 3 Pin Interface for Arduino Raspberry|Sensors| - AliExpress

I would like admins to close this thread.

Apparently there are only two kinds of people - those who don´t read my text and solve imaginery problems and the others who just want to point out ridiculous details. When I say similar to...I mean the same product from different seller. There is never "the same" thing when it comes to Chinese sellers.

Be careful not to let the screen door slam shut on your way out.

What is this way of thinking based on. Actual problems or imaginary problems.
DC (0-3volt) is extremely easy to filter at the receiving end, with a capacitor to ground.
A digital signal is harder to transport over distance.

And... this is a low resolution soil moisture sensor.
I doubt you're going to get more than eight or ten reliable states of moisture.
Leo..

Bombos3:
Apparently there are only two kinds of people - those who don´t read my text and solve imaginery problems and the others who just want to point out ridiculous details.

No, because they read your text (so did I) and concluded (imho correctly) that your proposed solution is utterly and entirely unsuitable for the problem at hand.

Turning an analog voltage into a digital signal is done by an ADC chip, not a battery management chip. Any halfway decent ADC will have no problem whatsoever turning a 0-3V signal into some digital signal.

Then indeed you have the problem of the digital transmission - most such chips use I2C which won't work well at that distance. SPI has better chance, otherwise you have to convert it into a long distance serial protocol such as RS485, which itself is pretty resistant to interference.

You complain about instability to the Arduino's power supply: that 5m wire in a noisy environment is making matters worse. Or how do you plan to get power to the sensor?

The alternative to this all is indeed a shielded cable and some filtering caps and you have a very clean analog signal right at your Arduino, 5 meters away from your sensor.

When I say similar to...I mean the same product from different seller. There is never "the same" thing when it comes to Chinese sellers.

We have long ago learned to distrust anything "similar to" as that means "it's not this". Why not sending the link to the site from where you actually bought it (or plan to buy it) instead?

But well, you can be boneheaded and roll your own solution with that DS2438 chip (which the web site even said is end of life, and gives a replacement for). It's your time/money that's wasted. Don't come back complaining it didn't work.

Bombos3,

I agree with all the comments above about what you are asking not being the right solution, however, to answer the question you asked:
You could put a fixed voltage reference in the ground connection of your sensor so as to raise its ground voltage by 3V (or whatever), probably an op-amp configured to have the voltage you want at its output, then make that the ground of the sensor, or even possibly use a voltage reference diode directly in the ground connection if the current through the sensor is compatible with the current requirements of the reference. Put a 0.1μF capacitor to ground across the reference.

The other way to get a fixed voltage shift is to pass a constant current through a resistor, which will give a constant voltage drop. You will probably need to buffer the output of the sensor with an op-amp to feed the resistor chain.

However, I stress I don't think this is the correct solution to your problem, I think the suggestions others have given you are far more likely to solve your problem.

PerryBebbington:
Thank you for answer :slight_smile:

PerryBebbington:
You could put a fixed voltage reference in the ground connection of your sensor so as to raise its ground voltage by 3V (or whatever),

Sounds like this can work but it's also as if you're asking for problems: ground loops, no directly shared ground, keeping the offset itself stable, plus the required extra circuitry introducing noise and maybe other artefacts.

wvmarle:
Sounds like this can work but it's also as if you're asking for problems: ground loops, no directly shared ground, keeping the offset itself stable, plus the required extra circuitry introducing noise and maybe other artefacts.

Totally agree with all that, which is why I said that all the other advice that had been given was better than the original idea of adding an offset.

I saw that :slight_smile: Mostly wanted to spell it out for OP what kind of issues they can expect (assuming OP hasn't left already, not liking our advice).

I went through all your comments and decided to focus on signal shielding and output smoothing as suggested. Despite that I still appreciate to get the answer for what I asked for :slight_smile: