• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
  • Home
  • Topics
    • Arts & Crafts
    • Education
    • Environment & Society
    • Family & Relationships
    • Funny
    • Health
    • Home & Garden
    • Animals & Insects
    • Science & Technology
    • Sports & Fitness
    • Style & Beauty
    • Travel & Entertainment
    • Cleaning
    • Childhood
    • Food
    • Vehicles
    • Finance & Business
  • About Us
  • Privacy Policy
  • Contact Us
Curiosity Insight

Curiosity Insight

Learning never exhausts the mind

How to Make a Automatic Chicken Coop Door Opener?

August 4, 2020 By Miranda Jackson Leave a Comment

I will present through this blog how to create a henhouse door that opens automatically depending on the sun. In the project I’m going to treat, the door will open in the morning at 9 am and close depending on the sun. You will be able to adapt this project according to your needs. The purely electronic part will be treated in this article.

Background  

I own 12 chickens and my father intends to put a rooster. The door is used to prevent him from singing and bringing up the whole neighborhood at 6 am. So I offered to manufacture all the control part for his engine.

Equipment required for engine control

– A nano Arduino 

– A card for welding

– An L298 

– Two terminal blocks 

– A small solar panel 

-An old 12 V recovery engine

Introduction

I decided after various tests to use the nano Arduino to manage the sun, sending commands to the engine.

What is the nano, Arduino?

The Arduino Nano is a free printed circuit board including a Microcontroller. The Microcontroller is the little black chip with lots of legs. It’s a bit like the brain of an electronic object, a miniaturized version of a circuit with lots of components. It is also on this component that the program is stored.

Technical specifications

MicrocontrollerAtmel ATmega328
Operating voltage (logic level)5V
Supply voltage (recommended)7-12V
Supply voltage (maximum)6-20 V
Digital I / O14 (of which six can provide a PWM output, denoted by a white line)
Analog I / O8
Current available by I / O pin40mA
Flash memory32 KB (including 2KB used by the bootloader)
SRAM2 KB
EEPROM1 KB
Clock speed16 MHz
Dimensions44mm x 18mm

It’s all well and good, but what does it do?

In truth, many things. Analog I / O can retrieve information and send information. Digital I / O allows them to send a 0 or 5V output. The PWM makes it possible to vary for example the speed of a motor but also the intensity of a lamp. TX / RX pins (transmit/receive) allows dialogue with other components, eg, radio frequency module.

Setting up the Arduino-nano

For the control of the light, we must recover the information of the solar panel thus use of the analog I / O. I chose to use the pins D2 and D3 (personal choice).

Engine control

To control a motor with an amperage greater than 1A it becomes a little more complicated … (You can find the indication of amperage on the transformer of your motor. Be careful because a high amperage is dangerous!)

We can not control the engine going directly through the nano-Arduino. Why?

  1.  Because the current is so low that your engine will not even turn.
  2. When the motor finishes running when it is no longer powered, it generates a current. This current arrives on your Arduino and can, according to the intensity to grill it. Great!

So we will use an intermediate component called the “H bridge.” I will not go into details, but this component can run a motor in both directions without the risk of grilling all your components. 

So we connect this small component on the digital I / O pins and also on the 5V Arduino because it must be powered to operate.

Here is my little card that I created for this component. But I will replace it with an L298 for more power.

For ease and power, use the L298D. The card does not become necessary anymore.

Programming your nano-Arduino

Install on your Arduino IDE pc downloadable here

Configuration:

  1. Open it, go to Tools-> Boards and select Arduino nano / ATmega 328
  2. Go to Tools-> serial ports to select the port.

Your Arduino is ready to be programmed!

Copy and paste the following code:

const  int potar = 0;
int D2 = 2;
int D3 = 3;
security boolean = 0; // Reset the security value

// variable to store the value read after conversion 
int valueLue;
// convert this value to a 
float voltage voltage;

void  setup ()
{
    // we just start the 
    Serial serial link . begin (9600);
    pinMode (D2, OUTPUT );
    pinMode (D3, OUTPUT );
    // At each reset, the program starts again and runs the motor in the up direction (opening at 8 o'clock) 
    digitalWrite (D2, HIGH );
    digitalWrite (D3, LOW ); 
    delay (3000);             // wait for 3 seconds 
    // Stop 
    digitalWrite (D2, LOW );
    digitalWrite (D3, LOW );
    delay(3000);             // wait for 3 seconds
}

void  loop ()
{
    valueLue =  analogRead ( potar );
    // convert the voltage read at the output of the potentiometer to the binary number 
    // translate the raw value into voltage (cross product)
    voltage = value Read * 5.0 / 1023;

    // the value read on the 
    Serial serial link is displayed . print ( "valueLue =" );
    Serial . println (readValue);

    // we display the calculated 
    Serial voltage . print ( "Tension =" );
    Serial . print (voltage, 2);
    Serial . println ( "V" );

    // we skip a line between two 
    Serial displays . println ();
    // wait half a second so that the display is not too fast 
    if (voltage <0.48 && security == 0) // Detection of the night and the door is open
    {
    security = 1; // security indicating that the door is closed
    // 
    DigitalWrite closure (D2, LOW );
    digitalWrite (D3, HIGH );
    delay (4000);             // wait for a second 
    // DigitalWrite 
    stop (D2, LOW );
    digitalWrite (D3, LOW );
    delay (1000);
    }
   delay (500);
}

Adapt this code according to your needs. When you click on the small magnifying glass at the top right, you can see the values read on your solar panel.

That’s it your motor drive is over!

Be careful, here I did not use opening contact or closing. I strongly advise you to use it. At a few cents a unit, why deprive yourself? We connect them to the Arduino.

When activated, the door has reached the stop and the power to the motor is turned off. It’s much cleaner and generates fewer problems.

Filed Under: Science & Technology, Topics

About Miranda Jackson

I am a chemistry researcher and research various household products to make life easier and enjoyable for people around the world.

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

E-mail Newsletter

  • Facebook
  • GitHub
  • Instagram
  • Pinterest
  • Twitter
  • YouTube

More to See

How to Protect Yourself Against Ticks

How to Protect Yourself Against Ticks?

December 20, 2020 By Miranda Jackson

How to Increase Platelet Count During Pregnancy

How to Increase Platelet Count During Pregnancy?

December 18, 2020 By Miranda Jackson

how to make a wasp trap with a water bottle

How to Make a Wasp Trap with a Water Bottle?

December 18, 2020 By Miranda Jackson

How to Make Rodent Repellent

How to Make Rodent Repellent?

December 18, 2020 By Miranda Jackson

How to Make a Bat House

How to Make a Bat House?

December 17, 2020 By Miranda Jackson

how to get rid of white grubs naturally

How to Get Rid of White Grubs Naturally?

December 17, 2020 By Miranda Jackson

How to Get Rid of Woodworm Beetle

How to Get Rid of Woodworm Beetle?

December 17, 2020 By Miranda Jackson

How to Get Rid of Field Mice in Your Home and Garden?

How to Get Rid of Field Mice in Your Home and Garden?

December 16, 2020 By Miranda Jackson

Footer

About US

At the curiosityinsight.com, we believe that it is possible to live better without spending more. But saving is difficult. So we want to make it easier for you. How? ‘or’ What?

We select and publish little life-changing tips every day. More precisely, we scan the Internet, test sometimes weird stuff, and even search our grandmothers’ closets to find you the best advice.

Recent

  • How to Get Rid of Snakes in Garden?
  • How to Protect Yourself Against Ticks?
  • How to Increase Platelet Count During Pregnancy?
  • How to Make a Wasp Trap with a Water Bottle?
  • How to Make Rodent Repellent?

Search

© 2020 Curiosity Insight · About US · Contact US · Privacy Policy