Nadeem Ahmed
Published © MIT

S(mart) - Coop

Automated chicken coop: automatic water and feed dispenser, IR based egg counter and notifier.

AdvancedShowcase (no instructions)2 days5,055
S(mart) - Coop

Things used in this project

Hardware components

IR receiver (generic)
×1
IR transmitter (generic)
×1
attiny 44a smd
×1
Arduino Pro Mini 328 - 3.3V/8MHz
SparkFun Arduino Pro Mini 328 - 3.3V/8MHz
for testing fabricated board
×1
LED (generic)
LED (generic)
×1
Jumper wires (generic)
Jumper wires (generic)
×1
3/8-inch plywood (generic)
×1
6mm clear acrylic sheet (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE
Microsoft Azure
Microsoft Azure

Hand tools and fabrication machines

Laser cutter (generic)
Laser cutter (generic)
3D Printer (generic)
3D Printer (generic)
shopbot
Dremel Tool
Modela milling machine
vinyl cutter

Story

Read more

Code

Code for my project

Arduino
Arduino IDE
#include <SoftwareServo.h> 
int pos = 0; 
SoftwareServo myservo; 
#include <SoftwareSerial.h>
#define RxD 3
#define TxD 4
#define DEBUG_ENABLED 1
SoftwareSerial blueToothSerial(RxD,TxD);
int state = 0;

int egg_count = 0;
void setup() {
pinMode(3,INPUT);
myservo.attach(0); 
blueToothSerial.begin(9600);
}
void loop()

{
if(digitalRead(3) == HIGH)
{
delay(5000);
egg_count ++; //increment egge count with 5 sec delay
}

if(blueToothSerial.available() > 0){
state = blueToothSerial.read();
blueToothSerial.write(state);
if(state >=0)
{

for(pos = 0; pos < state; pos += 2) //rotate continious servo
{ 
myservo.write(pos); 
delay(15); 
SoftwareServo::refresh();
} 

}
else if(state ==0)
{

blueToothSerial.write(egg_count); //counts egg
}

else if(state ==2)
{ digitalWrite(4,HIGH); //Pump ON
}
else if(state ==3)
{ digitalWrite(4,LOW); //Pump OFF
}


}
}

Credits

Nadeem Ahmed

Nadeem Ahmed

6 projects • 14 followers
I love making new things

Comments