3 Raspberry Pi projects for this Christmas
3 Raspberry Pi projects for this Christmas
David "DeMO" Martínez Oliveira

Xmas is here and some of us have a little bit of extra time for building cool things. I have acquired a couple of Raspberies recently and I have come out with a couple of ideas to use them. Here is what I'm planing to build.
There are a lot of Raspberry Pi project suggestions out there, but the true is... they are just GNU/Linux projects. I mean, most of them does not make use of any special feature of the Raspberry Pi. In other words, you can build exactly the same thing with any other SBC, the only difference is that those Rpi are cheap. I have got feed up with all those tutorials with those titles: "How to do X with your Rpi", where X is a GNU/Linux feature that you can use with any box running GNU/Linux.

However, the Rpi has a few unique features that let's us build things that will be difficult with other SBCs and those are the kind of projects I'm interested on. Let's take a quick look to those unique features... there are not many but here they go.

  • The price. Let's face it. The board is not that impressive but the price is. Those 5 dollars for the Zero are unbeatable.
  • The hardware video encoding/decoding capabilities opens the door to Full HD application that are hard to achieve with other boards
  • The camera module that can be connected to the board without wasting a USB port and that also supports H264 HW acceleration. Furthermore, that camera has also a pretty affordable price.

To my knowledge, there is no other special feature of the Rpi when compared to any other SBC out there. Actually, many of their competitors are superior on many different ways. BeagleBone Black (my preferred one) has a lot more interface possibilities including ADC and CAM buses, together with a good HW acceleration support and the extra PRU microcontrollers. BananaPi has a built-in microphone and SATA interface to connect a proper hard-drive. Same for the Olinuxino. Both of them, are just, because of that, more suitable for building small power-friendly servers. The Arrietta G25 (my second preferred one board) is really small and has a very small wifi module that makes it into a powerful wifi Linux box in the size of a USB stick.

Any way. Let's see what can be done with the Rpi

Wifi Full HD Camera

This is one of the points where the Rpi excels. The HW support for processing video together with the camera able to provide us Full HD H264 streams makes this platform ideal to build Full-HD wireless cameras.

I have already explored the possibilities in this post, using a RPi3 that already provides Wifi. My plan now is to use the Rpi Zero and make a very small and portable camera to deploy anywhere.

We will need the Rpi Zero.

A USB dongle and microUSB to USB adaptor, or, alternatively, good soldering skills to attach the USB wifi dongle directly to the board as in here. Such a hack will further reduce the size of the setup.

I have got some very small USB adaptors that I will be using for this setup. I have a couple of projects in mind using the Rpi Zero and I do not want to do the Wifi soldering hack yet as it will prevent the use of the USB interface for other things.

Small MicroUSB to USB adapters

This is how the Rpi Zero looks like with the small USB adapter.

Rpi Zero with small USB adapter

Then we need a battery and a step-up converter to rise the typical 3.7V from the Lipo batteries to the 5V required by the USB dongle. It may work to check if the wifi dongle can work with the voltage provided by the battery directly but it is likely that the range of the wifi will be reduced. I'm using a small battery from Olimex and a Adjustable Step-Up converter from Polulu. Check this post for some pictures.

This is it from the SW point of view, we can use gstreamer with some small control program. For the OS we should build a Buildroot system that will allow us to boot the device in a few seconds. Using the full-fledge Debian distro (Raspbian) increases a lot the boot time. Somebody else has already worked out this, in case you do not want to try yourself or you do not want to wait for me to build the image (that will take a while I guess).

Check the motionEyeOS project for this.

This is a picture of an early prototype I build using a external battery (no Lipo + Step-Up converter).

Early ZeroCAM Full HD Wifi Camera

Some more details of the SW side using gstreamer and how to hook up the Lipo battery can be found in this blog.

I have another idea based on this device but I will save that for future post.

A Stereo/Panoramic Camera

Another project I'm thinking about is to build a Stereo or Panoramic Camera. Again, the price of the Rpi-Zero and the camera module makes feasible building a device with multiple boards and cameras. Right now I only have 2 Rpi Zero and 2 Cameras, so an stereo or panoramic camera is possible. With 2 more building a 360 camera should also be feasible.

In a sense this is a extension of the Wifi Camera we had discussed before. We need the power system (Battery + Converter). The idea is to combine two of those devices and connect them together with some software that will trigger the image/video capture in both devices simultaneously. Then we have to stitch together the two images/streams depending on out application.

For a stereo camera we just need to combine the two images side by side, and for a panoramic camera we need some software to merge the two pictures in one single continuous image. The camera separation will indeed be different for both cases so it would be good to have a way to adjust it.

From the point of view of the connection we can explore different possibilities:

  • We can add a Wifi Dongle to each board and connect all of then to a single Access Point. For instance our phone. Then it is just a matter of file transfer to get the pieces together and process them before making the final result available to the user.
  • We can make the system stand alone and use USB interfaces to connect both boards using USB networking. In this case we lose the wifi connectivity as we only have one USB port but it would be interesting to exploit further the USB OTG interface to re-configure it as a Mass Storage device when plugged into a computer to access the acquired images.
  • Finally we can use the USB port in one of the boards as a Wifi interface, and then use some of the communication options in the GPIO header to synchronize both boards. The serial or the SPI interface looks like good candidates.

Note that if you want to go for the 360 camera, only the first and the third options are possible. The seond one only works for 2 boards unless we use a USB hub that will destroy the form factor of the build.

The PocketCluster

Again, here the real advantage is the price. The Pi Zero cost 5 dollars. It has a USB OTG interface that can be configured as a network interface, so we can easily build a Beowulf cluster that, literally we can carry in a pocket.

Again using the small USB adaptors I show you above, and using a 8 ports USB hub, we can, in theory, quickly build a 8 nodes Beowulf cluster without any further hardware. This is how it would look like with my 2 current Rpi Zero.

PocketCluster with 2 Rpi Zero

We can make one of the nodes the master or we can use a third computer to control the cluster. Basically we have to plug the Rpi Zero in the USB hub, plug the hub to the computer and, once the SW is installed, just start doing parallel processing.

Another idea is to use my Small Arietta G25 as the master node and also as Wifi access point to the cluster!. The thingy will look like this:

PocketCluster with 2 Rpi Zero and Arrieta G25 Master node

I haven't build it yet so I do not know if this will just work out of the box. I can envision some potential issues though:

  • It may be some power limitation in the hub when hooking up many boards. We may need to use some extra powering wiring to solve that problem... in case it happens
  • The USB port will be used as a network interface so it may happen that, depending on the application being executed the USB bus/hub chokes. This is something to try and maybe, the only way around is to build your application to minimize the data transfers between nodes. If that is really a problem then the idea may not be feasible or we may be limited in the number of ports in the USB hub we could use.

So... 3 projects

So the 3 projects I propose, that takes advantage of specific Rpi features (including its price), are:
  • A wifi Full HD camera
  • A Wifi Full HD Stereo/Panoramic/360 Camera... depending on how much money you want to spend :)
  • A pocket Cluster

Let Me know

If you build something of those problems I would like to know how it worked and what did you learn in the process. Which problem you faced that I haven't envision and if the ideas really work or not. My intention is to eventually build these things myself but it is very likely that some other people will build them before.

Tu publicidad aquí :)