EVE Alpha collects weather data

Last autumn, I came across Kevin Sangeelee’s great article describing how to collect sensor data from a Maplin N96GY weather station transmitter using a Raspberry Pi and an RFM01 module interfaced to the Pi’s GPIO pins. Suitably impressed and inspired, I was keen to have a go. A quick visit to the local Maplin store revealed that I’d just missed an opportunity to buy the weather station at a significantly reduced price. However, guessing that the offer price was likely to be repeated around Christmas time, I resolved to wait…

In the meantime, Ciseco launched ‘EVE Alpha‘ on Kickstarter. This little add-on board allows various wireless modules to be interfaced to the Raspberry Pi. I reckoned that this might be a good way to try Kevin’s project. I backed the “Entry level” reward for a pre-built EVE. This had all the tiny surface mount parts in place ready for the end-user to add radios of choice. True to Miles’ word, EVE Alpha arrived in the post with no delays.

I started with a newly imaged SD card containing Rasbian “wheezy” (2012-12-16) and then followed Davem’s very helpful “getting started” recipe: EVE RTC and Temp sensor from scratch This was a good way of checking that “EVE” was happy BEFORE getting out the soldering iron!

Once ready, all I needed to do was solder on an RFM01 receiver (Maplin part: A59JN  ‘FM Rx Module 433MHz’) and an antenna. Then (after much reading and head scratching) add 2 extra connections:

  1. a jump wire from SS_RFM12 (nSEL) to CE1 and
  2. a 100 ohm resistor between the FSK/DATA/nFFS pin on the radio module and G21/G27 on EVE.

It was also necessary to change a line in Kevin’s code (file wh10180_rf.c) to use device “/dev/spidev0.1” rather than “/dev/spidev0.0” (Kevin was using Ce0). Also, since I’m not currently using a BMP085 barometric pressure sensor, I needed to comment out the line defining its use in wh1080_rf.h

Step 1 - add RFM01 module (in place of RFM12B)

Step 1 – add RFM01 module (in place of RFM12B)

Step 2 - link from SS_RFM12 to CE1 (bottom of board)

Step 2 – link from SS_RFM12 to CE1 (bottom of board)

Step 3 - use 100 ohm resistor from FSK/DATA/nFFS to G21/G27 and add an antenna (165mm)

Step 3 – use 100 ohm resistor from FSK/DATA/nFFS to G21/G27 and add an antenna (165mm)

The setup seems to work very well with either revision (1 or 2) of the Raspberry Pi though a couple of additional lines of code in wh1080_rf.c need to be tweaked to suit revision 2:

// RPi (Rev1) Init GPIO21 (on pin 13) as input (DATA), GPIO22 (pin 15) as output (nRES)
*(gpio.addr + 2) = (*(gpio.addr + 2) & 0xfffffe07)|(0x001 << 6);
// RPi (Rev2) Init GPIO27 (on pin 13) as input (DATA)
*(gpio.addr + 2) = (*(gpio.addr + 2) & 0xff1fffff)|(0x001 << 6)

// RPi (Rev1) - GPIO21
status = ((*(gpio.addr + 13)) >> 21) & 1;
// RPi (Rev2) GPIO27
status = ((*(gpio.addr + 13)) >> 27) & 1;


Initial testing

Initial testing was done with the weather transmitter close by. Settings BW_67, LNA_14 and RSSI_91 seem to work well in my environment (with a 433MHz Currentcost energy monitor in the vicinity).

Thanks again to Kevin for his great tutorial. It gives just the right amount of help while encouraging a bit of pupil research and thinking! Previously, I’d had no interest in ‘GPIO stuff’, being content with a few 1-wire sensors connected to the Pi using a  USB adaptor. Now I’m hungry to explore further.


from: Little Router to: Little Printer (part 1)

While looking for a cheap and tidy way to deploy indoor, network connected temperature sensors, I came across TP-Link’s micro routers – TL-MR3020 and TL-WR703N. I think it was Sam Crawford’s excellent introductory write-up that got me enthused initially. Not only do these little routers have a USB port (intended for a 3G modem, but in our case think serial), they can also run OpenWrt (a very accessible Linux distribution for embedded devices). Sam’s post refers specifically to the TL-WR703N. The TL-MR3020 is a little more expensive and a little bigger but comes with a UK plug, though you’re denied the fun of starting from Chinese firmware.

Subsequently, when James Adam gave a great talk about their FreeRange Printer project, which uses an Arduino to talk to a thermal receipt printer and produce beautiful little notes via some rather nifty web services, I began to see more possibilities for ‘little router’….

And lo, without a lot of effort, early indications are good!

This took little more than the few linux commands:

# stty -F /dev/ttyUSB0 19200

# echo hello > /dev/ttyUSB0

# echo hello > /dev/ttyUSB0

# echo -e “\022T” > /dev/ttyUSB0

Indeed I didn’t really expect any outcome from ‘echo hello > /dev/ttyUSB0’ and was surprised and pleased when the printer gave a little cough (twice!) before successfully printing the test data. Ah, I thought, some sort of communications happening! Only later did I realise that the printer had very willingly printed hello.

Okay, a few more details. This is the setup:

That’s a USB BUB from Modern Device – a USB to TTL serial adapter.


From a fresh OpenWrt install, once you’ve got a ssh session open, these are the commands to install the necessary USB serial driver and utilities.

# opkg update

# opkg install kmod-usb-serial-ftdi

# opkg install usbutils

# opkg install coreutils-stty

Once the USB BUB is connected to the router, check that the hardware has been recognised:

That’s pretty much it. Now you can set the serial speed using the stty command above.

Next step: try to do proper FreeRange Printing

With thanks to James and the OpenWrt guys for making this possible.