ESP8266 – Ikea Molgan light Hack – Hardware.

The first ESP8266 project I worked on is a wifi PIR detector. My original plan was to use an cheap Ebay PIR and 3D printed case for this project but I happen to have a spare Ikea Molgan PIR light lying around, I opened it up and take a peek inside and decided to work this hack with it, overall this is an attractive and cheap unit. (SGD$9.90)   Removing the top dome was easy as it is friction fitted and held together with some tape, upon closer examination, it uses the same parts as most cheap Ebay PIR, just with a bigger dome lens, LEDs and battery holder. Running on 3 x AAA battery , voltage wise it is pretty ideal but I don’t think it will last too long once I hook the ESP8266 to it. On the topside after removing the plastic dome, you see the PIR and LEDs, at the side is a light sensitive photo-diode that lowers it’s resistance in the dark, arming the PIR. I removed the photo diode so the unit will work in daylight.   On the back of the PCB, the circuit is very similar to cheap Ebay PIR, with the same control chip, BISS0001 and RC circuits to control trigger pulse and re-arming timing. Voltage regulator is a 3V, 30mA LDO – HT7130, not enough for the ESP8266 as it draw about 250mA with it’s radio on. Next I removed 3 out of 5 470R current limiting resistors, disabling the LEDs. Out of the remaining 2 LEDs,  1 is for visual feedback and 1 for the opto-coupler. I replaced the 470R at the end of the project with a 1K to dim the light and lower the power consumption. Resistor R10 (pulse length) is changed to 100K from 1M to shorten […]

The first ESP8266 project I worked on is a wifi PIR detector.

MH1

My original plan was to use an cheap Ebay PIR and 3D printed case for this project but I happen to have a spare Ikea Molgan PIR light lying around, I opened it up and take a peek inside and decided to work this hack with it, overall this is an attractive and cheap unit. (SGD$9.90)

 

Removing the top dome was easy as it is friction fitted and held together with some tape, upon closer examination, it uses the same parts as most cheap Ebay PIR, just with a bigger dome lens, LEDs and battery holder. Running on 3 x AAA battery , voltage wise it is pretty ideal but I don’t think it will last too long once I hook the ESP8266 to it.

MH2
CDs and PIR in the Middle surrounded by 5 ultra bright LEDs

On the topside after removing the plastic dome, you see the PIR and LEDs, at the side is a light sensitive photo-diode that lowers it’s resistance in the dark, arming the PIR.

I removed the photo diode so the unit will work in daylight.

 

MH3

On the back of the PCB, the circuit is very similar to cheap Ebay PIR, with the same control chip, BISS0001 and RC circuits to control trigger pulse and re-arming timing. Voltage regulator is a 3V, 30mA LDO – HT7130, not enough for the ESP8266 as it draw about 250mA with it’s radio on.

MH4

Next I removed 3 out of 5 470R current limiting resistors, disabling the LEDs. Out of the remaining 2 LEDs,  1 is for visual feedback and 1 for the opto-coupler. I replaced the 470R at the end of the project with a 1K to dim the light and lower the power consumption. Resistor R10 (pulse length) is changed to 100K from 1M to shorten the pulse, we only need enough time for the ESP8266 to power up get an IP, SNTP time and publish a MQTT message.

MH5

An opto-coupler was used in place of an LED to solve the voltage difference between the light and ESP8266. The voltage supplied to the LED is 4.5V and the chip runs on 3v, voltage at the output pin to the base of the switching transistor is only 1.8v.

P1100550

A simple LDO is used to convert the 4.5v to 3.3v and the rest is hooked up based on this schematic. The pin CH_PD is pulled high when the PIR is triggered, booting the ESP8266. One abnormal behaviour with this light is that it will stay triggered if the ESP8266 radio is on,  the solution is to put it into deep sleep with the radio off after the message is sent.

schematic

 

Software and actual usage. 

13 Comments

  1. Hello there!

    I can´t solve the problem, that the Molgan stays trigered.
    I´m using ESP8266 with the Arduino IDE. I think the Problem is, it isn´t going into deep sleep:

    system_deep_sleep_set_option(1);
    system_deep_sleep(0);

    Could you help me ?

  2. Hi. I saw datasheet on BISS0001 but cannot understand how the arming of the PIR with the use of a photodiode works. In the exemplary circuit which i saw a photoresistor is used instead of photodiode. I need the PIR to arm only when there is almost no light in the room, i.e. change the sensitivity of the photodiode-based circuit. I suppose that I need to change one of the resistors but I have no idea which one. Could you please help?

  3. I’m trying to power my esp8266 with the LM2596 (set to 3.3v), and it’s working great… Now i’d like to connect a PIR Sensor. Using the 3.3v power line.

    Now, this kind of connection seems not to be working.. I mean the esp8266 responds correctly, but the PIR sensor doesn’t. Why? low power?

Leave a Reply

Your email address will not be published. Required fields are marked *