Help to Automate a Halloween toy with PIR sensor - Page 1
Forum section: electronics / projects

author: esmarques
author_rank: Newbie
timestamp: October 17, 2025 02:13:19 am
content: Hello, could anyone help me on how I could make a halloween toy to be triggered when someone passes by using a PIR sensor?Its a 4.5 dc toy, a whitch, that when we push a button it starts a sequence that light up some LEDs, make some sounds and then move the arms at the end.We want to put it in our front door so when someone come close, it triggers the toy.I have purchased these pir sensors but I am stuck on what else needed and how to do it:Youmile 5PACK IR Human Sensor AM312 Mini Detector Module HC-SR312 Pyroelectric Infrared PIR Motion Automatic Detector DC 2.7 to 12V for Arduino 2 A1U2 With Dupont WireAny help is welcomed.Thank you very much

author: ledtester
author_rank: Super Contributor
timestamp: October 17, 2025 02:52:17 am
content: A straight-forward solution would be to get a "relay timer module" like:https://www.amazon.co.uk/Module-Switch-0-01s-9999min-Display-Trigger/dp/B0CTY5VJ3D/Idea is PIR sensor triggers the relay timer module which then closes the relay for a set amount of time (emulating the button press) and the relay contacts are wired to the toy's switch.How does the toy's button work -- i.e. what happens if you just quickly press the button vs. hold it down for a long time?Some more implementation details...You'll have to determine if the toy's switch is normally open or normally closed.The output of the PIR sensor would connect to the relay module's "high-level trigger".The two ends of the toy's switch would be connected to two terminals on the ight side of the relay module -- either the middle and "NO" if the switch is normally open or the middle and "NC" if the switch is normally closed.Here's a video on how to program the timer module:Home Automation: How to use 7 Program 0.1s to 9999 minutes Relay Timer XY-LJ02- RJT213https://youtu.be/s4oNCpH_I0E

author: esmarques
author_rank: Newbie
timestamp: «Reply #2 on:Todayat 11:48:36 am »
content: Hello,Thank you very much for your reply and help.Sorry for taking this long to reply back, I am new here and still trying to find where all the buttons are.The button on the toy its a push button that we need to press it just once/quick press and it sets the sequence for the toy… i will check if it’s normally open or closed.I had a look at the video and in it it says that the voltage in needs to be 6v, but the toy operates with 3 AA batteries (4.5V). Do you think the module you mentioned would still work?Sorry for my basic knowledge.Thank you very much for helping.

author: ledtester
author_rank: Super Contributor
timestamp: «Reply #3 on:Todayat 01:37:03 pm »
content: The relay module will work from a 5V USB adapter.And you can use multiple power supplies - like one for the toy and the PIR and another for the relay module -- just make sure the grounds are connected together.

author: esmarques
author_rank: Newbie
timestamp: «Reply #4 on:Todayat 03:26:18 pm »
content: Hello,Thank you for this, would it be a simpler way? So I can just use the 4.5v from the toy? Even if I need to buy/solder some components together…?Sorry, just want the simplest/cheapest way for this one.Thank you very much

author: ledtester
author_rank: Super Contributor
timestamp: «Reply #5 on:Todayat 03:36:32 pm »
content: Is the 4.5V DC toy powered by 3 1.5V batteries?Note that a fresh 1.5V battery may be more like 1.8V so 3 1.5V batteries could be more like 5 or 6 volts.The toy will very likely work when powered by 5V or even 6V so you could power everything from a 5V USB adaptor.