Climate control system prototype - architecture of the control module.

I want to create a device that would:

Every minute: measure temperature and humidity, float switch in a humidifier tank, measure temperature in order to perform high temperature shutoff

Every five minutes: decide to switch heat, fan, ultrasonic humidifier

Every hour: check if work of a humidifier/heater produces desired temperature change
(d Temperature / d time and d humidity / d time).
Emergency shut off if systems work all the time and produce no desired rate of change but heat/humidifier works.
Turn lights on/off.
Check state of regime switch (spawn/fruit)

===========================================================

I will use this device to grow mushrooms for Chinese medicine.

I want to use some RTC ( what kind? DS3234 ???) to trigger interrupts.
I am debating weather I need to allow user to set time as in a clock (device that we look at to know time)

There is a 4X20 LCD screen.
I want to hook up this touchpad that I don’t know how to wire it
I need two humidity/temperature sensors - one SPI one I2C. Or three sensors in the future.
There will be a toggle switch with two positions to store operation mode.

I may eventually add an OLED LCD touch screen.

One tiny circuit board on my breadboard is a 5V to 3.3V voltage converter for temp/humidity sensors
This is just for convenience.

How to wire a touch pad?
What RTC architecture and algorithms should I use?

Are there any humidity/temperature I2C sensors where address of the device can be changed?

How do I know if it will all fit inside Arduino Micro Pro memory when I write the program? (I have to look up what microcontroller is in it.)

What would me my algorithm for average rate of change (of humidity and temperature) in the past five minutes, in the past hour?

Those values will need to be displayed for safety and diagnostic purposes.

Thank you.

start simple.
you will not need the RTC for this project to work.
since Mushoorms live and grow in a VERY high humidity, check the sensors to make sure they can work near the dew point.

most of what you want is often done my monitoring the process.
if temperature is out of range, then control it. checking every few minutes is not a common way to control temperature.

the most common way is to watch temperature, when it is too low, turn on the heater.
when humidity is too low, turn on the humidifier.

as for the RTC, the normal system clock is good for seconds per day. since it appears that all of your needs are hourly, the internal clock millis() should be accurate enough.

the I2C for most devices have a way to set the address so you can use multiple devices on the same buss.

you have other questions that will come with experience.
how to wire a touch pad
what RTC software
using a display
how much memory

these have simple answers and as you use the sensors to control your temperature and humidity, the answers about the rest will reveal themselves.

I would highly suggest that you data log your controls.
as you know a temperature increase instantly and automatically will cause a drop in humidity.
just as a drop in temperature will cause an automatic and instant increase in humidity.

what is common is to monitor dew point and control humidifier based on dewpoint.
a data logging will tell you if your humidity swings are from temperature control or from some environmental cause.

start simple.
you will not need the RTC for this project to work.
since Mushoorms live and grow in a VERY high humidity, check the sensors to make sure they can work near the dew point.

I agree that all those sensors may not work well at 80% humidity. In reality, cheap chinese sensors that I bought for two dollars a pop and Adafruit branded sensors for Arduino have a very similar circuit and the same chip that does the measuring.

I agree that I should prevent moisture from condensate inside the sensor. I may lose accuracy if I blow air or warm up the sensor to get rid of moisture.

most of what you want is often done my monitoring the process.
if temperature is out of range, then control it. checking every few minutes is not a common way to control temperature.

the most common way is to watch temperature, when it is too low, turn on the heater.
when humidity is too low, turn on the humidifier.

I could use discrete components in this case - temperature and humidity relay switches.
I don't like the traditional approach at all. I want to check for safety reasons and to know what my rate of increase is when humidifier or heater runs.

If air gets too warm, mushroom activity will slow down. I would prefer it to be at 28 degrees Celsius. In the future I will make it adjustable.

as for the RTC, the normal system clock is good for seconds per day. since it appears that all of your needs are hourly, the internal clock millis() should be accurate enough.

I want my hours to be as long as an hour is. I would rather use RTC that will trigger my Arduino for action.

the I2C for most devices have a way to set the address so you can use multiple devices on the same buss.

I thought so too. But I bought two I2C humidity/temperature sensors that apparently don't give that option.

you have other questions that will come with experience.
how to wire a touch pad
what RTC software
using a display
how much memory

these have simple answers and as you use the sensors to control your temperature and humidity, the answers about the rest will reveal themselves.

I would highly suggest that you data log your controls.
as you know a temperature increase instantly and automatically will cause a drop in humidity.
just as a drop in temperature will cause an automatic and instant increase in humidity.

what is common is to monitor dew point and control humidifier based on dewpoint.
a data logging will tell you if your humidity swings are from temperature control or from some environmental cause.

I feel like if I put that feature into my device I will run out of memory.
Ideally I would like temperature/humidity/light state to be entered as a table into the system from a PC.
Than the touchscreen will offer a user to adjust the values.
The system will draw graphs for temperature/humidity/light state and show deviations from the graph.

If deviation is too great and things are not controlled with calculated and predictable inputs of energy (I am mostly talking abou the heater) than maybe it is time to shut off and send a message to operator's phone.

I will make a commercial version of this system very soon. The hardware is all built. Something is going to be patented, some things will remain open-source.

I am preparing a kick starter campaign.

Previous electric circuit that I worked with was all discrete. I didn't like it at all. This is why I want an electronic control of this unit.

I thought so too. But I bought two I2C humidity/temperature sensors that apparently don’t give that option.

this is where you post links to products. tell us what you used that you had a problem with.

I feel like if I put that feature into my device I will run out of memory.

there is no way to know until you try.
if you use other peoples libraries, they often have a lot more bits than your project requires.
if you have doubts about the 328 on the UNO, use one of the other chips, the MEGA uses both a 1280
http://www.arduino.cc/en/Main/arduinoBoardMega
and the 2560 chip.
the larger the chip, the more memory and the more pins.
since you said you want to go commercial, I would assume that you will be having boards made and if you are having boards made, you can use any chip you want.
one question we ask a lot on this list is " what happened when you tried it ? "

Every minute: measure temperature and humidity, float switch in a humidifier tank, measure temperature in order to perform high temperature shutoff

Every five minutes: decide to switch heat, fan, ultrasonic humidifier

A normal heating/cooling system (including your oven & refrigerator) uses [u]hysteresis[/u].

For example, if your heating system is set for 70 degrees F, the heat comes-on at 69 degrees (or 69.9 degrees, etc.) and it stays-on 'till you get to 71 degrees (or 70.1 degrees, etc.). Then after it shuts off, it doesn't come on again 'till the temperature drops down to 69 degrees. That prevents your system from switching on & off every couple of seconds.

Every hour: check if work of a humidifier/heater produces desired temperature change
(d Temperature / d time and d humidity / d time).

That's fine.

What would me my algorithm for average rate of change (of humidity and temperature) in the past five minutes, in the past hour?

The [u]The Smoothing Example[/u] shows you how to calculate a moving average.

I want my hours to be as long as an hour is. I would rather use RTC that will trigger my Arduino for action.

No clock is perfect,* but a (good quality) RTC will be better. The resonator on the Arduino Uno board is rated for 0.5% accuracy. That's a (worst-case) error of about 18 seconds per hour. That might be OK if you want a reading once per hour. But the errors will add-up over many hours, so if you need to take measurements every hour on the hour, it might not be acceptable.

  • The clock on your computer or cell phone maintains nearly perfect accuracy because it's connected to an atomic clock somewhere on the Internet (or phone network).

AC powered clocks can also be nearly perfect (if you don't loose power) because they are (usually) synchronized to the 50/60Hz power line frequency and the electric utility slightly speeds-up or slows-down there generators so there are exactly the correct number of cycles over a year.

Your wristwatch or battery-operated wall-clock will drift over time.

I know what hysteresis is.

It looks like my architecture is realistic and buildable.

I need an RTC, as I understand.

Hi,

Hope my experience can be useful for you.
As a hobby I developed a simple climate controller. It measures pressure, humidity and temperature.

The parts are

  • Arduino Nano,
  • BMP280 - 1 unit,
  • DHT11/22 - 1 unit,
  • DS18B20 - 3 units.

All of them are quite cheap. I connected the controller to Raspberry PI to collect data by SCADA. If you need some special logic depending on values, you can define it by the SCADA software.

By using a smartphone, you can open the web application, running on RPi, to view data and send commands.


The sketch and schematic are available on GitHub.