Skip to main content

Baby Monitor pt 2

· 4 min read
Hampus Londögård

Back in action and finalizing the baby monitor!👶

TL;DR Built a baby monitor that included the following features:

  1. Bidirectional Audio & Unidirectional Video (Night & Day Vision!)
  2. Temperature Sensor
  3. Motor (Servo) to move left/right & up/down

The project was born the day I met an old friend and saw his expensive baby monitor that he had been gifted, I needed to match it! 🤓

Result: 300 I'm very happy about the results, my wife asked me to draw a smile on the creepy monitor, hence the smile! 😜
Video of it running live can be found at the end!

Implementation Details​

To implement and build this camera I had to combine both hardware and software into a package.

Hardware Details​

Most of my hardware was bought through Aliexpress, with few parts being from an old Pi.

HardwareFunctionalitySoftware Required/UsedNotes
Raspberry Pi 3B+The Brain which powers everythingRaspberry Pi OS Lite (Bullseye)This OS uses the new Open Source camera-stack, Libcamera!
DS18B20Temperature SensorW1ThermSensorI wish I found this earlier, at first I parsed the raw file myself. And it was hard to find set-up instructions!
Nylon FPV ServoServo Motor (moving the camera)gpiozeroA brilliant library. It has to be noted that this servo works through Pulse Width Modulation (PWM) and to make the servos quite we need to set servo.value=None after setting it to a value. Complicates the configuration a little.
Raspberry Pi 4 Camera 5MPCamera with IR-cut (IR on/off via hardware automatically)libcamera / picamera2Very simple to use over all. Tricky that you needed to focus it yourself, I thought it was broken first! 😆
Microphone from Google AIY v1Record soundThis is tricky because of the HAT, requires custom installation.
Speaker from Google AIY v1Play sound
Pi HAT from Google AIY v1Combine sensors, microphone & speakers

Software Stack​

To make use of my beautiful hardware I need software! Keeping things simple (KISS) I decided to use a Python backend and show it through a simple webapp. That way I can view the baby monitor from my PC, Smartphone & anything that has a browser really.

The end result became as follows 👇

Webapp Client​

Over all I really enjoyed playing around with Svelte. It felt very straight-forward and simple, although there's less community and libraries compared to React. All in all I'd give it one up compared to React because of simplicity, but I'm just a ordinary Backend Dev / Data Engineer+Scientist.


FastAPI as always is a blessing to work with! The auto-generated swagger page, superb type integration and much more makes me feel right at home as someone who's really a Scala-dev.😉 FastAPI has its drawbacks though, the streaming component definitely showed some rather large overhead. I had to fall back to raw http to have good performance 😰

The end result became two backends, but I tried to keep the responsibilities clear and it worked out fine!

End Result​

350 And a video to show how real-time it is!

I'm very happy about the results!

Images of the Building Process​

And some images of when I built the monitor!

Building the Camera350
Connecting the final piece of Camera350
Building Temperature Sensor350
Connecting Temperature, Pi & Camera350
Manual Temperature Validation350
Testing the Servo
Connecting all in a paper box350
First Wooden Baby Monitor Prototype350
Final Wooden Baby Monitor350

A sad ending​

The servo motors showed to be too weak which interestingly means they're too strong. As they try to move the housing it works slowly until it move everything at once which creates a force stronger than the pad that the monitor was standing on.

The end result was... Sweet release of machine breakage 😢

350 350

That's it for this time! Now I look forward to become a father! 👨‍👩‍👧‍👦
~Hampus Londögård