Monthly Archives: September 2014

Raspberry Pi to Banana Pi migration

You might have noticed that my site was down for maintenance on Wednesday, 2014-09-17. For better WordPress performance, I decided to migrate my blog to a brand-new Banana Pi server, featuring a Cortex-A7/ Allwinner A20 Dual-core CPU with Mali-400M2 GPU — that’s cheating — I know 😀.

Let’s go bananas … !

It took me a couple of hours and some tinkering to move my WordPress installation including the MySQL database onto the new server. So here are my first impressions:

Continue reading Raspberry Pi to Banana Pi migration

CUPS server with rcswitch-pi

My laser printer is placed far away from my desk and automatically connects to my WLAN router when it is switched on. I do not use the printer frequently, so that it is idle most of the time. Recently, I started some experiments controlling the light of my aquarium using a 433 MHz remote switch, which worked like a charm. I thought that it would be nice to save some power by letting the printer start as soon as a new print job arrives to the printer. So here is how it works:

Continue reading CUPS server with rcswitch-pi

Home-Automation using 433Mhz RC-Sockets

The small 35 liters fish tank in my living room is illuminated with a 6400 K energy-saving bulb. The light is controlled by a power outlet with a build-in digital timer. Unfortunately, the timer is somewhat complicated to program. Since it is not backed with a battery, one is losing all settings each time it is being disconnected. Therefore I wanted to control the light in a more convenient manner.

IMG_6847

Recently, I stumbled upon a kit of cheap (less than 10 €) 433 MHz RC power sockets. I soon had in mind to let my RasPi server take care about the fish tank illumination by connecting one of these sockets to the aquarium.G550694Each socket has a row of ten dip switches on its backside, in order to set a system code and to assign it to one out of four buttons on the remote control (A – D). The socket communicates at a frequency of 433 MHz, using ASK modulation. Although it would be possible to solder some wires to the remote buttons, directly connecting them with RasPi’s GPIO header, it is much more safe and convenient (and consuming less GPIO pins) to control the sockets using a 433 MHz transmitter.

433 MHz transmitter

PDR_0195It is important to chose a transmitter capable to communicate by ASK-, rather than FSK modulation (such as the HOPERF RFM12B). It requires only one GPIO pin to talk to Raspberry and can be safely wired to +5 V, since we’re not reading anything from the GPIO pin.

Download and install rcswitch-pi

For transmitting signals to the rc-switches, I downloaded the following code to my Pi:

$ git clone https://github.com/r10r/rcswitch-pi

in send.cpp I changed the line reading int PIN = 0; to the GPIO pin connected to the transmitter. GPIO numbering is done according to the WiringPi library:

gpio1Then, I typed “make”, chmod 755 and moved the “send” program into my binary PATH (e.g. /usr/local/bin).

ATtiny/ATmega programming shield

I recently discovered a nicely made Arduino shield for programming Amtel microcontrollers, which was designed by Jeff Murchison. Jeff is sellling the shields on Tindie. Unfortunately, the shield was out of stock at the time of writing. Thus, I dowloaded his fritzing project files from github and ordered a PCB at fritzing.org. It saved me of going through the hassle with German customs as well, since Jeff’s shields are shipping from Canada.

Continue reading ATtiny/ATmega programming shield