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

What's feasible and what's not


  • Please log in to reply
10 replies to this topic

#1 MarkWill

MarkWill

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 25 September 2010 - 01:58 AM

I am having a blast getting familiar with my Netduino (and, in fact, refreshing my memory of electronics - so lots to learn). One of the biggest challenges I have is getting some context for what is realistically in scope for what I can do with the Netduino (and what I can not). Let me take an example. Take a look at this digital thermometer (DS18S20). http://datasheets.ma...ds/DS18S20.pdf. I like the idea of being able to (eventually) hunt down chips like this and integrate them into solutions. But I have no idea if I am barking up the wrong tree. For example, the chip has a defined set of command (initialization, reset, read, search, etc, etc). What pins would I hook up (on the Netduino)? And how do I send command to a device like this. The datasheet has detailed information on the initialization timing - the pulse levels, durations, etc, etc. Are such things controllable from the Netduino and, if so, through what pins/features would I do this? I am not so much asking about this particular device (although I am actually interested in this). Rather, I'm trying to understand if this is the type of device that I can consider down the road when I learn more about the techniques available to me through the Netduino (hardware and software). Thanks. Mark

#2 Mark H

Mark H

    Advanced Member

  • Members
  • PipPipPip
  • 70 posts
  • LocationPerth, Western Australia

Posted 25 September 2010 - 03:00 AM

Unfortunately, Netduino doesn't appear to support 1 Wire, so you'd want to look for an i2c, spi or analogue output temperature sensor. Something like a LM60 from National or a TMP36 from Analog are examples of analogue output sensors.

#3 MarkWill

MarkWill

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 25 September 2010 - 03:21 AM

Unfortunately, Netduino doesn't appear to support 1 Wire, so you'd want to look for an i2c, spi or analogue output temperature sensor.

Something like a LM60 from National or a TMP36 from Analog are examples of analogue output sensors.

Thank you, Mark. Your message is very helpful because it starts to give me a sense of what I am looking for in a chip. So, it seems that I could use the chip I mention if my microprocessor I had came with "1 Wire" support. Is that something that would be flagged as a feature of a microprocessor?

Similarly, what clues might I look for when I review the datasheet for, say, the LM60 or the TMP36. I look at those and I don't see anything that leaps out at me as "Yes - Netduino supports that!!!". I guess I am trying to figure out what the relevant standards/features that are important as I search around for a solution. Is it maybe the fact that the chips you mention seem "passive" in nature, meaning they just emit their information on certain pins and, providing I can connect to and interpret the high/low values from the Netduino then I am OK (as opposed to the device I mentioned which seems to have a full-fledged "command interface").

Thanks again.

Mark

#4 greg

greg

    Advanced Member

  • Members
  • PipPipPip
  • 169 posts
  • LocationChicago, IL

Posted 25 September 2010 - 03:37 AM

Thank you, Mark. Your message is very helpful because it starts to give me a sense of what I am looking for in a chip. So, it seems that I could use the chip I mention if my microprocessor I had came with "1 Wire" support. Is that something that would be flagged as a feature of a microprocessor?

Similarly, what clues might I look for when I review the datasheet for, say, the LM60 or the TMP36. I look at those and I don't see anything that leaps out at me as "Yes - Netduino supports that!!!". I guess I am trying to figure out what the relevant standards/features that are important as I search around for a solution. Is it maybe the fact that the chips you mention seem "passive" in nature, meaning they just emit their information on certain pins and, providing I can connect to and interpret the high/low values from the Netduino then I am OK (as opposed to the device I mentioned which seems to have a full-fledged "command interface").

Thanks again.

Mark


Actually, there's firmware (by CW2) for the Netduino that supports onewire. And SL is rolling his code into the main codebase I believe.

#5 MarkWill

MarkWill

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 25 September 2010 - 04:14 AM

Actually, there's firmware (by CW2) for the Netduino that supports onewire. And SL is rolling his code into the main codebase I believe.

I guess I'm still not getting exactly what 1 Wire actually is. Is it a protocol that defines the physical characteristics of the protocol (I see references to pulse duration and amplitude, for example). Or is it more at the application layer (I see comments about commands that I can send).

Anyway, that's more a curiosity. At this stage I'm interested in what is available to me with the default Netduino firmware (I'll think about upgrading at some later stage). Let's say I am looking for a temperature sensor. What exactly is it in a datasheet that will leave me able to state whether I can get this working on the Netduino? I'm not so much interested in a specific recommendation for a sensor here (although the pointers were appreciated). I'm just trying to get my head around the characteristics I'd need to look for when hunting down a chip/solution I might use in my project. For example, with the two suggested already other than being told that they work I don't know how to check that for myself.

BTW, it could be that my understanding will be clearer if I understand what I2C or UARTs are and how they are used. I asked about this last week but didn't really get any pointers to stuff I can read as to actually use these ports.

Thanks again.

Mark

#6 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 25 September 2010 - 08:10 AM

I guess I'm still not getting exactly what 1 Wire actually is.

BTW, it could be that my understanding will be clearer if I understand what I2C or UARTs are and how they are used. I asked about this last week but didn't really get any pointers to stuff I can read as to actually use these ports.

Mark, have you tried Wikipedia or Google?

#7 Mark H

Mark H

    Advanced Member

  • Members
  • PipPipPip
  • 70 posts
  • LocationPerth, Western Australia

Posted 25 September 2010 - 09:22 AM

Wikipedia can be a really great resource for understanding what different protocols mean, usually the articles are high level enough that most people with basic electronics knowledge can understand them and if you need more information you'd be able to go to google to look for specifics. 1 wire is just a protocol for systems to communicate, like i2c, CAN, SPI, TTL and RS232 among others are. 

#8 MarkWill

MarkWill

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 25 September 2010 - 01:33 PM

Wikipedia can be a really great resource for understanding what different protocols mean, usually the articles are high level enough that most people with basic electronics knowledge can understand them and if you need more information you'd be able to go to google to look for specifics.

1 wire is just a protocol for systems to communicate, like i2c, CAN, SPI, TTL and RS232 among others are. 

Yes, I uses these resources :-) I've been looking at a number of places but, again, it's the Netduino context I am looking for. By way of example, the DS18S20 is, I am told, not considered suitable for the Netduino. The fact that it uses 1 Wire (and the Netduino - without firmware updates - doesn't support this) seems to be the data point that I should be looking for. OK, I'll buy that :-)

But what about the two that have been suggested (the LM50 and the TMP36)? As far as I can tell, the data sheets don't have any references to I2C or CAN or SPI or TTL, etc, etc. So, it doesn't seem to be as structured as looking for a protocol that Netduino uses and seeing if I can find it in the datasheet. If I look at the TMP36 datasheet, for example, what is it about that which tells you this could work on a Netduino. Also, does the fact that a chip (like the DS18S20) supports 1 Wire and the Netduino doesn't simply mean that there's no way to get it to work? Or is 1 Wire just one option, but not a requirement?

And finally, let's take the TMP36 example again. If it's deemed feasible for the Netduino I'm still not sure how I'd actually use it. The 1 Wire approach seems to require more of a formalized "command protocol". I don't see such an approach with the TMP36. Does this just mean that I merely respond to pin changes (high/low) with this and don't use commands?

Thanks.

Mark

#9 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 25 September 2010 - 01:49 PM

If I look at the TMP36 datasheet, for example, what is it about that which tells you this could work on a Netduino.

"The TMP35/TMP36/TMP37 are low voltage, precision centi-grade temperature sensors. They provide a voltage output that is linearly proportional to the Celsius (centigrade) temperature." This means the microcontroller has to have an analog input that can measure voltage - this feature is known as Analog to Digital Converter (ADC) and Netduino has its 10-bit ADC accessible via 8 pins labeled "Analog In 0 .. 7", you can use AnalogInput class and its Read() method to get the digital value of measured voltage on a certain pin (the value in range [0, 1023] represents voltage [0, Aref]). Hope this helps.

#10 MarkWill

MarkWill

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 25 September 2010 - 01:59 PM

"The TMP35/TMP36/TMP37 are low voltage, precision centi-grade temperature sensors. They provide a voltage output that is linearly proportional to the Celsius (centigrade) temperature." This means the microcontroller has to have an analog input that can measure voltage - this feature is known as Analog to Digital Converter (ADC) and Netduino has its 10-bit ADC accessible via 8 pins labeled "Analog In 0 .. 7", you can use AnalogInput class and its Read() method to get the digital value of measured voltage on a certain pin (the value in range [0, 1023] represents voltage [0, Aref]). Hope this helps.

That's EXACTLY what I was looking for - gives me that specific context that ties the features of the chip to the functionality of the Netduino. I really appreciate this.

BTW, having looked at I2C a little more, I'd be interested in any Netduino-specific details on how I might use it (samples, etc).

Thanks.

Mark

#11 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 27 September 2010 - 07:15 AM

BTW, having looked at I2C a little more, I'd be interested in any Netduino-specific details on how I might use it (samples, etc).

Please use forum's search box to look for "I2CDevice", there are several code samples already published. Also note the current Netduino firmware does not support "Repeated Start Bit" condition, which is required by certain I2C devices to read data from them - for more details, have a look at I2C Driver Improvement post.




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.