My Arduino & LEDs

salmonetin

Well-Known Member
...for all....any example code for show max temp or min temp for an dht sensor?... i prefer dht22 over an dht11...
...for simulate an tipical monitor of temperature for a tent.... (actual temperature max temp... min temp... promedium temp... same on Relative humidity...max RH min RH ...promedium RH...)

...or example code for show max temp or min temp or promedium temp for an DS18B20 sensor...

...saludos
 
Last edited:

Hot Diggity Sog

Well-Known Member
Hello all,

I have expressed some interest in using my Arduino Uno as a grow room controller. There are a lot of step-by-step guides online but they aren't exactly what I am looking for, so having that DIY bug I decided to give it a shot.

My plans are to

CONTROL
Lights (5 CXA/CXBs, 4 Vero 10s, UVB bulb)
Fans/Heater/Humidity

MONITOR
Voltage at each string/COB and of entire system
Current of LEDs and of entire system
Temperature
Humidity

I purchased:
365buying DS18B20 Temperature Sensor - Waterproof Digital Thermal Probe Sensor DS18B20 - $4.95
Arrela® 4-channel 5v Relay Module with Optocoupler for Arduino DSP AVR PIC ARM - $7.95
Arrela® DHT11 Digital Temperature/Humidity Sensor - $6.43

Total - $18.48 w/prime shipping

I plan to use the DHT11 Temp/Humid sensor in my growing area towards the canopy and will monitor and log this data, I will then be able to convert this to easy to read graphs for the entire grow. This sensor will be the trigger for the Fans/Heater/Humidity elements.

I will be using the DS18B20 waterproof temperature sensor to keep in my res, this will be constantly monitoring the res temp. I will also be able to graph this for different times of the day as well as for the entire grow.

The 4-channel relays will be used to allow the small signal voltage from my arduino to turn on much larger loads. I will be using https://www.sparkfun.com/tutorials/119 to construct the GFCI outlet boxes, this will allow me to control each outlet individually. The relays are 10A each X 4 realys, so each relay could have one GFCI outlet for future expansion. I will most likely only construct 1-2 to start.

I decided to use components that have examples already available online, and that were relatively low cost. I wanted to get a solid base system going and then I could add almost anything I wanted to in the future, for example:
PH Sensor and probe kit - $127.99
EC Sensor and probe kit - $191.99
Dissolved Oxygen Sensor and probe kit - $231.99

Now those prices are kind of steep, but those are lab grade kits with quality probes as well as everything else *including documentation*. So following our LED way of life, higher upfront costs for a better product that will have a longer quality life, I could set up a round the clock monitoring system that logs and graphs all of the data and stores it to an at home server. This could be used to control and maintain my res automatically.

I also think it would be neat to wire up a camera to take a couple snapshots a day so I can compile some nice seed-harvest GIFs, make for some nice comparison pics!

Once you start thinking about it you can accomplish just about anything you want like a light raiser, nutrient feeder, water pump control, CO2 sensors/controller, AC/Water chiller, Dehumidifier, etc.

I am no expert, I am an electronic hobbyist as well as some college courses. This is why I chose parts with documentation and examples. I will not be trying to reinvent the wheel, I plan on using the code already written for each sensor. I am hoping for as close to a plug-and-play experience as I can, not that I don't enjoy it but I feel like I could give back to the community if I made it....uh.....stoner proof?

The parts will be here Thursday!


:peace:bongsmilie
This is great man. I'm working on this stuff too. Maybe we can exchange and share knowledge!
What is your programming background?
 

_MrBelvedere_

Well-Known Member
Great stuff thx. For any DHT devices that are slow to respond, how about create a separate app/thread that monitors the slow devices. Or create an asynchronous multi thread to talk to slow devices. That app/thread will update a flat file with the reading/status data and also give a time stamp of the reading time. Then your main thread can lookup the value in the flatfile instantly and not be "thread locked" waiting for a response.....
 
Last edited:

alesh

Well-Known Member
Great start thx. For any devices that are slow to respond, how about create a separate app that monitors the slow devices. Or create an asynchronous multi thread to talk to slow devices. That app/thread will update a flat file with the reading/status data and also give a time stamp of the reading time. Then your main thread can lookup the value in the flatfile instantly and not be thread locked waiting for a response.....
Multithreading isn't exactly the simplest task to be done on an Arduino. Once you're so advanced you can do that, you should probably be long gone from the Arduino platform.
 

apoulin

Well-Known Member
This is great man. I'm working on this stuff too. Maybe we can exchange and share knowledge!
What is your programming background?
Well I will be posting everything to here, just doing some good old fashioned knowledge sharing.
I have taken programming classes (vb,c+), I have a background in computers/it. Less electronics and more computers, but I will learn anything I am able to if it will help me in my ganja quest


:peace:bongsmilie
 

Hot Diggity Sog

Well-Known Member
Well I will be posting everything to here, just doing some good old fashioned knowledge sharing.
I have taken programming classes (vb,c+), I have a background in computers/it. Less electronics and more computers, but I will learn anything I am able to if it will help me in my ganja quest


:peace:bongsmilie
Cool, ok. My background is primarily .NET. I found Arduino code to be pretty intuitive and straight forward. The 1st prototype I made last week with Arduino uses .NET to talk to Arduino...a simple water flow meter.
 

apoulin

Well-Known Member
Cool, ok. My background is primarily .NET. I found Arduino code to be pretty intuitive and straight forward. The 1st prototype I made last week with Arduino uses .NET to talk to Arduino...a simple water flow meter.
Yea that is the great thing I found too, pretty easy to adapt to. I am really excited to get this project going, my parts should be arrive today!!!

My goals are to hook the dht11 up and get the code working properly for that.

Construct a GFCI outlet box to control with a relay for my lights.

Wire up a voltage divider to safely read the high voltages from my drivers (~140v) and monitor them.

I already have tutorials saved for these parts, so I have a general idea of what I need to do. I do work at 5-11:30 so I guess we will see what time my parts get here and how much I can get done.

I have also tinkered with the idea of dimming my driver with my arduino, I would be able to precisely control the dim and be able to monitor the output as it is happening. I mean most people are just using pots, but why use manual labor if I can press a button :bigjoint: Lol


:peace:bongsmilie
 

Hot Diggity Sog

Well-Known Member
Yea that is the great thing I found too, pretty easy to adapt to. I am really excited to get this project going, my parts should be arrive today!!!

My goals are to hook the dht11 up and get the code working properly for that.

Construct a GFCI outlet box to control with a relay for my lights.

Wire up a voltage divider to safely read the high voltages from my drivers (~140v) and monitor them.

I already have tutorials saved for these parts, so I have a general idea of what I need to do. I do work at 5-11:30 so I guess we will see what time my parts get here and how much I can get done.

I have also tinkered with the idea of dimming my driver with my arduino, I would be able to precisely control the dim and be able to monitor the output as it is happening. I mean most people are just using pots, but why use manual labor if I can press a button :bigjoint: Lol


:peace:bongsmilie
Would you like to see my 1st project I did a couple of months ago? It's not with Arduino but it is a USB relay from Numato Lab. If you need to turn on and off electrical devices programatically, I've got just the example for you.
 

apoulin

Well-Known Member
Would you like to see my 1st project I did a couple of months ago? It's not with Arduino but it is a USB relay from Numato Lab. If you need to turn on and off electrical devices programatically, I've got just the example for you.
I have tons of examples bookmarked already lol plus I am using arduino and no usb relay. I plan on using code that is readily available so I am minimizing the amount of code I am writing. If you got it working you may want to post it in a section on here, people may want to copy your design for one reason or another!!

:peace:bongsmilie
 

Hot Diggity Sog

Well-Known Member
I have tons of examples bookmarked already lol plus I am using arduino and no usb relay. I plan on using code that is readily available so I am minimizing the amount of code I am writing. If you got it working you may want to post it in a section on here, people may want to copy your design for one reason or another!!

:peace:bongsmilie
OK. This probably won't interest you then but if you wanted to see it, it's here.
https://www.rollitup.org/t/adventures-in-automation.862146/#post-11358838
 

apoulin

Well-Known Member
OK. This probably won't interest you then but if you wanted to see it, it's here.
https://www.rollitup.org/t/adventures-in-automation.862146/#post-11358838
That is pretty cool, I am glad to see you have more of the web applications programming. I eventually thought of being able to write a small program that I can access while not at home, definitely want a text or email sent for issues. I might be hitting you up when it is time for that aspect of my build. I did notice you had some of the :roll: mentality while talking about automating the growing area, if they want to spend the rest of their life physically testing everything then let them have it! I know a lot of people take the approach, "I have been growing fire for years doing.....(insert their own process)" the issue is they have experience that cannot be duplicated or analyzed.
Automating the system will provide a math equation if you will for the grow. You are able to analyze each individual aspect and make changes based upon this.

The wheel may have been invented YEARS ago, but we are still improving it for our needs today!

:peace:bongsmilie
 

UKpeanuts

Well-Known Member
Semiconductors are fascinating devices. They have properties which exist outside the normal physics of tungsten twists and vapour tubes.
I wish to take advantage of them, if possible.
2 points;

a) normal physics ? there is no such thing
b) why you still no explain?
 

apoulin

Well-Known Member
Just a quick update for everyone, I got the temp/humid sensor as well as the waterproof sensor set up on my bench.
I have them both programmed for testing right now.

The temp/humid sensor seems to be accurate enough for my needs so far, after a min in the room it was reading what my digital thermostat was reading. The humidity seemed on par with my guesstimating meter from Walmart.

The waterproof sensor read the same as the temp/humid sensor +/-.5 F

I tested the relays with the arduino just to make sure I had the concept right. I didn't have time to play around anymore with it.

I have the data being read by the serial monitor in the arduino software. I will be setting this up to log and start getting some graphs together hopefully.

Off to work!

:peace:bongsmilie
 
Top