Motion Sensor numitron clock

More
8 months 2 days ago #11113 by Xntrix
I have both PIR and microwave motion sensors. Both work, as I made a little LED test circuit.
If I power on with the sensor connected, nothing happens, and the blue light on the wemos module stays blue. Current consumption is about 120ma.
If I remove power, wait a few seconds and reconnect, the clock boots up as normal. but the motion sensor appears to do nothing.
The app either reports motion sensor "not installed" or "motion detected 0s ago". Firmware is V5.0. I have the link shorted for 5V, and voltage out to the sensor is 4.9V.

Thanks, David

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

More
8 months 2 days ago - 8 months 2 days ago #11114 by Ty_Eeberfest
Hmm. I just now connected a motion sensor (microwave) to my DA-2000 clock and I'm seeing the same behavior you are. Never tried the motion sensor until today.

Like you, my motion sensor tests good with LEDs. Its output is sourcing 3.3VDC when there is motion and sinking current (grounded) when no motion.

I decided to take the sensor out of the equation and use jumpers to give the clock a fake motion input I can control. I tried with the Use PIR Pullup config item both off and on, which didn't have any effect (except that when pullup is on the PIR pin on the clock board is always high - unless actively pulled low with my jumper). Expected operation is that the clock is lit when the PIR pin is floating and blanks after a timeout when the PIR pin is pulled low (grounded). My clock was doing this just fine using a jumper to pull PIR low and then let it float. Worked great .BUT... the Wemos blue LED goes solid whenever PIR is low. Not correct!

Then I finally tried powering the clock down then powering back up with the PIR pin pulled low as would happen normally when a motion sensor is hooked up. What I got was basically what you described: clock start-up sometimes doesn't start at all and sometimes progresses to the first tube's LED coming on then freezes there.

So. Powering up with the sensor connected = fail. Connecting sensor after the clock is up & running = works but solid blue LED on Wemos which is not right.

I will try to look into this further. At the moment I can't even make up my mind if this is a software or hardware issue but I'll figure it out...

Look into it later when the dust is clearing off the crater.
Last edit: 8 months 2 days ago by Ty_Eeberfest.

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

More
8 months 2 days ago #11115 by Ty_Eeberfest
Half an hour later... I think I know what's wrong and it's not good news.

The PIR pin on the clock board is connected to D4 pin of the Wemos. On the Wemos, D4 is connected to ESP's GPIO-2. The trouble is that GPIO-2 is special as follows:

GPIO-2 is connected to the blue LED on the Wemos. That is why, when we pull PIR low, the blue LED lights solid.
docs.wemos.cc/en/latest/d1/d1_mini.html

GPIO-2 is one of the GPIOs involved in setting the ESP's boot mode at power up. For normal boot it needs to be held high at the moment of power up. Wemos deals with this requirement with an onboard 12K pull-up, But the motion sensor pulls low at power up meaning GPIO-2 is low, so the ESP does not boot the way it's supposed to for normal operation.
www.forward.com.au/pfod/ESP8266/GPIOpins/index.html

Ian, am I missing something or did I just discover an oversight??

Look into it later when the dust is clearing off the crater.

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

More
8 months 2 days ago #11116 by Ty_Eeberfest
Something else I'm finding as I dig into this: the microwave module gets a really bad attitude if its supply voltage drops below about 4.75V. Because of a low quality USB cable my sensor was only getting about 4.5V. It was getting stuck in the motion detected state. Getting the power up to 4.8V solved that. So you might want to measure VIN at the sensor. Not sure how/if this may apply to PIR sensors. Also not sure yet how this may affect the no-boot problem.

Look into it later when the dust is clearing off the crater.

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

More
8 months 1 day ago - 8 months 1 day ago #11117 by Ty_Eeberfest
One last tidbit of info and then I'll stop with the post flood...

It turns out that the microwave motion sensor is highly sensitive to +5V power fluctuations.

My sensor was detecting motion every minute when the clock transitioned into (and out of) date display. I finally figured out that when the tubes briefly go off during the transitions the voltage at the detector jumps from 4.8V to 5.0V and then right back down. This very repeatably causes the sensor to falsely detect motion. I have confirmed this by putting the sensor on a totally separate power supply (ground tied to clock ground), which makes the sensor work as expected - no more false detections.

The Numitrons draw substantial current from the USB supply: 600 - 700mA on my clock. I'm guessing that is why the voltage drops down to 4.8ish when showing the time and pops up to full 5V when tubes are off.

Not sure what a proper solution for this might be.....

Look into it later when the dust is clearing off the crater.
Last edit: 8 months 1 day ago by Ty_Eeberfest. Reason: minor typos

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

More
8 months 1 day ago #11118 by Xntrix
Replied by Xntrix on topic Motion Sensor numitron clock
Thanks for all the info, I hope t can be fixed eventually. |I was just sort glad it wasn't just me being stupid (again!).
I hadn't noticed the "false" triggering, as I have been powering it off a lab power supply for testing. On the first clock, I eventually thought I must be doing something daft, and gave up on the idea of motion sensing.

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

Time to create page: 0.179 seconds

Search

Tube Suppliers

Go to top
JSN Boot template designed by JoomlaShine.com