Skip to the content
2 layers50 × 50 mmHuhnix, the printed circuit board in 3D

Automatic chicken door system with AVR, DCF77 time signal receiver and ESP8266 WiFi module

Size
50 × 50 mm
Copper layers
2
Thickness
1.6 mm
Parts
32
Nets
31
Pads
143
Tracks, vias
322, 12
Pours
2
Routed
Yes
KiCad
KiCad 4
Created
22 Aug 2015
Updated
18 Oct 2015

Overview

Huhnix is an open-source printed circuit board by Jeija, from the Jeija/huhnix repository on GitHub. It is a 2-layer board of 50 × 50 mm with 32 parts on 31 nets, routed with 322 tracks and 12 vias.

It is built around the LF33CDT-TR. Its parts include 11 resistors, 9 connectors, 6 capacitors, 2 ICs and 1 crystal. It belongs with the radio and wireless boards and the ESP8266 boards of this library.

Main components

1

README

README.md

Huhnix

Huhnix is software for an automatic slider door, such as a door for a hen house (hence the name). The slider door opens automatically every morning at a set time and is operated with two buttons or via WiFi. Settings can be adjusted with WiFi device that can access the settings webpage. Huhnix uses two microprocessors that communicate over a UART interface.

Pictures

Slider with electronics Configuration site on smartphone Henhouse with slider and buttons ...and a chicken

Documentation

Main controller: AVR

The main processor receives inputs from two buttons that are used to make the doors slide up or down and keeps all the settings and keeps track of the time (so no need for a RTC).

Secondary controller: ESP8266

The ESP8266 provides a configuration interface by acting as an access point that mobile devices can connect to in order to access a simple web interface. This web interface can be used to access system information such as the system clock and battery levels. The ESP8266 (e.g. within an ESP-01 module) is only active, when the main processor wakes it up. That is the case, when any of the slider control buttons have been pressed. This is crucial to save limited battery power. The battery can be charged using a solar panel. The ESP8266 software is based on the IoT SDK version 1.4 from Espressif.

Controller communication protocol

Definitions

Due to restrictions of the ESP-01 module, the two processors have to communicate over the serial port. The protocol is as follows:

  • Baudrate 9600 Baud, no parity, 8 bits, no stopbit, no flow control
  • Each processor must always listen for commands and can always send commands. When a processor receives a command, it must answer immediately or perform the requested action and may not execute another command at the same time.
  • If any unknown or unexpected string / command / ... is received by any processor, it has to be ignored. This is due to the fact that the ESP8266 SDK ROM outputs debug information, which cannot be disabled.
  • Each command is terminated by "\r\n". The command itself may not contain any of these characters.
Commands
ESP8266 commandDescription
timeFor debugging only, outputs human-readable DCF77 time information
dcfFor debugging only, outputs debugging data on the DCF77 signal
time_getTo be used by the AVR controller. Outputs time data in a machine (and also human) readable form: Seconds, minutes, hours, date (of month), month, year (only last two digits) and day (of week) are transferred in this order as human-readable strings with a space in between each value. If no valid time value is available, the ESP8266 answers with the character x.
AVR commandDescription
slider_downMove the slider door down. Must be acknowledged by sending the string "sld_ok".
slider_upMove the slider door up. Must be acknowledged by sending the string "slu_ok".
systime_getGets the current system time in the same format as time_get (for debugging and for Display on the web frontend).
battery_getTo be used by the ESP8266. Voltage and percent values are transferred as two human-readable numbers with a space in between them. The voltage value is transferred as an unsigned integer with the value being measured in 100mV (so a value of 123 indicates 12,3V). The percentage value is an estimated integer number between 0 and 100.
opentime_getGet time at which to open the slider automatically (time of day). Hours and minutes are transferred as two human-readable integer numbers with a space in between them. An hour value of 25 indicates that the slider is not supposed to be opened at all.
opentime_set Tell AVR to open the slider at : each day, where hours and minutes are integers seperate by a space. Must be acknowledged by sending the string "ots_ok"

AVR hardware

The ATMega128A's fusebits are E:FF, H:89, L:FF, make sure to disable ATMega 103 compatibility mode! I use a cheap chinese ATMega128A development board from LC Studio with the power LED desoldered in order to save power. A custom addon board (PCB design files in hardware directory, currently only tested with a prototype board) is stacked on top of the pin headers of the development board. This addon board has connectors for the DCF77 real time clock (I use the one from conrad.de, for buttons, for 12V power sensing, the 5V power supply (provided by a step down converter from a lead-acid battery) and for a 2-channel relay board (HL-52 V 1.0).

Attribution / License

The PCB design and schematic uses Jerry Dunmire's ESP8266 KiCAD library in the hardware/libraries/ESP8266 directory, licensed under CC BY-SA 4.0. I license my hardware designs under the CC BY-SA 4.0 license.

The ESP8266 software uses Spritetm's libesphttpd with espfs in esp8266/libesphttpd. All my code is licensed under the MIT license.

Parts

32
QtyValueFootprintReferences
4100uCapacitors_SMD:C_1206_HandSolderingC2, C4, C5, C6
31KResistors_SMD:R_1206_HandSolderingR3, R5, R7
3470Resistors_SMD:R_1206_HandSolderingR2, R4, R6
2100KResistors_SMD:R_1206_HandSolderingR8, R10
210KResistors_SMD:R_1206_HandSolderingR1, R11
2CONN_02X16Socket_Strips:Socket_Strip_Straight_2x16P1, P2
2FILTERCapacitors_SMD:C_1206_HandSolderingFB1, FB2
110Resistors_SMD:R_1206_HandSolderingR9
1100nCapacitors_SMD:C_1206_HandSolderingC1
1220uCapacitors_SMD:C_1206_HandSolderingC3
132.768kCrystals:Crystal_Round_Horizontal_2mmY1
1BUTTONSPin_Headers:Pin_Header_Straight_1x03P4
1DCF77Connect:PINHEAD1-3P3
1DEBUGPin_Headers:Pin_Header_Straight_1x08P9
1ESP-01v090ESP Modules:ESP-01U1
1LF33CDTTO_SOT_Packages_SMD:TO-252-2LeadU2
1PIEZOBuzzers_Beepers:MagneticBuzzer_ProSignal_ABT-410-RCSP1
1POWERConnect:PINHEAD1-3P7
1REEDPin_Headers:Pin_Header_Straight_1x02P6
1RELAYSPin_Headers:Pin_Header_Straight_1x04P5
1UARTPin_Headers:Pin_Header_Straight_1x03P8

Similar boards

  • 2 layers129.8 × 67.5 mmSchem, the printed circuit board in 3D

    Schem

    SullivanAtl/cpld_bike_driver

    180 parts1
  • 2 layers127 × 110 mmUNICON board, the printed circuit board in 3D

    UNICON board

    dodotronix/RobotClaire

    This project is focused on a design of an autonomous robot including its electronics and basic software to present robot's features

    132 parts
  • 4 layers100 × 114 mmInkube ephys v4 3, the printed circuit board in 3D

    Inkube ephys v4 3

    maurer-lbb/inkube_hardware

    Open-source hardware (CAD + PCB) for inkudock, a modular incubator and closed-loop electrophysiology, and a water compartment lid preventing evaporation from cell cultures.

    63 parts
  • 2 layers50 × 23.2 mmAnalog, the printed circuit board in 3D

    Analog

    hoglet67/RGBtoHDMI

    Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI

    32 parts1kGPL-3.0
  • 2 layers136.8 × 54.2 mmRetropie zero, the printed circuit board in 3D

    Retropie zero

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    32 parts915
  • 2 layersMooltipass top, the printed circuit board in 3D

    Mooltipass top

    limpkin/mooltipass

    Github repository dedicated to the mooltipass project

    32 parts531
  • 2 layers16 × 20 mmESPKey, the printed circuit board in 3D

    ESPKey

    octosavvi/ESPKey

    Wiegand data logger, replay device and micro door-controller

    32 parts353GPL-2.0
  • 2 layers82 × 40.9 mmDisplay7447, the printed circuit board in 3D

    Display7447

    zmaker/arduino_cookbook

    gli sketch del nuovo progetto Arduino Cookbook e dei video di YouTube

    32 parts269

Questions

How big is the Huhnix PCB?

It measures 50 × 50 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Huhnix use?

32 parts, built around the LF33CDT-TR. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Huhnix KiCad files?

From the Jeija/huhnix repository on GitHub, at the commit this page was made from: the board is hardware/huhnix.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Huhnix design in my own project?

Its repository states no licence, so its author keeps all rights: ask Jeija before reusing the design.