"How can I easily draw my schematic...?"
Pencil and Paper, take a picture of it, upload that.
By power feeds I mean the power to the Arduino and the relay board and sensors. People talk about parasite power, what does this mean. I thought you had to upload using schematics using a special drawing tool. i''l do a sketch and upload shortly.
parasite power means the dataline is used for powering the sensors. The DS18B20 are "onewire"-bus sensors.
You can use onewire-sensors in parasite-power-mode which means you only have ground and the dataline. So all in all a two wire-bus.
Any other bus-systems needs 4,5 or 6 wires if you include power and ground.
parasite-power-mode has more restrictions and needs a carefully designed wiring and additional electronics of you want to have bigger distances.
So whenever it is no problem to use a thrird wire for Vcc do it.
The bus-signals switch the voltage up and down very fast.
The voltage has to go up and down
in microseconds 0,000001 seconds.
If the wiring is bad this can bend the signals so much that the communication fails.
This is the reason why USB-cables can't be 10m or more long.
(On a USB-3.0 cable the voltage must go up down in pico-seconds = 0,000_000_000_001 seconds because the signal-length is only nanoseconds)
With a lower pullup-resistor the signal-bending-effect is smaller.
best regards Stefan
OK pretty good schematic. Though it is not handdrawn ;-))
Please give a description of how the three onewire-sensors are connected.
Make a schematic that shows the principle but with numbers that name the real cable-length plus-minus 20 cm
best regards Stefan
Its sensor 2 that is playing up and jumping around. I've lengthened it by soldering a length of 3 core cable of a slightly larger size to the end and heat shrieked the connectors.
OK. This wiring is called a star-topology. This means the wirelength from connectorpoint to sensor is much longer than 10 cm.
A star-toplogy is unfavorable. It is much better to have a line-topology.
Line-topolgy means: wires start at microcontroller -------------------Sensor1-------------------Sensor2-----------------Sensor3
The long branches of a star-topolgy cause much more signal-bening than a line-topology.
Maybe wiring from sensor to sensor means adding a lot more wirelength.
So I would give a smaller pullup-resistor a chance.
Do you have a 2 kOhm-resistor plus a 2 r 5 kOhm potentiometer?
Then you could connect the 2Ohm-resistor in series with the potentiometer and then slowly reduce the resistance to see if you get constant valid measurings.
Best way would be to use an oscilscop to visualise the signal. But buying an digital storage oscilloscope for $300 for just this measuring is not worth it.
The onewire-signa is not continous. This is the reason why you would need a storage-oscilloscope.
Do you have the opportunity to ask somebody if he could do some measurings
2 kOhm at 5V means 5V / 2000 Ohms = 2.5 mA which is a peace of cake for a microcontroller-pin.
best regards Stefan
HI,
Can you please draw a diagram of your pool and where you have the sensors and how long each cable is please?
Also a picture of one of the modules you have the sensor on would also help.
Some bypass capacitors would also help across the 5V and gnd wires at the sensor pins.
Thanks.. Tom....
Hi Tom,
I know that capacitors are placed as close as possible to high-speed logic-ICs to ensure that the voltage stays up on Vcc. Here you called them "bypass-capacitors" wjhat is "bypassing" in this application or do you just mean Power supply backup capacitors?
The lengths of the cables is already there in post #26 2m, 8m, 5m.
@jamesb123: Can you upload a hand-drawn sketch how many meters your wiring would be if you mount the wire this way:
triple-wire-A:
From arduino to your Temp Sensor 1.
triple-wire B:
let triple-wire-B start at the connecting-wires of temp-sensor 1 or maybe 10 cm before.
the other end of triple-wire B connects to temp-sensor 2.
triple-wire C:
let triple-wire-C start at the connecting-wires of temp-sensor 2 or maybe 10 cm before.
the other end of the triple-wire C connects to temp-sensor 3.
this kind of wiring is called line-topology. As long as this kind of wiring doesn't need 100 m it will work better than the star-topology.
I have 21 DS18B20 sensors mounted this way in my heating system with a cable-length of 20m and it works reliably with a pullup-resistor of 2 kOhm.
best regards Stefan
Hi,
As the capacitors are only 0.1uF, they are there to bypass any digital noise that may appear on the power supply.
Electrolytic caps do not necessarily perform well at high frequencies unless they are very low ESR types.
Its a case of horses for courses, in some applications you will see a 10uF electro in parallel with a 0.1uF ceramic or other composition cap.
In other words the high frequency noise that can disrupt a digital signal is filtered by the 0.1uf and the power supply dips due to load changes is taken care of the larger, usually electrolytic cap.
Tom...
PS. Dave ahs a good YouTube Tutorial on it.
Unfortunately the sensors are all in opposite directions. The solar panel is on the roof above the controller the tank is on the floor below the controller and the pool is outside behind the controller. I could possibly run the a 3 core wire out about a meter from the controller and put a junction box where the 3 sensors connect into. This would save a couple of meters. I could also look to remove any spare cable and shorten them if possible. The cable I've lengthen I just used normal 3 core household flex does it need to be a special screened cable for the sensors?
This baffled me until it didn't. "Knowing" that the combo of 0.1 and 10 is just a 10.1 uF capacitor, and further that the 10 was +/- 20% to begin with, I just didn't get it.
I did always leave it as schematics said, even when it meant extra coins for "useless" parts.
Long enough ago I laugh.
a7
That is exactly the wrong way to connect the sensors.
The junction-box creates a star-topolgy. And a star-topolgy creates much more signal-reflections on the loong wires that bend the signal-shape. (the ideal rectangular signal becomes rounded edges which make the communication fail).
In a line-topology you have as short as possible stubs from your main-line to the sensors like shown in this quick drawn schematic. This sketchy sketching is not professional at all but absolutely sufficient to show the principle difference between a star- and a line-topology
Not sure if the sequency poolsensor to tank-sensor to panel-sensor to controller will result in the shortest wiring under the pre-condition of beeing a linetopology.
That's why I was asking for a sketching that shows how the sensors are located.
So maybe a different sequence results in a shorter wirelength. But it has to have a line-topology to minimise signal-reflections. The longer the stubs are the bigger the signal-reflections teh worser the signal gets.
Did you do test a 2 kOhm-pulup-resistor?
best regards Stefan
I think this is the best way to do it. I've only showed 1 wire for simplicity but obviously there will be be 2 more red and yellow following the same route. I will solder the connections about 10cm from the sensor. and heat shrink them to weather proof them as 2 or them are in exposed locations. Can I just use normal 3 core house flex or does it need to be screened?
i've not got any 2k resistors or a potentiometer. I could add a 2nd 4.7K resistor in parallel to make 2.3k or 1 can connect 1ks in series to replace the 4.7k one?
Yes a second 4.7 kOhm in parallel which results in 2,3 kOhm will do. it is just a matter of the resulting resistance.
Try this first. If this is sufficient everything is fine.
Sealing 100% against rain is not so easy. If you cover the soldering with a shrinking tube that is a bit longer so that both ends where the wire comes out can hang down compared to the middle of the shrinking tube means that water will flow away from the soldering point.
best regards Stefan
I'll give the 2 4.7k resistors a go. I've got some glue filled heat shrink, so it seals the joint for outside use. this should work and i can always use a little outdoor ip66 rated junction box.
The 2x 4.7k resistors seemed to have stabilised it a lot. It does still sometimes jump from 21C to say 84C but only one every 5 minuets or so. I might order a 2k resistor and potentiometer. to see if i can fine tune it to be stable all the time. Thanks for the help guys much appreciated. I just need some sunshine now the test if my code will turn on the valves at pumps at the right time to distribute the heat from the solar panels correctly.
are these the sort of capacitors I need to put across '+' and '-' near the sensors
[300pcs 10 Values 50V 10pF~100nF Ceramic Disc Capacitors Assortment Kit with Box | eBay)