hystrix
Posts: 52
Joined: Mon Jan 07, 2013 12:44 pm

Re: Fine Offset WH1081 (Maplin N96GY) sensors working on Pi

Sat Jan 19, 2013 9:30 am

dickydodds wrote:Regarding the resistors - I have not used any resistors at all and its currently a 'rats nest' of wires and working flawlessly! I am using a rev 2 board and connected up Kevin's diagnostic LED too. I don't have time to wire it onto a bit of vero etc at the moment.

Dicky
Can you give some more information on that diagnostic LED...I'd like to add it to my wiring diagram.

Many thanks.

ksangeelee
Posts: 192
Joined: Sun Dec 25, 2011 5:25 pm
Location: Edinburgh, UK
Contact: Website

Re: Fine Offset WH1081 (Maplin N96GY) sensors working on Pi

Sat Jan 19, 2013 5:22 pm

KarlS wrote:National Geographic 265NC (re-branded Fine Offset WH1080) has a sticker on the back that says 915MHz.
Just a couple of things to add to what others have said: -

1. The LCD unit is useful to see when you expect a signal to be received - the little RF icon shows briefly.

2. The LCD unit might also be useful to learn the exact frequency - mine has a sticker on the inside of the case - stating it as 433.92MHz. It might be worth having a look (even if it's not correct, you have to start looking somewhere).

3. Your output looks valid enough, though I've never seen such an uncongested band (lots of '0', very few 100s) - I suppose there's just not a lot of noise in the 915MHz band. Is this because you're in a relatively remote location? I'd choose the settings corresponding to the 8.nnn value or the preceding zero. Other combinations would probably work.

A note on the table that gets produced when the program starts - this is the output generated by iterating over each possible amplification setting, each RSSI threshold value, and each bandwidth setting.

For each and every permutation, the DRSSI (Digital Received Signal Strength Indicator) value is sampled, a number of times at a fixed interval, from the RFM01 module, and the number generated gives an indication of how often DRSSI was high - 100 means it was high 100% of the time for that permutation of parameters, 0% means it was never seen to be high for that permutation of parameters.

Where you see 100 (or even just 20), you're unlikely to find a clear signal with the corresponding parameters, because there's too much background noise getting through - noise will probably just bleed into the signal, unless the signal from the transmitter is particularly strong.

Where you see zero is a bit more ambiguous, because the settings may be to restrictive to get any signal at all - noise or data-packet. On the other hand, they may be ideal for ignoring noise and permitting a data-packet.

You have lots of zeros, so lots of places to look for your strong and clean signal...a mixed blessing, but it'll be interesting to learn if you get it working with the National Geographic unit.

chsims1
Posts: 18
Joined: Wed May 23, 2012 9:00 am

Re: Fine Offset WH1081 (Maplin N96GY) sensors working on Pi

Sun Jan 20, 2013 9:45 am

I find myself in a similar situation to Karl: using an 868MHz RFM01, so made the appropriate changes to the code (BAND868, F= 0x67c for 868.3MHz). I also have a rev2 board, so changed the data gpio number as described previously, and I also replaced bmp085.c with Kevin Sansom's code to use the i2c-1 address.

My RSSI table is similarly sparsely populated, and I am not seeing the head-unit signal, even though I have yet to systematically try every LNA/RSSI/BW combination. What I don't understand is why I don't see this signal for high amplification (LNA_0) settings, even though the table values are zero eg. at LNA_0, RSSI_103, BW_200. Perhaps, the transmission frequency is not actually 868.3MHz (as gleaned from sticker on display), but then I would expect LNA_0, RSSI_97, BW_400 (also zero in table) to show it??

If Kevin Sansom is reading this, I would be very interested in seeing your settings, since you appear to be using the same transmitter & a rev2 board.

Ian

Oh, btw I have not brought the transmitter inside (too cold and snowy), but it is less than 8 feet away from the receiver so it is surely a strong signal??

dickydodds
Posts: 25
Joined: Sun Oct 14, 2012 10:40 am

Re: Fine Offset WH1081 (Maplin N96GY) sensors working on Pi

Sun Jan 20, 2013 10:13 am

Here's my settings on a 433mhz RFM01 - mine isn't very congested either, but equally, not all settings work so there is a bit of trial and error too.

Code: Select all

LNA_0,RSSI_73 idx 0     0.00    0.00    0.00    0.00    0.00    0.00
  LNA_0,RSSI_79 idx 1     0.00    0.00    0.00    0.00    0.00    0.00
  LNA_0,RSSI_85 idx 2     0.00    0.00    0.00    0.00    0.00    0.00
  LNA_0,RSSI_91 idx 3     0.00    0.00    0.00    0.00    0.00    0.00
  LNA_0,RSSI_97 idx 4     0.00  100.00  100.00  100.00  100.00  100.00
 LNA_0,RSSI_103 idx 5   100.00  100.00  100.00  100.00  100.00  100.00
  LNA_6,RSSI_73 idx 6     0.00    0.00    0.00    0.00    0.00    0.00
  LNA_6,RSSI_79 idx 7     0.00    0.00    0.00    0.00    0.00    0.00
  LNA_6,RSSI_85 idx 8     0.00    0.00<   0.00    0.00    0.00    0.00
  LNA_6,RSSI_91 idx 9     0.00    0.00    0.00    0.00    0.00    0.00
  LNA_6,RSSI_97 idx 10    0.00    0.00    0.00   44.09   90.53  100.00
 LNA_6,RSSI_103 idx 11  100.00  100.00  100.00  100.00  100.00  100.00
 LNA_14,RSSI_73 idx 12    0.00    0.00    0.00    0.00    0.00    0.00
 LNA_14,RSSI_79 idx 13    0.00    0.00    0.00    0.00    0.00    0.00
 LNA_14,RSSI_85 idx 14    0.00    0.00    0.00    0.00    0.00    0.00
 LNA_14,RSSI_91 idx 15    0.00    0.00    0.00    0.00    0.00    0.00
 LNA_14,RSSI_97 idx 16    0.00    0.00    0.00    0.00    0.00    0.00
LNA_14,RSSI_103 idx 17    0.00    0.00   52.13  100.00  100.00  100.00
 LNA_20,RSSI_73 idx 18    0.00    0.00    0.00    0.00    0.00    0.00
 LNA_20,RSSI_79 idx 19    0.00    0.00    0.00    0.00    0.00    0.00
 LNA_20,RSSI_85 idx 20    0.00    0.00    0.00    0.00    0.00    0.00
 LNA_20,RSSI_91 idx 21    0.00    0.00    0.00    0.00    0.00    0.00
 LNA_20,RSSI_97 idx 22    0.00    0.00    0.00    0.00    0.00    0.00
LNA_20,RSSI_103 idx 23    0.00    0.00    0.00    0.00    0.00    0.00
RSSI Duty 0.00

ksangeelee
Posts: 192
Joined: Sun Dec 25, 2011 5:25 pm
Location: Edinburgh, UK
Contact: Website

Re: Fine Offset WH1081 (Maplin N96GY) sensors working on Pi

Sun Jan 20, 2013 10:51 am

chsims1 wrote:What I don't understand is why I don't see this signal for high amplification (LNA_0) settings, even though the table values are zero eg. at LNA_0, RSSI_103, BW_200.
It depends - you should see RSSI activity, but the receiver would fail to decode an over-amplified/unrestricted/unfiltered signal into OOK data.

To just watch for RSSI activity - if you pass any parameter to my current version of the code (argc > 1), the software goes into an endless loop reading and displaying DRSSI - you should see this jump from zero every 48 seconds if you're at least receiving something from the transmitter. Ctrl+C to quit.

When starting to develop this, I used the transmitter's AA battery as a switch to reset the unit - this way I could get it to transmit without waiting 48 seconds, which was useful when I was just looking for a signal of any type (hadn't thought to use keyfob or other transmitter on the same frequency).

User avatar
KarlS
Posts: 42
Joined: Fri Oct 12, 2012 1:10 pm

Re: Fine Offset WH1081 (Maplin N96GY) sensors working on Pi

Mon Jan 21, 2013 9:05 pm

Hi Kevin:

Thanks for your response.
The LCD unit is useful to see when you expect a signal to be received - the little RF icon shows briefly.
Unfortunately there is no RF symbol on my LCD screen, so I don't know when a transmission happens.
Your output looks valid enough, though I've never seen such an uncongested band (lots of '0', very few 100s) - I suppose there's just not a lot of noise in the 915MHz band. Is this because you're in a relatively remote location?
Indeed, I live quite remote. The next neighbour is about 700m away. We don’t even have cell reception here … so not a lot of RF noise.
You have lots of zeros, so lots of places to look for your strong and clean signal
I patiently tried each and every one of the 144 possible combinations and waited for 4 minutes to pick up at least 4 transmissions. The results were quite disappointing. Only 10 of the combinations produced any output on the terminal (and all had a RSSI-duty of 100.0, so probably only noise)
  • Four combinations showed one dot for short packages directly after the program switches to the realtime scheduler and then nothing more for the rest of the 4 minutes
  • Five combinations showed multiple dots per second as long as the program ran
  • One combination (LNA_6, RSSI_103, BW_340) produced pulse stats messages, mixed with few dots
I modified the program so it iterates over all possible frequences in steps of about 0.04MHz. The interesting result was that I only ever get a value > 0 for RSSI_103 (-103dBm meaning a very weak signal?) I'm beginning to wonder if the signal I'm picking up really comes from the weather station. Maybe it's the new "smart" electrical meter installed on the power pole just 5m away from the transmitter :(

I finally opened up the console and found the same RFM01 that I'm using, but no sticker that gives the correct frequency. The antenna measures about 82mm, which suggests 868MHz and not 915MHz. The module is soldered in, so no way to look at the markings on the underside (Sorry, I don't know how to display the photo any bigger)

ImageImage

So ... where do I go from here?

Cheers

Karl

ksangeelee
Posts: 192
Joined: Sun Dec 25, 2011 5:25 pm
Location: Edinburgh, UK
Contact: Website

Re: Fine Offset WH1081 (Maplin N96GY) sensors working on Pi

Mon Jan 21, 2013 10:32 pm

KarlS wrote: I finally opened up the console and found the same RFM01 that I'm using, but no sticker that gives the correct frequency. The antenna measures about 82mm, which suggests 868MHz and not 915MHz.
From what I've seen, the wire antennas on these things are measured out by thumb and index finger - I wouldn't count on that as an indication of module frequency.

A thought that occurred to me, when discussing with someone else trying to get a different model working, was that your transmitter might be using FSK rather than OOK to send the data - this is the native modulation scheme used by the RFM01/RFM02 RX/TX modules.

If your transmitter contains an RFM02 module, rather than some circuitry on one half of the PCB, then I think there's a good chance that it's using the FSK features of the module (it would make sense, since this is a more reliable and resilient scheme).

If you can open your transmitter and post more photos, then that would help. It should still be possible to get FSK data, and may actually turn out to be easier in terms of software. It will need some datasheet digging, since the module would need to be re-configured accordingly.

Note that the Maplin unit we're using in the original post contains neither an RFM01 nor RFM02 - it has (simple) RF circuits built onto the PCB, so getting an RFM01 (or RFM12B) to read it requires the 'jumping through hoops' that we do (OOK configuration, sampling the DATA pin, extracting pulse-widths, coding as bytes, etc.).

With the inbuilt RFM01 in your receiver, you might have the luxury of a FIFO to pick up data-bytes entirely using SPI, or at least picking up the bits directly from the DATA pin. Not without some effort, however, which may be more than you care to invest.

cii
Posts: 9
Joined: Tue Jan 22, 2013 11:06 am

Re: Fine Offset WH1081 (Maplin N96GY) sensors working on Pi

Tue Jan 22, 2013 11:11 am

Been watching this thread with interest, I have a Clas Ohlson WH1080 station that looks identical to the Maplin unit, only as far as I can see also runs at 868MHz (antenna is ~83mm which agrees). The PCB looks identical to KarlS's picture minus the relay on the left.

The RF module is tricky to separate from the main PCB so I have tacked some wires on and probed the SPI bus on powering the unit with a Saleae logic, it appears to be consistent with an RFM01 being configured:

0x958A, 0xA67C, 0xE105, 0xCC0E, 0xC69F, 0xC46A, 0xC813, 0xC206, 0xC080, 0xCE84, 0xCE87, 0xC081

As best I can tell this is for 868.3MHz, load capacitance 12.5uF and bandwidth 134kHz, RX LNA 0dB with -103dBm RSSI. The only thing that looks odd is the data rate given by '0xC813'.

Will have more of a play with it tonight!

ksangeelee
Posts: 192
Joined: Sun Dec 25, 2011 5:25 pm
Location: Edinburgh, UK
Contact: Website

Re: Fine Offset WH1081 (Maplin N96GY) sensors working on Pi

Tue Jan 22, 2013 12:28 pm

cii wrote:The RF module is tricky to separate from the main PCB so I have tacked some wires on and probed the SPI bus on powering the unit with a Saleae logic, it appears to be consistent with an RFM01 being configured:
Fantastic results, thanks. The other control registers that will be of interest - Receiver Setting (VDI setting), Data Filter (Filter Type setting), and Output and FIFO Mode (FIFO Fill bit).

The FIFO stuff will tell us if the synchron pattern is used to recognise data from the transmitter. I forget if this is hardwired or configurable - if configurable, we'd need to know what it is (if the FIFO is used at all).

Are you able to do similar for the transmitter?

cii
Posts: 9
Joined: Tue Jan 22, 2013 11:06 am

Re: Fine Offset WH1081 (Maplin N96GY) sensors working on Pi

Tue Jan 22, 2013 2:24 pm

Will have a look at the transmitter when I can. Just putting it off for now until I have something suitably waterproof to reassemble it with :D

Certainly looking at the 0xCEnn commands it looks like the module is using FIFO mode triggered to fill on receiving the synchron word which I think is fixed at 2D D4 on the RFM01. If this is the case then the datasheet also mentions nFFS shouldn't be left floating...

I have (I think) seen a packet received but I am not sure of the format. It occurs 3 times every 150ms:

06 04 06 74 26 74 3E 04 08

Sadly, I didn't think to note down the readings from the LCD unit at the time! However it was inside so the wind speed / rain values should be zero.

ksangeelee
Posts: 192
Joined: Sun Dec 25, 2011 5:25 pm
Location: Edinburgh, UK
Contact: Website

Re: Fine Offset WH1081 (Maplin N96GY) sensors working on Pi

Tue Jan 22, 2013 2:38 pm

cii wrote:Will have a look at the transmitter when I can. Just putting it off for now until I have something suitably waterproof to reassemble it with :D
Perhaps not necessary, given what you've said below... maybe not worth risking the seal.
cii wrote:Certainly looking at the 0xCEnn commands it looks like the module is using FIFO mode triggered to fill on receiving the synchron word which I think is fixed at 2D D4 on the RFM01. If this is the case then the datasheet also mentions nFFS shouldn't be left floating...
Good stuff, that simplifies things...
cii wrote:I have (I think) seen a packet received but I am not sure of the format. It occurs 3 times every 150ms
Does that equate to once every 50ms, or 3 times at 150ms intervals? In either case, that sounds kind of unusual.

Mine sends on a cycle of 48 seconds - on every alternate cycle, instead of a single packet, two (identical) packets are sent 100ms apart (or thereabouts).

cii
Posts: 9
Joined: Tue Jan 22, 2013 11:06 am

Re: Fine Offset WH1081 (Maplin N96GY) sensors working on Pi

Tue Jan 22, 2013 2:47 pm

As in the message I saw was repeated 3 times, 150ms between each. I didn't run the trace for long (20s or so) and that's the only packet I have, I was more interested in the initialisation stuff to be honest. Will try to take a longer sample tonight along with the unit readings.

User avatar
KarlS
Posts: 42
Joined: Fri Oct 12, 2012 1:10 pm

Re: Fine Offset WH1081 (Maplin N96GY) sensors working on Pi

Tue Jan 22, 2013 4:44 pm

So, I borrowed my wife's snowshoes and ventured out to get the transmitter. (I'm sure you have heard her laughing as far away as Scotland). Here are the pictures of the 915MHz TX pcb. I hope they are of use ...

Image
Image

Note the sticker "04A09" on both the transmitter and receiver (in my previous post). Not sure what it is. As the F value in the frequency setting command it would be out of range.

@cii: Excellent work, but don't worry about the water seal, there isn't any :-(

ksangeelee
Posts: 192
Joined: Sun Dec 25, 2011 5:25 pm
Location: Edinburgh, UK
Contact: Website

Re: Fine Offset WH1081 (Maplin N96GY) sensors working on Pi

Tue Jan 22, 2013 5:49 pm

KarlS wrote:Here are the pictures of the 915MHz TX pcb. I hope they are of use ...
Looks a lot like an RFM02 built directly onto the PCB (counting capacitors and resistors, and based on the crystal on the top side of the board), and the holes for a 2 x 4 pin header match up with the through-hole package. These could probably be used with a protocol analyser (panalyzer?) to get SPI data from the chip.

My guess is, if @cii gets it working, then the same solution will work for yours - it's beginning to look as if the modules are indeed configured for FSK with FIFO. Exciting times... :)

chsims1
Posts: 18
Joined: Wed May 23, 2012 9:00 am

Re: Fine Offset WH1081 (Maplin N96GY) sensors working on Pi

Tue Jan 22, 2013 7:31 pm

Interesting certainly; good work people :-D

dickydodds
Posts: 25
Joined: Sun Oct 14, 2012 10:40 am

Re: Fine Offset WH1081 (Maplin N96GY) sensors working on Pi

Tue Jan 22, 2013 8:26 pm

Yes, very interesting.
If indeed we eventually get some code produced for FSK decoding, I might have a crack at getting it to work with the Efergy energy monitor as this seems to use FSK as hacked by this guy on his website...

Code: Select all

http://electrohome.pbworks.com/w/page/34379858/Efergy-Elite-Wireless-Meter-Hack 
I've already got another RFM01 attached to my second Pi in readiness ;)

cii
Posts: 9
Joined: Tue Jan 22, 2013 11:06 am

Re: Fine Offset WH1081 (Maplin N96GY) sensors working on Pi

Wed Jan 23, 2013 9:46 am

The previous RX packets were spurious. These are what I *think* are the packets:

0E 85 72 07 82 81 0E 83 5A 0F 84 72 0F 84 00 0F 84 00 0F C4 02 0F 84 20 0E 84 04 0F 84 82 0E 84 00
0E 85 52 0E 80 81 0F 81 58 8E 82 72 0E 82 00 0E 82 00 0F 82 02 8F 82 28 0E 84 07 8E 85 70 0E 84 00
0F 85 52 0F 86 81 0E 83 58 07 82 73 0F 82 00 0F 82 00 0F 82 02 0E 82 28 0F 82 05 0F 83 50 8F 82 00
0F C5 52 0F 84 81 0E 83 58 0F 82 7A 0F 82 00 0F 82 00 07 82 02 0E 82 28 07 82 05 0F 83 50 0F 82 00

They are sent ~48s apart similar to the Fine Offset stations but the format eludes me for the moment. These readings would be around 17.5c, 56% RH with no wind/rain and no DCF77 reception (transmitter was indoors!). Think the wind direction was indicated as NE.

ksangeelee
Posts: 192
Joined: Sun Dec 25, 2011 5:25 pm
Location: Edinburgh, UK
Contact: Website

Re: Fine Offset WH1081 (Maplin N96GY) sensors working on Pi

Wed Jan 23, 2013 10:46 am

A few thoughts that come to mind (no particular order)...

Are these one packet per line?

My transmitter keeps a count of rain sensor 'ticks' so, unless you've reset the transmitter, even if your display reads zero (e.g. in past 24 hours), you probably have non-zero data being sent in the packet.

I used relative humidity as way-point in the data. It's likely to be a single-byte unencoded value with limited range, so it's easy to spot. I don't see a 0x38 or 56 (BCD) value in among those bytes.

There seems to be a pattern to the data, but very little consistency - lots of 'off by one bit' variations looking vertically down the columns. I wonder if this is related to the bit-rate?

Are we seeing a corrupted version of the synchron bits being returned in the FIFO? There are a lot of similar two-byte sequences (e.g. 0x0f, 0x82 and 'bit-error' variants).

I'd be tempted to get the analyser onto the transmitter - when I was decoding the Maplin unit, it really helped to know exactly what was being sent by the transmitter, when looking for that data on the receiver. You can concentrate on getting the correct bits assembled and then move on to figuring out what they mean.

cii
Posts: 9
Joined: Tue Jan 22, 2013 11:06 am

Re: Fine Offset WH1081 (Maplin N96GY) sensors working on Pi

Wed Jan 23, 2013 11:32 am

Yes one packet per line (33 bytes each). I don't have the transmitter installed anywhere yet so I only had it powered on for about 10 minutes previously so I would expect most fields to be 0. I see nothing to suggest that these packets aren't valid as the receiver updates fine with my limited testing.

I guess I need to take more samples and try to change either the temperature and/or humidity while I do it and see what bytes change. Or it may be some odd encoding scheme that doesn't make sense looking at it byte-wise...

ksangeelee
Posts: 192
Joined: Sun Dec 25, 2011 5:25 pm
Location: Edinburgh, UK
Contact: Website

Re: Fine Offset WH1081 (Maplin N96GY) sensors working on Pi

Wed Jan 23, 2013 12:12 pm

cii wrote:I see nothing to suggest that these packets aren't valid as the receiver updates fine with my limited testing
What did you use to get the bytes that you posted? Were the packets taken via the Raspberry Pi+RFM01 module, or did they come directly from the receiver (e.g. using Saleae Logic?) - I ask because the same RF signal can be interpreted entirely differently by separate RFM01 modules.

cii
Posts: 9
Joined: Tue Jan 22, 2013 11:06 am

Re: Fine Offset WH1081 (Maplin N96GY) sensors working on Pi

Wed Jan 23, 2013 12:13 pm

These were from the weather station base unit via the Logic.

ksangeelee
Posts: 192
Joined: Sun Dec 25, 2011 5:25 pm
Location: Edinburgh, UK
Contact: Website

Re: Fine Offset WH1081 (Maplin N96GY) sensors working on Pi

Wed Jan 23, 2013 12:35 pm

cii wrote:These were from the weather station base unit via the Logic.
Would you mind posting the Logic session (along with the pins being monitored) so we can load it into the software? If you can, then anyone interested can download the Saleae Logic software to look at sessions. Not sure what uploads the forum allows though...

cii
Posts: 9
Joined: Tue Jan 22, 2013 11:06 am

Re: Fine Offset WH1081 (Maplin N96GY) sensors working on Pi

Wed Jan 23, 2013 4:56 pm

Yeah sounds like a good idea considering, I'll try to get some good captures up in the next day or so.

hystrix
Posts: 52
Joined: Mon Jan 07, 2013 12:44 pm

Re: Fine Offset WH1081 (Maplin N96GY) sensors working on Pi

Fri Jan 25, 2013 6:45 pm

kenmc wrote:Ok, from what I can see, I just commented out the line in "Hourly.py" which says
# get weather station data
# LogData.LogData(params, raw_data)

Although I can't honestly remember what else I changed to make it work.Have a look in the github posted earlier, that's my running code.
I have assembled my RFM01 (433MHz) and BMP085 onto my Rev2 Pi. I need some help now with the wh1080listener code. I have made the changes relevant to the Rev2 Pi. How do I compile this into an executable? As you can guess, I am new to Linux, so I'm not really sure what I am doing :?

Another question: Should nSEL go to CE0 or CE1, and what do I need to change in the code?

Many thanks.

hystrix
Posts: 52
Joined: Mon Jan 07, 2013 12:44 pm

Re: Fine Offset WH1081 (Maplin N96GY) sensors working on Pi

Sat Jan 26, 2013 10:04 am

hystrix wrote:
kenmc wrote:Ok, from what I can see, I just commented out the line in "Hourly.py" which says
# get weather station data
# LogData.LogData(params, raw_data)

Although I can't honestly remember what else I changed to make it work.Have a look in the github posted earlier, that's my running code.
I have assembled my RFM01 (433MHz) and BMP085 onto my Rev2 Pi. I need some help now with the wh1080listener code. I have made the changes relevant to the Rev2 Pi. How do I compile this into an executable? As you can guess, I am new to Linux, so I'm not really sure what I am doing :?

Another question: Should nSEL go to CE0 or CE1, and what do I need to change in the code?

Many thanks.
I think I have complied everything OK now. However, when I try to run the executable using ./weatherlogger , I get the following errors:

Failed to open /dev/mem, try checking permissions.
Failed to map the GPIO registers into the virtual memory space.

I complied everything using:

Code: Select all

gcc weatherlogger.o bcm2835.o bmp085.o -lm -o weatherlogger -lsqlite3
I would be grateful for some help!

Many thanks.

Return to “Automation, sensing and robotics”

Who is online

Users browsing this forum: straggler1 and 6 guests