DF Robot pH Meter Pro Kit V2 and Arduino with external power supply

Background:

I have a home aquaponics system that runs off a 12v power supply at the wall of my house. There’s about 3m of wire running to the aquaponics system underground to run 2 large pond pumps.

I am attempting to build an automated pH controller as well as use the Arduino to control a couple of pumps for other things like spraying pesticides on a schedule.

Currently I have a 12v to 5v transformer I bought off ebay, an Arduino Uno Wifi r3 and a DF Robot pH sensor Pro Kit V2. To dose the pH level I have some DF Robot Peristaltic pumps and to control spraying pesticides I am using a quad relay board.

The problem:

When the pH sensor is connected to the Arduino and powered via my PC usb port, I was able to calibrate and see correct readings from the pH sensor. I have a solid pH4 reading in the buffer solution 4 and a solid pH7 in the neutral buffer.

When I connect the 12v to 5v power supply to the vin pin on the Arduino I get a varied reading bouncing from pH 2.47 to 2.87 and is very unstable when reading the pH4 buffer solution.

I am assuming that the power supply is not feeding a clean 5v supply to the sensor and it’s causing issues.

I’m using the sample code provided by DF Robot to read the sensor values:

The wiring setup:

12v comes in from a wall wart power supply at the bottom of the photo to the 12 to 5 volt power supply which is then used to power the Arduino, 2x peristaltic pumps and the relay module. I’m using the 5v out and gnd pins on the arduino the power the sensor. All gnds are tied together back at the power supply.

1 Like

Hi Steve
Remove the 5V from “Vin” and put it on “5V”. “Vin” expects a voltage the same as the round plug Between 7 and 12V. This is then regulated to 5V and this 5V is available on the “5V” pin. By applying 5V to “Vin” the regulator will not work and neither will the Arduino. Applying 5V to the “5V” pin bypasses the regulator and will power the Arduino OK.
Cheers Bob

Note: All this is explained in the documentation and description for the Arduino UNO V3 freely available.

Oh I forgot. Welcome to the forum Steve

Another note
I don’t think it is a good idea to power from USB and “5V” at the same time. If USB is connected disconnect the external 5V from “5V”.

2 Likes

Thanks for the tip Bob, I will try powering it on the 5v pin and see how that goes.

As for powering from USB and the 5v pin at the same time, how does one debug running code and do testing without both plugged in? My PC usb port wouldn’t provide enough current for these devices to solely run off.

2 Likes

I’ve just powered the arduino by the “5v” pin as suggested and I’m getting a much more stable and accurate reading. Getting a fluctuation between 7.0 and 7.07 in the neutral solution now.

2 Likes

It appears from the image of your wiring that the Arduino 5v is powering the sensor only. The pumps and relays appear to be powered direct from the separate 5v regulator. There is no need to connect the regulator 5v and the Arduino 5v. That would be a typical setup for debugging. If the sensor draws more than the Arduino can handle you could power that from the regulator supply, in the same way that you have set up the other devices.

When running standalone you remove the USB cable and connect the regulator output to Arduino 5v.

2 Likes

Hi Steve
Jeff has hit the nail on its head here.
It is not a very good idea to try to power anything from 2 supplies without using isolation diodes. In fact when a voltage above about 7V is connected to the round plug or “Vin” the USB is disconnected with a high side Mosfet switch to prevent any back feeding damaging the USB source.

If it is imperative that you need to use the external 5V and USB at the same time you will have to sacrifice a USB cable. Very carefully open up the cable and cut the Red wire. Make the ends safe to prevent accidental shorts. This cable will then no longer be able to supply power for any other USB device.
Cheers Bob

2 Likes

Actually guys, I believe you are incorrect in saying that you can’t power this Arduino and have it plugged into USB at the same time.

See this discussion:

2 Likes

That’s the case for USB and VIn both connected - VIn will always be selected when it is valid. But the discussion was about USB and +5V connected at the same time. This is not recommended if there could be a voltage of difference of more than about 1.5V, and that can happen if the USB is disconnected while +5V is connected, as there is no diode feedback from output to input for the onboard regulator. Using the 5V pin on the Arduino as a power input should be avoided, and is seldom necessary. There is a more thorough discussion here.

2 Likes

Hi Steve.

Didn’t say that. I quote

Not quite the same.
I also said.

Which is what Jeff is also saying.
Cheers Bob

2 Likes

You guys are literally contradicting each other here!

2 Likes

Hi Steve
I am not getting into an argument over this. What Jeff says is correct, it should be avoided if you are using USB or Vin to power an Arduino. What I am saying is it CAN be used if the Arduino is stand alone as I have used a couple of MiniPro units on XMAS lights. The same 5V supply powers 2 strings of LEDs and MiniPro Arduino via “5V”. All OK. If I want to change the Arduino sketch I unplug it and take it to my computer where it is powered via USB. All good and all too easy.
Enough said as far as I am concerned.
Cheers Bob

2 Likes

Welcome Steve, and hello all!

Bob and Jeff have you pointed straight down the road to success.
To make sure you stay out of trouble using Bob’s tip of isolating and supplying from a computer would be best - I often use a slither of electrical tape.
Just be sure to disconnect the USB connection first then the power supply to avoid damage.

(It also doesnt help that the Uno schematic isnt overly easy to understand)
Liam

Hi Liam

This came up quite recently about all those little tags with no indication of how many connections there are. Particularly as there is often no need and a simple wire will suffice. I think the discussion started out with the ground connection on one of those quad level converter schematic. The Modern (???) system of using these tags is prone to mistakes methinks.
Cheers Bob