Editor Version ×
Standard

1.Easy to use and quick to get started

2.The process supports design scales of 300 devices or 1000 pads

3.Supports simple circuit simulation

4.For students, teachers, creators

Profession

1.Brand new interactions and interfaces

2.Smooth support for design sizes of over 5,000 devices or 10,000 pads

3.More rigorous design constraints, more standardized processes

4.For enterprises, more professional users

Ongoing

STD Chicken Coop Automation v24.6 - ESP32s2

Chicken Coop Automation v24.6 - ESP32s2

Project tags

License

Public Domain

License: Public Domain

Mode:

Mode

Editors' pick

Editors' pick

Cloned from Chicken Coop Automation v24.3 - ESP32

  • 66
  • 0
  • 0
Update time: 2024-09-30 18:22:55
Creation time: 2024-04-16 12:24:49
Description

Description

Chicken coop door and life support controller. Beta 0.24.6.  I'm sharing this as an idea for anyone to build their own. 

Code for PlatformIO included.  Debugging using native USB on Wemos ESP32-S2 board configured.

3 MCU options to allow for EspNow transmissions:
- Internal socket (for plastic enclosures),
- Side PC-LPT port with ext MCU box (for metal enclosures),
- External 2x13 header with cables and with ext MCU box (for metal enclosures)

Do not use autogenerated BOM since a lot of parts are optional (ESD protection, dual mode, I2C, SPI, future expansion, etc).

Chicken Coop Automation.
This project (see schematic) controls chicken coop door, heat, fan,
battery charge, solar charger and additional relays for future features like feed control, lights, etc.
A 20W solar panel is connected to MPPT mini charger that charges LiFePo4 battery.
The battery already has balancing and protective circuitry built in.
South facing, on T-post is the South_Box sensor module containing 2 LDRs, Override reeds,
reset reed and Neo RGB LED. RGB LED has a lens and faces house. The LDRs
are facing North. MPPT will also regulate ext power supply with FET protection
in case solar isn't sufficient (more than 3 rainy days) or when heat or fan is needed.
Heat or Fan relays will not come on if ext power is not present (assuming
AC not available). Additional 3.3V voltage regulator added for peripherals
Either H-driver or relays (reversing polarity to motor) are used to drive motor
switchable by jumpers and plug. The 4 relay wiring: relay's NC contacts for one direction
as COMMONs for another in case of a software glitch (to avoid all relays at the same
time and causing a short). There is an off/delay time in door operation to allow
motor to completely stop on state changes. Door limit switching done using reeds.
On cold days if temp below freezing (asterisk on LCD) the door will remain closed
and heater relay will come on 24x7. If temp is below comfort (set to 40F) the heat will
come on as well, but only during the night. A fan will be started when temp is
above 86F (settable on top of code) but only during the day if ext power connected.
Battery voltage is monitored - will flash purple "batt" LED on status, see table.
Also, solar and ext Volt values are monitored.
Optional 2 or 4 line LCD with I2C interface can be used to display temperature,
status and light level. Currently set to 2 line, modify lcd lib to adjust
for 4 line LCD. LDRs read light level 0-1023 (higher=darker), range of daylight
as determined from values preset, then state of the last door activity.
OPT: All pertinent data is sent via EspNow to home automation for monitoring.  
Board can be reset anytime by holding magnets to both overrides at the same time
for 5s (L and R of South_Box)

* Features
- LCD: show status at glance.
- RGB INDICATOR: flash color codes to determine status of coop from outside.
- ESPNOW: send coop data to monitoring station.
- ESP OTA: hold magnets to both overrides at the same time for 5s (L and R of South_Box)
    to reset the board to OTA mode. HOLD until White LED will keep flashing fast,
    then go dark, orange and solid white - this is the time to upload new FW OTA.
    Once uploaded the board will reset automatically and run new code.
- SOLAR MPPT: 20W solar panel, and/or EXT power brick regulation and batt charging.
- REED SENSING: door up and down door state sensed by reed switches.
- DOOR OVERRIDE: door open/close can be overriden by magnet on reed switch.
- REMOTE RESET: ESP reset by using magnets on bottom of South_Box.
- PWM or RELAY motor driving. Choose plug. Relays 1-2 = OPEN, 3-4 = CLOSE
- MOTOR RETRY: motor will try 3 cycles to close/open door if no feedback from reeds.
- TEMP MONITORING: monitor outside and inside temperatures to determine if
    life support (cooling/heating) is needed and controls this via relays.
- LIFE SUPPORT: Heating or Cooling (fan) relays (7-8) can be used when
    EXT_PWR brick is connected.
- EXPANSION: Relays 5-6 can be utilized for additional features (feed, water, lights, etc)
- LCD does not show solar volt if ext is plugged in, shows that instead
- HEAT  : comes on after Twilight if temp lower than heating temp
        : comes on during day if door closed due to frost

* LCD DISPLAY:
-----------------------------
b14.2/e19V+c *HC
i56/o22F 1320^ N
------------------------------
Line 1:
Batt(b) / Ext-Brick(e) voltage,  +c || !c (charge_OK or charge_OFF_b/c_frost), * (frost), H || F (heat or fan), C (door status O/C)
Line 2:
Inside(i) / Outside(o) temperatures(F),  LDR_value^ToD (D/N/T Day, Night, Twilight)


* See table below for LED flash codes.
----------------------------------------------------------------------------------------------------------
FUNCTION            LIGHT/ACTION        INDICATES               To Do
----------------------------------------------------------------------------------------------------------
    STATUS
GREEN: on SOLAR     1 Short Flash       Night                   n/a
                    2 Short Flashes     Evening/Morning         n/a
                    3 Short Flashes     Day                     n/a

BLUE: on CHARGER    1 Short Flash       Night                   n/a
                    2 Short Flashes     Evening/Morning         n/a
                    3 Short Flashes     Day                     n/a

PURPLE: BATT LOW    3 Short Flashes     LOW Battery             Charge battery before it runs out
WHITE: FREEZE OUT   Flashes             DOOR remains closed     Wait until warmer or override
----------------------------------------------------------------------------------------------------------
    DOOR
RED: ALARM          5 Short Flashes     Door - Wrong State      Check if door open during day or closed at night
GREEN: OP           Constant Flashes    Motor in Oper           n/a
----------------------------------------------------------------------------------------------------------
    CHARGE
YELLOW: ERROR       2 Short Flashes     Freeze = Charge OFF     Too cold for batt charge, charge at home
----------------------------------------------------------------------------------------------------------
    SUPPORT
ORANGE: HEAT        1 Long Flash        HEAT is ON              Works only if EXT PWR connected
TEAL: FAN           1 Long Flash        FAN is ON               Works only if EXT PWR connected
----------------------------------------------------------------------------------------------------------
    POWER
NO_LIGHTS           Dark                No Power/MCU bad        Check Power / MCU
----------------------------------------------------------------------------------------------------------
    UPDATES
WHITE: OTA          Constant Light      Waiting for upload      Reset
----------------------------------------------------------------------------------------------------------

 

Design Drawing

Design Drawing

schematic diagram
1 /
PCB
1 /
The preview image was not generated, please save it again in the editor.
ID Name Designator Footprint Quantity Manufacturer Part Manufacturer Supplier
1 SMF3.3.TCT tvs TVS1 SC-70-5_L2.1-W1.3-P0.65-LS2.1-BL 1 SMF3.3.TCT SEMTECH LCSC C117568
2 SMF3.3.TCT TVS2 SC-70-5_L2.1-W1.3-P0.65-LS2.1-BL 1 SMF3.3.TCT SEMTECH LCSC C117568
3 SMF05CT1G TVS TVS3 SOT-363_L2.0-W1.3-P0.65-LS2.1-BR 1 SMF05CT1G onsemi(安森美) LCSC C15879

Unfold

Project Members

Project Members

Target complaint
Related Projects
Change a batch
Loading...

Comment

Add to album ×

Loading...

reminder ×

Do you need to add this project to the album?

服务时间

周一至周五 9:00~18:00
  • 0755 - 2382 4495
  • 153 6159 2675

服务时间

周一至周五 9:00~18:00
  • 立创EDA微信号

    easyeda

  • QQ交流群

    664186054

  • 立创EDA公众号

    lceda-cn