Software apps and online services
Hand tools and fabrication machines
Some people have cats or dogs and I have a pigeon. Well, sort of. Technically, he is free and he lives wherever he wills, but he has developed a habit of coming to my window every morning at roughly the same time and I would feed him with some seeds. For a few months now, I am always happy to see him and continue to be somewhat surprised that he continues coming back. I named him Pirate because of his injured foot and limping.
However, my daily schedule changed a bit and now I am not home at the time he usually comes on the weekdays. Leaving plenty of food out for him did not make sense because it would be eaten by other birds in half an hour and Pirate would have nothing left for him. So, tinkering an autonomous device that can feed the bird when I ask even if I am not around was a go-to solution.
I am proud to present the Bird Feeder, Alexa-controlled device powered by a solar energy which may work even in remote locations. Operating on a GSM-module and fueled by a solar panel, this autonomous device may be stationed almost anywhere and you can still turn it on just by asking your Alexa echo or Alexa app to feed the birds from anywhere.
Bird Feeder is a device that dispenses some bird-food per Alexa voice command. Powered by a solar panel and equipped with GSM-modem Bird Feeder may be stationed almost anywhere and you can trigger it from any place with Internet connection. Just make sure to refill the container with seeds :-).
The main mechanic components of this device are a standard pet bottle, custom designed mechanized screw-on seed dispenser, and a stepper.
For this project, you can use pet bottles of various sizes to serve as containers for seeds. The only limitation is the bottleneck and cap size which has to fit the size of the designed dispenser. Because it was tailored to the most common cap size, you can use a plastic bottle from any beverage to serve as a container for the seeds. Here’s an easy start, right?
The mechanized screw-on seed dispenser was designed especially for this project. When designing it, I wanted to make it suitable for almost any standard plastic bottle you can find. Also, I tried to keep it very simple, yet, functional.
It consists of the cap and a rotor which rotates and dispenses some seeds with each turn. The screw-on seed dispenser was then printed on a 3D printer. I am attaching the 3D model I created, so feel free to use it.
The rotor part of the screw-on dispenser is operated by a stepper, controlled by stepper motor driver.
The rotor consists of the rotor itself and a shaft that transmits energy from the stepper motor to the rotor. The shaft has to be glued to the rotor. The shaft and the motor plate are designed as the separate details so that you can adjust them for a different stepper if there's a need.
The screw-on dispenser is then screwed on the pet bottle and connected to stepper and the rest of electronic parts.
Taking into account that I wanted to be able to place the device outdoors, far from the power outlet, I decided to power it with a solar panel. Because the panel’s voltage may change throughout the day, it is stabilized to 4.3 v with MT3608 dc-dc booster. The battery is connected via the BMS-board that protects the battery from over-charge and over-discharge. The battery output voltage is transformed to 4.8 v by MT3608 dc-dc booster to power the Arduino, GSM-modem, and the stepper driver. At first, the output voltage was set to 5 v but a couple of tests have resulted in the overvoltage warnings on the modem and I had to adjust it to 4.8 v.
All the components are displayed on the schematic diagram for your convenience. Keep in mind that you can adjust the voltage of boosters.
Because this device is powered by a somewhat-low-power solar panel while also using modules with high energy consumption, special attention should be paid to energy saving within this project. Because GSM module consumes 2 amps current I used a booster that can ensure sufficient power for the module. This makes keeping the modem in active mode all the time troublesome. It would discharge the battery faster than solar panel can charge it. To prevent this, I decided to keep the modem in a sleep mode most of the time. It is programmed to wake up every 5 minutes to check whether there are any new activation messages.
Here, I ran into the first major problem of receiving the new activation messages while the device is in the sleep mode. The problem was solved by turning to a special feature available for MQTT protocol – messages with the retained flag. Broker publishes these messages for the subscribed clients. These messages are also saved in broker’s memory so that when new users subscribe to this topic the broker sends them this retained message. Every time the user subscribes to the topic, it will receive the last message sent with the retained flag. To make sure that the same message does not trigger the Bird Feeder every time it wakes from sleeping mode and subscribes to the activation topic, once BirdFeeder receives the activation message it will delete this message by publishing an empty message on the same topic.
The device subscribes to the "feeder/on" topic using MQTT. The sketch is created to expect to receive an integer number as a payload in the message on this topic. The value of the received number determines the number of turns the rotor will make. This number can be set in Lambda function. Hence, you can adjust it to fit the needs of the birds you will feed when you deploy the Lambda. I tried to make the code
I used CloudMQTT as MQTT broker for this project. I went with the free Cute Cat plan they offer which is sufficient for my needs.
The skill was built using node.js and this guide.
Every Smart home skill requires account linking. Because I need it just to make the skill work and for nothing else, I used this simple guide.