Our project is a dog barking monitoring system using STM32Nucleo, NodeMCU, and Firebase. We decided to make it because I wanted to help dog owners keep track of their pets' behavior when they are not around. The system works by using a sound sensor to detect barking, sending data to Firebase, and notifying the owner via a mobile app if the noise exceeds a set threshold.
In that first implementation we decided to not develop the full front-end application and just develop a simple screen to prove the idea that this system could work.Let's dig deeper into this.
We split our project in four main areas: STM32Nucleo, NodeMCU, Firebase and Front-end.
STM32NucleoSTM32 Nucleo is a development boards that we chose to make our prototype. Basically we have a sensor that will collect data from the environment, 3 different leds that will be responsible to return a output to the user:
Using it's serial port, you can switch between ProductMode (actual product's porpuse, it will read the mic's input every 3 seconds and react accordingly switching between the sound modes - explanation below) and DebugMode (you can manually switch/test every component individually).
Sound Modes:
- (Quiet Mode) If there is no sound of barks in the environment the greenled will be on. This should be the standard output for a room with no loud noises;
- (Warning Mode) If the dog starts to bark, the yellow led will be on. This represents a "warning mode", which may turn to red if the bark keeps going or go back to green if the noise stops;
- (Loud Mode) The last one is the red led that will be on if the bark is loud and non-stop. Together with the red led, there's a buzzer that wil go off. This represents a customizable noise to distract the dogs and (try to) stop the barking.
NodeMCU is a iot board that allowed us to connect our hardware to firebase. It connects to the STM32Nucleo and with the firebase and make the connection between both. We developed it using the PlatformIO tool (https://platformio.org/).
It receives the values from the STM32Nucleo. Values between 1 and 8 are internal coding conventions and values greater than 8 (or 0) are microphone values:
1 - Quiet Mode
2 - Warning Mode
3 - Loud Mode
4 - Switch green led's value
5 - Switch yellow led's value
6 - Switch red led's value
7 - Switch buzzer's value
8 - Read mic's value and update it
FirebaseFirebase is the responsible to store the data in a Realtime database. We are storing 5 variables:
1. Buzzer (0/1 == off/on)
2. Green Led (0/1 == off/on)
3. Microphone Analog Value (144 to 4096)
4. Red Led (0/1 == off/on)
5. Yellow Led (0/1 == off/on)
Front-endWe decided to develop a simple screen to represent our front-end with react and make the connection with Firebase using the Firebase API to web apps.
Comments
Please log in or sign up to comment.