Climate control system: Raspberry Pi + Arduino

Discussion in 'The Projects Forum' started by Nrets, Aug 30, 2013.

  1. Nrets

    Thread Starter New Member

    Jan 31, 2008
    9
    1
    I have a rather ambitious project in the works that aims to control, at a minimum, the temperature and humidity inside a 20 gallon vivarium that will be housing poison dart frogs.

    My thoughts were to use an Arduino for sensor reading and control of relays, transistors (both for on/off switching and for PWM in the case of fans and lights), and the Raspberry Pi for higher level operations like remote access/monitoring and special functions (thunderstorms).

    Sensors:
    - 2 x DHT22 for temperature and humidity (in tank and in room)

    Controllables:
    - LED lighting (3W LEDs, no more than 50, will likely be split into strings and groups for more precise control of the lighting.)
    - Vent Fans (PWM enabled CPU fans)
    - Humidifier (relay)
    - Feeding system (servo, only for vacations)
    - *Misters
    - *Cooling

    * planned in the future

    I would really like to use both a Raspberry Pi and an Arduino on this project because I have both already and they don't get used nearly as much as they should. The Arduino would be slaved to the Raspberry Pi through an I2c connection. Then, the Raspberry Pi could be used to set the temperature and humidity set points (e.g. remotely through SSH), log data, send notifications (emergencies), and do more creative things like trigger thunderstorms (which would involve the Pi's audio out port) and check the moon phase and adjust the moon lighting accordingly.

    However, the slave half, the Arduino, will also be standalone allowing the Pi to be disconnected at times.

    Since I'll be controlling many things with a single Arduino, I am thinking it would be best to use shift registers for certain things like the lighting. That way I could still maintain precise control over the lighting from a single pin.


    My question isn't very specific but more general. Am I in over my head? Are these tools appropriate for this project? For things like the LEDs and the fans that can be controlled with PWM, bit banging isn't an option when there is so much other stuff going on, is it? Would hardware PWM be preferred (I believe the Arduino Leonardo I am using has several PWM pins)?
    http://arduino.cc/en/Tutorial/SecretsOfArduinoPWM

    That was long winded and a bit confusing, but thanks for reading anyway!
     
    wkwiat likes this.
  2. wayneh

    Expert

    Sep 9, 2010
    12,100
    3,034
    If you have to ask, there's a good chance! ;)
    But the fact that you're smart enough to ask tells me your chances are improved.
    In the scheme of environmental control systems, this one shouldn't be too hard. I don't know enough about the microprocessors to help you with that, but I can tell you that controlling temperature and humidity of a small chamber should not be too bad. Lighting control is "trivial".

    Start by defining your specifications, in terms of targets and acceptable ranges, for instance 30°±1°C, RH=70±3%. The static conditions. Then define the dynamic conditions, the flows of heat and air. Think in terms of mass and energy balances. You want estimates of how much heating and cooling you might need, how much air and water to move around. Then you can begin to think about the equipment to accomplish that.

    Right off the bat I suspect that, with 150W of lighting, cooling is going to be a challenge for you.
     
  3. Nrets

    Thread Starter New Member

    Jan 31, 2008
    9
    1
    Thanks for the optimism!

    The sliver of good news is in all of this, is that my education has provided me with all I'd ever want to know about mass and energy balances, as well as process control systems (feedback loops and the like). How much of latter I remember, though, is questionable.

    50 3W LEDs would be the max. I have no intentions of driving them at their max current though. I suspect I'll drive each at 1-1.5W. The LEDs will also be heat sinked with forced convection, so my room will benefit from that during the winter months.

    In the summer months my apartment is not air conditioned and there are some days where it can be pretty warm inside. Those days will be the ones I worry about most. I have considered using some Thermoelectric devices (Peltier plates) to pump heat from the tank to my room, but these are terribly inefficient.
     
  4. wayneh

    Expert

    Sep 9, 2010
    12,100
    3,034
    Yes, I think a swamp cooler (evaporative) would be better, although it would add humidity to the room.
     
  5. #12

    Expert

    Nov 30, 2010
    16,261
    6,774
    Those are useless in Florida. Again, we ask the original poster (Nrets) to go to "User CP" and type in some idea of the location of the project.
     
  6. Nrets

    Thread Starter New Member

    Jan 31, 2008
    9
    1
    I'm living in upstate NY, and this time of the year it's pretty humid. Probably 60%. The humidity inside the vivarium will be considerably higher. This, evaporative cooling will be pretty useless. In the winter time though, cooling is super easy ;).
     
  7. Corvidael

    New Member

    Sep 20, 2014
    2
    0
    Hi there!
    I'm currently working on what sounds like exactly the same thing. I'm interested in hearing how it turned out! Any updates?
     
  8. #12

    Expert

    Nov 30, 2010
    16,261
    6,774
    Nrets has not signed in since the day of this thread. He's probably not coming back. :(
     
  9. Corvidael

    New Member

    Sep 20, 2014
    2
    0
    oh damn. Well that's unfortunate.
    I'm about 1/3 of the way into building a 100 gallon vivarium using an Arduino to monitor (through a pair of DHT22 sensors) the temp/humidity of the tank, and triggering relays for the heating pad and **future** misting system based on that info. I'm also running PyEphem on the RPi so I can pull the latitude/longitide coords of the native location of the critters (French Guyana, Belize, whathaveyou) and trigger the lighting to perfectly match their natural 365 equinoxal sunrise/sunset cycles.
    I saw the sweetest LED lighting controller out there that already does most of what I want, but there's no fun in just buying one so I am wanting to build my own. I could certainly have used a few more like minded project people here on that note.
     
  10. #12

    Expert

    Nov 30, 2010
    16,261
    6,774
    Start your own thread. One guy that left a year ago is not the limit of the resources at this site.
     
    Corvidael likes this.
Loading...