Power issue or something else?

I have an Arduino Nano which I have hooked up with 4 DS18B20 water-proof sensors (D2) in one-wire, one analog Voltage board (A1) and an analog 12 bar water pressure sensor (A2).

Running everything without the water pressure sensor and it all works fine (I output all sensor readings into a JSON object and I get all four temp's, sensor id's and the voltage).

When I plug in the water pressure sensor (which is working with 0-5VDC) I get a pressure reading, but too low and the one-wire bus gets screwed up and it starts missing sensors or give strange readings, e.g. -127 degrees, etc. and every loop (1 second) I might get an accurate reading from one or two of the sensors.

Running it with only the water pressure sensor it gives a more accurate reading for the pressure.

Could it be that the power gives out with all sensors connected?
The sensors themselves is working since they work individually but not all together...

The Arduino is powered over USB from a RasperryPI (with a 4A USB power adapter).

The sensor is of this type:

Which wire from what is connected to which pin on Nano? Post a wiring diagram AND your code.

Quote: "Could it be that the power gives out with all sensors connected?
The sensors themselves is working since they work individually but not all together..."

You have the project. You have the power. You can measure the voltage and see if you have a power problem, We can't.

Paul

Paul_KD7HB:
Quote: "Could it be that the power gives out with all sensors connected?
The sensors themselves is working since they work individually but not all together..."

You have the project. You have the power. You can measure the voltage and see if you have a power problem, We can't.

Paul

Thank you for that useful information!

I am so sorry for not realizing that obvious hurdle so let me rephrase that question... Is it common, or have you seen it happen, that adding a number of sensors to the Arduino could result in a low voltage issue?

JCA79B:
Which wire from what is connected to which pin on Nano? Post a wiring diagram AND your code.

USB -> RaspberryPI 3B+
D2 - one-wire with 4k7 ohm pull-down and four DS18B20
3V3 - one-wire power
GND - one-wire, water pressure and voltage sensor ground
A0 - water pressure sensor signal
A1 - voltage sensor signal
5V - water pressure and voltage sensor power

As the code works and outputs the values correctly (as long as either the one-wire or the water pressure sensor is disconnected) I know it works properly.

Since you refuse to even measure the voltage when you think it could be the problem, I am through, here.

Goodby.

Paul_KD7HB:
Since you refuse to even measure the voltage when you think it could be the problem, I am through, here.

Goodby.

Thank you for inspiring me and helping out with your wast knowledge! Most appreciated!

Thank you for supplying complete information and feedback on debugging steps.

awasen:
Thank you for that useful information!

I am so sorry for not realizing that obvious hurdle so let me rephrase that question... Is it common, or have you seen it happen, that adding a number of sensors to the Arduino could result in a low voltage issue?

Yes. If the sensors draw too much current then the voltage may drop. Have you calculated how much power is available from the 5V pin? I suggest using an external 5V supply with a common ground.

P.S. Why a pull-down resistor for the DS18B20?

adwsystems:
Thank you for supplying complete information and feedback on debugging steps.
Yes. If the sensors draw too much current then the voltage may drop. Have you calculated how much power is available from the 5V pin? I suggest using an external 5V supply with a common ground.

P.S. Why a pull-down resistor for the DS18B20?

Thanks, I will try with an external power supply!

I thought a resistor was mandatory (as it is on the RPi one-wire)... Most guides shows that it is needed as well but I see now on the Arduino page that they are not having one and also powering it from 5V...

I have the older Nano, is that still true for it (no resistor) or is that only for newer models?

awasen:
I thought a resistor was mandatory (as it is on the RPi one-wire)... Most guides shows that it is needed as well but I see now on the Arduino page that they are not having one and also powering it from 5V...

I have the older Nano, is that still true for it (no resistor) or is that only for newer models?

Who said a resistor was not necessary?

We ask for a diagram because "A picture tells a thousand words." You have not reached that milestone yet.

You need a 4.7k pull UP resistor from data pin to Vcc.

Yeah, sorry, pull-up it should have been stated!
I built my own board before and it had pull-down (to ground)...

The 4k7 ohm resistor is connected in parallell between 3V3 ana the signal on D2 for the sensors.

I can try and get a picture later today (the board i mounted in another location where I don't have the key...)

awasen:
I can try and get a picture later today (the board i mounted in another location where I don’t have the key…)

Pictures are nice. Schematics are useful. Need schematic.

A picture with descriptions and a diagram attached...

Arduino.png

And a picture:

Arduino.png

We know the model number of the temperature sensors and know they should draw 5mA each. The current draw of the pressure sensor is 10mA. What is the current draw of the analog voltage board (A1, OP)?

awasen:
The Arduino is powered over USB from a RasperryPI (with a 4A USB power adapter).

So you powering the Arduino from the USB port of the Raspberry Pi which is powered by?

adwsystems:
We know the model number of the temperature sensors and know they should draw 5mA each. The current draw of the pressure sensor is 10mA. What is the current draw of the analog voltage board (A1, OP)?
So you powering the Arduino from the USB port of the Raspberry Pi which is powered by?

I added a 9VDC 2A input voltage for the Arduino now but that made things worse... :o
Now I only get one sensor every like 20th read...

The RPi is powered by a 4A USB charger.

Well, anyone how's "suffering" from the same symptoms, I never figured it out and ordered a new board which works fine (with the same wires/cables and program) so something had gotten messed up on the original board...

Try powering the sensors w/ an external 3.3v source and see if it works. It seems like a textbook overcurrent issue to me but idk for sure.