AC/DC Power Supply for Micro Nano reading Flow Sensor Via ADC

Thread Starter

Vosloo87

Joined Mar 4, 2019
5
Hi All,

I'm using a NANO board with a ATMEGA328p to translate a linear voltage output from a flow sensor.
Its a very simple implementation that reads the ADC pin and creates a calculated pulse signal on another pin.
When the flow sensor is picking up flow all is well and I can see the correct pulse being generated.

I've been powering the NANO off my laptop via USB. And when there's no flow, the sensor output settles at 0.35Vdc as per the datasheet.
However, when i unplug my laptop's power supply and its running off its battery only, this Zero flow output rises to 0.85Vdc.

To this effect, when i power my NANO off an external AC/DC power supply this Zero flow state puts out the higher 0.85Vdc, but when i take earth from the AC side and connect it to the DC negative, This value settles at 0.35Vdc again.

i'm not using any additional analog hardware other that the standard Arduino NANO board. Simple powering the sensor with 5V and GND from the board and landing its signal wire on ADC0.

Any help understanding this grounding potential issue would be much appreciated.

Thanks!
 

djsfantasi

Joined Apr 11, 2010
5,702
Are the Nano’s ground and the sensor’s ground connected? I think you’ve stated already that that is the case.

But I’m not clear what you mean by...
[QUOTE="Vosloo87, post: 1363788, member: 609316]
To this effect, when i power my NANO off an external AC/DC power supply this Zero flow state puts out the higher 0.85Vdc, but when i take earth from the AC side and connect it to the DC negative, This value settles at 0.35Vdc again.[/QUOTE]

Maybe a hookup diagram or schematic will make this clear.

As well as documenting where on the Nano you’re pulling ground and 5V? Specifically which pins. You have a choice with the Arduino family.
 

Thread Starter

Vosloo87

Joined Mar 4, 2019
5
Thanks for the quick response!

I've attached a quick hookup diagram.

It seems to be related to the earth connection i'm either adding or removing. I've shown on the hookup drawing where i'm connecting this AC earth. and by AC earth i mean on the AC side of the power supply I take the earth and connect it to the DC negative (GND).

Thanks again for the help
 

Attachments

djsfantasi

Joined Apr 11, 2010
5,702
What happens if you use pin 4 instead of pin 29 for your sensor ground connection.

Theoretically, there should be no change. But in researching if the two are connected, there are many reports of different behavior when using pin 29 and pin 4 for a ground connection. I have no explanation, but suggest it might be worth a try.
 

Thread Starter

Vosloo87

Joined Mar 4, 2019
5
Yeah i have done ohm test on both GND connections as well as the shielding of the USB connector. They are all connected.

Another thing I've noted since hooking up an oscilloscope is that with the earth connected, the output from the flow sensor when there's flow is very noisy. Then when I disconnect the added earth connection its fine again.

Again, its only an issue when there's no flow. Even on very Low flow the added earth connection makes no difference except for adding noise. The RMS calculation of the output voltage stays relatively the same.
 

djsfantasi

Joined Apr 11, 2010
5,702
Yeah i have done ohm test on both GND connections as well as the shielding of the USB connector. They are all connected.

Another thing I've noted since hooking up an oscilloscope is that with the earth connected, the output from the flow sensor when there's flow is very noisy. Then when I disconnect the added earth connection its fine again.

Again, its only an issue when there's no flow. Even on very Low flow the added earth connection makes no difference except for adding noise. The RMS calculation of the output voltage stays relatively the same.
Yeah, but have you tested the pin connection I asked for?

Pin 29 is connected near the onboard voltage regulator. If for some reason, that regulator is oscillating, it could produce noise on pin 29.

Conversely, pin 4 is the true supply ground. Admittedly, it’s connectef to pin 29, but it’s physically distant from the regulator (6mm?) and intervening circuitry may dampen any noise.

I wouldn’t think this would make a difference. But there’s evidence from other users that it does!

So, I thought that a simple test, moving the sensor ground from pin 29 to pin 4 would be worth the effort.

At least we could learn that was not the problem.
 
Last edited:

Thread Starter

Vosloo87

Joined Mar 4, 2019
5
I did join the sensor GND and the power supply GND and it made no difference.

I've power the board in three different ways, USB, as shown in the hook up drawing and via the ISP header. An in each case if I remove the actual ground connection, the zero flow state output voltage is too high.
 

djsfantasi

Joined Apr 11, 2010
5,702
I did join the sensor GND and the power supply GND and it made no difference.
Just to be clear (and a little bit obsessive), I was way more specific than saying connecting power supply ground and sensor ground.

There should be NOTHING connected to pin 29. Is that what you tested? Just curious...
 

Thread Starter

Vosloo87

Joined Mar 4, 2019
5
I will feed your obsession and confirm that nothing was connected to pin 29 and only pin 4 was used as a common ground connection for both the sensor and power supply
 
Top