KlikAanKlikUit (fph)
1 August, 2018
15:40
Nieuw Protocol:
code:
_ _
'0': | |_| |____ (T,T,T,3T)
_ _
'1': | |____| |_ (T,3T,T,T)
_ _
dim: | |_| |_ (T,T,T,T)
T = korte periode = 275 µs (of 375, werkt ook)
lange periode = 3,4 of 5*T (werkt ook allebei)
Het frame bestaat normaal uit 32 bits:
startpuls (T hoog, 9*laag)
26 adres
1 groep-bit
1 on/off/[dim]
4 unit (indien meerdere kanalen op één zender)
[4] [dimniveau]
stoppuls (T hoog, 39 laag)
Pasted from <https://www.circuitsonline.net/forum/view/89220>
Oud Protocol

Nog meer oud: https://gathering.tweakers.net/forum/list_messages/1594647
OOK, 3.85 kbs
KlikAanKlikUit (KAKU, COCO)
last updated: 20-12-2014, Stef Mientki
Introduction
This document describes some tests with the SI4432 tranceiver to transmit and receive + decode signals from the KlikAanKlikUit-system (KAKU, COCO).
The KAKU system, is a system for wireless home automation. It has a large set of devices for a reasonable price. The range is quiet good, they claim 70 m in the free air and 30 m in house. For what I've tested indeed 25..30 m in house is achievable.
Most interesting is that the receivers are all self traning and each receiver can act on 6 different codes. If want to add a pic controller to your home automation system, you want to be able to control the receivers with a pic. And that's very easy: just generate a random 32 bit address and let the selected receiver train on that address. So in general there's no need for decoding the transmitted signal form switches.
The RF-part of the transmission is defined by:
-- Modulation Type : OOK
-- Manchester : OFF
-- Carrier Frequency : 433.92 [MHz]
-- Data Rate : 3.85 [kb/s]
Each control word consists of the following:
Start Bit
Bits 1..26 are assumed to form the (unique) address.
Bit 27 = Group (no yet tested)
Bit 28 = On/ Off / Dim (Dim is not tested)
Bit 29..32 = Unit
Stop-Bit
Pressing a switch will send 10 to 20 times the control word.
The individual bits are defined by:
Startbit = T,10T = 100_0000_0000, so for the startbit we use 0x04, 0x00
1-Bit = T,5T,T,T, so that's 0x82
0-Bit = T,T,T,5T, so that's 0xA0
Stopbit = 0x80 + some extra delay
JAL support
As said before each receiver can be trained to act on 6 different signals. So just generate a random number and train the receiver.
So for sending just initialize the SI4432:

And then control your receiver device by sending an On/Off command:

There's also a test routine that sends some test patterns. This procedure is also used by the UHF-Generator in KAKU-mode.

Stream Viewer support
The Stream Viewer can receive and decode KAKU-signals, if you still want to know what a KAKU transmitter is sending.
The decoding is done in the Stream Viewer (as for the moment I don't need to decode in a pic).
Below is the decoded output shown. Note that the Address (A) contains the full address, i.e. Adress (first 26 bits) and Unit (last 4 bits), bit 27 (Group) and 28 (On/Off) are cleared.


AWST-8802 (double switch)
The AWST-8802 is a double switch with a unique code and powered by a CR2032 battery (3V). The battery should last for about two years.
The address of the two switches is identical, but the unit number is different: 0x0A and 0x0B.


There's no visible marking on the IC.
For accurate measurement of the modulation signal you can connect a pic-input-pin (through a 3k .. 10k resistor) to pin-1 of the IC (there is a small testpoint in the neighbourhood) as shown in the picture below.


ACM-3500-3 (triple heavy duty receiver)
This is a heavy duty receiver with 3 channels. Each channel can learn upto 6 different codes.
Each channel contains a large relais, capable of switching 17 A resistive. That makes this swicth ideally suited for switching TL-Lamps and other ECO-devices (with a very bad cosine-phi)



Note the weird antenna form (I have 2 of these and both antenna's have the same shape !!



The large chip is a MDT10P57A1, a 8-bt microcontroller.
The small chip is unknown, I could see "537009"

Determine the encoding with Logic Stream Viewer
The Logic Stream Viewer is extended with a KAKU ( KlikAanKlikUit, COCO = ClickOnClickOff) triggering. In KAKU trigger mode, the SI4432 receiver is set for optimized for KAKU signals and decoding is done according to the KAKU protocol.

Here are the results of my first AWST-8802 (double switch). As you can see in the picture below, detection is not always correctly. But checking enough of the Address and Unit part will garantee a error free detection.

Same switch, pressing Off

Other switch, pressing On
![]()
Other switch, pressing Off

Prijzen in Nederland
http://www.klikaanklikuit.nl/advies/lampenwijzer/draadloos-schakelen/
Schakelaars (onbedraad)
AWST-8800 enkel, CR2032, Euro 18.25 (Gamma 16)
AWST-8802 dubbel, CR2032, Euro 18.80 (Gamma 16)
AMWT-003 dubbel, CR2031, Euro 21.30 (Gamma 22) (ECO 22) inbouw achter een gewone schakelaar, losgekoppeld van de 230V
Schakelaars (bedraad)
AMWT-230 dubbel, Euro 19.25, (Gamma 19) inbouw achter gewone schakelaar die een lamp MOET bedienen
Spaarlamp (ontvanger)
AWS-3500 Euro 29.95
AFR-060 (lampfitting) Euro 21.85 (max 100 Watt) (Gamma 19) (ECO 17.50)
ACM-1000 Euro 18.25 (ECO 14.75)
ACM-3500-3, drievoudig, Euro 35.55 (Gamma 30, met 20% korting dus 26) (ECO 30.75)
AILS-3500 Euro 25.95 (Gamma 26) (opbouw, met timer uitschakelaar)
AWMR-300 Euro 26.95 (bedoeld voor achter schakelaar)
TL verlichting (ontvanger)
ACM-1000
AILS-3500
Deurcontact
AMST-606 (Euro 15.75)
The information below should be read from Bottom to Top
NOTE: Address decoding in the part below is done on the real address of the first 26 bits (excluding Unit, On/Off and Group)
Optimizing the detector-2 2C/2D/2E
For 2C we tried : OOK counter should be around 450, so therefore bit 2:0 = 010
0x2C = 02 : bad
0x2C = 22 : bad
0x2C = 0x12 the best
0x2C = 0A : bad
0x2C = 0x3A : almost the best
So the conclusion is: we need at least bit-4 = 1 peakdetector
Next step is to try to distiguish between the needs of ookfrzen and madeten, therefore we tried
0x2C = 0x12 peakdeten :
0x2C = 0x32 peakdeten + ookfrzen :
0x2C = 0x1A peakdeten + madeten :
These settings makes not much different, so for teh moment we choose 0x1A
it gives a quiet long low after the stop bit and often detects the startbit

0x2E = 0x2B : default = good
0x2E = 0x00 : bad
0x2E = 0x70 : bad
0x2E = 0x0F : best
0x2E = 0x7F : slightly worse
All of these determine the stopbit and long period behind it very well.
0x0F seems to be the best, i.e. attack = 000, decay = 1111
Optimizing the detector
The spreadsheet gives for OOK, Rb= 3.85 kHz and BW= 600 kHz, the following values
0x2C = 0x29
0x2D = 0x44
0x2E = 0x2B
but the result is much worse then we had before

So we tried some other settings:
0x2C = 0x00 : no result at all
0x2C =0 x18 : even worse result
0x2C = 0x10, a quiet good result:

Modifying the UHF generator
Startbit = T,10T = 100_0000_0000, so for the startbit we use 0x04, 0x00
1-Bit = T,5T,T,T, so that's 0x82
0-Bit = T,T,T,5T, so that's 0xA0
Stopbit = 0x80 + some extra delay
And the Units value:
A = 1010
B = 1011
Finally the complete (unique) address is 00_1110_0001_1100_0101_0000_0010 = 0x0_E1_C5_02
var byte KAKU_A1 [] = { 0x88, 0x8E, 0x8E, 0x8E, 0x88, 0x8E, 0x8E }
Group = 0, which also seems to be logical
KAKU
![]()
UHF-generator, second attempt, that's good enough !!
The mismatch is 0.3% which is quiet acceptable.
So we've here an extra confirmation that the Baudrate = 3.85 kHz.
![]()
![]()
UHF-generator, first attempt, we miss a few bytes
In this case the On/Off bit is the last bit, but seems to be enough to toggle the real KAKU module
![]()
![]()
The Pause between the signals is 11 ms instead of 10 msec, which is also perfect.
Let's try RF signal again
not good:
light green, here should be the startbit with the T,10T
dark green, obviously some periods are glued together

some tests with different bandwidths (both RF and Rb) doesn't give a good result. So we first need a stable signal from a modified UHF-generator.
Signal Coding
For determining the exact coding of the signal we connected the modulation signal of a transmitter to pin-B5.
Below is a complete sequence
![]()
According to most of the information on the web, the bottom signal in following region is one final bit

2090 / 260 = 8 periods: T,T,T,5T
The start bit:

2940 / 262.0 = 11.2 periods: T,10T
The stop bit

10511 / 262.0 = 40.1 periods: T,39T
AWST8802, double On/Off switch
A-On, A-Off, B-On, B-Off
![]()
![]()
![]()
![]()
Everyone on the web agrees about the content of the message
Start Bit
Bits 1..26 are assumed to form the (unique) address.
Bit 27 = Group (no yet tested)
Bit 28 = On/ Off / Dim (Dim is not tested)
Bit 29..32 = Unit
Stop-Bit
Looking at the above signals we see that the first 26 bits are all equal. So the switch information must be in the Unit section, and indeed there's a difference.
But first let's define the final "0" and "1". It seems logical to define "On" as "1".
In the A-On signal here's the switch info
![]()
So "1" is definied as T,5T,T,T (byte-value = 0x82)
and "0" is definied as T,T,T,5T (byte-value = 0xA0)
And the Units value:
A = 1010
B = 1011
Finally the complete (unique) address is 00_1110_0001_1100_0101_0000_0010 = 0x0_E1_C5_02
Group = 0, which also seems to be logical.
Baudrate
First the Baudrate was measured with an oscilliscope, directly from the modulation signal from a receiver:
Pulswidth = 260 usec ==> 3.85 kHz
As an extra check, the Logic_Stream_Viewer was temporary modified to sample the signal at B5 on which the modulation signal of a transmitter was connected. The bottom signal contains 5 pulswidths, is 1309 usec, yielding:
Pulswidth = 262 usec

First tests with streamviewer
GOA on OOK-2500-600k

GOA on OOK-4100-100k, duidelijk mindere kwaliteit

GOA on KAKU, rubish

KAKU on 4100-100k

KAKU on 4100-600k

KANU on 3600-600k
duidelijk te kleine Baudrate, waardoor pulses samengevat


Created with Microsoft Office OneNote 2007
One place for all your notes and information