Jump to content






Photo

Elk M1 Zone Temperature Sensor protocol decoded

Posted by N4HC , 03 June 2012 · 1852 views

Elk m1 temperature humidity protocol
Through reverse engineering I was able to decode the protocol used to transmit temperature to a main zone input on the Elk M1 control.  This will ONLY work on a main zone and NOT on an input expander.  This is by design on the Elk itself.

So here it is.  Manchester encoded:

· 3 start bits of ‘1’
· 8 data bits – unsigned.
· 1 parity bit – even (bit set if odd number of 1's)
· Bit time is just less than 1 second.  I picked 480ms for the ½ bit time.  So send each half (bit and its compliment) at 480ms each to total 960ms.
· Value is sent with a delay of approximately 5 seconds between transmissions.  I have found this can be extended to a long enough time to send a temperature value on another input zone.


To create a humidity sensor you need to:
· Measure the humidity and scale to an integer between 1 and 100
· Add 60 (Elk does this to avoid negative numbers for temperatures)
· Send the humidity data using the above protocol on the designated humidity zone.
· Repeat for temperature if desired and transmit on the designated temperature zone.

Hardware:
Connect an output from a microcontroller of your choice to the base of an NPN transistor (you could use a FET if you want) through a bias resistor.  I used a 2N2222A that I had in my junk bin and a 10k resistor for bias.   Connect the emitter to ground and the collector to the Elk zone input of your choice (on main board only).  The Elk zone input is pulled up to +12V by a 1k resistor (or close to).   Note this does not include any necessary ESD or over-Voltage protection but it will work.


Software:

#include <stdio.h>
void send_one(void) {
		printf("10 ");
		// output on 480ms
		// output off 480ms
}
void send_zero(void) {
		printf("01 ");
		// output off 480ms
		// output on 480ms
}
// Simple program to demonstrate Elk M1 temperature sensor protocol generation
// Easily adapted to run on a microcontroller of your choice
void main() {
int i,p;
unsigned char x=30;
p=0; // clear parity counter
 
// send 3 start bits
send_one();
send_one();
send_one();
// send data byte
for (i=0; i< 8; i++) {
		if ( x & 0x80) {
		   p++;
		   send_one();
} else {
		   send_zero();
}
		x= x <<1;
		}
// send parity
if ( p & 1)
		 send_one();
else
		 send_zero();
printf("\n");
// Disable output
}
This compiles with GCC.  Run to see a printed representation of what it does.  Remove printf statements and add appropriate IO and delay statements for your microcontroller.




August 2014

S M T W T F S
     12
3456789
10111213141516
17181920212223
242526272829 30
31      

Categories