Introduction: ATtiny85 Automated Fish Feeder
I am about to go on a around the island bike trip and I wanted to automate the feeding process. There are plenty of DIY auto fish feeder articles available on the internet but I wanted to create something quick and easy and wanted the circuit to be very small with the minimal amount of parts.
This project is very easy to build. I have set the timer to 6 hours and no more forgetting to feed your fish. With a little modifications to the structure, you can even use this to feed any pet you have.
This is my very first instructable and let's begin.
Step 1: Supplies
To complete this project, you will need:
- Arduino UNO (to program the ATTiny85) or a ATTiny85 programmer
- Servo motor
- Empty small container (I used a baby cotton buds container)
- Fish food (obviously)
- Jumper wires
- Prototyping PCB board
- 15cm x 5cm , 6cm x 2cm, 10cm x 2cm, 5cm x 2cm plywood pieces
Links to find these:
ATTINY85-20PU - http://www.ebay.com/itm/5PCS-ATMEL-DIP-8-ATTINY85-...
ATTINY85 Arduino General Micro USB Development Board http://www.ebay.com/itm/Digispark-Kickstarter-ATTI...
Copper Tone Prototyping PCB Print Circuit Board http://www.ebay.com/itm/2-Pcs-Copper-Tone-Prototyp...
- Hot Glue
- Small nails
Step 2: Structure
Look at the image, you have to build something like that so the food container can stay firmly on the motor.
I used a combination of glue and nails to make this stand.
Drilled a hole for the motor.
Attached the PCB to the top of the structure
Step 3: Code the Feeder
Follow the instructions in this page to setup the Arduino UNO as the ATTiny programmer if you dont have a dedicated programmer for the IC.
High-Low Tech – Programming an ATtiny w/ Arduino 1.6 (or 1.0) ( http://highlowtech.org/?p=1695 )
Download Fritzing from http://fritzing.org/download/
Now you can open these files with the program.
Upload the code to attiny85 and setup the circuit as shown in the breadboard or the PCB design. I recommend trying it out on a breadboard first.
Once you have the code uploaded, connect the circuit to power (USB or whatever 5v power supply you have) and witness the red LED blinking once every 10 seconds.
If you want to change the timer, follow the steps given below.
1. locate the 7th line of the code. which should read
long FISHFEEDER = 21600000; // in milliseconds
2. convert the time you want into ms and set the amount in the variable.
eg: if i want to test the feeder every 1 minute, 1 min = 60000ms
long FISHFEEDER = 60000; // in milliseconds
upload the changed code and see it in action.
Step 4: Finished!
Put the circuit and the servo motor and the food tank on the structure and attach it to the fish tank.
If the way I've designed my base doesn't suit your needs, you can always get creative. but the mechanism should be the same. code should work for any feeder.
If you have any questions, please feel free to contact me.
We have a be nice policy.
Please be positive and constructive.