element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Forget Me Not Design Challenge
  • Challenges & Projects
  • Design Challenges
  • Forget Me Not Design Challenge
  • More
  • Cancel
Forget Me Not Design Challenge
Blog Forget Me Not :  eLDERmon  Hardware Hacking
  • Blog
  • Forum
  • Documents
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: mcb1
  • Date Created: 4 Sep 2014 9:26 AM Date Created
  • Views 1111 views
  • Likes 1 like
  • Comments 3 comments
  • forget_me_not
  • b+
  • design_challenge
  • openhab
  • iot_eldermon
  • raspberryp
  • tektronix
  • eclipse
  • internet_of_things
  • enocean
  • smarthome
  • challenge
  • iot
  • enocean_pi
Related
Recommended

Forget Me Not :  eLDERmon  Hardware Hacking

mcb1
mcb1
4 Sep 2014

Forget Me Not :  eLDERmon  Hardware Hacking

 

Since my last post, element14 and EnOcean have pulled out all the stops to ensure the parts for this challenge are available.
So Markus, Christian and Samantha ... thanks for your efforts.  image


Link to other posts
Forget Me Not : eLDERmon Intro
Forget Me Not :  eLDERmon  Electrical
Forget Me Not :  eLDERmon  Outlets
Forget Me Not : eLDERmon Planning
Forget Me Not : eLDERmon Parts 1
Forget Me Not :  eLDERmon  Sponsor Parts
Forget Me Not : eLDERmon Hardware Hacking
Forget Me Not : eLDERmon GNUplot
Forget Me Not: eLDERmon Protocol
Forget Me Not : eLDERmon Hardware Hacking #2
Forget Me Not : eLDERmon Hardware Hacking #3
Forget Me Not : eLDERmon OpenHAB

Hardware
One of the parts of my Challenge was measuring the Outdoor Temperature and Humidity.
I recalled having a commercial unit that I picked up many years ago in the bargain bin.

Time to dig it out, see if it will do what I want, or if I can re-purpose the case.
Regardless of the final use, it will be an extra sensor at home.

 

Research

Obviously the first place to look is the internet to see if someone else has played with one of these devices.
Sadly after a few good leads, the answer was No.
I did find some links for where to buy (same place I got it originally), but it looks like they are end of line.

 

The box and paperwork indicated it was 433Mhz, so adding a receiver to an Arduino I was surprised when I got no data.


About this stage you wish you had something that could measure the radiated RF and determine the frequency.  image
The Tektronix scope wasn't going to stretch to 433 Mhz, so I found a sketch that flashed the onboard led if any data appeared.

 

Still nothing ... and a check using a Tx sending data proved the receiver was working.

 

 

Broken

I recall that this was in the bargain bin, but there were no markings or note saying why (or I'd lost it years ago).
When I opened it up, I was pleasantly surprised how much effort had been made to prevent moisture ingress, and that it included a Humidity sensor.

image


As the picture shows the RF unit was a separate device, and features a pcb aerial and some matching to ensure the reduced length is correctly tuned.

 

That looked promising, so time to see if there was data.

image

          Always nice to see the manufacturer label the connections.

 

 

Since I had a few spare minutes at work I captured it with the logic analyser.


The above picture shows there is data going out to the transmitter.image

It will require some working out the protocol, but in the meantime it needs to be sent out so it can be used.

image

The picture shows one of the loading coils damaged and various soldering on other parts.

 

Luckily my order of 10 x RFM85 transmitters arrived this morning from Anarduino


A quick replacement and tidy of the wires had the transmitter replaced.
The last one was held on with some double sided tape and foam, so that would do for now.
image

These Tx units don't have a aerial, and the required length is 170mm for a 1/4 wave whip.

A length of wire was added but it needed to be carefully placed around the inside, to ensure the seal was not comprimised.

image

Ideally this should be a straight wire, since the RF standing wave generated along the antenna interacts with the magnetic field .. but that's another subject and another blog. image

 

 

Capture

I connected the receiver up, connected the logic analyser to the receiver output and was surprised that it was capturing rubbish.
It was so bad and random I didn't bother capturing it.
It seems that something was either sending 433MHz data or some other frequency was being picked up.
Shorting out the antenna made no difference, and since there is no other pins to trigger the analyser off, it was end game until I got home.
  imageimage
     images from Nexus 7  ... despite the 5MP you can't control the ISO so the images get grainy ...
 
When the scope was added, it became clearer what was causing the trigger seen on the logic analyser.

image

A regular pattern showed.
The cursor is looking at 10 cycles (the second cursor seems to have become a dotted line) and there is 200mS between Cursor 1 and Cursor 2 as indicated by the Δ200ms and the Δ5Hz.
200mS/10 = 20mS
Freq (Hz) = 1/ time  therefore  freq = 1/20mS or 1/ 0.020  = 50Hz which is our mains frequency.
Despite isolating the computer by running the receiver on battery, and adding a capacitor in the scope earth, it still remained.

 

Data

To confirm everything worked correctly, I fired up the test unit that sends out a RF control signal. (I bypassed the button checking)

/*
    Simple Button for Digispark to drive an Watts Clever Outlet
    Sends the ON code then xx secs later sends the OFF code
  Pin connections
  Digi  tiny85
  P0     (5)=
  P1     (6)= On board LED (Rev A)
  P2     (7)=
  P3     (2)= 433 MHz transmitter Data pin
  P4     (3)= pushbutton (P4 to ground)
  P5     (1)=
  http://code.google.com/p/rc-switch/
*/


//RCSwitch code heavily modified to remove extra code not required
#include <Digi_RCSwitch.h>


RCSwitch mySwitch = RCSwitch();
const int buttonPin = 4;     // the number of the pushbutton pin
const int ledPin =  1;      // the number of the LED pin ver A
//const int ledPin =  0;      // the number of the LED pin ver B




int buttonState = 0;         // variable for reading the pushbutton status
void setup() {


  //Serial.begin(9600);
   pinMode(ledPin, OUTPUT);
   pinMode(buttonPin, INPUT);
   digitalWrite(buttonPin, HIGH);
  // Transmitter is connected to Digispark Pin P3
  mySwitch.enableTransmit(3);


  // Optional set pulse length.
  // mySwitch.setPulseLength(320);
  // Optional set protocol (default is 1, will work for most outlets)
  mySwitch.setProtocol(1);
  // Optional set number of transmission repetitions.
  // mySwitch.setRepeatTransmit(15);
}


void loop() {


  buttonState = digitalRead(buttonPin);
  // delete below for the button to work correctly
  buttonState = LOW;
    if (buttonState == LOW) { 
    // turn LED on:
    digitalWrite(ledPin, HIGH);
    mySwitch.send(13998174, 24); // Send 1 ON Code
    //mySwitch.send(13998172, 24); // Send 2 ON Code
    //mySwitch.send(13998170, 24); // Send 3 ON Code
    delay(5000);
    digitalWrite(ledPin, LOW);
    mySwitch.send(13998166, 24); // Send 1 OFF Code
    //mySwitch.send(13998164, 24); // Send 2 OFF Code
    //mySwitch.send(13998162, 24); // Send 3 OFF Code
  }
}

 

/*
  Simple example for receiving

  http://code.google.com/p/rc-switch/
*/


#include <RCSwitch.h>


RCSwitch mySwitch = RCSwitch();


void setup() {
  Serial.begin(9600);
  mySwitch.enableReceive(0);  // Receiver on inerrupt 0 => that is pin #2
}


void loop() {
  if (mySwitch.available()) {

    int value = mySwitch.getReceivedValue();

    if (value == 0) {
      Serial.print("Unknown encoding");
    } else {
      Serial.print("Received ");
      Serial.print( mySwitch.getReceivedValue() );
      Serial.print(" / ");
      Serial.print( mySwitch.getReceivedBitlength() );
      Serial.print("bit ");
      Serial.print("Protocol: ");
      Serial.println( mySwitch.getReceivedProtocol() );
    }


    mySwitch.resetAvailable();
  }
}

 

The data pulses showed up as I expected, and the Arduino quite happily decoded it.

image

So for now this is how it will be, and I'll use the raw data sent out to the transmitter to do the decoding.

 

 
Mark
  • Sign in to reply
  • mcb1
    mcb1 over 11 years ago in reply to DAB

    Thanks guys ..

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 11 years ago

    Great post and good fault finding process.

     

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 11 years ago

    Hi Mark,

     

    Cool reverse engineering image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube