User Tools

Site Tools


record_temperature_from_lexibook_asm30_sensor

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
record_temperature_from_lexibook_asm30_sensor [2016/04/02 11:23]
sgripon [Reverse engineering Lexibook ASM30 temperature sensor]
record_temperature_from_lexibook_asm30_sensor [2016/04/03 21:58]
sgripon [The arduino sketch]
Line 5: Line 5:
 ===== Needed hardware ===== ===== Needed hardware =====
  
-  * Arduino Uno R3 board (available on [[http://​www.amazon.fr/​dp/​B008GRTSV6/​ref=pe_386181_40444391_TE_item|Amazon]]) with USB cable +  * Arduino Uno R3 board (available on [[http://​www.amazon.fr/​dp/​B008GRTSV6/​ref=pe_386181_40444391_TE_item|Amazon]]) with USB cable {{ :​arduino.jpg?​200|}} 
-  * 433Mhz RF transmitter and receiver (available on [[http://​www.ebay.com/​itm/​433Mhz-RF-transmitter-and-receiver-kit-for-Arduino-ARM-WL-MCU-Raspberry-pi-new-/​370685120131?​ssPageName=ADME:​X:​AAQ:​US:​1123|eBay]])+  * 433Mhz RF transmitter and receiver (available on [[http://​www.ebay.com/​itm/​433Mhz-RF-transmitter-and-receiver-kit-for-Arduino-ARM-WL-MCU-Raspberry-pi-new-/​370685120131?​ssPageName=ADME:​X:​AAQ:​US:​1123|eBay]]) ​{{ ::​rf433.jpg?​200|}}
   * Lexibook ASM30 temperature sensor: I had one since many years and I noticed it communicates with 433RF signals with the base   * Lexibook ASM30 temperature sensor: I had one since many years and I noticed it communicates with 433RF signals with the base
 +
 +
  
 ===== Assembly ===== ===== Assembly =====
Line 18: Line 20:
 Then I suppose you have the Arduino connected with a USB cable to a PC running the Arduino development environment. Then I suppose you have the Arduino connected with a USB cable to a PC running the Arduino development environment.
  
 +{{ :​arduino-rf433_receiver_bb.png?​300 |}}
 ===== Reverse engineering Lexibook ASM30 temperature sensor ===== ===== Reverse engineering Lexibook ASM30 temperature sensor =====
  
Line 25: Line 28:
  
 Analysing the timings show several things : Analysing the timings show several things :
-  * There is a short timing (<500) every other pulse +  * There is a short timing (<500µs) every other pulse 
-  * Some pulse have medium duration (around ​1900+  * Some pulses ​have medium duration (around ​1900µs
-  * Some pulse have long duration (around ​4500+  * Some pulses ​have long duration (around ​4500µs
-  * The full frame is sent 3 times with a timing >9500 between frames+  * The full frame is sent 3 times with a timing >9500µs ​between frames
  
-My asumption was a short pulse was a separator, a medium pulse was a "​0"​ bit and a long pulse a "​1"​ bit. So I tried to decode bytes knowing the expected temperature which is displayed on the sensor itself: so easy, the 3rd byte is the temperature x10.+My asumption was a short pulse was a separator, a medium pulse was a "​0"​ bit and a long pulse a "​1"​ bit. So I tried to decode bytes knowing the expected temperature which is displayed on the sensor itself: so easy, the 3rd byte is the temperature x10 simply encoded in decimal.
  
 So now, this is what I found: So now, this is what I found:
Line 41: Line 44:
 ===== The arduino sketch ===== ===== The arduino sketch =====
  
-The following sketch reads the temperature and output ​to the serial line in JSON format. In this sketch, I use RFControl library as is, so it is not very optimized for my needs. However, for now it works and it is enough!+The following sketch reads the temperature and outputs ​to the serial line in JSON format. In this sketch, I use RFControl library as is, so it is not very optimized for my needs. However, for now it works and it is enough!
  
 <code c++> <code c++>
Line 66: Line 69:
     Serial.print(",​ \"​channel\":​ ");     Serial.print(",​ \"​channel\":​ ");
     Serial.print(channel);​     Serial.print(channel);​
-    Serial.print("​ }\r\n");+    Serial.print("​ }\n");
 } }
  
Line 130: Line 133:
 ===== Next Step ===== ===== Next Step =====
  
-Next step is to be able to get the temperature using a raspberry ​pi connected to the arduino and display it in domoticz.+  * [[add_temperature_sensor_in_domoticz|Add ​temperature ​sensor in Domoticz]] ​using a respberry ​pi.
  
 ===== References ===== ===== References =====
record_temperature_from_lexibook_asm30_sensor.txt · Last modified: 2016/04/04 13:24 by sgripon