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

Greenhouse/Terrarium automation


  • Please log in to reply
7 replies to this topic

#1 Quattro

Quattro

    New Member

  • Members
  • Pip
  • 4 posts

Posted 21 June 2011 - 01:55 AM

Hi all,

This is all very new to me, but the potential for micro-controller as compact and inexpensive as the netduino seems infinite.

I intend to utilize the netduino in controlling the temperature and relative humidity of a small greenhouse or terrarium. As of right now I have ordered a temperature and relative humidity sensor as well as two relay control boards for the control of the heater and humidifier.

I intend to write a controls logic to automate the process as well as log data from it. I may need a good amount of help when it comes to this part. This is my first netduino project aside from onboard led fun. I'm sure I'll have plenty of questions once I start piecing this project together.

Any thoughts and suggestions are more than welcome.

#2 Dan Morphis

Dan Morphis

    Advanced Member

  • Members
  • PipPipPip
  • 188 posts

Posted 21 June 2011 - 04:49 AM

Hi all,

This is all very new to me, but the potential for micro-controller as compact and inexpensive as the netduino seems infinite.

I intend to utilize the netduino in controlling the temperature and relative humidity of a small greenhouse or terrarium. As of right now I have ordered a temperature and relative humidity sensor as well as two relay control boards for the control of the heater and humidifier.

I intend to write a controls logic to automate the process as well as log data from it. I may need a good amount of help when it comes to this part. This is my first netduino project aside from onboard led fun. I'm sure I'll have plenty of questions once I start piecing this project together.

Any thoughts and suggestions are more than welcome.



Welcome to the Netduino community! There should be no issue with the hardware you've picked out and it should be fairly trivial to write all the glue code to make things work!

If you have any questions, just ask! Everyone here is real friendly and always willing to help!

-dan

#3 Quattro

Quattro

    New Member

  • Members
  • Pip
  • 4 posts

Posted 28 June 2011 - 02:07 AM

So, I'm trying to read data off of the DHT22 Temperature and Relative Humidity Sensor. I've found code written for the Arduino but, I have an extremely limited knowledge of C# and Visual Basic. I am wondering if anyone wants to take a look at the code for the Arduino and help translate that to a C# file for me. I have had a very basic introduction to C++ but not a working knowledge of it, and I am brand new to C# so any explanation and translation of the code I've attached would be extremely helpful.

Attached Files



#4 mishoboss

mishoboss

    New Member

  • Members
  • Pip
  • 5 posts

Posted 11 July 2011 - 03:34 PM

So, I'm trying to read data off of the DHT22 Temperature and Relative Humidity Sensor. I've found code written for the Arduino but, I have an extremely limited knowledge of C# and Visual Basic. I am wondering if anyone wants to take a look at the code for the Arduino and help translate that to a C# file for me.

I have had a very basic introduction to C++ but not a working knowledge of it, and I am brand new to C# so any explanation and translation of the code I've attached would be extremely helpful.


I'm looking for DHT22 support too. These are very nice and inexpensive digital sensors that you can read from distance and seems a lot of hobbyist use them with Arduino (me too). The Netduino support is the only thing that stops me from switching to this nice board.

#5 Quattro

Quattro

    New Member

  • Members
  • Pip
  • 4 posts

Posted 19 July 2011 - 10:06 PM

I've been working on the program to interface with the DHT22 sensor, and I have based it off of the code written for the arduino at the website below.

http://sheepdogguide...ne1humDHT11.htm

I've had a friend write a stopwatch class to handle the microsecond delays required, and the rest I've tried to piece together based on the arduino code. I've had trouble writing anything that will print out the values from the sensor, so if anyone can give me some help there I would really appreciate that.

Other than that I hope this is helpful, and I would appreciate any and all feedback.

Attached File  DHT 22.zip   53.08KB   27 downloads

#6 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 20 July 2011 - 03:56 AM

Hi guys! The sensor seems implementing the 1-wire protocol. So, please, have a look at the forum section regarding the current firmware evolution of that protocol. However you cannot perform that protocol with the last official firmware of the Netduino (4.1.0.5) Cheers
Biggest fault of Netduino? It runs by electricity.

#7 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 20 July 2011 - 07:00 AM

...so if anyone can give me some help there I would really appreciate that.

I don't remember it exactly, but I think port Read() method call takes about 50 µs, which is too slow to sample sensor's bit '0' waveform (26-28 µs). You might try using InterruptPort to detect edge transitions, hopefully the interrupt queue will not overflow. I am also not sure TristatePort can handle interrupts, if not you'd need to use two ports wired together for the data line.

@Mario: DHT22 (and DHT11) sensors use "Single Wire" protocol, which is [deliberately] not compatible with Maxim/Dallas 1-Wire.

#8 Quattro

Quattro

    New Member

  • Members
  • Pip
  • 4 posts

Posted 02 August 2011 - 01:15 AM

Hey Mario and CW2,

Thanks for responding to the post, and I've figured out that the DHT-22 uses a weird 1 wire protocol, and that the lack of precision with the .NET framework is going to be a deal breaker. So I would recommend avoiding this sensor despite it's alluring price.

Therefore, I have decided to go with an analog approach. I've decided that dealing with an analog voltage signal should be much easier than trying to decode some strange 1-wire protocol or do any kind of bit hacking which is way over my head at this point.

So, I've ordered a new set of sensors. I have purchased a 10K thermistor, the SEN - 00250 to be exact. I have also purchased a humidity sensor in the form of a HIH-4030 Breakout Board. I'm planning on reading the 10K thermistor using a simple voltage divider with another 10K resistor. I'm hoping that will give me the right voltage range and close enough accuracy for measuring temperature +/- a few degrees F.


I'll let you know when I get everything set up.




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.