I am an engineering undergrad and that comes with one personality trait, being lazy. In my dorms, the switchboard was near the door, directly opposite of my bed and at night, I had to get up just to turn off the lights. Thus, this idea was born. First version I made with an arduino with an ethernet shield and microphone. However, the arduino being severely under-powered, I could not do more processing on the audio from mic, just simple pattern recognition. I could control the lights and fan using simple clapping patterns or an app. This time, I'm thinking about being able to unlock the doors, controlling everything that can be justified including lights, fans, AC etc.. For example, dimming the lights or setting a specific color, turning on AC before you are home, monitoring movement and control lights based on movement, allow someone access etc.. Raspberry PI 2, being quite powerful, the ideas aren't that limited.
My second try was using a raspberry pi b+ model. It ran raspbian and I used the wiringPi library to control the pins.
Power was given with my cellphones charger, as there were not many peripherals, it was enough. The attiny85 was connected with serial ports of raspi, communicating with it about the state of master light relay. Using raspberry pi comes with one caveat, it does not have analog pins so I had to resort to attiny85. The microphone was connected with an LM358 op-amp, amplifying it enough to be caught by ADC. The attiny then took proper course of action and relayed the data to the raspi. The raspi could be controlled from an webserver or bluetooth module, connected to it with one of the USB ports through an USB-Serial converter (yet to complete this part). Three +ve pins of the led were connected to three gpio of the raspi and being controlled by softpwm.
The PIR sensor detects shift in infrared levels that are generated in case of movement and causes the output pin to go high. Raspi detects this change with an interrupt and turns on the master light (rgb led) to dim brightness. This can also be used to log movements and activate a camera.
YET TO COMPLETE:
1. send http requests and parse http/bluetooth response
2. gradual changing of brightness instead of sudden change
3. figure out how to use camera
4. monitor temperature
5. update this with images
Comments