Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

ds18b20 cable length issue (but not typical)

Status
Not open for further replies.

aq_mishu

Full Member level 4
Joined
Jul 16, 2007
Messages
212
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Activity points
3,402
Guys,
I'm writing here with a different situations... Yes! DS18b20 and the cable length with pull-up resistor and timing and etc is a well discussed and there are plenty of info there. I'm in a position where I can not change the circuit that much to be frank. I have an option of changing the pull-up for either 2.2k or 4.7k. Means if i finally fix on 2.2k, then will that help me to run a cable 15m using regular cat5/ cat6? [DATA and GND in twisted pair]. so this is my option 1, but also I want to know for option 2:

Option 2: is there any other way to transmit the data to long distance of such, say 20m max.??

My current scenario is like I have a PLC circuit (custom made Arduino based, but already mass produced, with 4.7k) that has 3 ports for 3 individual sensors (all are almost around, nearby). I can either run the cable for sensors directly to the PLC or I can add a middle-something like a repeater who will send me the data. [I have a plan of using a nano to concatenate at least 2 (mandatory sensor) sensors and send via UART (not RS232, as that is also a kind of limitation) to the PLC (since i can change the code somehow to read the software serial over those ports.) But if there is a way of NOT using UART but a direct approach, I will prefer that.

Help is a highly appreciated...

Mishu~
 

Hi,

CAT5 / CAT6 calls for RS485/RS422.
And I assume you have free pairs for power supply...
So you can make an active differential interface.

Klaus
 

how much can you really change (or not change) the circuit? can you use a three wire interface?

as i read the documentation

https://cdn-shop.adafruit.com/datasheets/DS18B20.pdf

you can use a three wire connection - +Vdd to the same power as your uP, GND to the same
common and your uP and the third wire with the data. See figure 5.

i expect (without proof) you can get 20 m this way.

i remember reading the Dallas semiconductor book (yes a real data book)
about 1 wire communication. really cool.

but cool takes a backseat to getting the job done
 

how much can you really change (or not change) the circuit? can you use a three wire interface?

you can use a three wire connection - +Vdd to the same power as your uP, GND to the same
common and your uP and the third wire with the data. See figure 5.

i expect (without proof) you can get 20 m this way.

Here is the ans:

The device was mass produced with my design. Arduino based, and it has 3 ports for 3 ds18b2b. each port has 3 pins, VCC, Data, GND. [VCC and DATA is also having 4.7k pullup on the PCB]

And no help practically, though I used CAT5E with BLUE White for GND, BLUE for RED. ORANGE WHITE+ORANGE for VCC.

Mishu~

- - - Updated - - -

So you can make an active differential interface.

OK, interesting... that's what probably i'm looking for. I can hook the sensor with the interface (named as buffer/amplifier) and then a twisted pair (CAT5/6) can bring the signal 20m away from the origin and there will be the PLC with same. Now, there should be minimal parts count for this purpose, to be frank...

Mishu~
 

Have you seen this?
Guidelines for Reliable Long Line 1-Wire Networks
https://www.maximintegrated.com/en/app-notes/index.mvp/id/148

That part has done for several times... each says "it's possible" And finally it was possible (tested upto 10m)...

I used CAT6 (cheap grade though) with Blue-White as GND, Blue as DATA. Oranges were tied together for VCC. This was no luck untill I remove the 4.7k from the PLC's PCB and did two things, and found success for both case...

1) I added a 1k resistor as pull-up at sensor side (where I connected the CAT6 with sensor) and it was success.
2) I removed the 1k from sensor side and added it in the PCB and also found success.

Both of the success is for "so far upto now with ideal condition". Cable was 10m.

Now I have 2 questions:

1) Can i replace the 4.7k for all the hardwares (infact changing the primary design at all in other words) and add that 1k as pull-up in PCB for both short length and medium length cables?? (Means 3m - 20m)?

2) Which is best? that pull-up resistor at sensor side or at PCB side??

Mishu~
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top