Introduction: Happy Birds ! a World of Connected Bird Feeders / Connectez Vous Aux Jardins Du Monde (bilingue)

About: French Graduate Engineer, love electronics, software and 3D printing

A New version is now available !

ESP32 files are available here, and version 2 of the App on Apple & Google stores

The updated tutorial is available here.


Une nouvelle version est disponible !

Les fichiers ESP32 sont disponibles ici, la version 2 de l'Appli sur les stores Apple et Google

Une mise à jour du tuto est disponible ici


This is all about birds of the world, of our gardens and sharing photos of them. This tutorial will give you all the details you need to build your own connected bird feeder and get nice snapshots.

You will get instantly the photos on your smartphone and you will be able to share them and chat with the other birds enthusiasts through the Happy Bird simple social network.

The Happy Birds companion application is available on Apple and Google stores (smartphones and tablets) and is free.

Visit also the Birds and Friends (birdsandfriends.org) site.


This tutorial is written both in English and French


Connectez-vous aux jardins du Monde et découvrez les oiseaux ! Ce tutoriel vous donnera tous les détails pour fabriquer votre propre mangeoire connectée pour de très belles photos.

Vous recevrez instantanément les photos sur votre smartphone et pourrez les partager dans cette communauté des Happy Birds.

L'application Happy Birds fonctionnant avec la mangeoire est disponible gratuitement sur les stores Apple et Google (pour smartphones et tablettes).

Visitez également le site Birds and Friends (birdsandfriends.org)

Supplies

Step 1: Overview / Vue D'ensemble

The 2 main elements of this project are the Bird Feeder and the Application.

The Bird Feeder is 3D printed with 3 different materials, but we will come back to this later. We have the following parts:

  • the central block hosting a sensor device for bird detection, the front camera facing the feeding areas, and the rest of the electronics which is inside the box.
  • 2 removable food dispensers on the sides
  • the roof hosting 2 solar panels to power the electronics.

You can hook it to a tree branch by the roof, or simply put it on a support at a reasonable height (because of the cats).

When a bird lands on the bird feeder, the sensor device detects it and triggers the camera for a quick snapshot. Then, the photo is sent to your Happy Birds App, thanks to your local wifi network and Internet. You don't need to be physically present to get the photo. Photos are stored on the Firebase database in the Google cloud. You can save them to your photos library, share them on Instagram or WhatsApp and share on the dedicated Happy Birds social network and ask for help if you cannot identify them.


Les 2 éléments principaux de ce projet sont la mangeoire et l'Application.

La mangeoire est imprimée en 3D avec 3 filaments différents, je reviendrai plus tard sur ce point. Elle est constituée:

  • d'un bloc central accueillant le senseur détecteur de présence, la caméra frontale, et le reste de l'électronique placée à l'intérieur du bloc
  • de 2 réservoirs de nourriture placés de chaque côté du bloc central
  • d'un toit supportant 2 panneaux solaires qui viennent alimenter l'électronique.

Le toit est également équipé d'un crochet pour suspendre l'ensemble à une branche d'arbre par exemple, mais on peut aussi simplement poser la mangeoire sur un muret à une hauteur raisonnable (à cause des chats).

Lorsque d'un oiseau se pose sur la mangeoire, le senseur de présence le détecte et déclenche la photo. La photo est alors transmise à votre Application Happy Birds, par internet, via votre réseau wifi local. Vous n'avez pas besoin d'être présent physiquement pour recevoir la photo. Les photos sont stockées dans une base de données Firebase dans le Cloud Google. Vous pouvez les sauvegarder dans votre album photos, les partager sur Instagram ou WhatsApp, ou les partager sur le réseau social Happy Birds dédié et intégré à l'Application: c'est un moyen de demander l'aide pour les identifier.

Step 2: Understanding the Electronics of the Bird Feeder / Comprendre L'électronique De La Mangeoire

The technology used is quite simple and rely on the ESP32-CAM, a nice and cheap module based on the ESP32 micro-controller. The main elements are:

  • the ESP32-CAM, low power 32-bit CPU with 4Mb RAM, wifi and bluetooth, built-in flash lamp (not used), micro SD card reader (not used). Most of the time, the ESP32 is in deep-sleep mode with a low power consumption. The following pins are used as inputs:
  • GPIO 13: wake up from the range sensor
  • GPIO 14: battery voltage monitoring
  • GPIO 3: push button to setup the board
  • power supplied through the 5V pin
  • please note that these pins have been carefully chosen and should not be changed
  • the OV2640 camera, 160 degrees wide angle and 75mm cable length connected to the ESP32-CAM board
  • the wifi external antenna (I will explain how to setup the ESP32-CAM board) to extend the range
  • the 10cm range sensor from Sharp: when something is detected at a distance from 0 and 10cm, the output pin drops to 0 volt and wakes up the ESP32 from the deep-sleep mode to take a snapshot and process it. I have tried other Infra Red sensors but it didn't work: classic PIR detects any changes at long distance, clouds or tree branches moved by the wind and are not suitable for this. The Sharp sensor detects only obstacle between 2 and 10cm and is ideal for this usage. However, it comes with a disadvantage of a permanent current consumption of 5mA.
  • the power is supplied by a 4800mAh Li-ion battery that is charged by solar panels. You may have to recharge it sometimes, through the micro-usb connector with a very classic 5V charger. The charger board module (TP4056) secures the battery charges and discharges.
  • a general on/off power switch
  • a push button to setup the board with your smartphone and the App.


Remark about the solar panels:

Energy was one of the most challenging problem to design this project, since the ESP32-CAM board requires a voltage input not lower than 3.7 volts: it means that battery voltage must not drop below 70-75% of its max value. In the attached files of this tuto, you will find 2 options for the solar panels size and the roof holding them:

  • Option 1: panels of 90x60mm supplying 100mA each. For me, living in Paris area, it was fine during spring and summer (battery was permanently supplying enough energy to charge the battery), but not enough during the winter period.
  • Option 2: panels of 135x165mm supplying 583mA each. That is good enough for me.

So, if you are lucky to live in a sunny place, you should go for option 1, otherwise choose option 2.



La technologie utilisée est relativement simple et s'appuie sur l'ESP32-CAM, un module bon marché, basé sur un micro-contrôleur ESP32. Les éléments principaux sont:

  • l'ESP32-CAM, micro 32 bits avec 4Mo de RAM, wifi et bluetooth, une LED flash (non utilisée), un lecteur micro SD (non utilisé). La plupart du temps l'ESP32 sera en mode deep-sleep ("sommeil profond") avec une consommation électrique très basse. Les broches suivantes sont utilisées en entrées:
  • GPIO 13: recevant le signal de réveil du senseur de proximité
  • GPIO 14: pour contrôler le voltage de la batterie
  • GPIO 3: reçoit le signal du bouton pressoir pour configurer la carte
  • l'alimentation est assurée par la broche 5V
  • notez que ces broches ont été soigneusement choisies et ne doivent pas être changées
  • la caméra OV2640, champ de 160° et un câble d'une longueur de 75mm connecté au module ESP32-CAM
  • l'antenne wifi externe (J'expliquerai comment configurer la carte) qui permet d'accroitre la portée
  • le senseur de proximité 10cm de Sharp: lorsque quelque chose est détectée entre 0 et 10cm, la broche de sortie tombe à 0 volt et réveille l'ESP32 qui prend une photo et la transmet. J'ai essayé d'autres senseurs infra-rouge sans succès: les autres senseurs classiques PIR détectent tout changement du décor sur une longue distance, changement de luminosité lors d'un passage de nuage ou le mouvement des branches agitées par le vent. Le senseur de Sharp ne détecte d'obstacle qu'entre 0 et 10cm. Il a par contre un désavantage c'est sa consommation permanente de 5mA.
  • l'alimentation est assurée par une batterie Li-on de 4800mAh, chargée par les panneaux solaires. Vous pouvez la recharger directement avec un chargeur classique 5V ayant un connecteur micro-USB. Le module TP4056 est chargé de sécuriser les charges et décharges de la batterie.
  • un bouton on/off d'alimentation
  • un bouton poussoir pour configurer la carte avec votre smartphone et l'Appli.


Remarque à propos des panneaux solaires:

L'alimentation de l'électronique a été l'un des problèmes les plus complexes à résoudre, le module ESP32-CAM nécessitant une tension d'alimentation supérieure à 3.7 volts: ce qui signifie que le voltage de la batterie ne doit pas descendre en-dessous de 70-75% de sa valeur max. Dans les fichiers joints au tutoriel, vous trouverez 2 options de taille pour les panneaux solaires et le toit qui les héberge:

  • Option 1: panneaux de 90x60mm fournissant 100mA chacun. Dans mon cas, vivant en région parisienne, ce modèle a bien marché au printemps et en été (la batterie était rechargée en permanence), mais pas en hiver, lorsque l'ensoleillement a baissé.
  • Option 2: panneaux de 135mmx165mm fournissant 583mA chacun. Là, c'était bon.

Donc, si vous avez la chance d'habiter une zone ensoleillée toute l'année, l'option 1 sera suffisante, sinon optez pour l'option 2.

Step 3: Building the Electronics of the Bird Feeder / Construire L'Electronique De La Mangeoire

The Electronic Board

You can either build your own board (with veroboard for example) or use the Gerber file I have attached that contains the full layout description and that you can get manufactured for something like 2 dollars. I designed the board with EasyEDA, a very comprehensive tool with direct links to some manufacturers.

Note that the 2 sides of the board are used:

  • the "component" side: with all the passive components (resistors, capacitors), the push-button, the on/off power connector (JST XH-2A), the charger output connector (JST XH-2A) labelled Battery on the board, and the sensor connector (JST-3A)
  • the "copper" side: with the 2 x 8-pins female pin header sockets that will host the ESP32-CAM module


La Carte Electronique

Vous pouvez créer votre propre carte (en utilisant du veroboard par exemple) ou utiliser le fichier Gerber attaché qui contient la description complète du circuit pour commander sa fabrication, et ce, pour une somme très modique, du genre 2 dollars. J'ai conçu la carte avec EasyEDA, un outil très complet avec des liens directs fournisseurs.

Notez que les 2 côtés de la carte sont utilisés:

  • le côté composant: accueille tous les composants passifs (résistances, capacités), le bouton poussoir, le connecteur du bouton on/off d'alimentation (JST XH-2A), le connecteur pour brancher la sortie du chargeur (JST XH-2A) et nommé Battery sur la carte, et le connecteur pour le senseur (JST-3A)
  • le côté cuivre: les 2 supports 8 broches pour accueillir l'ESP32-CAM



The Charger Module

The TP4056 Power Charger Board Module should be wired as follows:

  • I strongly recommend you use black and red wires so that there is no ambiguity in the connection and no risk of short circuit for the battery (risk of fire or explosion)
  • I have used 2 pairs of micro JST PH 2.0 connectors to connect the plus and minus inputs of the module to the solar panels. These connectors can be bought wired, so you just have to solder the male wires to the solar panels and the female to the module +/- inputs. Again, double check that the red (+) and the black (-) pins match between males and females.
  • 2 wires soldered between the module B+/B- to the battery holder (the + and - marks on the battery holder are not very visible)
  • then, 2 wires connected to a JST XH-2Y connector that will be plugged to the BATTERY connector of the Electronic Board


Le Module Chargeur

Le module chargeur TP4056 doit être connecté de la façon suivante:

  • je recommande d'utiliser des fils noirs et rouges pour bien distinguer les polarités et éviter tout court-circuit de la batterie (risque de feu ou d'explosion)
  • j'ai utilisé 2 paires de connecteurs JST PH2.0 pour connecter les entrées + et - aux panneaux solaires. Ces connecteurs peuvent être achetés déjà câblés et vous n'avez qu'à souder les fils des connecteurs mâles aux panneaux solaires et les fils des connecteurs femelles aux entrées +/-. Vérifiez bien que les fils rouges (+) et noirs (-) se correspondent bien entre les connecteurs mâles et femelles.
  • 2 fils soudés entre les entrées B+/B- et le support de la batterie (les marques + et - sur le support batterie ne sont pas très visibles)
  • finalement, 2 fils avec un connecteur JST XH-2Y qui viendra se brancher sur le connecteur BATTERY de la carte électronique


The Solar Panels

Solder the black and red wires to the solar panels with the males micro JST PH 2.0 connectors.


Les Panneaux Solaires

Soudez les fils noirs et rouges des panneaux solaires aux connecteurs JST PH 2.0.



The Sensor

You just need 3 colored wires (preferably with a red wire for Vcc) with:

  • on one side, a 3 Dupont female connector
  • on the other side, a JST connector XH-3Y
  • Make sure the pins match between the sensor and the SENSOR board connector (the order is different)


Le Senseur

Vous avez besoin de 3 fils colorés (de préférence avec un fil rouge pour Vcc) avec:

  • d'un côté (senseur), un connecteur femelle type Dupont
  • de l'autre côté (carte), a connecteur JST XH-3Y
  • Assurez vous que les broches correspondent bien entre le senseur et l'emplacement du connecteur SENSOR (l'ordre des broches est différent).


The ESP32-CAM Module

You first need to connect the external antenna. This operation can be a bit tricky but I will give you my way to do it easily. There are a few tutorials on Internet, here is one of them. Basically you need to change the position of the tiny resistor selecting the antenna, from the on-board position to external position. So, you can do it in 5 steps:

  • Step 1: apply some flux on the resistor while your soldering iron is getting hot. Of course, considering the size of the resistor, it's good to have a large magnifying lamp
  • Step 2: put your soldering iron on the resistor and when the solder has melted, remove the resistor with your iron or with tweezers.
  • Step 3: put some melt solder on the two points corresponding to the external antenna configuration
  • Step 4: cut a short piece of wire and put it between the two points with a tweezer while you put also your soldering iron. The solder should melt and keep the piece of wire in place.
  • Step 5: trim the wire and you are done.

Note for the antenna: if you don't feel like doing it, you may carry on with the tuto and do some wifi testing with the board internal antenna that could be sufficient.

Finally, place carefully the camera OV2640 with the 75mm cable on its connector.


Le Module ESP32-CAM

La première chose à faire est de connecter l'antenne extérieure. Cette opération est assez délicate mais je vais vous indiquer une manière assez simple de le faire. Il y a plusieurs tutos sur Internet, en voici un exemple. Le principe consiste à changer de position la minuscule résistance qui connecte l'antenne, de la position interne vers la position antenne extérieure. Vous pouvez le faire en 5 étapes:

  • Etape 1: appliquez un peu de flux sur la résistance pendant votre fer à souder chauffe. Il est bien sûr recommandé d'avoir une bonne lampe avec loupe.
  • Etape 2: appliquez votre fer à souder sur la résistance. Lorsque la soudure a fondu, retirez la résistance avec le fer ou avec des pinces fines. Nettoyez la zone.
  • Etape 3: Déposez un peu de soudure fondue sur le point de connexion commun et celui correspondant à l'antenne extérieure.
  • Etape 4: A l'aide d'une pince, approchez un petit morceau de fil de cuivre avec une pince et votre fer à souder en même temps. La soudure va fondre et enrober le fil entre les 2 points.
  • Etape 5: coupez le fil en excès, c'est terminé.

Note sur l'antenne: si vous ne souhaitez pas vous lancer dans cette opération, continuez le tutoriel et faites un essai wifi avec l'antenne interne (défaut).

Finalement, insérez avec précaution le câble de la camera OV2640 dans son connecteur.


Note about the connectors

The various JST connectors are not really mandatory, you can replace them by Dupont connectors (probably cheaper) that are easier to find already with wires without the need to crimp them. You can even solder the wires directly to the boards without any connector but then, you loose the possibility to disassemble the system.

For the on/off switch and the battery holder, I recommend the use of heat-shrinkable sleeves to protect the pods from any shortcuts or contacts with other elements. Just remember that a short circuit on a Lipo battery can provoke fire or explosion.


Note sur les connecteurs

Les différents connecteurs JST ne sont pas réellement obligatoires, vous pouvez les remplacer par des connecteurs Dupont (probablement moins chers) qui sont plus faciles à trouver déjà câblés et sertis. Vous pouvez même souder directement sur la carte sans utiliser les connecteurs, mais vous perdez la possibilité de démonter l'ensemble.

Pour les boutons on/off et le support batterie, je recommande l'utilisation de gaine thermorétractable pour protéger d'éventuels court-circuits avec d'autres éléments. Un court circuit peut déclencher un feu ou une explosion de la batterie Lipo.

Step 4: Bird Feeder Software / Le Logiciel De La Mangeoire

Setup the Software Environment for the Bird Feeder software

I used the Arduino IDE to develop the software in C language. You will find here explanations to set up the IDE for the AI-Thinker ESP32-CAM microcontroller.

On your computer, create a folder called BirdFeeder and copy all the files attached to this section (files for version 2). Open the BirdFeeder.ino file. No change of configuration parameters is needed at this stage, it will be done later through the App. Compile and download the binary to the ESP32-CAM.

To be able to download easily the software to the ESP32 with a USB cable, I recommend to buy the download module (see the photo) at the same time you buy the device. Once the ESP32-CAM plugged into the download module, you just have to push together the IO0 switch and the reset switch (the one on the ESP32-CAM module), then the download can start.



Installez l'environnement de développement logiciel pour la mangeoire

J'ai utilisé l'atelier Arduino pour développer le logiciel en C. Vous trouvez ici toutes les explications pour installer cet atelier et le configurer pour l'ESP32-CAM.

Sur votre ordinateur, créez un dossier BirdFeeder et copiez tous les fichiers joints à cette section (fichiers pour version 2). Ouvrez le fichier BirdFeeder.ino. Aucune changement de paramètre n'est nécessaire à ce stade, ce sera fait plus tard avec l'Application. Compilez et téléchargez le binaire sur le module.

Pour télécharger facilement le binaire vers l'ESP32 avec un câble USB, je vous recommande d'acheter aussi le module de téléchargement (voir la photo) lorsque vous achèterez l'ESP32. Lorsque l'ESP32-CAM est inséré dans le module de téléchargement, il suffit d'appuyer simultanément sur les boutons IO0 et reset (celui de l'ESP32-CAM pas celui du module de téléchargement), puis de les relâcher pour mettre le micro-contrôleur en attente de téléchargement.


Bird Feeder Source Code

The code is not object oriented but structured in modules:

  • BirdFeeder.ino: is the main module including the setup() and loop() functions. The long sequence of setup() is:
  1. boot time: the ESP32 is waking up either from power on or from deep sleep by the sensor. In the latter case, Register B needs to be restored since it was used by the Wifi and left unchanged during the deep sleep. Quite a tricky sequence of code that I found on Internet.
  2. SD card is not used here and needs to be disabled in order to reuse the associated I/O pins
  3. Now we can use the analog input to read the battery level. It is not very accurate but good enough to have an idea of the battery charge level
  4. Flash LED is also disabled and not used
  5. Parameters are read from the EEPROM (we will see how they get there)
  6. The value of Push button (Settings) is read: if pushed, we enter in settings mode, if not, we continue.
  7. in settings mode: the ESP32 creates a wifi access point (ssid: BirdFeeder-Access-Point, password:123456789) and wait for parameters from the Application until manual reset of the board.
  8. if not in settings mode, then a photo is taken
  9. Then the wifi is started, and the photo upload to the firebase real time database can proceed. Wifi status and battery status are uploaded as well. The photo is almost immediately available on your smartphone.
  10. Once completed, the ESP32 goes back to deep sleep, waiting to be triggered again by the sensor.
  • Battery.ino, Battery.h: used to read the battery value. It was not obvious to make it work for the reasons I mentioned before and because the power is not really stable during execution. The accuracy of the measure is bad but good enough to check if the battery is still ok.
  • Camera.ino, Camera.h: camera settings and shoot
  • Eeprom.ino, Eeprom.h: parameters sent by the Happy Birds application need to be stored in a permanent memory. This module is used to declare, store and retrieve them from the EEPROM storage
  • Firebase.ino, firebase.h: Access functions to the Google firebase real time database and storage
  • Registers.ino, Registers.h: to disable brownout detection and manage Register B to be able to use properly Wifi.
  • Setup.ino, Setup.h: module launched when the Bird Feeder is in setting mode (the Settings button pressed when powered on). In this mode, the ESP32 creates a wifi access point and wait for receiving parameters from your smartphone and will store them in EEPROM.
  • Wifi.ino, Wifi.h: manages the Wifi for the board, measures the Wifi reception strength. The Wifi needs to be started only when needed since it drains a lot of power and it needs to be stopped also before the ESP32 goes to deep sleep.

I strongly recommend you not to change any line of code for the following 2 reasons: first, compatibility with the Happy Birds application could be compromised. Second, it took me quite a while to make it work: the ESP32-CAM is a nice board but GPIO pins are hard to use properly since I/Os can be shared between several functions, so order of lines execution matter a lot.

The main Arduino librairies are available here.

The binary file is available here.


Storage of photos and memory space

The Bird Feeder can upload up to 200 photos that are stored permanently on the Google Cloud. With the Application, you can save them to your local album, share them through social networks, including the Happy Birds one. Once your quota is reached, you need to free up some space by deleting some of them with the Application.

Please remember that the overall space available is limited, this is a free Application. If this project proves to be a success, I will scale up the whole thing.


Code Source de la Mangeoire

Le code est structuré en modules mais n'est pas orienté objet:

  • BirdFeeder.ino: c'est le module principal qui comprend les classiques fonctions setup() et loop(). La longue séquence de setup() se déroule de la façon suivante:
  1. démarrage: l'ESP32 démarre suite à une mise sous tension ou réveillé du mode Deep Sleep par le senseur de proximité. Dans ce dernier cas, le Registre B doit être restauré après sa dernière utilisation pour le Wifi et qui est resté en l'état pendant le mode Deep Sleep. Une séquence un peu tordue que j'ai trouvée sur Internet
  2. le lecteur SD n'est pas utilisé et doit être désactivé pour pouvoir réutiliser les entrées / sorties qui lui étaient associées
  3. On peut maintenant utiliser l'entrée analogique pour lire le voltage de la batterie. Elle n'est pas très précise mais suffisante pour avoir une idée de sa charge.
  4. la LED flash est aussi désactivée, elle n'est pas utilisée
  5. Les paramètres sont lus de l'EEPROM (nous verrons plus tard comment ils ont été définis)
  6. La valeur du bouton poussoir (Settings) est lu: s'il est en position basse on entre en mode Configuration (Settings), sinon on continue
  7. en mode Configuration: l'ESP32 crée un point d'accès Wifi (ssid: BirdFeeder-Access-Point, mot de passe:123456789) et attend le chargement des paramètres par l'Application jusqu'au reset manuel de la carte.
  8. en mode Normal, une photo est prise
  9. puis le Wifi est démarré et la photo transmise à la base de données temps réel Firebase. La qualité de la réception Wifi et l'état de la batterie sont également transmis. La photo est presque immédiatement disponible sur votre smartphone.
  10. lorsque la transmission est terminée, l'ESP32 retourne en mode Deep Sleep, attendant le prochain réveil par le senseur.
  • Battery.ino, Battery.h: utlisés pour lire le niveau de la batterie. Cette partie n'a pas été facile à mettre au point pour les raisons que j'ai déjà mentionnées et aussi parce que le voltage n'est pas stable pendant l'exécution
  • Camera.ino, Camera.h: gèrent les paramètres de la caméra et la prise de photo
  • Eeprom.ino, Eeprom.h: gèrent les paramètres du logiciel qui sont transmis par l'Application Happy Birds et doivent être stockés en EEPROM (stockage permanent)
  • Firebase.ino, firebase.h: fonctions d'accès à la base de données et au stockage Firebase
  • Registers.ino, Registers.h: pour désactiver la détection de brownout (sous alimentation) et le registre B pour utiliser correctement le Wifi.
  • Setup.ino, Setup.h: module utilisé lorsque la mangeoire est en mode Configuration (Settings). Dans ce mode, l'ESP32 crée un point d'accès wifi pour recevoir les paramètres
  • Wifi.ino, Wifi.h: gère le Wifi, mesure la qualité de la réception. Le Wifi ne doit être démarré que lorsqu'il est strictement nécessaire au transfert des données car il consomme énormément d'énergie. Il doit être éteint avant le passage dans le mode Deep Sleep.

Je vous recommande de ne pas changer une seule ligne de code pour les 2 raisons suivantes: d'abord, la compatibilité avec l'Application Happy Birds ne serait plus garantie. Deuxièmement, la mise au point de ces lignes m'a pris pas mal de temps: l'ESP32-CAM est une super carte mais les entrées sorties GPIO sont difficiles à utiliser car elles sont partagées entre plusieurs fonctions. L'ordre d'exécution de ces lignes est fondamental.

Les librairies Arduino principales sont disponibles ici.

Le binaire du programme est disponible ici.

Stockage des photos et espace mémoire

La mangeoire peut transférer jusqu'à 200 photos qui sont stockées en permanence dans le Cloud Google. Avec l'Application vous pouvez les sauvegarder dans votre album, les partager avec les réseaux sociaux et le réseau dédié Happy Birds. Lorsque le quota est atteint, vous devez libérer de la mémoire en en supprimant certaines avec l'Application.

L'Application étant gratuite, l'espace global est limité. Si ce projet devient un succès avec un nombre croissant d'utilisateurs, on changera de braquet.

Step 5: Print the Bird Feeder / Imprimer La Mangeoire

I have designed the Bird Feeder with the powerful Fusion 360. The model is composed of several bodies that you need to print separately. I have used 3 different types of filament but, of course, it's your decision:

  • A filament with wood particles. The reference is SUNLU WOOD printer filament 1.75mm. Thanks to a temperature tower, I determined that the best temperatures are: 200°C for the nozzle 1st layer, then 180°C for the other layers, 60°C for the Bed. The elements to print with this filament are: 1 x House, 1 x Camera support, 1 Back Door, 2 x Sliding Guides, 1 Tab
  • A SUNLU PLA+ black filament 1.75mm. The elements to print are: 1 x Roof (select one of the 2 versions), 1 x Bird
  • A ERYONE PETG Clear filament 1.75mm. The best temperatures are: 220°C for the nozzle (all layers), 85°C for the Bed first layer, 90°C for the other layers. The elements to print are the Right and the Left Food Dispensers.


For those who cannot print:

Some of you may want to build this with wood. I have received some requests to publish the drawings with all dimensions, so you will find an attached pdf with all the quotes.


Recommendations for printing:

  1. I personnally use a Prusa Mk3s printer with PrusaSlicer and I'm very happy with it. For the House, I used the feature "Paint-on Supports" that allows to define manually the supports you need.
  2. The Roof needs support everywhere, otherwise it will be out of shape and not matching with the house
  3. The Food Dispensers require supports only for the bottom opening
  4. I have also added 2 files for the half left and right of the roof to be printed instead of the complete roof. This is much faster since they do not need any support. Of course, you need to stick them together after that.
  5. Be patient, it will take quite a long time to print them all !!


Assembling the Elements:

You need to glue some elements together:

  • The Camera Support to the front of the House, matching the square window on the front
  • The Roof to the House
  • The 2 Sliding Guides to the Back Door (well centered)
  • The Bird to the front of the House (for decoration only)

Wait 24 hours for the glue to dry, then you can spray some varnish on the various parts (for outside protection). Before applying the varnish, you should try it on a dummy element printed separately or on a non visible part: sometimes, there is a chemical reaction between PLA/PETG and the varnish, leaving the plastic a bit fade.


J'ai dessiné la mangeoire avec l'outil 3D Fusion 360. Le modèle est composé de plusieurs corps à imprimer séparément. J'ai utilisé 3 types différents de filament (mais bien sûr, vous pouvez en décider autrement):

  • Un filament PLA avec particules de bois. La référence utilisée est SUNLU WOOD 1.75mm. Grâce à une tour de température, j'ai déterminé que les températures optimales sont: 200°C pour la buse 1ère couche, puis 180°C pour couches suivantes, 60°C pour le plateau. Les éléments à imprimer avec ce filament sont les suivants: 1 x House (bloc central), 1 x Camera support, 1 Back Door (panneau arrière), 2 x Sliding Guides (guides), 1 Tab (glissière)
  • Un filament noir de référence SUNLU PLA+ 1.75mm. Les éléments à imprimer avec filament sont: 1 x Roof (le toit, choisir une des 2 versions), 1 x Bird (oiseau de décoration)
  • Un filament translucide de référence ERYONE PETG. Les températures optimales sont: 220°C pour la buse (toute les couches), 85°C pour la 1ère couche du Plateau, 90°C pour les suivantes. Les éléments à imprimer sont les 2 réserves de nourritures (Right, Left Food Dispensers).


Pour ceux qui ne peuvent pas imprimer

J'ai reçu plusieurs demandes de publier les plans de la mangeoire avec les côtes. J'ai donc ajouté un fichier pdf qui contient tout ça.


Recommendations pour l'impression:

  1. Personnellement j'utilise une imprimante 3D Prusa Mk3s avec PrusaSlicer et j'en suis très content. Pour le bloc central, j'ai utilisé la fonction "Paint-on Supports" qui permet de définir manuellement les supports
  2. Le toit nécessite des supports partout, sinon l'impression risque d'être déformée et il n'adhèrera pas au bloc central
  3. Les 2 réserves de nourritures ne nécessitent de supports que pour l'ouverture du bas
  4. Soyez patient, l'impression va prendre quelques heures !!


Assemblage des éléments

Vous devez coller ensemble les éléments suivants:

  • Le support camera sur la partie frontale, bien centrée sur l'ouverture carrée
  • Le toit sur le bloc central
  • Les 2 guides sur le panneau arrière, bien alignés et centrés
  • L'oiseau sur la partie frontale (c'est juste une décoration)

Attendez 24 heures pour le séchage. Vous pouvez vaporiser une ou deux couches de vernis sur l'ensemble pour assurer une meilleure protection à l'extérieur. Avant d'appliquer le vernis, faites un essai sur une partie non visible, car il pourrait réagir avec le plastique en le ternissant ou en laissant des tâches.

Step 6: Assembly / L'Assemblage

It's now time to start the final assembly of the parts:

  1. Insert and glue the Solar Panels into the roof. Wires should go through the roof and the house. Let it dry 24 hours. You can also spray varnish to properly seal them but keep the protective plastic sheet upon them so that there is no varnish on the Solar Panels, just on the edges.
  2. Fix the battery holder with M2 self-tapping screws (difficult) or glue it.
  3. Put the ESP32-CAM on the PCB.
  4. Insert a 12mm x 2.4mm rubber washer through the camera
  5. and slide carefully the camera through the hole of the camera support. This operation is not easy. Once the camera is in place, insert a 14mm x 2.4mm rubber washer through the camera in order to maintain it. This will also prevent from rain infiltration.
  6. Fix the PCB to the 4 supports with M2 self-tapping screws
  7. Fix the sensor with one M2 self-tapping screw. The edge of the sensor should slightly break through the front wall of the house
  8. Gently insert the Charger Board Module into its housing, the micro-USB connector should break through the wall. Eventually, cut off the 2 small tips (just in front of the OUT +/- pads) to reduce the length of the module.
  9. Slip the Antenna connector through the hole and screw the antenna.
  10. Slip the power switch through the back door
  11. Branch all connectors.


Check the connections:

  • Exposing the solar panels to the sun or a light should lit up the red LED of the charger module (make sure you have removed the plastic sheet protecting the solar panels)
  • Branching the micro-USB to an external power should also lit up the same LED. When the battery is full, the LED turns blue.
  • Switch the system on (power switch): after a while (say 1 or 2 minutes), put your hand in front of the sensor (just above the feeding area): a red LED should lit up on the sensor, inside the house.


You can now proceed to the next step !


Il est temps maintenant de réaliser l'assemblage final:

  • Insérer et coller les panneaux solaires sur le toit. Les fils doivent traverser le toit et le sommet du bloc central. Laisser sécher 24 heures. Là aussi, vous pouvez vaporiser du vernis pour assurer l'étanchéité mais prenez garde à laisser le plastique de protection sur les panneaux et d'éviter de mettre du vernis sur les éléments actifs. Juste sur les bords.
  • Fixer le support de batterie avec des vis auto-perceuses M2 et/ou avec de la colle
  • Insérer l'ESP32-CAM dans son support, sur la carte
  • Glisser une rondelle de caoutchouc de 12mm x 2.4mm autour de la caméra, juste derrière l'objectif
  • Glisser doucement la caméra à l'intérieur du bloc support (par l'intérieur du bloc central). L'opération n'est pas facile. Lorsque la caméra est en place, glissez une 2ème rondelle de caoutchouc 14mm x 2.4mm autour de la caméra de façon à la maintenir en place et assurer l'étanchéité
  • Visser la carte électronique avec 4 vis auto-perceuses M2
  • Fixer le senseur avec une vis auto-perceuse M2. Le senseur doit très légèrement dépasser à l'extérieur.
  • Insérer délicatement le module chargeur dans son logement, le connecteur micro-USB doit bien rentrer dans l'ouverture extérieure sur le côté. Si nécessaire, découper les 2 ergots (en face des 2 plots à souder OUT +/-) pour réduire la longueur du module.
  • Glisser le connecteur de l'Antenne dans le trou du support et visser
  • Insérer le bouton interrupteur on/off dans le panneau arrière
  • Branchez tous les connecteurs

Vérifier les connexions

  • En exposant les panneaux solaires à la lumière, la LED rouge du module chargeur devrait s'allumer (Assurez vous d'avoir retirer le film plastique de protection des panneaux solaires)
  • Branchez une alimentation extérieure 5V au connecteur micro-USB et, là encore, la LED rouge du module chargeur devrait s'allumer. Elle devient bleue si la batterie est complètement chargée.
  • Mettez le système sous tension (interrupteur sur panneau arrière): après 1 ou 2 minutes, placez votre main en face du senseur, devant la mangeoire, à moins de 10 cm: la LED rouge du senseur devrait s'allumer à l'intérieur de la mangeoire.

En route pour l'étape suivante !

Step 7: Installing the Application / Installer L'Application

Installation

The Happy Birds Application is available for iOS devices on the App Store and Android devices on Google Play. It is free. At this stage, you need to download and install it on your smartphone or tablet and follow the next instructions:

  1. Depending on your settings, the application uses English or French language, and works in light and dark modes. If you want to change the current language or the mode, go to the phone Settings (not the Application settings).
  2. Create an account: click on the Register button (bottom of 1st page) and fill with Name, Email and Password (6 characters minimum).
  3. If the registering is successful, you should land on the Settings page.


Setting up the Bird Feeder with the Application (Instructions attached as a pdf file)

  1. Before starting the setup process, you need to charge the battery (the LED charger module must be blue) or you can proceed while the charger is connected.
  2. Click (tap) on the Setup menu (section Bird Feeder)
  3. Then, tap on the "Bird Feeder + phone Setup" button. The other button is for setting up your phone only if you don't have any Bird Feeder.
  4. You are now entering in the Bird Feeder settings phase, follow carefully the instructions displayed on the screen
  5. Step 1: Switch the Bird Feeder OFF and remove the back door screws
  6. Step 2: While pushing the settings button, switch the Bird Feeder ON
  7. Step 3: Go to your phone settings, tap on Wifi and connect to the BirdFeeder-Access-Point network, password is123456789
  8. Step 4: Go back to the App and enter your home Wifi ssid and password (where the Bird Feeder should connect), then tap the button "Send Settings" below
  9. After a short moment (it can be a few seconds), a message will pop up to confirm the successful setup. If it is not the case, you need to restart the process.
  10. Switch OFF the bird feeder and ON again, so that it can reboot in normal mode
  11. Go back to your phone settings, tap on Wifi and connect back your smartphone to your home network

At this stage, the Bird Feeder is operational. After less then 1 minute, put your hand in front of it, less then 10cm far from the sensor. The sensor LED should turn red (visible inside the Bird Feeder) and after a few seconds, you should receive your photo on the "My Birds" page of the Application.

Congratulations, you can close the back door with the screws and put it in your garden or your balcony.


Installation

L'Application Happy Birds est disponible sur l'App Store et sur le Google Play Store. Elle est gratuite. Pour cette étape, vous devez la télécharger et l'installer sur votre smartphone ou votre tablette et suivre les instructions suivantes:

  1. En fonction de vos réglages, l'Application présente une interface en Anglais ou en Français. Elle fonctionne également en modes Clair et Sombre. Si vous souhaitez changer la langue ou le mode, allez dans les réglages du téléphone (pas dans celle de l'Application) et changez les.
  2. Créez un compte: cliquez sur le bouton Inscription (bas de la 1ère page) and renseignez vos noms (alias), email et mot de passe (6 caractères minimum)
  3. Si l'ouverture du compte s'est bien passée, vous devriez arriver sur la page Réglages.


Paramétrage de la Mangeoire avec l'Application (Instructions jointe dans le fichier pdf)

  1. Avant de démarrer le processus de configuration, vous devez charger la batterie (la LED du module doit devenir bleue) ou laisser le chargeur connecté pendant cette phase.
  2. Cliquer sur le menu Configurer (section Mangeoire)
  3. Puis, cliquer sur le bouton "Configuration Mangeoire + téléphone". L'autre bouton est à utiliser pour configurer uniquement le téléphone si vous n'avez pas de mangeoire
  4. Ici, on rentre vraiment dans la phase de réglage de la mangeoire, suivez attentivement les instructions affichées sur l'écran:
  5. Etape 1: Mettre la mangeoire hors tension et ouvrir le panneau arrière
  6. Etape 2: Tout en appuyant sur le bouton settings, remettre la mangeoire sous tension
  7. Etape 3: Allez dans le menu réglages Wifi de votre smartphone, et connectez-vous au réseau BirdFeeder-Access-Point avec le mot de passe 123456789
  8. Etape 4: Retournez dans l'Appli et entrez le nom de votre réseau Wifi (où doit se connecter votre mangeoire) avec son mot de passe, puis appuyez sur le bouton "Envoyer"
  9. Après quelques secondes, un message confirmera que la configuration s'est bien passée. Si ce n'est pas la cas, vous devez recommencer le processus.
  10. Eteignez puis ré-allumez la mangeoire pour redémarrer le logiciel
  11. Revenez dans les réglages du téléphone et re-connectez vous à votre wifi local.


A ce stade, la Mangeoire est opérationnelle. Après environ 1 minute, placez votre main devant la mangeoire, à moins de 10cm du senseur. La LED du senseur devrait s'allumer (à l'intérieur de la mangeoire) et après quelques secondes, vous devriez recevoir la photo sur la page "Mes Oiseaux" de l'Application.


Félicitations, vous pouvez revisser le panneau arrière et placer votre mangeoire dans votre jardin ou sur votre balcon.

Step 8: How to Use the Application / Comment Utiliser L'Application

I have developed the App using Flutter, an open source framework by Google to build multi-platform applications from a single source code. Quite convenient. I started to learn it last September and it took me a few weeks to be able to produce something decent.

Still, the App is what we could call an MVP (Minimum Viable Product), meaning that this is a very first version of it with a set of basic and operational functions:

Main functions included are:

  • Reception and storage of birds' photos sent by the Bird Feeder
  • Photos can be taken by the Application as well (no real need of a bird feeder)
  • Library of birds photos to help identification of the bird
  • Sharing with WhatsApp and Instagram
  • Local storage in Album
  • Sharing with the Happy Birds "network" including chat zone
  • Discovery of all Bird Feeders sharing photos and localized on a World geographical map (note: location accuracy degraded to 3km to preserve anonymity)
  • Light and Dark modes available
  • Available in English and French


3 pages are directly accessible through the 3 icons of the bottom navigation bar.


First page "My Birds":

Any new photo taken by the Bird Feeder is added at the end of the list with the recorded date and time. Since the birds are very fast and agile animals, they don't stay a long time on the bird feeder, and a lot of snapshots will actually be empty. So, you can delete the empty photo simply by swiping left. For the same reasons, you may want to delete many snapshots at the same time: for that, use the "Select" menu on the top right and select all the photos you want to get rid of.

A "Globe" icon is displayed on the right when a photo is shared inside the Happy Birds network. A "Bubble" icon is displayed when the photo is shared and you have received a new message for it (I'll come back to it).

On the top left, there is a colored circle with a percentage showing your occupied space in the Database. When it becomes red, it's time to clean up your photos and keep only the best ones or the one you want to share.

Tapping (clicking) on a photo shows a second page with more details. You can zoom in or out by pinching the photo, you can display it full screen by turning the screen to landscape position.

You can enter the name of the bird.

If you tap (click) on the small magnifying glass on the left, you will get a scrolling list of 300 birds: it can help you to recognize yours. Tapping on one image will automatically fill the name of the bird.

Tapping on the top right button reveals a menu:

  • for sharing your photo with WhatsApp or Instagram
  • saving it to your local album
  • or simply deleting it.

If you want to share it with the Happy Birds community, just slide to the right the button ("Shared with Happy Birds") below the photo. When you do this, your photo becomes visible in the Happy Birds network and a new button is revealed to get access to the Chat zone. Just click on it, and you can post your message, for example to get help for identifying the bird.


Second page: "Shared"

All the Bird Feeders sharing at least one photo with the Happy Bird network are listed here. The names displayed is the account name (when you register, you can put any nickname you want). Clicking on the right "Map" icon will launch your map App on your device (Maps or Google Map) showing an approximated location of the Bird Feeder (3km accuracy). I think it's a good compromise: you can see the origin of the photo while keeping it anonymous. I hope we will see birds from all over the world.

Clicking on the name will show a list of all the photos shared by this Bird Feeder, the view is very similar to the first page "My Birds" except that you cannot delete them.

Then, clicking on a photo will show the details. Because, the photo is shared, you have access to the Chat Zone and start chatting, leaving a message to the photo owner. He/She will be informed by the "Bubble" icon on the First page "My Birds".


Third page: "Settings"

We already have seen the Setup menu to configure the Bird Feeder.

Then, each time you receive a new photo, you also get some Bird Feeder health information: Battery level, Wifi level, the Firmware version and the last time seen.

Below you have 2 buttons:

  • Help button: clicking on it will show you the Happy Birds site with some more information and the Privacy policy
  • About button: showing the App version number and all the used licenses.


J'ai développer l'Application avec Flutter, un framework open source de Google qui permet de produire des applications multi plate-formes à partir d'un code source unique. Super outil. J'ai démarré en Septembre et il m'a fallu quelques semaines avant d'avoir quelques chose de présentable.

Malgré tout, l'Application reste pour l'instant un MVP (Produit Minimum Viable): c'est donc une première version avec des fonctions minimales mais fonctionnelles:

  • Réception et stockage des photos d'oiseaux envoyées par la mangeoire
  • Les photos peuvent également être prises par l'Application, sans avoir besoin de la mangeoire
  • Bibliothèque de 300 photos d'oiseaux pour aider à l'identification
  • Partage avec WhatsApp et Instagram
  • Stockage local dans l'Album
  • Partage avec le réseau Happy Birds intégrant une zone de discussion
  • Découverte des autres Mangeoires partageant des photos et localisable sur une carte géographique (La précision de localisation est volontairement dégradée à 3km pour préserver l'anonymat)
  • Modes Clair et Sombre
  • Disponible en Anglais et Français


3 écrans sont directement disponibles en cliquant sur les icônes de la barre de navigation du bas.


Ecran 1 "Mes Oiseaux":

Toute nouvelle photo prise par la Mangeoire est ajoutée en fin de liste avec la date et l'heure. Les oiseaux étant des animaux particulièrement rapides et agiles, ils ne restent parfois pas assez de temps sur la mangeoire, avant que la photo ne soit prise. Vous pouvez supprimer rapidement une photo vide en balayant le doigt de droite à gauche. Vous pouvez également supprimer toute une liste en utilisant le menu Modifier en haut à droite de l'écran.

Une icône en forme de Globe est affichée sur la droite lorsque la photo est partagée avec le réseau Happy Birds. Une icône en forme de texte bulle indique que vous avez reçu un nouveau message pour cette photo (J'y reviendrai pus tard).

En haut à gauche, il y a un cercle coloré avec un pourcentage montrant l'espace occupé dans la base de données. Quand il devient rouge, il est temps de supprimer quelques photos pour faire de la place.

Un clic (tappe) sur la photo révèle une deuxième page avec plus de détails. Vous pouvez zoomer sur la photo, vous pouvez également l'afficher en plein écran en positionnant l'appareil en mode paysage.

Vous pouvez renseigner le nom de l'oiseau.

Si vous cliquez sur la loupe située à gauche, vous obtiendrez une liste déroulante de 300 oiseaux: ça peut vous aider à reconnaitre les vôtres. Cliquer sur une image remplira automatiquement le nom de l'oiseau.

Cliquer sur le bouton en haut à droite révèle un menu:

  • pour partager la photo sur WhatsApp ou Instagram
  • copier la photo dans votre album local
  • ou simplement la supprimer

Si vous souhaitez la partager avec la communauté Happy Birds, vous n'avez qu'à glisser le button vers la droite ("Partager avec Happy Birds"), situé sous la photo. A ce moment, la photo devient disponible sur le réseau Happy Birds et un nouveau bouton "Discussions" apparait. Cliquez dessus, et vous pouvez poster vos messages, éventuellement pour obtenir de l'aide pour identifier l'oiseau.


Ecran 2: "Partagées"

Toutes les mangeoires partageant au moins une photo avec le réseau Happy Birds sont listées ici. Les noms affichés sont les noms des comptes (le nom que vous avez choisi lors de l'inscription). Cliquer sur l'icône en forme de Globe lancera votre appli de localisation (Plans ou Google Maps) pour afficher une localisation approximative de la mangeoire (3km de précision). Je pense que c'est un bon compromis pour avoir l'origine de la photo tout en garantissant l'anonymat. J'espère que vous pourrez voir des oiseaux du Monde entier.

Si vous cliquez sur le nom (associé à la mangeoire), vous obtiendrez la liste des photos partagées par la mangeoire. L'écran est très similaire à l'écran 1 "Mes Oiseaux", sauf que vous ne pouvez pas les supprimer.

Puis, en cliquant sur une photo, vous en afficherez tous les détails. Vous avez également accès à la zone de Discussions, et pouvez laisser un message à l'émetteur. Il ou elle sera prévenu par l'icône Texte bulle sur sa photo.


Ecran 3: "Réglages"

On a déjà vu le menu "Configurer" pour la mangeoire.

A chaque fois qu'une photo est transmise, vous recevez également des informations sur l'état de la mangeoire: niveau de batterie, niveau wifi, la version du logiciel ainsi que la date et l'heure de la dernière réception.

Plus bas, 2 boutons supplémentaires:

  • bouton Support: un clic vous emmène sur le site Happy Birds avec plus d'informations dont les Règles de confidentialité
  • bouton A propos: présente la version courante de l'Appli et les licences utilisées.


Photographiez les oiseaux de votre jardin et partagez avec les autres passionnés !.

Step 9: Conclusion

I hope you have liked this project and you will build your own Bird Feeder so that we can share and explore the World together !

Again, if this is a success, then I will develop more functions in the App. Don't hesitate to send me your feedback: bugs (be kind, the App still needs to be tested on a large scale), new cool features to add. I'm thinking about including a full World map representation inside the App (based on OpenStreet map) and some Artificial Intelligence for automatic recognition of birds (we could build this together with a lot of collected photos)...

Enjoy !!


J'espère que vous aimé ce projet and que vous allez construire votre propre Mangeoire pour partager et explorer les jardins !

Encore une fois, si c'est un succès, je développerai des fonctions supplémentaires dans l'Application. N'hésitez pas à m'envoyer votre avis: bugs (soyez indulgents, l'Appli a encore besoin d'être testée), ou de nouvelles fonctions à ajouter. Je pense par exemple à intégrer un affichage de carte OpenStreet map et une reconnaissance automatique des oiseaux (à construire ensemble avec toutes les photos collectées)...

Amusez-vous bien !!

Anything Goes Contest 2021

Runner Up in the
Anything Goes Contest 2021