Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Help with DS18B20 and basic electronics


  • Please log in to reply
6 replies to this topic

#1 Don King

Don King

    Advanced Member

  • Members
  • PipPipPip
  • 30 posts
  • LocationLawrence, KS

Posted 30 August 2012 - 02:33 AM

Hi All - Sorry for the elementary questions on electronics. I am a .NET Developer who is just getting started using micro-controllers, specifically the Netduino Plus. I have been running through many examples, learning basics with the .NETMF, learning to flash upgrded software etc. I have literally no experience with wiring and such except for the wire I put in the 3.3v hookup and touched the gold erase pad. That's it.

Now that you know my electronics level, on to the questions...

I want to use the DS18B20 Temperature Sensor that I bought from Sparkfun. The technician gave me a little verbal layout of the wiring:


Sensor-------->Netduino Plus
-GND(black wire)----GND
-VDD(red wire) ----3.3V
-DQ(white wire)---Digital Pin on the Netduino

She also mentioned putting a 4.7 pull up resistor between the signal and power pin. I actually sort of follow what she is saying after reading a couple of things online and some information from a Netduino book. I feel like I need another piece like a breadboard (no idea which one to get) and some jumper wires. I purchased a pack of resisitors and so I am good there. It appears that wiring this thing directly to the Netduino Plus is either impractical, ill-advised or both. I have seen a few postings on this subject with pictures posted on how someone has wired it up although I am not certain what I am looking at.

Any direction on that is appreciated. I did run through a breadboard tutorial to which another user posted a link but I was wary because the tutorial was hard to understand and the comments seemed to dispute the authors calculation of resitance provided by X number of resistors. The last thing I want to do is burn up some hardware (obviously).

Additonally, I have questions about OneWire support. I have read through several posts trying to figure out where that support effort currently is for the Netduino. I have thus far noted the following:

1. A gentleman named CW2 has produced a very nice implementation of OneWire support. There was talk of including it in the official release but that did not come to fruition.

2. The Microsoft .NETMF 4.2 has OneWire support in the Microsoft.SPOT.Hardware.OneWire assembly.

3. At this point in time, if I want to use the DS18B20 Temperature Sensor I need one wire support and will need to flash the modified (unsupported?) version created as a special build and includes CW2's implementation. My understanding is that the Secret Labs SDK would need to include a Netduino Plus specific implementation for whichever (CW2 or Microsoft.SPOT.Hardware.OneWire) to use this device.

If I have misstated anything above please do correct me. All of this is my next big step in understanding the basics of how to get this sensor to work properly for my project.

I thank you very much for taking your time to read this and certainly with any help you can provide.

Regards,

Don

#2 Paul Newton

Paul Newton

    Advanced Member

  • Members
  • PipPipPip
  • 724 posts
  • LocationBerkshire, UK

Posted 30 August 2012 - 06:44 AM

Hi Don, This is a very quick reply as I am about to start work. You said a 4.7 resistor - check that value, it sounds much much too small. Also have a quick look in the wiki, there is a bread board article in their, that will help you understand what you are looking for. Have Fun - Paul PS all electronic components contain smoke, the trick is to keep it inside them.

#3 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 30 August 2012 - 09:12 AM

...She also mentioned putting a 4.7 pull up resistor between the signal and power pin.... It appears that wiring this thing directly to the Netduino Plus is either impractical, ill-advised or both. I have seen a few postings on this subject with pictures posted on how someone has wired it up although I am not certain what I am looking at.

The pull-up resistor should be 4.7 kΩ (you are missing the kilo- prefix in your post, which means 4.7 Ω, but I assume it's just a typo). Connecting the sensor to Netduino directly is not really possible, because the leads do not reach the necessary pins (input pins are too far from the power), you'd need to solder some wires to the sensor leads. You can see sample connection for example in this post.

#4 Don King

Don King

    Advanced Member

  • Members
  • PipPipPip
  • 30 posts
  • LocationLawrence, KS

Posted 30 August 2012 - 05:54 PM

The pull-up resistor should be 4.7 kΩ (you are missing the kilo- prefix in your post, which means 4.7 Ω, but I assume it's just a typo). Connecting the sensor to Netduino directly is not really possible, because the leads do not reach the necessary pins (input pins are too far from the power), you'd need to solder some wires to the sensor leads. You can see sample connection for example in this post.


Thanks for the replies gentlemen. Yes, I did mean to have the Ω symbol but did not know how to make it. I did not however, know that it should be kΩ which I see makes a big difference. In looking at the pack of resistors I have I can see that they are 2 different things so thanks much for that. The tech I conversed with did not denote that and probably thought my experience level was such that I would know.

Thanks CW2 for the link to the post and picture. I have a couple of questions for you:

1. I mostly get the concept of the photo but I am not certain what I am looking at. Is that what is considered a breadboard? I recognize it from some documentation and tutorials I have read through. If so, can you recommened what I need to purchase?

2. Does it matter which of the 'Gnd' slots the Ground wire is connected to?

Thanks again much for your help. It is greatly appreciated.

Don

#5 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 30 August 2012 - 07:24 PM

ad 1) Yes, the thing on the right with many holes is a breadboard. It is rather valuable for making quick prototypes, you can easily put components there and connect them with wires (usually called "jumper wires"). The holes are also connected internally, which allows you to put integrated circuits in the middle.

ad 2) No, it does not matter. All ground pins are connected together.

#6 Paul Newton

Paul Newton

    Advanced Member

  • Members
  • PipPipPip
  • 724 posts
  • LocationBerkshire, UK

Posted 30 August 2012 - 07:42 PM

Hi Don,

Yes, referring to the picture in the other post, the white grid on the right hand side is the bread board.

All the ground slots on the Netduino are connected together, so it does not matter which one (or ones) you use.

I'm not sure where you are based, but in the UK I can recomend a company called Hobbytronics for electronic supplies. (I have spent much too much there!) From them you might buy a breadboard like this one. They have several sizes, and there are lots of other suppliers too.

And if you have an unlimited budget, you will not regret getting some jumper wires too.

Hope this helps - Paul

Edit : If my reply seems a bit odd, its because I started typing this before CW2 replied!

#7 Don King

Don King

    Advanced Member

  • Members
  • PipPipPip
  • 30 posts
  • LocationLawrence, KS

Posted 30 August 2012 - 07:52 PM

Hi Don,

Yes, referring to the picture in the other post, the white grid on the right hand side is the bread board.

All the ground slots on the Netduino are connected together, so it does not matter which one (or ones) you use.

I'm not sure where you are based, but in the UK I can recomend a company called Hobbytronics for electronic supplies. (I have spent much too much there!) From them you might buy a breadboard like this one. They have several sizes, and there are lots of other suppliers too.

And if you have an unlimited budget, you will not regret getting some jumper wires too.

Hope this helps - Paul

Edit : If my reply seems a bit odd, its because I started typing this before CW2 replied!


Hi Paul - Thanks for the information. I have been looking at Sparkfun and Adafruit and I will check to see if perhaps they have the one you mention. I live in the US but would think I could get the same thing. Also, thanks much for the suggestion of the wiki. I will be looking through the tutorials to try and get a better understanding of how to wire.

Thanks!

Don




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.