Egg Incubation,a beginners advice needed

Greetings I am a complete novice , I have been studying the variables and what I can research from others what I want to do is create another Arduino controlled poultry egg incubator .My concept so far
-An Arduino uno as controller
-An ethernet /sd card shield and for data storage and communication to a server , either rasp Pi or a laptop connection to internet, the intent here is future development of communication wirelessly through telephony to remote access and data management. Cell phone
-16 x 2 LCD display and keypad shield for at source display and data management would a serial based two wire be a better choice, I already ordered the shield , I imagine it could be modified if I needed to go serial and have fewer pins employed. Not sure if this is right or a 20 x4 would be better , need advice
-The temperature setting and sensing would primarily be a DS18B20 sensor sending to the Arduino which I hope could run the PID library with auto tune. PWM temp control through a ssr . I would like to have an upper and lower limit alarm with this
-The humidity, I hope to use a AM2302 sensor . I want on off with set limits, control through a EM relay module. I would like to have an upper and lower limit alarm with this. The temp function of the sensor would be utilized as a read only second temperature check in the chamber. I am not sure if PID is relevant here as the nature of humidity and temperature is so difficult to sense and control accurately as it is a relative read, as well as frequency of sampling and frequency of response being slow I expect to only be able to get at best within 2%to 5% of set value process value variance. I don’t want to have a dehumidification exhaust happening I think this would be counter productive causing heat hysteresis
-I would want to control a dc 12 volt fan with on off proportional control PWM for circulation, like fan speed control. Ventilation would be one aperture that was opened and closed by hand to maintain a positive pressure and stable temp, no sensor or controller, a minimal opening.
-I want to use a timer set up with an interval interrupt loop to control the motion of a 12 volt DC turner motor for back and forth side to side egg turning This would likely be seconds on minutes off looping. Off between a variable of 200 to 800 minutes, through a EM relay module
-Last to use a DS3231 RTC for recording start date , time stamping functions,and also to use its temperature sensing to record the ambient temperature outside of the chamber .

The primary display on LCD would be SV and PV for temperature with the SV and PV of relative humidity,
I want to basically use they keypad to scroll through the other displayed information and have it return to temp and humidity values when basically running
A key scroll to another screen for turner motor motion frequency and start ,finish dates, interval value and interrupt value
A key scroll to fan circulation speed , ambient temperature , current operating date,start date,elapsed date, target date to stop turning eggs and expected hatch date.

I would have a dedicated power supply for the arduino . would like it to retain settings if the power was disrupted and reset, Any advice would be appreciated I think I have conceived it right, now is the task to learn how to find libraries and integrate them in some logical sequence for the five functions that need be sensed or controlled, time, temperature ,humidity,fan speed ,and motor motion control for the egg turning. I am hoping to learn how to write and create a working sketch for this. I looked at the PID temperature library and it was 17 k hopefully everything else will fit or do I need a larger set up,more pins and memory. Am I way off with this expectation.

No, sounds good.

You don't need an ethernet/sd shield. Just use a serial line to the RPi over the UART or USB.

You might want to get an arduino mega instead of the uno.

Use cherrypy or similar framework on the pi to write the web part, using pyserial.

Avoid much logic on the arduino, mostly put the logic on the pi and make the arduino act as a slave to the pi. As you are just begining, you might manage better in python than C.

Dont use a shield, just wire the devices directly instead. Its a bit tougher, but more versatile (and potentially leaves more io pins free)

20x4 sounds better, as you can use arduino menu library (there are a bunch of them, google it) to do some tasks.

For the fan, you could use an L293D (recommended) or L298N based motor controller, or if you have the time, just get the IC and wire it up.

No need of RTC, if your Pi is connected to the internet. Otherwise, it might be a good idea.

Also, about the persistant data, just serial it over to the pi and have it store and sync it. You could use logrotate, syslogng or many other log management tools. You could also use some kind of SMS api from the Pi. Or maybe email will do.

UPDATE: By sync, I mean the "sync" command.

Also, you could power the Pi off a battery, and probably connect the most important sensors to an arduino promini or nano. Then use another USB cable, or the GPIO Uart, if you didn't use it up for the MEGA, to handle your most essential sensors. The pi could log the data, and push it when the power returns. Again, I am assuming you are doing this for scientific data, and would like a backup.

I agree 100% with the idea of doing as much of the work as possible on a Pi or a PC.
I agree also about not using a shield.

In my opinion the Python Bottle server is easier to use than CherryPy.

You have not said what experience you have of programming generally or of the Arduino in particular. If you are not already a competent programmer what you propose involves a very steep learning curve.

I suggest that you start by writing separate Arduino programs to control each of the accessories on its own. When you know how to work with each of them it will be time to build them into a single project.

Leave the LCD display until last. Just use the Arduino Serial Monitor for output while you are developing the project. The LCD code tends to obscure other aspects of the project. Also it is easier for people here to give advice for code without LCD stuff because they can easily try it on their own Uno of Mega.

There are many useful examples in the Arduino IDE and you may find useful ideas in planning and implementing a program.

...R

Thank you both,I appreciate your input.it gives a better insight into what I hope to learn. I have no experience as a programmer, I am a retiree ,and have picked up on this PLC stuff from employing separate devices like industrial PID temp control, pwm motor control, plc stand alone humidity control and it seemed that to integrate them and make it data based for records and analytics would be worthy . I have seen these integrated applications in very expensive hardware proprietary set ups. When I found the arduino my study of it seemed to promise that by using the libraries and some time management with the the code you could put together and sequence a device like this, I hope that in the final stages I can use the intranet, internet, wireless facility to make it remote. I appreciate the advice regards the learning curve.I will start with the arduino and once that becomes familiar think about the greater logic and communication (PI) at the integration phase.Your critique gives a better understanding of the depth here.

use an arduino yun

Greensprings:
use an arduino yun

I have recently bought a Yun but have done very little with it because I am working on another project which, I hope, will be runnable on the Yun as well as my PC. I don’t have an RPi. AFAIK an RPi plus an Uno is about the same price as a Yun.

I am genuinely interested to learn why you suggest a Yun for this job?
(I am not trying to dispute the issue).

…R

Robin2:
I have recently bought a Yun but have done very little with it because I am working on another project which, I hope, will be runnable on the Yun as well as my PC. I don't have an RPi. AFAIK an RPi plus an Uno is about the same price as a Yun.

I am genuinely interested to learn why you suggest a Yun for this job?
(I am not trying to dispute the issue).

...R

Yun means cloud, and while it is in its formitive stage, there are may projects which have already been developed to data log to the cloud, and interact with the yun from the internet via a cell phone or other device

the yun is not that much more expensive than the uno, esp by the time you add an ethernet, wireless or sd card shield, which all take up space, pins and processikng power on the uno.

unless you are just trying to reinvent the wheel for the fun of it, the yun was made to make internet access easy

For learning and creating the mark one version of your incubator, I suggest using an Uno and leaving out the LCD as Robin2 suggests. Pi and Yun will add unnecessary complexity while you're learning the basics. You should be able to get to a functional standalone device controlling everything, possibly then adding a serial LCD (to save pins). You can use the EEPROM to retain settings through a power outage, but be aware of the limits on how many times you can safely write to it.

The Uno is cheap and so less painful to replace if you destroy/damage it with a wiring mistake. Even cheaper to repair if you have one with a socketed Atmel chip.

Once you have a basic version going, you'll be in a much better place to decide what the final version really needs.

Maybe search the forums a bit - there have been incubator projects done before - may give you some ideas.

Greensprings:
unless you are just trying to reinvent the wheel for the fun of it, the yun was made to make internet access easy

That does not really address the choice between the Yun and a combination of an RPi + Uno ? The RPi is almost certainly more versatile than a Yun.

I am not a “cloud” fan. Generally I have no wish to make my data accessible to people all over the world.

…R