Posts: 28
Joined: Fri Jan 30, 2015 10:49 pm

PiHead: Mountable Wireless Live Camera w/ Extras

Fri Mar 27, 2015 4:01 pm

Hi everyone!

Here is a rundown of my current project, currently dubbed PiHead, which is still in very early stages.

- A low-cost, easily configurable and customizable device that can be mounted on a quadrocopter, car dashboard, paintball gun, or robot, that will stream a live video feed to a smartphone or PC with no latency. This box will be an easy addition to any project where a remote real-time video is needed with motion and location information.

I started thinking about a project to get a Raspberry Pi mounted to a rifle so that it can stream live video to a Google Glass or equivalent. this way, the rifle no longer needs to be aimed by bringing it to your face. Such devices exist, but are extremely expensive and closed-source. With further thought, such a device could be useful for many other applications, such as quadrocopters and car dashboards. A motion sensor and GPS would add great functionality too.

With all the press surrounding the new VR headsets, this device could act a remote head, in a sense. With two cameras and two microphones for binaural sound, you could strap this onto a RC car or quadrocopter and be fully immersed with a VR headset. This is where I decided on the project name PiHead. Unfortunately, the RPi2 does not allow dual cameras, so my initial project would have to be 2D only.

I have begun testing the core features of the hardware and plan to program the RPi2 in Python, given it's popularity with the RPi community. I am familiar with Java programming, so I plan to write an Android app that will receive the feed from the RPi, and even be able to configure the RPi remotely.

Core Features:
- Stream 1080p or 720p live video to remove devices (Android, IOS, PC).
- Record video stream onto the RPi as needed.
- Motion sensor to detect specific events and react accordingly (customizable).
- GPS module to log location of the RPi and of specific motion events.
- Custom Android/IOS apps to interface with device, to reduce latency and to configure RPi.
- LiPo battery power for 2+ hours of operation.
- Open-source and customizable.
- RPi code in Python.

Stretch Features:
- Multiple board options, such as Raspberry Pi A+ (if powerful enough to work, but with smaller footprint and less power usage) or new Snapdragon dev board (built-in WiFi and GPS).
- Interchangeable camera (NoIR) and lenses.
- 4G/LTE module for streaming over carrier networks.
- Bluetooth or XBee to communicate with other devices (e.g. quadrocopter controls).
- 3D PiHead:
- - Compute Module instead of RPi2.
- - Dual PiCamera for streaming to VR headsets.
- - Dual microphones for binaural stereo sound.

Current hardware purchased:
- Raspberry Pi 2.
- PiCamera 5MP.
- Adafruit 9-DoF motion sensor.
- 16GB MicroSD Class-10 card.

Current Progress:
Tested setting up the RPi as a WiFi access point at startup and having Android phone and Windows PC connect to it. Working perfectly.
Tested streaming low-latency video using the MJPG-Streamer package. Low latency streaming possible, tweaks necessary for Windows PCs at 1080p.
Tested Gstreamer/VLC streaming, but with very poor RPi2 encoding performance above 480p resolution. Poor handling of dropped packets. Further testing possible, but MJPG approach better for situations where packets get dropped.
Tested interfacing with Adafruit 9-DoF motion sensor board using Python and the I2C bus, working, but require further work.

Need Help!
I am looking for a programmer that is willing to join me on this project that is familiar with Python programming and has their own RPi2+PiCamera. If you have experience with Adafruit motion sensors or UDP/TCP networking too, excellent! If you happen to be in Houston Texas, even better!

Feel free to offer any feedback about this project!
Current Project: PiMac

Posts: 5
Joined: Sun Apr 12, 2015 8:57 am

Re: PiHead: Mountable Wireless Live Camera w/ Extras

Sun Apr 12, 2015 9:08 am

Hi there, an interesting project, I even thought about calling my Pi "PiHead" too, still working on it, anyway, what microphones are you using, and more importantly what sound capture device are you using?

I'm using a cirrus logic audio card, with "proper" binaural mics, the ones with ears that the mics are attached to (else its stereo).

I've had similar ideas you have, though anything flying would be useless if you wanted to listen to anything (unless you have a few seconds of free fall).

I've a 720p stream of "Frank" in my back garden, a 24/7 binaural stream (so headphones are required for the 3D effect) - WARNING!! BIRD SONG CAN DAMAGE YOUR HEARING! so just be aware if the Robin sings in Franks ear! (Frank in the trees)

Can be heard from links on my raspberry pi's here:

Raspberry "PiEar" in garden
Raspberry Pi webserver in house.

Good luck with your project and let me know what your sound device is :D


Posts: 28
Joined: Fri Jan 30, 2015 10:49 pm

Re: PiHead: Mountable Wireless Live Camera w/ Extras

Tue Apr 14, 2015 1:51 pm

I have not bought any sound-related components yet, as that will be after I get the video, motion sensors and smartphone app working.

I looked into RPi sound hardware and am a little disappointed in the options. I do not need a full sound card with output, just stereo input. The Cirrus Logic card looks like the only easy option, but not as cheap as I'd like.

Frank looks pretty neat, I will try to listen in later when not at work.
Current Project: PiMac

Posts: 28
Joined: Fri Jan 30, 2015 10:49 pm

Re: PiHead: Mountable Wireless Live Camera w/ Extras

Wed Apr 22, 2015 1:44 pm


Android App: Made an app to receive the MJPEG stream. It uses TCP packets, so the delay and stuttering is a little high, but still under 300ms. No blurry images or tearing. Will work on getting the app to automatically connect to a predefined access point (the RPi) on startup and revert back once done. Also will see what I can do about converting the protocol to UDP for better performance.

WiFi Connectivity: My phone is still having issues connecting to the RPi's wireless access point, not sure if an RPi issue or Android issue. The bandwidth speed of the connection isn't very good, sometimes 2Mbps, sometimes 36Mbps. The first time it did not want connect at all, now it is connecting relatively normally. *scratches head*

Sensor Module: Got the sensor module working pretty well in Python, can read all the 9-DoF axes and make the conversion to SI units. Also reading the temperature reading on 2 of the chips, but still need to find the conversion factor for one of them to get it to degrees C. Attempting now to remove the 9.8m/s2 gravity from the accelerometer and determine "up" from it.

Case: Built a Lego housing to hold the pi case, sensor and camera in place with the limited number of Legos I have. Finally have that silly camera sitting still now.
Current Project: PiMac

Posts: 1
Joined: Sat Apr 25, 2015 4:07 pm

Re: PiHead: Mountable Wireless Live Camera w/ Extras

Sat Apr 25, 2015 4:17 pm

:D Greetings fellow Pi enthusiasts.!!

I m currently working on a SLAM (i.e Simultaneous localization and mapping ) project. I bought the Pi to transmit the data of a kinect camera wirelessly to my PC so that i may be able to process it in Matlab.

Any guidance and help regarding this problem will be deeply appriciated.

Regards. :D

Posts: 1
Joined: Wed Jun 10, 2015 12:42 pm

Re: PiHead: Mountable Wireless Live Camera w/ Extras

Wed Jun 10, 2015 12:57 pm


I tried video streaming over wifi communication with dual camera on wandboard. Now I would like to try the same video streaming on RPI board. I can also work on your project. May I know your sources if you have any and where to start from.


Return to “Automation, sensing and robotics”