New assignment to Air Freshener

January 02, 2016

new-assignment-to-air-freshener  Facebook  Twitter  Google +  
  vidposter.jpg

 Few weeks ago i moved to a new place which is bigger than my previous lair. we're decided to install an alarm system and story started from there. actually i got nothing to steal even if a burglar break into my house he probably pity me and lay down some money on the table before leaving with full of tears.

 An average alarm system starting from approx $350~400 in here. that's serious funds if we convert it to local currency. did a quick math with cons & pros and decided to build my own by using an arduino ethernet shield

 First attempt
 After the release of wifi enabled ESP8266 dev boards, ethernet modules even arduino itself getting obsolete. before anybody say "overkill" to arduino+ethernet bundle for this scale of project, i would like to mention it's laying around since two years. anyway, i found an automatic air spray box and installed the pir sensor and arduino board on it which is took two hours. then created a simple sketch based on arduino's ethernet client samples and my growl like desktop notification software "judith" handled the rest of job. i assigned turret sound effects from the game portal just for fun and written a timer code to wake the whole apartment if got room activity after 00:00am.

 False alarms
 Well, that was done in total 3 hours but not effective as i predicted. so next day i updated the sketch by adding an extra error correction feature. pir sensor should triggered at least 25ms in new version. that's worked but still got false alarms from nothing. researched almost everything, spent whole business day to figure out the problem and noticed the inactivity while wifi router rebooting. internet service provider's modem also supports 5ghz wifi which is causes signal interference like cell phones. i used a longer cable and put a distance between router and device and problem solved. at least for next 3 days.

 Corrections & upgrades
 Everything looks good but still got minor lags between movement and notification at pc, in third version i removed all delays from sketch and used time based events. in the most recent code temperature and light sensor data sending in 3 seconds of interval and pir sensor activity pushing to server immediately. also prevent double notifications, i put 300ms delay to each motion event. you can check out the final version in devzone section.

 if i purchase it, probably will costs me about $50~ but currently just taken my two business days. and i can tell it's definitely worth it based on last one week of usage. at least i can aware about who in which room while i'm working on my pc.

 by the way will mention about the backend software in next entry with a "crash-free" version of it.

  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 3 Year, 8 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...