New gadget: wireless sensor station

August 08, 2016

new-gadget-wireless-sensor-station  Facebook  Twitter  Google +  
  vidposter.jpg

 After the spending months to commercial projects, taken few days of break and created a new sensor node for home network. it's supposed to be a weekend project but i have to put rest of the new week to make it completely functional.

 
 One month ago i mentioned about purchased 2x pair of raspberry pi from an used goods store. still using first one as headless torrent client and repurposed second one as a sensor station at these days. sounds like overkill for such a simple task but reliability is the key while developing a security gadget. consistent readers possibly know, i was created it's arduino+ethernet version at past year but didn't mention about ruined nights which caused by false alarms.
 
 Preparing parts
 There is not too much thing to highlight, it's exactly same setup which mentioned in this entry got raspi with wifi dongle in this setup instead arduino. implemented mq5 gas sensor to both of them as an extra. my though was reading analog inputs by using MCP3008 adc converter but that caused a file descriptor leak which is very common in popular linux distributions. so i got laying around multiwii flight controller from a crashed quadcopter, i attached sensors to it and fetched data by using serial port. that took my 30 minutes instead spending hours maybe days to research what caused the memory leak in previous attempt.
 

 Software setup
 It's powered by node.js like other pair of pi and uses same libraries which i developed for torrent client project. raspberry's primary functionality is video transmission in that case. it's own video capturing tool raspivid can record high quality videos by utilizing the onboard h264 hardware. that's why ffmpeg and similar solutions stuck in 320x240.

 After more research found a guy's blog who forked the raspivid's source and implemented a live streaming feature which is exactly what i need. installed it for future use but recording is okay for now, i created a quick script to record 24hrs of video separated by hours and delete them everyday. another script creates a web daemon in a spesific port and captures photos and handles basic commands such as shutdown & restart etc.
 third script fetches data from arduino (multiwii) and pushes them to home automation server. sources are available in rest of entry.
 
 Functionality
 I planted it to living room which sees the balcony directly, now it's non-stop recording hd video, measuring temperature, light level and lpg & co2 gas levels and detects the human movements. as mentioned in first lines on entry, previous arduino based sensor was waking me up with false alarms. now using this device's data as cross-validator for incoming data. for example, if gas levels higher than 500 and other device's level is close to 500, my automation software (judith) launching the gas alarm.

 Same method applies to pir sensor, if you need to go living room, you have to pass from hallway first and hallway also got a pir sensor, machine records this activity and does nothing if movement detected in this order. if suddenly an activity detected in living room, that means someone break in from window or balcony, that's a reason to launch a fully audible alarm. as mentioned before, nobody going to break into my house and steal something but increasing the security perimeter increases the safety feeling and you don't have to worry tick or noises on middle of the night. commercial pir sensor sets provides same functionality but you have to arm them before goto bed, disarm before wake up for pee, arm again before sleep. almost no logic in there and completely depends on human commands.


 by the way temperature was approx 35 C while i recording the video, noticed the pir sensors cannot detect humans with higher temperatures, i was literally sweating and both of sensors didn't see me. validated that by approching to building's automated hallway lights. same condition applies while wearing raincoat. so we can say pir sensors not too reliable in that case. alternative hardware might be a doppler radar (the sensors which installed on automated glass doors on the public malls) but they're expensive and view distance is very limited.
 

 Cost
 Already got all components in my trash dump, so cost is almost free to me. component list follows:
 - Raspberry pi model B with official 8mp camera
 - 1x mq5 lpg gas sensor
 - DS18B20 temperature sensor
 - 1x light dependent resistor
 - multiwii flight controller as equivalent to arduino nano
 - 12v to 5v/1.2amps step-down converter (was sony phone's official car charger)
 - audio amplifier which salvaged from broken beats headphones
 - 1x speaker which salvaged from a dead notebook
 - TP-Link TL-WN722n wifi dongle
 - 1x voltage divider module
 
 plus spent exact 7 days to development but that's absolutely worth it. if interested, complete project sources available in this github repository.
 
 watch on youtube if having troubles with flash

  Fuck Spam
WfMHj8TncvUqIQS9@ZftajxRl.gov
StJvLaCVFEpK0cGx@GtP59jrF.net
WkLM497clOdj8Aqn@nZAS2BJt.org
fVcLgsqF7HnjQOiE@Nkn8EHOf.org
xPmHCdczfUi0I6bh@R4JSACMz.com
C89nj3ZqBTvEykSH@y7fiKqVD.net
iTER45WJ7ktgq3up@1NCGDgL6.gov
aHFpLZ2eq40tdsn1@NWmKSxZr.gov
gZSc1CkLvqDFTKbe@puRcsYzP.gov
49Av6TKZYI071wfk@YNkifQoK.net
50wJfXdhZnTrPEkS@oMP16STg.net
SN6HFQnetA3xyIsC@VKnqtjA4.net
gSEqXAGemhK97jTQ@c3Ya42Um.gov
EFhpiUyqesm8vnS2@5XVSsgNC.gov
ouD1LUW4pYAGqEQH@iNj8STAd.org
zNEFQqY69vBMaRtn@KRvjIybH.org
OWtShyUFa4BNC5Yf@3XEef2HP.net
FDKemyi5MQYLlGxH@HTciDk3t.gov
ryOKleXUtL3vxdA8@hOHxpzwe.net
57Wqsd3mLIoQZa4Y@keOZVFzs.org
Qhs8x0J6SROoM7dD@NZ50KqlU.gov
XMk52CBDsKLFTgV9@PH8QdDgw.net
lwQ47L6PifH1dS9Y@KokBmGMN.net
QikeJ7p8EF54hVTG@oUX6b9jL.com
7H34E1C05vzVBTPS@aLZzXOCJ.net
sPUuacFHteKvzmp7@s132rTaw.gov
nDydt82JCgxMakAR@ckgqV3Wj.net
4Ki1xhqjDpGPkWyd@pH5Wjgsx.org
HTIPuVpKMs8cBGYE@qX7c1wfN.net
lZ8OCMbUo9KY0na5@gUx2OoLa.gov
QRtI4YmzHryUMjJs@tVwNzf7u.net
t4If2TlaFAPUc73j@khmXUMR4.net
hOs80Pm4RStTBuU3@VU9aCSdW.net
4b6DqH835twnfe7a@YRyBvLeq.com
3vqYH0pGlwoPVfUg@eAxY8qkR.com
j7etNRkrHsnYzAmW@rQZumRgF.net
sZnKgSIxCofOeGL3@bH9GzM0j.com
BHXrgx7alEK9kFZW@92xsUVQM.gov
Gw5tuDWiJ9Yb2yM7@nutGPVAB.com
JF9uKlPo8xkVZEHU@N7tSgCTn.org
mhepWGiVfr59cMK8@FMKIQ9XB.com
5WIHrZSMhobzgsAx@JEKoMqHC.com
WxXmuIvF2isLcOCr@GSd1TvBM.com
iIpKhZTszUufaydo@JHB1A6CN.com
TCwrMSczGp64kaRi@ItqOQA9X.net
RrTyJ2lMBbhojcsq@jlCqzWv3.org
eUQWvsRn8HdfCF1D@C4NAl3u8.com
YO9zrmeDyNcvuEp0@XNyxdW4h.com
  Most Watched

Fail of week: WS2811 VU-Meter

after the few commercial projects, i got some "me-time" at last. i sold all of my geek toys and some trash on ebay except few 8 Year, 3 Month ago


Strange signals on radio ocean

2012 was SDR year. some guys (Antti Palosaari ...

Project Judith - First hardware connection tests

trying to make a connection between my virtual assistant "Judith" and a PIC16F84 based 8-bit relay interface. first step to pc b...

New gadget on desktop: Air Quality Sensor

past year i was working with a material named ...

New gadget: wireless sensor station

After the spending months to commercial projects, taken few days of break and created a new sensor node for home network. it's s...