I am creating an Arduino Uno controlled controller for an animated Halloween decoration. I plan to have a PIR sensor trigger the Arduino to turn on two relays and use an attached MP3 board to play a sound. One of the two relays controls a 12vdc output to a couple of LEDs. The other relay controls a standard 110vac outlet which will have a motor plugged into it.
My goal is to have one standard PC power cable provide 110vac power to my project and then have that voltage converted to the various voltages I need for the other components. The 110vac coming into my project enclosure is run to the standard outlet and fed into a LED Driver which converts it to 12vdc. The 12vdc powers the Arduino and is fed into a DC buck converter to step it down to 5vdc. The 5vdc powers my PIR sensor, the MP3 player board, and a USB jack I'm using to supply power to an external speaker.
The PIR sensor is connected to the controller by a standard Ethernet cable. Three of the wires in the Ethernet cable provide ground, 5vdc, and input to the PIR sensor.
The first problem I'm running into is that my PIR sensor doesn't work when it's powered by the 5vdc coming out of my buck converter. It DOES work if it is powered by the Arduino's 5V pin. For testing purposes I'm running a sketch that does nothing but put the analog value received on the PIR input pin out to serial. At this point the relays and audio board are not connected to the Arduino at all. When the PIR is powered by the 5V pin on the Arduino it works as expected: it normally shows a value of 0 and shows values of ~620 when something moves in front of the sensor. When the PIR sensor is powered by the buck converter output, the PIR values oscillate from 0 to 1023 and back every 5 seconds or so and there is no apparent reaction to motion in front of the sensor.
I have used my multimeter to check the voltages coming out of the LED driver (steady 12vdc) and out of the buck converter (steady 5vdc). I have checked the voltage at both ends of my PIR Ethernet connection (steady 5vdc) and on the input pin from the PIR sensor (0 when not triggered, ~3.2vdc when triggered). The voltage on the PIR's input pin looks correct regardless of how the sensor is being powered, but as I said, if the power is coming from the buck converter instead of the Arduino then the analog values being read by the Arduino are oscillating nonsense.
This is my largest Arduino project to date. I'm a software guy by trade so I'm much more comfortable with the code than the physical pieces. I suspect that I am running into some sort of interference due to my combination of AC & DC voltages, but I'm not sure how to go about troubleshooting further or fixing it. Any advice would be appreciated.
Thanks,
Mike