arduino incubator controls for dummies

gpop1

Songster
5 Years
May 2, 2015
546
71
134
If I was to start this post saying something like "programmable computer controls" 90% would stop reading now so i am going to start this post on a more positive note.

If you want lots of controls but no one is selling what you want then it might be time to look at a arduino. Im not suggesting this is the best option but with a little surport, lots of pictures it may be a option you or your partner might consider.

I have written a base code (not fully tested so im looking for guinea pigs).
It should include most of the toys required for a custom home built incubator and im happy to add more options you may have or fix things you dislike.

The main screen looks like this

sceentext1.jpg


or this depending on what options you have chosen

screentext2.jpg



The idea of this post will be to take you step by step from construction to build.

So what's so special that its worth the aggravation

temp control
humidity control
4 different types of turner controls (options)
hatch date (options)
temp calibration
humidity calibration
temp controls in F or C
control of alarms
etc


I hate typing so to avoid retyping I will be posting in sort blocks
 
Ok so on to the basic menu structure

menu1.jpg
menu3.jpg
menu4.jpg
menu5.jpg




all of the controls will run from a 4 key keypad

keypad.jpg

I like the factory look of things so im also going to post how to make the controls look nice and neat.
 
Ok by this point some people are beginning to understand that there's going to some cutting and wiring. So to make it easy we will use a breadboard so all that's required is plugging in wires following instructions.

breadboard.jpg



If you can follow instruction like.........plug wire between A6 and +rail then this shouldnt be hard to do. (the wires come with pins on the ends so you just push them in). At the end after testing we hot glue everything so the wires stay put.
 
Ok so on to the hardware.......shopping:drool

Arduino uno r3 or arduino mega

uno.jpg

4x20 lcd with i2c interface

lcd.jpg


i2c interface is the red (some are blue) thing stuck to the back it just save having to connect lots of wires

8 arduino type relay block

relays.jpg



A breadboard (1/2 size like the one pictured earlier)

A bread board power supply

powersupply.jpg


A dht22 sensor (I pay a little extra to get a am2302 as I like the way it looks)

sensor.jpg


DS1307 RTC (real time clock) just make sure it has pins attached as we want to stay plug and play.

buzzer passive (arduino) or active 5vdc or anything you like as a relay can be used

2 power bricks 9 to 12v dc (every one has a bunch of these laying around especially if you have kids) 1/2 to 1 amp should be good

DuPont arduino wire jumpers

male to female x20 or more
male to male x20 or more
female to female x10

10k resistor x 1

most of these things can be found online if you search for arduino then the name of the part. Probably about $30-40

(some arduino starter kits has just about all the parts needed)
 
Forgot you will also need a keypad or buttons. keypad is easier to wire so im going in that direction but I can help you install buttons if you want to go with some chrome bling.
 
Mounting hardware:

There's lots of different options so im just going to cover one using a plastic box

Cut a hole for the screen (the raised black section of the lcd). The hole needs to be about 1/16 to 1/8 to large. Next find a clear clam shell (that's the clear packaging that store bought items come in). Cut a piece of flat clear packaging from the clam shell it needs to be a few inches larger than the hole you cut in the box.
Place the box, hole down so you can get to the inside where the lcd goes. Next heat the clear plastic with a heat gun or in the oven. With pliers place the clear plastic over the hole then press the lcd into the plastic. This may take a few attempts as the plastic has a very short working time but when its done right the lcd will now be flush with the outside of the box with a clear plastic cover over it.

Trim the plastic leaving about 1/4 inch on the sides so it can be hot glued into the box later

for the keypad cut a small slot for the connector to pass then using the stick back that's on the keypad stick the pad to cover the hole.
Now you an hot glue the lcd cover then the lcd into position.

You can either buy a clear plastic box for a few dollars that fits the arduino or you can directly mount the arduino buy adding sticky back Velcro directly to the arduino back.

The bread board normally comes with double sided foam so you can pell of the backing and stick that inside the box. If it didn't then attach with sticky back Velcro.

The relay board can not be mounted with velco. Due to the exposed soilder joints under the board it has to use "pcb standoff" mountings. I like to cut a piece of plastic larger than the relay board then after the relay board is mounted to the plastic it can be Velcro in to place.

Keep everything close together leaving as much room as possible for the wiring that goes to the relays.
 
basic breadboard how to:

bbhow.jpg


down the sides you will see a + and - track.
for this example we are calling + positive and - negative
all of the + positive side of the board are joined inside the board so if you run a wire from positive to ???? that means you can use any hole on the positive side, same for the - negative

holes marked as a,b,c,d,e are internally joined (they are not joined to f,g,h,I,j)
so if you are connecting 3 wires to a2,b2,c2 really you are joining the 3 wires together
 
Setting up the arduino.

There lots of online videos that explain this better than I can.

Basically you download the ide program from

https://www.arduino.cc/en/Main/Software

you need the ide program.

next plug the usb lead that's comes with the arduino into the board, Plug the other end into your computer.

your computer should see the board and add hardware for you

open the ide program and go to the tools tab then board and select the board you purchased (uno or mega) next go to tools, port and select the usb that the board is being shown as being connected.

You will need to download one library (library is a code that some one else wrote that that we are allowed to use). The link is on the arduino forum where the program I wrote is stored.

download the library it will be in a zip file, Unzip and place in the arduino library folder on your computer.

down load the program I wrote and save in a folder.

double click on the program I wrote and the arduino ide program should open and display the code.

you will have to make one program change.

the line
LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); //

about line 74 in the code has to be changed depending on the lcd you purchased.

most sellers will give you the address you need 0x3F is the address I am using (that's number 0 letter x number 3 letter f)

if your address is different then you will need to change that to your lcd address

if you get stuck post back with where you bought the lcd. If they didn't include a address we may have to run a program that tells us what the address is.


click the tick mark top left to verify, if there are no problems then click the button next to it for upload. If theres a problem look in the bottom box to see what the problem is (normally its because the library was not downloaded or you have not selected the board or usb port). Message me any problem you find or post on this thread.

if everything went to plan you have now loaded the arduino. (text at bottom stayed white and text on the blue bar near the bottom will say "done uploading"
 

New posts New threads Active threads

Back
Top Bottom