Pages: [1]   Go Down
Author Topic: Just getting started - can't seem to understand this simple schematic...  (Read 1297 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey All,

I am just getting started with my Arduino Duemilanove. I have already successfully wired up a ds18b20 temp sensor and am graphing it via cricket on my Macbook. The trouble is, I had to use an alternate wiring method (parasitic, I think) to the one I originally planned to, and although it works, I want to understand the original plans and how to make them work.

Ultimately I used the wiring scheme found in this document:

http://www.hobbytronics.co.uk/ds18b20-arduino

and I see (around the net) that others that have used it too. Maybe it's even superior to the one I was going to use originally, but still, I'd like to understand how to make the original work.

Here's the original tutorial I tried to follow:

http://www.hacktronics.com/Tutorials/arduino-1-wire-tutorial.html

When I wire up my breadboard the way I think the schematic instructs me to, I can't read the sensor and if I leave it connected too long, things start to smoke (!). I have spent a few hours today reading on how to read wiring schematics, understanding pull-up/pull-down resistors, etc, and no matter what I try, I just can't get that hacktronics schematic to make sense to me (or at least, what I end up doing on the breadboard is just wrong). I think my confusion lies in how to tie in the pull-up resistor since that at least appears to be the only part that isn't 100% straight forward (for a beginner).

Would it be possible for someone to take a photo of a breadboard, or produce an image of one, wired how they interpret the hacktronics schematic? Alternatively I can provide a picture of what I think I should be doing, which isn't working.

Thanks a ton. I really want to make sure I understand what I'm doing, and am not just painting by number, but after hours of reading today, things aren't any more clear. I searched the forums and found mentions of the tutorial I am trying to understand, but none that shed light on my issue.

Andy
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 547
Posts: 27363
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Read the datasheet
http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf
Both ways can work - Figures 4 & 5.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Canada
Offline Offline
God Member
*****
Karma: 7
Posts: 602
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That is a valid way to use the DS18B20.  With a 4,700 ohm (K7) resistor, nothing should be going up in smoke.  Can you take a clear picture of your set up that shows everything and post it?
Logged

Facts just don't care if you ignore them.

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

Thanks for the quick replies. I have reviewed the data sheet (again) and I guess I just don't understand how to read these schematics, or at least not how to translate them to my breadboard. Please see the attached picture of my breadboard configured as I interpreted (apparently incorrectly) the non-parasitic schematic. If it's not clear, the resistor is connecting sensor pins 2 and 3.

If it helps, this is kind of how I am reading the schematic in English:

Connect sensor pin 1 to ground (Arduino GND pin on the side with the digital pins)

Connect sensor pin 2 to Arduino pin D3 (as specified in my sketch)
Connect sensor pin 2 to +5v (Arduino 5v pin) via 4.7k ohm resistor

Connect sensor pin 3 to +5v (Arduino 5v pin)

I imagine I am failing to understand the circuit(s) I have created on the board, even if I theoretically understand what the schematic is telling me to do.

Thanks again.
Andy


* IMG_0036.JPG (533.23 KB, 1632x1224 - viewed 36 times.)
Logged

Canada
Offline Offline
God Member
*****
Karma: 7
Posts: 602
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If you have 5V coming in on green then the DS18B20 is in  backwards.  It is likely dead.  Do you have another?


* DS18B20.jpg (28.26 KB, 773x521 - viewed 30 times.)
Logged

Facts just don't care if you ignore them.

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

Hi,

5v is coming in on green, but I don't believe I have the sensor backwards. Green is connected to pin 3 (pin 1 is at the top in the picture). When I put the board back into the parasitic configuration, the sensor still appears to be working and accurate when compared to another temp sensor I have in the same space.

Just to clarify further, in that picture Green is connected to 5v and sensor pin 3, Blue is connected to Arduino D3 and sensor pin 2, and White is connected to Arduino GND and sensor pin 1.

Thanks.
Andy
Logged

Canada
Offline Offline
God Member
*****
Karma: 7
Posts: 602
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have to disagree, according to my data sheet, you have pin 3 at the top of the picture.
Logged

Facts just don't care if you ignore them.

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

Gah. You are totally correct.

For some reason I was interpreting the "bottom view" diagram as a top view. I don't know why. I read the caption each time I looked at it. With the same configuration as in my picture but the sensor flipped around everything is working fine (same as in the parasitic configuration). I do have another one of these sensors, but I guess I'm lucky that I didn't fry the one I have been using so far.

Thanks to all who replied. Please forgive such a stupid mistake.

Andy
Logged

Canada
Offline Offline
God Member
*****
Karma: 7
Posts: 602
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, I'm still making them.  Comes with the territory.
Logged

Facts just don't care if you ignore them.

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

Vdavidoff,

Wow, I looked at it just like you did thinking 'top' view, even though its clearly labeled 'bottom' view! Even once I knew it was the bottom view I still had a hard time flipping it spatially in my mind. So much that I had to cut out a piece of paper label the bottom (1,2,3), flip it over label the top and then orient it the same as in your picture... its crazy what the mind insists on seeing.

--Greg
Logged

Pages: [1]   Go Up
Jump to: