Ghosty, a Smart Nightlight
by MikeTheMaker in Circuits > Arduino
1567 Views, 13 Favorites, 0 Comments
Ghosty, a Smart Nightlight
![ghost - 3.jpg](/proxy/?url=https://content.instructables.com/FW5/2C4O/IU4M04YS/FW52C4OIU4M04YS.jpg&filename=ghost - 3.jpg)
To sleep, it's nice for a room to be really dark--no glowing leds and nightlights, but a little light would be useful for nocturnal bathroom breaks. Ghosty supplies some light only when you need it.
Ghosty will detect day and night using a photocell inside the 3d printed structure. An ultrasonic transducer is always watching for someone to pass by. If it's dark and you pass by, the ghost will illuminate. Ghosty will stay illuminated until 10 seconds after your next appearance (he wants you to make it back to bed), then he shuts off so you can sleep.
My wife, Annelle, molded the ghost using polymer clay. I scanned it and created necessary holes using a MakerBot scanner and TinkerCad.
Parts and Schematic
![schematic30092016.jpg](/proxy/?url=https://content.instructables.com/FLZ/7DYV/IU4M058R/FLZ7DYVIU4M058R.jpg&filename=schematic30092016.jpg)
These parts will need to be arranged as shown in the schematic diagram.
1 × Arduino Uno
1 × 9 volt dc power supply for Arduino
1 × White led
1 × Photoresistor https://www.amazon.com/goeasybuy-Sensitive-Resist...
1 × Parallax Ping Ultrasonic Range Sensor
1 × 100 ohm resistor
1 × 30 K ohm resistor
1 × Velcro Brand White Tak Putty (or any other stick and release putty https://www.amazon.com/goeasybuy-Sensitive-Resist...
![ghost on scanner - 1.jpg](/proxy/?url=https://content.instructables.com/FZL/IAC6/IU4M058D/FZLIAC6IU4M058D.jpg&filename=ghost on scanner - 1.jpg)
This is the clay version of Ghosty and these 3d printable files are the outcome of Ghosty's scan.
![ghost assembly - 1.jpg](/proxy/?url=https://content.instructables.com/FQA/1BPN/IU4M0518/FQA1BPNIU4M0518.jpg&filename=ghost assembly - 1.jpg)
![ghost assembly - 2.jpg](/proxy/?url=https://content.instructables.com/F3B/JID1/IU4M053R/F3BJID1IU4M053R.jpg&filename=ghost assembly - 2.jpg)
I wired these according to the schematic--using shrink wrap tubing to keep all conductive surfaces hidden.
![ghost assembly - 3.jpg](/proxy/?url=https://content.instructables.com/F8M/V6NV/IU4M053T/F8MV6NVIU4M053T.jpg&filename=ghost assembly - 3.jpg)
![ghost assembly - 4.jpg](/proxy/?url=https://content.instructables.com/F04/M8AT/IU4M053U/F04M8ATIU4M053U.jpg&filename=ghost assembly - 4.jpg)
![ghost assembly - 5.jpg](/proxy/?url=https://content.instructables.com/FM6/EVRA/IU4M0541/FM6EVRAIU4M0541.jpg&filename=ghost assembly - 5.jpg)
I place the Ping transducer in the head (friction fit) and duct taped the photocell and led assemblies inside the head.
![ghost assembly - 6.jpg](/proxy/?url=https://content.instructables.com/FGU/GG5W/IU4M0542/FGUGG5WIU4M0542.jpg&filename=ghost assembly - 6.jpg)
![ghost assembly - 7.jpg](/proxy/?url=https://content.instructables.com/F9W/40RS/IU4M0547/F9W40RSIU4M0547.jpg&filename=ghost assembly - 7.jpg)
The wires from the head were connected to the Arduino.
![ghost assembly - 8.jpg](/proxy/?url=https://content.instructables.com/F5E/RTDP/IU4M054B/F5ERTDPIU4M054B.jpg&filename=ghost assembly - 8.jpg)
The 9 volt power supply cord was routed through the hole in the back.
![ghost assembly - 9.jpg](/proxy/?url=https://content.instructables.com/F4Y/6GXT/IU4M055T/F4Y6GXTIU4M055T.jpg&filename=ghost assembly - 9.jpg)
The 9 volt supply is connected to the Arduino.
![ghost program - 1.jpg](/proxy/?url=https://content.instructables.com/FYI/48XJ/IU4M058E/FYI48XJIU4M058E.jpg&filename=ghost program - 1.jpg)
![ghost program - 2.jpg](/proxy/?url=https://content.instructables.com/FIA/QIMM/IU4M058G/FIAQIMMIU4M058G.jpg&filename=ghost program - 2.jpg)
The sketch included operates Ghosty. The bottom plug (and the head) can be attached using the putty listed in the supplies. The head could be glued on for a more permanent solution.
Downloads
![ghost assembly - 10.jpg](/proxy/?url=https://content.instructables.com/FYN/YQWF/IU4M058B/FYNYQWFIU4M058B.jpg&filename=ghost assembly - 10.jpg)
Of course the software could be modified so that Ghosty stays on only when someone is standing in front of his eyes. A smoke detector type buzzer could be attached to the led light pin also--it just depends on what you want Ghosty to do.