Pages: 1 [2]   Go Down
Author Topic: Multiple DS18B20 on a 10meter long Cat5, not discoverable.... HELP!!!!  (Read 1156 times)
0 Members and 1 Guest are viewing this topic.
Dee Why NSW
Offline Offline
Edison Member
*
Karma: 48
Posts: 2299
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Lowered the resistor from 4k7 to 3k3.
I've got 4 different sensors, none is working "remote", but very well close to the board.
I'm powering the unit through the USB-cable.
if I move them directly close to the board it detects 2 or more addresses.

I use the code below to just locate and display the devices.


Your report is confusing but at least you clearly understand what the code is for and, if it works at all, you can assume there is nothing wrong with it.
I believe people go down to 2.2k for pullup, and there is surely discussion hereabouts to that effect.
Your power supply could be marginal - even with short wiring. It is never a good idea to power a project from the USB  cable, and now might be a good time to use a proper 9v wall wart. I never thought i would hear myself say this but, just to prove the point, even a 9v battery might suffice.


Logged

Offline Offline
Faraday Member
**
Karma: 62
Posts: 3077
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
lease, have mercy on me and tell me what the h##l is wrong....

Your problem fundamentally is the distance.

Any kind of low voltage, high speed, signalling scheme is limited by this.   Your little square wave digital on/off signals get corrupted and deformed by the electrical characteristics of the cable,   and noise, which increase with distance,    to the degree that the signal becomes unusable.

One solution is to put another arduino close to the sensors to make the readings,    and then transfer the results by some other method,  with greater practical range,   to the remote location where you need to use the information.

Logged

Offline Offline
Faraday Member
**
Karma: 62
Posts: 3077
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Try this.

Connect the cable to your arduino.   Take the sensor off the remote end of the cable.   Connect the data line to a digital pin on the arduino.     Write a sketch which sets the digital output to low,   and get the sketch to make the output  low and high alternatively at one second intervals.    Use your voltmeter to measure the voltage on the remote end of the data line.   You should see the voltage going high and low each second.   

If this test works,   then it means your wiring scheme is basically sound,   you can signal at a 1 Hz rate,  it then becomes an issue of speeding things up to whatever frequency the onewire devices use.

If this test doesn't work,    then you have some kind of wiring problem.   If you can't signal by pulling down the wire at 1 Hz,  you got no chance at higher frequencies.

Other things you can try:
Connect the remote end of the cable back to an arduino input.   You can try measuring the delay between when you switch the output,  and detect the input.   This could indicate that your cable has some huge and unwanted capacitance, for some reason.

Connect the remote end to an analog input on the arduino.   Measure the voltage you are getting.   Is the high signal sufficiently close to 5V ?  Is the low signal sufficiently close to 0 V ?



Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 47
Long time web software developer and allround ICT specialist freaking with arduino.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

....I'm using the sensor (waterproof) itself. .....

I used a couple of those too, (not sure its the same)  but it seems they had resistors in the metal casing.

I was able to hook them up to a couple meters of cable without resistors and they worked fine.
Logged

Dee Why NSW
Offline Offline
Edison Member
*
Karma: 48
Posts: 2299
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

but it seems they had resistors in the metal casing.

I don't think there would be any pull-up resistor in the casing unless the supplier explicitly advised that.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Try this.

Connect the cable to your arduino.   Take the sensor off the remote end of the cable.   Connect the data line to a digital pin on the arduino.     Write a sketch which sets the digital output to low,   and get the sketch to make the output  low and high alternatively at one second intervals.    Use your voltmeter to measure the voltage on the remote end of the data line.   You should see the voltage going high and low each second.   

If this test works,   then it means your wiring scheme is basically sound,   you can signal at a 1 Hz rate,  it then becomes an issue of speeding things up to whatever frequency the onewire devices use.

Ok, just tried this and I do get a sound reading of 0.01v on low to 5.07v when set to high, at a seconds interval.
Made a new strip of cable, same length but "new"... but still nothing.
I applied external power (wall mart)  and still nothing.
So given what you've written before, timing is the thing then, no?

What next? Please help before I go nuts....
Logged

Offline Offline
Faraday Member
**
Karma: 62
Posts: 3077
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well if you can see your 1 Hz square wave pulses through the cable,    that's better than nothing.   At least it shows the conductors don't seem to be broken.

And you are getting good voltage, which is also good.

And your arduino is capable of pulling the wire down close to zero volts,     which would tend to suggest that your pull-up resistor isn't too small.

The point is,  due to the capacitance and inductance of the cable,   that square wave gets distorted   and has sloping rises and falls and overshoots as the frequency increases.   This happens with any kind of transmission through any kind of cable,   and it limits both the frequency and the length of cables you can use.   

For example,  normal ethernet won't work for more than about 500 metres,  or whatever it is.    On the other hand,  SPI might not work if the wires are longer than 20 centimetres.

But we know that many people have succeeded at getting  DS18B20's  to work at distance over 10 metres,   and up to at least 30 metres.    So you should be able to,  also.      I don't know why you can't.     I am pretty close to out of ideas..... smiley-confuse



Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

For this test, I've cleared the board from other components, but before mounting these sensors, I've connected a PIR, on a maybe 15 meter long CAT-5 cable, and that one works perfectly fine.
So this is (in my world) related to the DS18B20 sensors.

Logged

Dee Why NSW
Offline Offline
Edison Member
*
Karma: 48
Posts: 2299
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You are probably correct, but others have succeeded, and all you need do is check with them.
Logged

Pages: 1 [2]   Go Up
Jump to: