Monthly Archives: January 2013

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);
Becomes:
// RPi (Rev2) Init GPIO27 (on pin 13) as input (DATA)
*(gpio.addr + 2) = (*(gpio.addr + 2) & 0xff1fffff)|(0x001 << 6)

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

P1020667

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.