Problem with connecting several temperature sensors



  • Hi

    I'm a newbie to Arduino and MySensors.

    I have some Dallas DS18B20 sensors connected to different wires which I connect together.
    When I connect the Arduino to the Purple connection only I get readings from the different sensors (4 sensors).
    When I connect the Arduino to the red connection only I get readings from the different sensors (3 sensors).
    When I connect it as shown on the picture where I'm connecting them all together (7 sensors) I get no readings.

    It only shows this from the serial monitor:

    sensor started, id 3
    send: 3-3-0-0 s=255,c=0,t=17,pt=0,l=5,st=fail:1.4.1
    send: 3-3-0-0 s=255,c=3,t=6,pt=1,l=1,st=fail:0
    send: 3-3-0-0 s=255,c=3,t=11,pt=0,l=18,st=fail:Temperature Sensor
    send: 3-3-0-0 s=255,c=3,t=12,pt=0,l=3,st=fail:1.0

    I have the library 1.4.1, It's the standard sketch "DallasTemperatureSensor" I'm using and I have a 4,7k ohm resistor between + and the signal. It's powered by a laptop when I try to get the readings. I use the Arduino 5V for the sensors.
    One of the wires is around 15m long but I can get readings from it when I don't connect the all.

    I'm stuck and I don't know what's wrong. Please help!

    Skærmbillede 2014-12-23 kl. 14.02.23.png


  • Hero Member

    @Mouridsen I'm a little confused... How far away is the gateway/controller from this node? Depending on the resistive value of the wires in those runs, you may need to add a large cap and or drop the pull-up resister.

    Can you draw out a complete wiring diagram?



  • I have tried to make the diagram:
    Skærmbillede 2014-12-23 kl. 16.42.48.png

    I have tried to remove the resistor but no change.
    What size of capacitor do you think I should use?

    The gateway is around 10m away. Both the sensor and gateway have a 4,7uf capacitor mounted on the radio.

    I hope the diagram make sense 🙂


  • Hero Member

    @Mouridsen So when you only have one "bank" of sensors connected, the the radio is able to communicate, but when both banks are connected you suddenly loose radio communication?

    How are you powering the sensors? Through the Arduino?

    Providing all the wiring is correct, It really sounds like a power problem. I would start with a measurement of the actual current draw on the entire system while cycling through all the sensors readings.



  • @ServiceXp I'm powering through the Arduino. I have tried to power the sensors with a 4,9V 450mA power supply and connected it to the sensors + and GND and to the Arduinos GND. It was the same result.
    I will try to measure the draw after christmas. Maybe the total length of the wires to the sensors get too long to supply the load needed or the resistance should be changed to a lower value?


  • Admin


  • Hero Member

    Thanks for the page @hek, some great information.

    @Mouridsen If it's not too much trouble, you may want to setup the same sensor network using test wire on your bench. (with minimal wire lengths of course) That may give you a quick method to see if it's the existing wiring or something else.

    It's strange that you loose radio communication when both banks are connected.. I really would have suspected (when you did the test with the sensors directly connected to the power supply) the sketch to simply return fails on querying the sensors if it was just a 1-wire network issue.....


  • Admin

    Hmm if I remember right, the sketch first acquire the temperature for one of the ds1820 sensors, and then transmitting the result, and then proceeding to the next ds1820 sensor in the row.

    So it's not trying to talk to every ds1820 at the same time, causing it to use a lot of power.



  • Hi again

    Problem solved!!! I found an other forum where some people had succes with a 2,2K ohm resistor instead of the 4,7k ohm and it worked. Now I get reading from 8 sensors.
    I still get the st=fail all the time but it does communicates the values to the Gateway and Vera Lite. Is it something I should try to fix or do it not make a huge different?

    Thanks for the input and the Christmas reading 🙂


  • Hero Member

    @Mouridsen Thanks for the follow up!


Log in to reply
 

Suggested Topics

  • 33
  • 13
  • 5
  • 3
  • 2
  • 27
  • 14
  • 6

7
Online

11.4k
Users

11.1k
Topics

112.7k
Posts