Rotating Pill Lamp

by sophiaehaase in Circuits > Arduino

467 Views, 4 Favorites, 0 Comments

Rotating Pill Lamp

IMG_8712.jpg

This project is a large pill-shaped lamp that reminds users to take their medicine. When the pill lamp is rotated 180 degrees the lamp turns off and then when rotated again it will turn back on. This links the action of turning off the lamp before going to sleep with taking one’s pills before bed. This lamp is a great way to remember to take your medicine while also adding a unique light to any room!

Supplies

3D Modeling

IMG_8253.jpg
IMG_8264.jpg
75425931739__0EA90016-CC6A-4611-B7E4-CABAE3BD7F24.jpg
IMG_8340.jpg
IMG_8339.jpg

Use your preferred 3D modeling software such as Fusion360 or Rhino to model one-half of your pill shape. This pill half is 6 inches tall with a 4.75-inch diameter. It is hollowed out using the modeling software and is .25 inches thick. It also has a .25-inch hole on one side for the cable to come out of when it is all put together. This lamp includes a base for the pill to sit on and a lid to enclose the wires and Arduino board inside. After you are done modeling or downloading the models attached below, print them using the purchased filament of any color on a 3D printer.

Paper Mache

paper mache
IMG_8380.jpg
75494292412__E272C486-A4B6-48FF-A353-470074A9654B.jpg

After your 3D model is complete, cover the inside of the dome shape with masking tape to prepare for the paper mache. Then coat it in a thin layer of petroleum jelly that will act as a mold release when taking out your paper mache. Cut your tracing paper into 1-inch by 8-inch strips. You should have enough to cover the inside of the 3D print 3 times but cut as much as you would like. 

Next, Mix together your glue and water in a 1:1 ratio. Dip each strip into the glue mixture and use your fingers to squeeze off the excess. Lay the strips inside the 3D model vertically going up from the center all the way around the model. There should be at least 3 layers of paper. Let it dry for at least 24 hours before removing from the mold. If desired, you can spray with the Modge Podge spray to seal it and make it stronger.

Circuit Diagram and Code

IMG_8729.jpg

Using the Arduino program, code your circuit with the tilt ball switch to allow the light to turn on and then off when rotated. Attached is the code that I used along with the circuit diagram which you will need for the next step.

Downloads

Circuit Construction

IMG_8671.jpg
IMG_8668.JPG
IMG_8691.jpg

Now, solder your 2 LED neopixel strips, Arduino Nano ESP32 board, and tilt ball switch onto the solder-able breadboard using the aforementioned circuit diagram. Allow enough wire for the board to sit in the bottom half of the pill while the lights are suspended in the top half. 

After everything is soldered and you have tested that it is working with your code, hot glue the breadboard to the bottom of the 3D-modeled pill. You should also hot glue the tilt switch sensor to the side of the model facing up and the neopixel strips back to back in the center of the upper half. Cut your power cable a few inches from the USB C end in order to feed it into the small hole in the 3D model and then re-solder it back together using solder and heat shrink tubing. Use a heat gun to shrink the tubing to keep the wires from touching then plug the cable back into the Arduino board now sitting in the pill.

Assemble and Enjoy!

IMG_8723
IMG_8708.jpg
IMG_8714.jpg

Take your paper mache top half and glue it into the 3D-modeled bottom half with the wiring inside. Now rotate your pill 180 degrees to turn on and off and you are good to go! I chose to go with a bright pink for my pill lamp but feel free to pick any color you choose. The beauty of this lamp is that it is customizable and can be changed at any time by editing the code. This lamp creation is still an ongoing process so I would love any feedback for those reading. My goal is to add strong magnets in the top and bottom of the pill and the base as it is a little top-heavy on the stand, but please let me know if you have any suggestions or anything else you would add! Thank you!