๐Ÿ’ฌ Ikea Molgan Hack


  • Hardware Contributor

    So yesterday my molgan started to constantly trigger, which I think might indicate that the voltage is too low. It has dropped down to 1950mV. I will try it with new batteries later today, but the power consumption still seems to be way too high compared to yours @Yveaux.
    I have removed R17 to disable all leds and I have changed the fuses and used your sketch. Any idea what might have gone wrong?


  • Mod

    @LastSamurai can you measure the consumption of individual parts? E.g. The Molgan hardware, the arduino and the radio?


  • Hardware Contributor

    @Yveaux Ok I will try to do that. I did try other (new) batteries though and got the same values (about 2V strangely). Then it started to continuously trigger. I described the problem here.
    It's so frustrating, but something seems to be wrong with my whole network I guess....


  • Mod

    @LastSamurai how did you measure 2V? Measured with a DMM 2XAAA fresh alkaline batteries should be more in the 3V range. This makes a big difference, as at around 2V the Pir starts to behave weird, as you already experienced.


  • Hardware Contributor

    @Yveaux I used the vcc library to let the atmega328 measure the voltage and send it as a sensor value to my controller. I guess I will have to investigate that too. Measuring the batteries outside the case with a multimeter I got 1.5V for each one (without any load though).


  • Hardware Contributor

    PS I just measured with the multimeter and the measurements are strange. The board voltage is at about 2.9V (so more like expected) and reaches the atmega as well as the NRF. Overall voltage is at about 4.8V.
    The trigger pad seems to be constantly high though (~2.7V) and the node doesn't seem to show up at the gateway anymore. I guess some serial debugging is needed now. Perhaps some component has died... falsy NRF modules would perhaps explain the errors with my nodes :(

    PPS now the sensor is sending again (strange). The trigger pad is still constantly high though. I guess I will have to desolder the pcb again to have a look at the PIR pcb. Perhaps somethings wrong there...


  • Hardware Contributor

    So I took some measurements and and the molgan pcb on its own works just fine. The mysensors pcb with a stable 3.3V power source worked too. When I wanted to measure the power consumption I realized that a fuse in my multimeter was defect... so I am still waiting for a replacement. Will post an update once its here.


  • Hardware Contributor

    Sorry for the spam here but I have the fuse now and have just been measuring the pcbs.

    • Molgan PIR pcb: 17mA triggered, 7mA otherwise
    • mysensors PCB: 18mA sending, 6uA sleeping

    The second one looks fine to me but the molgan pcb draws way to much power for battery usage, right?! @Yveaux did you measure the power consumption of yours? I just realized that I did not change the resistor that controls the trigger time. I thought 30s are fine but that makes it draw more power too...

    I will also start to test with the second molgan I bought. Really want this to work ;)


  • Mod

    @LastSamurai said in ๐Ÿ’ฌ Ikea Molgan Hack:

    Sorry for the spam here but I have the fuse now and have just been measuring the pcbs.

    No worries, that's what this thread is for, right? ;-)

    The second one looks fine to me but the molgan pcb draws way to much power for battery usage, right?! @Yveaux did you measure the power consumption of yours?

    I did measure it (when I found out the power usage was less with the regulator, than without) but I can't seem to find the results anymore...
    @dynamite mentioned in this thread "The powerconsumption of the PIR when not triggered is approx. 60 uA and when triggered 160 uA.".

    I just realized that I did not change the resistor that controls the trigger time. I thought 30s are fine but that makes it draw more power too...

    Only marginally I guess, unless it triggers all the time.

    I will also start to test with the second molgan I bought. Really want this to work ;)

    Please do so, at least for comparison.


  • Hardware Contributor

    I measured with the new molgan and got nearly the same results. Perhaps my cheap multimeter isn't accurate enough though.
    I moved the mysensor pcb to the new molgan pcb and tried this out. Strange result: at first it only send the initial messages but no triggers. After some minutes the opposite happened: it started to randomly trigger (or at least send them). Then after some more time the random triggers stopped and now its working as intended.
    Perhaps it just the setup time of the PIR or the warmer air coming from a heater nearby... I will keep an eye on it the next days.


  • Hardware Contributor

    Ok I did some more testing and the error seems to be pretty random. Sometimes the PIR works as intended for some time, sometimes it just keeps triggering constantly. I am pretty sure sleeping/waking up or sending the message is somehow influencing the PIR (don't know what else it could be).
    Does anyone have an idea how to fix this (some wait() code or some cap somewhere perhaps)?


  • Hardware Contributor

    i've not looked at the molgan..but for fixing this:

    • if capa to place, that would be directly to the PIR sensor VCC pin (100uf), ideally close to it.
    • or by software : ignoring false triggers, or disable the irq when it's not needed, or slow down a little bit clock during these false trigger.

  • Mod

    Agreed on the capacitor on the vcc, I had some random triggers on a pir sensor and they were gone when I added a cap to the 5v pin


  • Hardware Contributor

    @scalz and @gohan thank you very much! I added a 47uF electrolytic cap which helped a little. Afterwards I also added another 22nF ceramic cap. After that it seems to working just fine (for about 2 days now).
    @Yveaux perhaps you could create a new version including some caps to fix this problem for anyone? I am still glad to finally be able to use this good looking cheap sensor. Thanks again for your work


  • Mod

    @LastSamurai Great to hear it runs stable so far!
    As I understood the capacitor is placed on the Molgan PCB, and that's a PCB I cannot redesign...
    Where execactly did you plave the capacitor? Could you post a picture, so I can add it as a hint to the build guide.


  • Hardware Contributor

    As the Molgan PCB works fine without the addon PCB it has to be its "fault" so I guess it makes sense to add them there. I placed the caps between GND and VCC of your pcb (which is linked to the molgan pcb). I also noticed that your pcb doesn't have any caps at the radio (right?). Normally you would add a 47uF caps there. Might that be part of the problem?

    Here is a quick picture. I can take a better one later.
    0_1488219882399_caps.jpg


  • Mod

    @LastSamurai said in ๐Ÿ’ฌ Ikea Molgan Hack:

    As the Molgan PCB works fine without the addon PCB it has to be its "fault" so I guess it makes sense to add them there. I placed the caps between GND and VCC of your pcb (which is linked to the molgan pcb).

    Well, not too sure about that. In your case the PIR seems to suffer from disturbances introduced by the addon board (quick conclusion), so I would try to buffer there.
    The PIR seems already buffered at two places (red & green caps):

    0_1488220742916_upload-2933de08-8c55-4dd1-bf49-5cc25c454a00

    Adding an extra cap in parallel to the existing one(s) on the PIR-side of the PCB could be a simple solution.
    I have to dive into the Molgan's PCB layout to see if that's possible.

    I also noticed that your pcb doesn't have any caps at the radio (right?). Normally you would add a 47uF caps there. Might that be part of the problem?

    The radio has 100nF for decoupling on its own PCB.
    I never mount a 47uF buffering cap (or some similar value) for battery powered sensors.


  • Hardware Contributor

    I still have the second molgan on my desk waiting to be finished. I will experiment with that one adding caps in parallel to the once you marked and/or adding one directly across the +/- pads.


  • Hardware Contributor

    So I finally came around to testing with the second molgan. I put a small 22nF cap in parallel to the (in your picture) red cap on the board just on the backside of it. I also added a bigger 47uF electorlytic cap to the green one.
    I have only had it running for about a day now and it helped at least partly. It doesn't seem to get into constantly triggering anymore (although this only happened after longer periods of time with the other one) but I still get multiple triggers every time. If I shortly move inside the range I get 2-3 triggers (30s pause). So I guess the problem isn't fixed yet. I will wait some time to see how this works out and then try to add a cap between the + and - pads of the pcb.

    Any other ideas? (Btw I find it strange that its working for you without any problems while I have the same problem with bost molgans)


  • Mod

    @LastSamurai said in ๐Ÿ’ฌ Ikea Molgan Hack:

    I find it strange that its working for you without any problems while I have the same problem with bost molgans

    I'm sorry that you're experiencing problems, but mine are running rock solid for months. Maybe there's variation in the Molgans produced by Ikea?
    What PIR's do yours have? Mine are marked "PIR D203B" on top.

    I do have some issues with an outdoor D-SUN HC-SR501 based sensor.
    This node starts to produce random bursts of triggers every now and then, which I tried to fix by replacing every part of the sensor.
    After help from @scalz I found out the 47uF capacitor C102 (see schematics below, supposedly the schematic of the HC-SR501 from http://www.electrodragon.com/w/PIR_sensor) was only 100nF.

    0_1488822219762_upload-1f2da113-c2b0-41cd-b1cc-8684ca52d6af

    I replaced C102 with 100uF and added an extra cap to GND (connected to R1), to stabalize the power to the PIR.
    First results show it runs stable, but time will have to tell if it keeps running that way.

    Maybe the Molgan also contains some cost reductions (like replacing C102 by 100nF).
    To know for sure the schematic of the Molgan has to be known first... Any volunteers?



Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.