Go Down

Topic: Problem with PH Sensor reading (Read 376 times) previous topic - next topic

emc

I have a MEGA 2560, a 2x16 LCD with backlight control and a PH probe module with BNC connector among others connected and running.

My problem is the following:

Power supplied by USB. (This is only going to be the case during the testing phase)
When the LCD backlight is switched on/off (through Digital Output HIGH/LOW) the raw analogue signal for the PH sensor changes by 15 points. The other sensors are also affected but only by a value of one or two.

Has anyone run across a similar situation?

Things I have already tried with no change

1. I have changed the pins used for all devices concerned. Wasn't expecting this to fix it but worth a try anyway.
2. Isolated the LCD power supply (however I need the retain the common ground obviously).

I have also measured the voltage change when the LCD backlight is switched off .
The probe power/ground, the voltage across the probe both increase by 0.15 volts.

Voltage change across the other sensors are a third of the PH measurement.

Finally this problem goes away when the Power is supplied by an external source. I assume this is because the voltage regulator comes into operation (I think I am correct in saying it is not used when power by USB) and does a better job of maintaining a stable power supply.
Before anyone says "then what's your problem?", as you all know it is easier to do testing with the serial monitor connected via USB etc etc.

Thanks all and it would be interesting to see if anyone else has experienced this and if a way around it was found.

Wawa

Has anyone run across a similar situation?
Yes, common problem.

Returned value of the A/D depends on two things.
1) voltage on the analogue input
2) reference voltage of the A/D (the ruler that measures it)

Default reference is Arduino's power supply.
If supply sags, the ruler that measures the input voltage gets smaller.
The result is more A/D values.

A Mega has TWO buildin regulated/stable reference voltages. A 2.56volt and a 1.1volt Aref.
If you use them (code), then A/D measurements are independent of the (USB) supply.
If you CAN use those Aref voltages depends on your hardware.
Post a circuit diagram, a list (links) of the sensors, and your code (read forum rules first).
Leo..

wvmarle

pH sensors usually use an absolute voltage as off-set (typically 2.5V to be nicely in the middle of the ADC with 5V reference). The output from the pH probe is added to that: 0 mV when at pH=7, negative when higher, positive when lower.

If your sensor provides a relative output (like a thermistor which is basically a voltage divider) the output varies with Vcc and your reading doesn't change.

If your sensor, like typical for a pH sensor, provides an absolute output, your ADC reading will change with varying Vcc.

And that's exactly what you see here: USB provides a less exact 5V than the built-in regulator provides.

If you can bring down the pH=7 output of your probe to about 1.25V you can use the internal and pretty stable 2.56V fixed reference (won't change as long as Vcc is well above that value).
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

emc

If you can bring down the pH=7 output of your probe to about 1.25V you can use the internal and pretty stable 2.56V fixed reference (won't change as long as Vcc is well above that value).
That may be very useful. I will give it a try since the expected PH variance will only be 4-10 at the absolute most (fish will be well and truly dead by the time either of those are reached).

Thanks

wvmarle

Then your total variance in voltage coming out of the probe will be about 360 mV. Depending on the amplifier that's connected to your probe you may get a bigger range, there may be a x2 or x3 gain, depending on how the circuit is designed.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Go Up