-->
Page 1 of 2

Help with light automation project

PostPosted: Thu Jun 25, 2015 12:02 am
by IcedMocha
First post on this forum. Just about to get started with the ESP8266 (or anything WiFi) so sorry if I'm a bit of a newb.

I'm looking to implement automated lighting throughout my house. I've got the WiFi bulbs and Hub that will interface to a raspberry pi. My idea is to integrate sensors and the wifi transmitter into my light switches and have them report back to the pi over my home network.

So within each light switch housing I need to fit:

- an ambient light sensor to detect the current lighting in the room (less lighting needed if there is a lot of ambient light already)
- a motion sensor (to detect if anyone is in the room)
- an on off switch (as an override, can just use the normal light switch that is already there, current plan is to bypass the switch with AC current and just use the switch as a digital input on the board)
- a power coverter (to get from the AC circuit in the wall to DC power)
- the wifi communicator

I'm wondering if there is any way to pull this off without having to buy a separate arduino (the pro mini for example). I've looked at the ESP8266 "thing" on sparkfun, but I'm not sure if it can do what I need. Depending on the light sensor and motion sensor I use, I'm trying to figure out if I can wire them straight to a stand alone ESP8266. Since I'll probably have a dozen of these detectors all over my house, any hardware I can trim down will save me some decent cash.

Right now the light sensor I'm leaning toward is just a simple photocell:

http://cdn.sparkfun.com/datasheets/Sensors/LightImaging/SEN-09088.pdf

and for the motion sensor:

http://www.sparkfun.com/datasheets/Sensors/Proximity/SE-10.pdf

I'm just starting out on this so any suggestions if there is a better way to pull this off are welcome.

Thanks!

Re: Help with light automation project

PostPosted: Thu Jun 25, 2015 3:39 am
by tavalin
Your project sounds pretty similar to mine and it should be perfectly do-able with the ESP8266.

I've only gotten as far as prototyping but I've got an ESP-12 controlling a led/light bulb via a relay from my home automation setup (openHAB) or with a manual override switch.

Re: Help with light automation project

PostPosted: Thu Jun 25, 2015 8:25 am
by IcedMocha
tavalin wrote:Your project sounds pretty similar to mine and it should be perfectly do-able with the ESP8266.

I've only gotten as far as prototyping but I've got an ESP-12 controlling a led/light bulb via a relay from my home automation setup (openHAB) or with a manual override switch.


The thing I seem to be struggling with is getting more details on the different ESP versions and what their pins can do. For example, can I do a 5V A2D conversion with a ESP-12 for the photocell?

Re: Help with light automation project

PostPosted: Thu Jun 25, 2015 9:05 am
by trackerj
IcedMocha wrote:
tavalin wrote:Your project sounds pretty similar to mine and it should be perfectly do-able with the ESP8266.

I've only gotten as far as prototyping but I've got an ESP-12 controlling a led/light bulb via a relay from my home automation setup (openHAB) or with a manual override switch.


The thing I seem to be struggling with is getting more details on the different ESP versions and what their pins can do. For example, can I do a 5V A2D conversion with a ESP-12 for the photocell?


Few small tutorials that might help you with your project:

- ESP8266 Internal ADC Explained
- ESP8266 PIR Motion detector
- MAINS power switch
- MAINS power Light Dimmer
- Web interface for MAINS Dimmer