Multisensor PIR based on IKEA Molgan
-
@dynamite , can you may be share your code and the way you have attached your LDR to the arduino etc?
@gijss the code can be found here. But I don't know the actual status of this code as I have not used it for a while and I was busy creating a dimmer. But maybe you can copy parts out of it.
https://github.com/rspaargaren/My-sensors-IKEA/blob/master/multisensor.ino
@dynamite said:
@gijss the code can be found here. But I don't know the actual status of this code as I have not used it for a while and I was busy creating a dimmer. But maybe you can copy parts out of it.
https://github.com/rspaargaren/My-sensors-IKEA/blob/master/multisensor.ino
@dynamite Thanks for the code, I am sure it will prove to be useful. Will try to experiment this weekend. Can you also share how you connected the LDR to the arduino? I have the feeling I might be using a suboptimal wiring scheme (or wrong resistor) resulting in shorter battery life.
-
@Yveaux Did you finish the PCB for the molgan?, If so is it possible for you to share the files?
-
I would be interested too!
-
@Yveaux Did you finish the PCB for the molgan?, If so is it possible for you to share the files?
-
@Cliff-Karlsson Yes, works like a charm!
It has been on my ToDo list for quite a long time to publish the files -- please hold on a little longer ;-) -
@Yveaux Did you finish the PCB for the molgan?, If so is it possible for you to share the files?
@Cliff-Karlsson @LastSamurai @dynamite I just published the PCB on [OpenHardware.io].(https://www.openhardware.io/view/274/Ikea-Molgan-Hack)
A sketch will follow soon.Enjoy!
-
@dynamite said:
@gijss the code can be found here. But I don't know the actual status of this code as I have not used it for a while and I was busy creating a dimmer. But maybe you can copy parts out of it.
https://github.com/rspaargaren/My-sensors-IKEA/blob/master/multisensor.ino
@dynamite Thanks for the code, I am sure it will prove to be useful. Will try to experiment this weekend. Can you also share how you connected the LDR to the arduino? I have the feeling I might be using a suboptimal wiring scheme (or wrong resistor) resulting in shorter battery life.
It has been a while (mainly because the PIR was out of order for other reasons) but now I am restarting the project and again it happened that the PIR no longer responded. So I took a look at your code, but it seems your are using a BH1750 light sensor, is that correct? And are you using that in fact at the moment, or did you switch to LDR and is this perhaps not the latest version of the code?
Thanks!
Gijss
-
It has been a while (mainly because the PIR was out of order for other reasons) but now I am restarting the project and again it happened that the PIR no longer responded. So I took a look at your code, but it seems your are using a BH1750 light sensor, is that correct? And are you using that in fact at the moment, or did you switch to LDR and is this perhaps not the latest version of the code?
Thanks!
Gijss
-
Hi to all,
I've realized my hacked version of the Ikea Molgan but the PIR sensor stays always HIGH.
Everything works apart of this... Do you have any idea howto investigate?could I have broken it?
@ricmail85 hi iT has been a while ago but as far as I recollect I had the same problem with one of my sensors ...
In normal situation the sensors gives a high signal for approx 30 sec.
In the bricked PIR I have replace the pir board by a cheap and modified pir from Ali.
-
Hi to all,
I've realized my hacked version of the Ikea Molgan but the PIR sensor stays always HIGH.
Everything works apart of this... Do you have any idea howto investigate?could I have broken it?
-
@ricmail85 I also have one Molgan that I just can't get to work correctly. Put it aside, thinking it was an incident, but if more people have issues, this might be a structural thing...
@Yveaux said in Multisensor PIR based on IKEA Molgan:
@ricmail85 I also have one Molgan that I just can't get to work correctly. Put it aside, thinking it was an incident, but if more people have issues, this might be a structural thing...
I'll give it a try. I have to check that the wires I soldered on the back of the breadboard are just fine...
I'll let you know.bye!
-
@Yveaux said in Multisensor PIR based on IKEA Molgan:
@ricmail85 I also have one Molgan that I just can't get to work correctly. Put it aside, thinking it was an incident, but if more people have issues, this might be a structural thing...
I'll give it a try. I have to check that the wires I soldered on the back of the breadboard are just fine...
I'll let you know.bye!
-
@ricmail85 @Yveaux basically mine was shortcut by testing Some connection which I should not have Done....🙄
@dynamite @Yveaux Ok I've done some testing. Here my results.
I checked the wire connections between the Arduino and the PIR and they were ok. Actually when powering everything with batteries I always get HIGH from PIR.
Then I tried to leave only the PIR without the Arduino and its radio (disconnected the GND wire) and the PIR (alone) was working! I checked with multimeter it oscillates between 0V and 3V if a movement was detected.
So I concluded that the failure was due to the Arduino. If arduino+radio are powered (by the same battery source) i get always HIGH.
Looking at this post https://forum.mysensors.org/topic/5273/ikea-molgan-hack/36 I found similar problems due to ripples. I added a capacitor (100uF) in parallel to the PIR capacitor and a 10uF capacitor between the + and - of the battery pack.
By doing so I still cannot move from HIGH signal from PIR when everything was connected. So I've done more debugging and I found that everything works like a charm if I put a sleep (1000 ms) after sending a message (in my sketch I send 4 different message types when the Molgan wake up).
Maybe there is still some disturb arising from the radio (sending a message require some power at least)? Now my project is working, actually with the sleep(1000) trick after each send.
I don't know if the capacitors were effectively needed at this point...
Hope this can help!
bye! -
I am the one from your post and the capacitors only helped a little. One of my molgans simply doesn't seem to work.
But you are right sending takes a lot of energy (vs doing nothing) so a bigger capacitor and/or pauses in between definitely should help! -
@LastSamurai
Some more debugging and I see the problems arise when I do analogread, so does not seem related to the radio itself.If I send a message about a dht sensor (digitalread) it is ok. If I send a message of battery/light measure (analogread), the pir gets high...
-
@LastSamurai
Some more debugging and I see the problems arise when I do analogread, so does not seem related to the radio itself.If I send a message about a dht sensor (digitalread) it is ok. If I send a message of battery/light measure (analogread), the pir gets high...
-
@ricmail85 does the behavior change when you swap the order of the messages sent? Eg first send the battery value.
-
@Yveaux yes, it seems to work better by sending before the messages performing analogread and then the one using digitalread...