Pages: [1]   Go Down
Author Topic: Incubator project  (Read 2074 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am building my own home incubator. I already controlled the Temperature sensor, Humidity sensor, heater and  Fan. However I do not have Idea of how to control the servo to over the eggs every 10 minutes without affecting the reading data of the other two sensors (Humidity and Temperature). I am new working with Aurduino one. I know that I need to use some additional libraries such as Timer1 or other. However is quite difficult to implement without any similar example. Any help?

Jorge
Logged

Porto
Offline Offline
Newbie
*
Karma: 0
Posts: 30
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

you need to explain better what you already did or post the code you have so far, otherwise probably nobody will help you... i guess
good luck  smiley
Logged

For some Awesome Arduino Projects  click -> www.randomnerdtutorials.com

Offline Offline
Edison Member
*
Karma: 27
Posts: 2033
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

do you mean,   you want to turn over the eggs ?

Do they need to be turned over every ten minutes ?  Really ?   How do people normally do this ?
Logged

New Jersey
Online Online
Faraday Member
**
Karma: 48
Posts: 3391
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Look at the blink without delay example. If will show you how to do something peridocally. You can do all of your existing activities in loop as I assume you already have them and use the technique in the example to move the servo at whatever interval you need.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You can use millis() function to check your predefined cycle! Or use a timer interrupt!
Logged

Miami/Florida
Offline Offline
Sr. Member
****
Karma: 10
Posts: 284
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I do not have Idea of how to control the servo to over the eggs every 10 minutes without affecting the reading data of the other two sensors (Humidity and Temperature).

Do you really need a servo to turn over the eggs every certain amount of time? Do you really need that angular control precision?

Maybe you can simplify things by using a regular motor with a simple cam attached to the shaft activating a microswitch to stop the motor after the angular rotation you want which is probably fixed and always the same. if the angular rotation required by your desing is less than 360 deg per egg turn, then you may need more than one microswitch.

You will just start the motor when required and then just monitor the input pins where the switches are connected with a simple if(digitalRead(SwitchPin)==LOW) on every loop. Your sensors will continue operating on every loop with no problem as the rate of change of the temp and humidity is way slower than the Arduino loop speed.
Logged

Perseverance is 90% of the solution. The remaining 10% is more perseverance.

Dubuque, Iowa, USA
Offline Offline
Edison Member
*
Karma: 29
Posts: 2236
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The eggs are turned to prevent the embryo from sticking to one side of the shell. A typical turner will flop a tray of eggs over about 90 degrees, pointy end down, every two hours (example). Some smaller, bowl-shaped units will use paddles rotating from the center to "roll" the eggs around the bottom. And of course sometimes you do it by hand (not fun). The eggs will be taken out of the turner a couple days before hatching date so the chicks have time to reposition themselves for hatching -- seeing them break out of their shells is an amazingly precise process.

IMHO the easiest way to schedule events like this is with the TimeAlarms library. It's a bit overkill but certainly keeps your code nice and tidy.
Logged

Pages: [1]   Go Up
Jump to: