Alarm Central
-
- Posts: 822
- Joined: Tue Apr 01, 2014 2:14 am
- languages_spoken: german, english, español
- ODROIDs: C1, C1+, C2
- Location: Germany
- Contact:
Alarm Central
Already in the Odroid Magazine published... Here is now the forum site of my project Alarm Central.
The window sensor.
The firmware is made on Attiny84 processor. A sensor takes about 17uA average current, and sends the state every 4s to the central.
The files are on Github: https://github.com/joerg65/rf24_window
The hardware files (KiCad) are also on Github:https://github.com/joerg65/rf24_window_hw
The window sensor.
The firmware is made on Attiny84 processor. A sensor takes about 17uA average current, and sends the state every 4s to the central.
The files are on Github: https://github.com/joerg65/rf24_window
The hardware files (KiCad) are also on Github:https://github.com/joerg65/rf24_window_hw
Last edited by joerg on Thu Apr 20, 2017 6:37 pm, edited 1 time in total.
-
- Posts: 822
- Joined: Tue Apr 01, 2014 2:14 am
- languages_spoken: german, english, español
- ODROIDs: C1, C1+, C2
- Location: Germany
- Contact:
Re: Alarm Central
The motion sensor.
The firmware is made on ATtiny84. The MCU communicates with the ultra low current motion controller E931.96. The connected sensor is a LHi968. If a motion is detected or every 4s the state of sensor and battery voltage is sent via nRF24. After sending, the cpu goes sleep. The current consumption is about 32uA average. Two lithium cells AA (3000mAh), should stay about 4 to 8 years. The lifetime depends on the amount of detected motion.
The firmware can be found here: https://github.com/joerg65/rf24_motion
And the KiCad project here: https://github.com/joerg65/rf24_motion_hw
The firmware is made on ATtiny84. The MCU communicates with the ultra low current motion controller E931.96. The connected sensor is a LHi968. If a motion is detected or every 4s the state of sensor and battery voltage is sent via nRF24. After sending, the cpu goes sleep. The current consumption is about 32uA average. Two lithium cells AA (3000mAh), should stay about 4 to 8 years. The lifetime depends on the amount of detected motion.
The firmware can be found here: https://github.com/joerg65/rf24_motion
And the KiCad project here: https://github.com/joerg65/rf24_motion_hw
Last edited by joerg on Sat Jun 10, 2017 3:05 pm, edited 2 times in total.
-
- Posts: 822
- Joined: Tue Apr 01, 2014 2:14 am
- languages_spoken: german, english, español
- ODROIDs: C1, C1+, C2
- Location: Germany
- Contact:
Re: Alarm Central
The Android App.
Comming next ...
Comming next ...
Last edited by joerg on Sat Jun 10, 2017 3:10 pm, edited 3 times in total.
-
- Posts: 822
- Joined: Tue Apr 01, 2014 2:14 am
- languages_spoken: german, english, español
- ODROIDs: C1, C1+, C2
- Location: Germany
- Contact:
Re: Alarm Central
The Central (the Odroid C1+ and VU7+).
Comming next ...
Comming next ...
Last edited by joerg on Mon Nov 21, 2016 3:30 am, edited 1 time in total.
-
- Posts: 822
- Joined: Tue Apr 01, 2014 2:14 am
- languages_spoken: german, english, español
- ODROIDs: C1, C1+, C2
- Location: Germany
- Contact:
Re: Alarm Central
Other components.
Comming next ...
Comming next ...
- rooted
- Posts: 6341
- Joined: Fri Dec 19, 2014 9:12 am
- languages_spoken: english
- Location: Gulf of Mexico, US
- Contact:
Re: Alarm Central
Designing from ground up a full blown security system?
-
- Posts: 822
- Joined: Tue Apr 01, 2014 2:14 am
- languages_spoken: german, english, español
- ODROIDs: C1, C1+, C2
- Location: Germany
- Contact:
Re: Alarm Central
Yes, it's my hobby.
- rooted
- Posts: 6341
- Joined: Fri Dec 19, 2014 9:12 am
- languages_spoken: english
- Location: Gulf of Mexico, US
- Contact:
Re: Alarm Central
Very nice, I will definitely be following your progress 

- odroid
- Site Admin
- Posts: 29750
- Joined: Fri Feb 22, 2013 11:14 pm
- languages_spoken: English
- ODROIDs: ODROID
- Contact:
Re: Alarm Central
I've read your article on November issue. Nice and useful item in the real world. 
How long time the Attiny MCU is alive to check the lead switch and transmitting the 20byte data via nRF24L01 ?
a few milliseconds?

average 17uA
is quite impressive.How long time the Attiny MCU is alive to check the lead switch and transmitting the 20byte data via nRF24L01 ?
a few milliseconds?
-
- Posts: 822
- Joined: Tue Apr 01, 2014 2:14 am
- languages_spoken: german, english, español
- ODROIDs: C1, C1+, C2
- Location: Germany
- Contact:
Re: Alarm Central
@odroid
I checked again with oscilloscope. The Attiny wakes up every 4s, then a period of 2.6mA for 7ms and a rush of 23mA for 250us. During sleep it is 6uA.
The structure is:
- Wake up
- Read DI
- delay 2ms
- Read battery voltage 4 times
- Calculate a CRC
- Encode payload AES128
- Power up nRF24
- delay 3ms
- Transmit payload
- Go to sleep
I checked again with oscilloscope. The Attiny wakes up every 4s, then a period of 2.6mA for 7ms and a rush of 23mA for 250us. During sleep it is 6uA.
The structure is:
- Wake up
- Read DI
- delay 2ms
- Read battery voltage 4 times
- Calculate a CRC
- Encode payload AES128
- Power up nRF24
- delay 3ms
- Transmit payload
- Go to sleep
- odroid
- Site Admin
- Posts: 29750
- Joined: Fri Feb 22, 2013 11:14 pm
- languages_spoken: English
- ODROIDs: ODROID
- Contact:
Re: Alarm Central
Thank you for the detail explanation.
It is really helpful to build an extremely low power RF things.
I want to make a similar item with our Weather board via bit-banging software driven I2C host on Attiny84.
3~4 years of running time will be amazing !
One more question.
What is average normal distance of RF communication in open space?
It is really helpful to build an extremely low power RF things.
I want to make a similar item with our Weather board via bit-banging software driven I2C host on Attiny84.

3~4 years of running time will be amazing !
One more question.
What is average normal distance of RF communication in open space?
-
- Posts: 822
- Joined: Tue Apr 01, 2014 2:14 am
- languages_spoken: german, english, español
- ODROIDs: C1, C1+, C2
- Location: Germany
- Contact:
Re: Alarm Central
I was able to receive signals within 15 meters in open space, maybe more is possible. It depends also on the direction of the antenna, the one on the sensor and the one on the C1.
- odroid
- Site Admin
- Posts: 29750
- Joined: Fri Feb 22, 2013 11:14 pm
- languages_spoken: English
- ODROIDs: ODROID
- Contact:
Re: Alarm Central
Okay. 10~20 meters should be fine for my application.
-
- Posts: 822
- Joined: Tue Apr 01, 2014 2:14 am
- languages_spoken: german, english, español
- ODROIDs: C1, C1+, C2
- Location: Germany
- Contact:
Re: Alarm Central
The app is discontinued. I decided to not follow this way anymore. The reason is that it never worked as stable as I wanted.
By inspiration of @mad_ady, I ported already a lot of stuff to Home Assistant. I am now testing how stable it works.
The nRF24 library for my sensors I ported to run on Ubuntu. One Odroid C1 is running in the living room to receive the states of the sensors and sends mqtt messages to another Odroid C1 that is integrated in the electric central acting as Home Assistant server.
The sensor card is a custom card I made for the Lovelace UI: For the covers I made a command line prog that manage the covers time controlled. None of the build in covers of Home Assistant has fulfilled my demand. Home Assistant sends an init message and the prog creates a cover with specified time for open and close. The prog sends back position from 0 to 100%. For the inputs and outputs that are connected via i2c I made a prog that communicate via wiringPi and sends states of the inputs by mqtt messages. And of course receives mqtt messages to control the outputs. The automation part is running now stable for some weeks. Before I tested the Home Assistant on a Pi B, but it was terrible slow. There was a dead time of about 500ms, when I pressed a button, with the C1 there is practical no dead time.
By inspiration of @mad_ady, I ported already a lot of stuff to Home Assistant. I am now testing how stable it works.
The nRF24 library for my sensors I ported to run on Ubuntu. One Odroid C1 is running in the living room to receive the states of the sensors and sends mqtt messages to another Odroid C1 that is integrated in the electric central acting as Home Assistant server.
The sensor card is a custom card I made for the Lovelace UI: For the covers I made a command line prog that manage the covers time controlled. None of the build in covers of Home Assistant has fulfilled my demand. Home Assistant sends an init message and the prog creates a cover with specified time for open and close. The prog sends back position from 0 to 100%. For the inputs and outputs that are connected via i2c I made a prog that communicate via wiringPi and sends states of the inputs by mqtt messages. And of course receives mqtt messages to control the outputs. The automation part is running now stable for some weeks. Before I tested the Home Assistant on a Pi B, but it was terrible slow. There was a dead time of about 500ms, when I pressed a button, with the C1 there is practical no dead time.
- mad_ady
- Posts: 5264
- Joined: Wed Jul 15, 2015 5:00 pm
- languages_spoken: english
- ODROIDs: XU4, C1+, C2, N1, H2, N2
- Location: Bucharest, Romania
- Contact:
Re: Alarm Central
"To err is human, but to really foul things up you need a computer."
Even with Home Assistant running beautifully, there may be some corner cases that are hard to anticipate and that can give you a hard time. A couple of weeks ago I managed to DDoS my mqtt broker with lots of messages from a faulty pir sensor that was causing me to be unable to turn off the gas heater via the thermostat. Try explaining to the missus why the kids were sweating at 07:00...
Even with Home Assistant running beautifully, there may be some corner cases that are hard to anticipate and that can give you a hard time. A couple of weeks ago I managed to DDoS my mqtt broker with lots of messages from a faulty pir sensor that was causing me to be unable to turn off the gas heater via the thermostat. Try explaining to the missus why the kids were sweating at 07:00...

-
- Posts: 822
- Joined: Tue Apr 01, 2014 2:14 am
- languages_spoken: german, english, español
- ODROIDs: C1, C1+, C2
- Location: Germany
- Contact:
Re: Alarm Central
Ha, yes I know. It was hard time to learn to integrate things to HA. Also a reason I was as mute as a fish here last months.
Who is online
Users browsing this forum: No registered users and 1 guest