Wiznet makers

mayuri

Published January 23, 2023 ©

109 UCC

66 VAR

0 Contests

0 Followers

0 Following

Original Link

Umochi / AutomaticHenHouse

Project for the automation of a chicken coop door.

COMPONENTS Hardware components

WIZnet - W5100 ethernet shield

x 1


PROJECT DESCRIPTION

AutomaticHenHouse

Project for the automation of a chicken coop door.

The hardware that takes care of opening and closing the door consists of an Arduino Uno board,
connected to the network via Ethernet-Shield .

Ethernet-Shield  


The motor that opens the door via a threaded rod is a simple 12v motor that mounts a spindle.

 


A different lmd18200 was used to interface with the motor, but 4 simple relays could also be used. The use of this diver allows you to control the direction and activity of the motor as well as the output voltage to regulate the ascent and descent speed.

 


Two simple buttons (PCB Switch) constitute the limit switch for the opening and closing of the door.
Two other buttons of the same type form an additional keyboard to force closing and opening without having to use the web service interface.

 


The graphical interface and the management of the automation of closing and opening consist of a Node-Red flow .
In particular, the node-red-dashboard library supplies the nodes necessary for the creation of the graphical interface.
The generated interface is responsive and also adapts well to smartphone use.

 

     


The library: node-red-contrib-sun-position provides the scheduling functions with the sunrise and sunset event, relative to the set zone.


The behavior of the system is as follows:

  • Arduino executes the loop, in which it checks if there are invocations on the exposed web service or key presses.
  • The web service returns a json that reports the status of the opening and closing sensors and the activity of the motor.
  • Furthermore, the commands sent as url parameters are recovered, these can be the Closing , Opening and Stop command . Any unexpected parameters will be ignored.
  • However, the Stop command is not used within the exposed user interface.
  • It is also possible to calibrate the energy used by the motor in case of need. The motor activation is performed at 100% of the available voltage , and is reduced to 50% after one second.
  • The entire Opening / Closing operation takes approximately 4 seconds.
  • Power reduction is important, not only to reduce speed and the possibility of accidents, but to reduce inertia at the end of the stroke, and the possibility of blocking the mechanism and not having enough acceleration to start the next operation.
  • Some conditional delays in the cycle have been introduced in order not to overload the Arduino.
  • The Flow created in Node-Red takes care of generating the graphical interface, and activating the schedules.
  • The user interface shows the status of the door, Closed , Open or in Intermediate Status and the activity status of the motor.
  • You are given the option to turn autorun on or off.
  • Two buttons instead make it possible to force Closing and Opening .
  • When the switch is set to Automatic , the scheduling conditioned by the position of the sun in the "Sunrise" and "End of Sunset" states trigger the opening and closing operations.
  • The interface can be exposed on the internet, in my case I use a free DDNS and NginX service to manage reverse proxy and authentication.
Documents
Comments Write