Pages: [1]   Go Down
Author Topic: How to wire multiple sensors - D18S20  (Read 993 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a small project and I'm trying to create a small board that will allow me to take 4 sensors off in 4 completely different directions. Otherwise, I'd just try and daisy chain them. I have a small prototyping board and (4) 3 wire terminal blocks.

I know you have to use the 4.7K pull up resistors on these, so on my diagram, you can see my thoughts. The positives and negatives are common, on rows. The data has 3 holes, all together, so I planned on picking the data up from that. With 4 different sensors, and using 4 different data lines (1 positive, and 1 negative on the common buses), can I put the 4.7K resistor from the common positive to the data line on each one, knowing that there will be (4) 4.7K resistors all on the same positive?

As you can see from this, my electronics knowledge is non-existent. But my gut told me to stop and ask because it might not be right or even worse, it might do damage to the Arduino.

Can I do it like shown, or do I need to back up and regroup?

Thanks!


* Question.jpg (96.06 KB, 263x485 - viewed 56 times.)
Logged

texas
Offline Offline
God Member
*****
Karma: 27
Posts: 862
old, but not dead
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you are going to have your data lines connected to different pins on the micro, then you need four resistors.  If you bring all data lines to the same i/o pin, then you need only one resistor. 

That's the way I understand it anyway, but wait there may be other experts wanting to comment.  They know far more about the right way to wire your bus than I do.
« Last Edit: March 06, 2013, 08:47:53 pm by afremont » Logged

Experience, it's what you get when you were expecting something else.

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

Thanks, I'm going to use 4 different I/O pins for this if that helps any. My concern was just putting 4 resistors all on the same positive, but it might be perfectly acceptable to do that.
Logged

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

If you use the one wire system, in the manner that god and Dallas intended, one pullup will suffice. If you use separate data, you need a 4k7 pullup for each.  

But before you go out and buy the extra 4k7s, you might consult the aforementioned gut, and write down very clearly why you would want to make up a proto board that runs counter to the way god and Dallas intended the sensor to be used. I say write it down, because it is surely going to be something you later regret.
« Last Edit: March 07, 2013, 02:55:57 am by Nick_Pyner » Logged

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

Thanks Nick! So what you are saying is that even if I have 4 separate wires, going in 4 directions, I should still pull all 4 data wires back into 1 I/O on the Arduino, correct? I can do that, it's not a problem. Is that what you're saying?

Thanks for the input!
Logged

texas
Offline Offline
God Member
*****
Karma: 27
Posts: 862
old, but not dead
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Nick! So what you are saying is that even if I have 4 separate wires, going in 4 directions, I should still pull all 4 data wires back into 1 I/O on the Arduino, correct? I can do that, it's not a problem. Is that what you're saying?

Thanks for the input!

Yes, that's what he is saying.  You would only use one resistor then.
Logged

Experience, it's what you get when you were expecting something else.

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

Great, thanks! Glad I asked. This place is great for helping people like me that just don't know what we don't know!

I appreciate the help from all that gave input!

Logged

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

Is that what you're saying?

Yes, that's what he is saying.  You would only use one resistor then.

Indeed I am. Not only do you save resistors but, far more importantly, you save Arduino pins! Having the cable going in different directions is hardly material. You bring them back to individual terminals on your proto board and have them straddling three rails - 5v, gnd, signal, rather like you originally intended, but with only one resistor.

Logged

Pages: [1]   Go Up
Jump to: