Raspberry Pi baby monitor
In this first of a multi-part post I will show my build of a Raspberry Pi baby monitor (using a RPi 3). A baby monitor that I (and my wife) use to check on my son (currently 7 months old) on a daily basis.
Hardware, part 1
In this post I will mainly talk about the various hardware components of this project (with a quick mention of the software).
List of components
What you need:
- Raspberry Pi (3)
- RPi case, normal square (I have a Lego one with whole for camera)
- PINOIR v2 Pi-camera
- Cheap floor lamp at least a few decimeters higher than the crib it will stand next to.
- USB charger with long-ish cable. Optionally with power switch on cord to make it easier turning the monitor on/off (I got this one from Kjell & Co.)
Besides these main components, if you want sound recording/noise detection:
- Microphone (e.g. USB microphone)
Starting with pictures of the finished project, which shows the monitor the way we use it mostly. Since the lamp had the adjustable head, it is easy to direct it to whatever is best. If he is sleeping in our bed we simply direct it there, if he is in the sofa, we just unplug and move it there, and adjust the direction. After plugging it in, it takes <1 min to boot up and access the web interface. With a simple VPN server we can access it from the outside fairly securely, say if a grandmother is looking after him and we are out for dinner/cinema we can keep an eye on things. 😉
Making of the holder
The holder for the Raspberry Pi is basically a floor lamp, high enough for his crib, with an adjustable head where we put a mobile phone holder to hold the build.
Step 1. Remove the lamp reflector head (is there a better English word for this?). On the one I bought there where two small screws, which was very useful for removing the reflector and mounting the RPi holder.
Step 2. Similarly, take a car vent phone holder, remove the vent clip. Then attach to the lamp arm. As mentioned, for me it was attached with screws which meant I just used it on the lamp arm, which had screws as well.
Finally just remove the internal cable of the lamp mount, attach your USB power cable. Now all that is left is the software setup and then it’s time for testing different software solutions.
The final result is this pretty neat, and the on/off switch on the cable saves a lot of middle-of-the-night troubles pulling the USB plug.
Because we use the floor lamp, the height of the camera is perfect, and with only a small night light in the room and a low “shutter speed” setting the little guy is easily visible. Since I do not have any IR LEDs mounted, I do have to change the shutter speed manually, which means switching it in day/night settings. When I have time I continue to work on this Raspberry Pi baby monitor.
AV streaming/Software setup
Lastly, a quick note on the video streaming and audio. I usually install DietPi on my RPi’s, it has a nice community, and a lot of nice packages for easy installation. After DietPi installation it is time for some software testing. As a first step I decided to try 3 different projects; the rpicam project web interface, a flask app, and the UV4L project. The flask app is from https://github.com/adamphillips/pi-flask-video-streaming and the references in it.
Further inspiration and ideas on Raspberry Pi baby monitor: