Instructables
Picture of Motion sensing Lego figure nightlight

Since becoming a dad about a year ago, I find myself strangely drawn to things like Lego, Scalextric and remote control toys "for my son". I also feel that ratherjust than buying toys I want to make personal one-off stuff for him and introduce him into the ways of being a maker himself.

I saw this large Lego figure torch (about 9 inches tall) and felt that it had to be hacked to have a geekier use. So with the addition of a programmable PIR sensor and a few simple components, a motion sensing nightlight was born. Now rather than an on/off switch it will sense if my son wakes up in the middle of the night and gently fade up some LED lighting. Once there's been no movement for 30 seconds then it will fade down again. His room can be completely dark at night and I feel that if he wakes up it's nice that he can see where he is.

I decided this would be a perfect entry to the Hack It contest because it's a double-hack. Not only has the toy been hacked to take a PIR sensor, but the PIR sensor has also been hacked and reprogrammed to do more than it was intended to - it fades the external LEDs up and down gradually using pulse width modulation. If you feel this meets the spirit of the contest then a vote would be nice. However, check out the other entries and vote for one of them too if you think they're good too.

Here's a video of the finished product. You can see it sensing movement and fading up the light. Then I switch it off using his arm as a hidden switch.

 
Remove these adsRemove these ads by Signing Up
I saw this and thought as a "green" night light to buy a solar garden stake thing, and mounting the solar panel and light sensor to the back of a Darth Vader light. The black of the solar panel will mostly blend in with Darth's suit, and for use, just put him in the window, let him charge and come bed time, it is ready to go lol
mikeasaurus2 years ago
I like the modification, that LEGO minifig looks great!
fred27 (author)  mikeasaurus2 years ago
Thanks. I tried to make the modification subtle so it looks like it was always meant to be that way. Ninja hack!
LEGO?! Ninja?! :)

Nicely done, I usually don't condone cutting into LEGO pieces but this ones doesn't really count and you did it so well it seems like a natural thing. LEGO upgrade!
fred27 (author)  sherrycayheyhey2 years ago
I've only just realised that matches you avatar. I suppose "stealth hack" might be more appropriate but I suppose was thinking of the Ninjago version of the figure...
steve0002 years ago
Love it!

Could you please post a schematic and a link to the launchpad as I could only find the PIR.

Thanks heaps

Steve
fred27 (author)  steve0002 years ago
I've added a link to TI's eStore for the Launchpad. I'll get the schematic up very soon.
steve000 fred272 years ago
Perfect mate, thanks heaps
wobbler2 years ago
Nice! I can see this being a good mod for a Dalek too, but adding an LED to its 'eye'.
fred27 (author)  wobbler2 years ago
I haven't seen a Lego Dalek, but there is a Darth Vader. I'm sure the PIR's red LED could find its way to his light saber! Maybe I should give that a go next...
filtercages2 years ago
www.43oh.com, not www.430h.com
Can't read the code.
fred27 (author)  filtercages2 years ago
40oh link fixed. Sorry about the typo.

Click on the attached C file and you should be able to download the source code - it's just a text file.
pudtiny2 years ago
Great work, good use of the I'm a dad now so I can by toys line.