Go Down

Topic: Switching both Ground and Power (Read 375 times) previous topic - next topic

Korawy

Jan 12, 2018, 11:33 pm Last Edit: Jan 12, 2018, 11:44 pm by Korawy
Hi All,

I am implementing an Hydroponic System that uses two Sensors (EC and pH), I have faced a problem that the readings from the two sensors are interfered greatly while both are powered, but when I switch off one of them then the readings are right.

Unfortunately both power and ground pins must be separated from the sensor controller to get the right reading from the other one.

Now to do that I have thought of a circuit that may do the trick but i dont know if it will work like that !!

Here it is ::



So..Could it work??
Thanks,

Wawa

#1
Jan 13, 2018, 12:26 am Last Edit: Jan 13, 2018, 12:28 am by Wawa
Crosstalk between sensors is usually solved by reading the sensor twice, and using the second reading.
No delays or other code between the readings.
Another solution could be a (10-100n) capacitor from pin to ground.
Need to see a wiring diagram and links to sensors to see if that's possible.
Leo..

raschemmel

#2
Jan 13, 2018, 02:17 am Last Edit: Jan 13, 2018, 02:19 am by raschemmel
Wouldn't it be a good idea to post the part number,data sheet or link to the vendor of the sensor ?

Quote
I am implementing an Hydroponic System that uses two Sensors (EC and pH), I have faced a problem that the readings from the two sensors are interfered greatly while both are powered, but when I switch off one of them then the readings are right.

Unfortunately both power and ground pins must be separated from the sensor controller to get the right reading from the other one.

Now to do that I have thought of a circuit that may do the trick but i dont know if it will work like that !!
There is not enough information presented to come to any conclusion about this.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

TomGeorge

Hi,
How are you powering your Arduino?
How are you powering the sensors?

What model Arduino are you using?

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom.. :)
Everything runs on smoke, let the smoke out, it stops running....

MarkT

#4
Jan 13, 2018, 05:14 pm Last Edit: Jan 13, 2018, 05:16 pm by MarkT
Crosstalk between sensors is usually solved by reading the sensor twice, and using the second reading.
No delays or other code between the readings.
Another solution could be a (10-100n) capacitor from pin to ground.
Need to see a wiring diagram and links to sensors to see if that's possible.
Leo..
This is nothing to do with crosstalk, these are electrolytically in contact with the same solution, so
must be isolated in order to measure anything meaningful.  In fact I suspect the entire Arduino system will need to float for truly accuracte measurement.

Given the electrode potentials are unknown I think you need complete isolation with small relays -
any semiconductor approach might not work if one sensor has significantly different electrode potential
from the other (creating an inadvertent elctrochemical cell between the devices)

So I presume you'd need at least s 3PDT relay for GND, power, signal?
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Korawy

#5
Jan 13, 2018, 08:43 pm Last Edit: Jan 13, 2018, 08:51 pm by Korawy
This is nothing to do with crosstalk, these are electrolytically in contact with the same solution, so
must be isolated in order to measure anything meaningful.  In fact I suspect the entire Arduino system will need to float for truly accuracte measurement.

Given the electrode potentials are unknown I think you need complete isolation with small relays -
any semiconductor approach might not work if one sensor has significantly different electrode potential
from the other (creating an inadvertent elctrochemical cell between the devices)

So I presume you'd need at least s 3PDT relay for GND, power, signal?
Thanks All,

Yes the problem is that both sensors are electrolytically in contact with the same solution, so these are the situations where I get right readings: Either I get the sensor out of the solution or I switch off both power and ground.

Im using arduino MEGa and All the sensors are powered from 5v Source (one source) sorry if I didn't mention that( I dont know if that what you mean by electrode potential).

Currently I am not having any schematic for the system, I may handwrite and upload it if it's urgently needed.

Korawy

So in schematic uploaded, Vcc should be 5v and base voltage should be from arduino IO pins (5v)

MarkT

Google knows what electrode potential is.  Without know the metal the probes are made from its
impossible to say (within a few volts) what the relative potential of the sensors is going to be, hence
choosing relays being the safest option.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

TomGeorge

Hi,

Can you post links to the spec/data sheet of your sensors, please?

How do your sensors communicate with the mega?


Have you tried just isolating the positive to each sensor in turn, to see if the problem persists.
Leave the gnds and signal line connected.

Thanks.. Tom.. :)
Everything runs on smoke, let the smoke out, it stops running....

Korawy

#9
Jan 14, 2018, 08:56 am Last Edit: Jan 14, 2018, 09:02 am by Korawy
Link for EC Senosr: (EC with temp Sensors)

https://www.dfrobot.com/product-1123.html

Link for pH Sensor: (pH Sensor)

https://www.dfrobot.com/product-1025.html

As shown in the links, Sensors are communicating via Analog pins, So in a nutshell The sensor electrode fed its voltage into a small controller that shifts its voltage into a reasonable voltage, hence can be detected by Arduino (Uno or MEGA) and then is fed into analog pins of arduino.

Now whenever I switch off both Power and Ground (NOT ONLY ONE OF THEM and leaving the signal pin) OR pick up the sensor from the solution I got the right readings.

TomGeorge

#10
Jan 14, 2018, 09:14 am Last Edit: Jan 14, 2018, 09:15 am by TomGeorge
Hi,
Because these are not industrial grade sensors, corners will have been made to keep the cost down.

By the looks of it, the isolation of the measuring systems power supply and gnd from the sensor heads has had to be compromised.

Your switching solution may be  the  only way.

Each time you reapply power is there a settling time before you get readable data?

Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

Korawy

Hi Tom,

Yes there's a settling time of 1 min or less especially when both are powered.

So Switching schematic uploaded in the first post will work correctly ?!
My main Question is Is the circuit right electronically ?? Whatever Load is put there Will it (in means of electronics) switch both Power and Ground with no problems ?! Or Am I missing something?!

Thanks,

TomGeorge

Hi Tom,

Yes there's a settling time of 1 min or less especially when both are powered.

So Switching schematic uploaded in the first post will work correctly ?!
My main Question is Is the circuit right electronically ?? Whatever Load is put there Will it (in means of electronics) switch both Power and Ground with no problems ?! Or Am I missing something?!

Thanks,
If your Vcc is 5V, then yes,  a 5V HIGH on the PNP will remove bias from it and turn it off.
As mentioned earlier a relay would do the trick, but if its going to be a relatively high switching rate you may have some reliability probs.
Tom.. :)
Everything runs on smoke, let the smoke out, it stops running....

Korawy

Thanks All,

I have tried transistor switching and it works well.

Go Up