Mysensors S_MOTION shows up as S_LEAK

9 years 10 months ago #331 by freol
Hi,

Just tried to connect a motion detector using the mysensor library and the example sketch for motion detection on mysensors.org. The child is declared as S_MOTION but shows up as S_LEAK in Easyiot once the node has been added.

But the communication seems to work as I get "OK" or "Leak" on the node on the frontpage when waving my hand in front of the motion detector :P

Please Log in or Create an account to join the conversation.

9 years 10 months ago #334 by EasyIoT

freol wrote: Hi,

Just tried to connect a motion detector using the mysensor library and the example sketch for motion detection on mysensors.org. The child is declared as S_MOTION but shows up as S_LEAK in Easyiot once the node has been added.

But the communication seems to work as I get "OK" or "Leak" on the node on the frontpage when waving my hand in front of the motion detector :P


This is correct. If you see MySensors sketch they are using the same datatypes (S_MOTION and V_TRIPPED) for rain(leak) and motion detector. So this is not bug it's working correctly.
But right now motion detector is not implemented, so you can not change sensor type to motion detector. Right now you can use LEAK, GENERIC or DIGITAL_INPUT. I will implement motion detector in next release - beta will be out soon. When will be implemented just change sensor type in WEB UI.
Just curious : is your motion detector battery powered? I plan to implement one, but I want to be battery powered if it's possible. I know that I will need to do some hacks.

Please Log in or Create an account to join the conversation.

9 years 10 months ago #335 by freol
Ahh, good to know :) Thanks for the quick answer!

I havent got around to it yet but the plan is to make it batterypowered. The sleep function implemented in mysensors library allows for waking on interrupts only which has been my plan to use. No tested it yet though.

So as long as i manage to tune the sensitivity and trigger time not reacting at too small movements/too quickly I figure it should be possible toput it to sleep quite a lot of the time and manage on batteries. The main concern is the current draw of the motion sensor in standby.

Please Log in or Create an account to join the conversation.

9 years 10 months ago #337 by EasyIoT

freol wrote: So as long as i manage to tune the sensitivity and trigger time not reacting at too small movements/too quickly I figure it should be possible toput it to sleep quite a lot of the time and manage on batteries. The main concern is the current draw of the motion sensor in standby.


See my door/window sensor under build section. It is optimized for low power. This could be the base for motion sensor. My concern is also current draw of motion sensor in standby. I know there is hack to remove power regulator, but I didn't tested it yet.

Please Log in or Create an account to join the conversation.

9 years 10 months ago #339 by freol
Ok, so just made some quick measurements of the current draw of one of these PIR motion sensors. Its actually not bad. In standby it hovers somewhere around 50-60 microamps depending on incoming light it seems. When it detects changes the consumption rises to 200-300 microamps. So even without removing the power regulator, i think its pretty ok.

I also tried running it directly from 3.3v but even if it seemed to kind of work it was much less sensitive and i got the feeling that the trigger time changed. If removing the voltage regulator I guess it needs to be powered from 3.3v?

Nice sketch for the door/window sensing! But I dont think you need to call powerUp and powerDown manually. All that is taken care of in the mysensors sleep command. According to mysensors.org that should put both radio and arduino in powerdown mode which i think is correct . At least it mathes the current measurements I have done.

Please Log in or Create an account to join the conversation.

Time to create page: 0.219 seconds

Forum latest

  • No posts to display.