So today I tried tackling this side project I’ve been noodling around with—calling it “Project Plus Ex.” Figured it’d be a slick lil’ upgrade to my home setup. Here’s how it all went down, warts and all.

Starting Simple (Or So I Thought)
First, I grabbed this old Raspberry Pi collecting dust. Thought, “Hey, let’s make it control my smart lights automatically.” Plugged it in, hooked up wires from the GPIO pins to a relay module. Looked straightforward—Pi turns on, relay clicks, lights go brrr. But nah.
The “Why Won’t You Work?!” Phase
Tried writing a quick Python script. Opened the editor, typed some basic code:
- Imported GPIOzero
- Set pin 4 as output
- Made it turn the pin on/off every 5 seconds
Ran it. Nothing. Relay didn’t click. Checked wiring—fine. Replaced jumper wires—still dead. Realized I forgot to enable the GPIO interface in raspi-config. facepalm Fixed that. Now the relay clicked! But the lights? Nope. Turns out I mixed up NO and COM terminals on the relay. Swapped those—lights finally flickered on. Minor victory dance ensued.
Adding Features = Adding Headaches
Now for the “Plus” part. Wanted motion detection. Dug out a PIR sensor. Wired VCC to 5V, GND to ground, OUT to pin 17. Wrote more code:
- Added PIR sensor object
- Set it to trigger lights when motion’s detected
- Added a 30-second timeout
Tested. Lights came on with motion… but never turned off. Uh oh. Realized I coded the timeout loop inside the motion check. Rookie mistake. Moved the timer logic outside—fixed. Now the lights shut off after 30 seconds. Sweet.

Epic Fail Moment
Feeling cocky, I tried powering everything off the Pi’s 5V pin. Bad call. Plugged in the relay and the PIR sensor. Pi rebooted. Then it froze. Touched the Pi’s chip—hotter than my coffee. Fried the USB controller. Pi’s Ethernet port went kaput. Lesson? Use external power for hungry components. Always.
Salvaging the Wreckage
Swapped in a new Pi (had a spare). Used a proper 5V wall adapter for the relay & sensor this time. Script worked flawlessly. Set it up in my hallway—lights now auto-on when I walk by & shut off after 30 seconds. Not fancy, but it works.
What I Learned
- Never trust “simple” wiring. Double-check.
- Code loops will mess you up if lazy.
- Power limits ARE real. Don’t ignore ’em.
Project “Plus Ex” is alive… minus one dead Pi. Win some, lose some.