heap.ovh

embedded adventures

Raspberry Pi Zero - glider loadout

The spiderweb electronics for the RC glider are starting to take shape.

Title

The bill of materials so far is:

Component Price (incl. tax)
Raspberry Pi Zero €9
OV5647 Camera (wide angle) €15
Pololu RC Switch €4
BMP280 pressure sensor €3
GPS GY-NEO6MV2 €6
Cables & connectors €3
Total €40

Quite thrifty, but the loss of aircraft is a consideration.

Altitude measurement

I already covered the GPS module in the previous installment. One problem with GPS is that its vertical accuracy is not great at about 2 times the horizontal accuracy. For precise altitude measurement I got the Bosch BMP280 pressure sensor which is accurate to about 0.12 hPa. You can easily convert pressure to altitude using the barometric formula which makes it accurate to about 1m in altitude. For convenience, many BMP280 libraries such as bmp280-python already incorporate it.

Camera

I got a cheap OV5647-based camera which is essentially a clone of the original Raspberry Pi camera module, except with wider lens. Raspbian comes with a command line utility to control the camera which seems to cover about everything. Personally I think the camera prices for RPi are quite ridiculous, with IMX219-based models touching €100. You can get an entire smartphone with a better camera module for less. Incidentally, my Pi Zero with the camera and the gps module is increasingly starting to look like an old smartphone. All it needs is a GPRS modem and I am actually considering adding one later. I could go on a rant here how the closed nature of the Android ecosystem generates e-waste that could be otherwise reused by hobbyists but it is Sunday and I have no need to agitate myself.

Power

While I initially planned to have a small separate LiPo battery for the microcontroller I have decided to use the conveniently-supplied 5V from the FS-iA10B radio receiver instead.

Interfacing the radio receiver

The last missing bit is being able to trigger the Pi Zero using the RC transmitter. At this stage in the project I was starting to get lazy, so instead of faffing about with a level shifter and ADC I decided to use a tiny €4 part from Pololu that does all the lifting.

Wiring it up

The simplified schematics is as follows:

Title

A nice bowl of spaghetti code

The python script which I am currently using is a bit rough around the edges. I will revisit this section again later.