Overview
Press the button on this pill case holder, and a light turns on under the correct day of the week. The light shows what day it is, which helps people who might be unsure, such as retired people who aren't working Monday to Friday or people with mild congitive impairment. A standard-size pill case fits on top, which can be replaced each week.
[Photo of completed project]
Other parts
- One or more pill cases, 5 ⅞ inches wide, such as this one or this one, available at most drug stores
- CR1220 coin cell battery
- STEMMA cable, QT to QT, 50 mm long
- USB C to A cable or USB C to C cable for data and charging
- M2.5 bolts and nuts
- wire, preferably black, white, and red
- solder
- masking tape
- glue
- (optional) bumper feet
The following connections are soldered:
- Feather GND to NeoPixel GND.
- NeoPixel GND to button G (black wire).
- Feather TX (GP00) to button S (white wire).
- Feather 6 (GP08) to NeoPixel Din.
- Feather Bat to NeoPixel 5V.
The Feather and clock are connected by a STEMMA QT cable. The Feather and battery are connected by the battery's cable.
The wire between the NeoPixel strip and button is a way to ground the button, since the Feather has only one GND pin. Alternatively, use a three-way wire splice or the GND pin on the real time clock.
Connect the electronics
Wires
Cut three pieces of wire about 6 inches long, preferably one black, one white, and one red piece. Strip ¼ inch from each end.
Button
Attach the JST-PH cable that comes with the button and has black, white, and red wires. Cut the black wire about 4 inches long. Cut the white wire about 5 inches long. Cut the red wire about a half inch long, because it isn't used. Strip about ¼ inch from the black and white wires.
Put the loose black wire next to the black wire from the button. Twist the ends together to make a single end.
[Photo of wires and button]
NeoPixel strip
Cut a strip of 13 NeoPixels. Then cut between the NeoPixels, cutting at the ends of the copper pads, as shown in the photo. Keep seven pieces with copper pads, and set aside six pieces without copper pads.
[photo]
Lay a strip of masking tape upside down on the work table. Tape it to the work table with more masking tape. Place the seven pieces with copper pads on the masking tape with the NeoPixels spaced 21 mm apart. The pieces may overlap slightly.
Solder the copper pads together, using the technique for connecting two strips.
Solder wires to the copper pads at the start of the NeoPixel strip. The white wire goes to Din, the double black wire goes to Gnd, and the red wire goes to 5V.
Detach from the work table. Leave the masking tape on the back of the NeoPixel strip, but trim away the extra masking tape.
(Optional) With the soldering iron and solder wick, melt and remove the solder attaching the individual NeoPixels to the leftover pieces of strip. Save the individual NeoPixels for another project.
RP2040 Feather
Solder the wires by pushing them through from the chip side of the Feather and soldering them on the flat side of the Feather.
The black wire goes to Gnd. The white wire from the button goes to TX, which is labeled GP00 on the flat side of the Feather. The white wire from the NeoPixel strip goes to 6, which is labeled GP08 on the flat side of the Feather. The red wire goes to Bat.
Clock
Insert the coin cell battery into the clock. Connect the clock to the Feather with the STEMMA QT cable. Optionally, scratch across the connection to disable the LED.
LiPo battery
Connect the LiPo battery to the Feather.
Code
Connect your computer to the Feather with a USB cable.
Download CircuitPython and install it, following these instructions for the Feather.
Download the library bundle. Open the zip file and open the lib folder in the zip file. Copy the file adafruit_ds3231.mpy to the lib folder on the Feather.
Install the Mu Editor, if you don't have it.
Set the clock
Open Mu and open the Serial connection.
Type the lines below into the serial connection and press Enter after each line.
import board
import time
import adafruit_ds3231
i2c = board.STEMMA_I2C()
rtc = adafruit_ds3231.DS3231(i2c)
The next lines set the date and time. Change the example to the current date and time.
- The first three numbers are the date. The example shows 2025 September 28.
- The next three numbers are the time. The example shows 1:45 p.m. and zero seconds.
- The next number is the day of the week. 6 is Sunday, 0 is Monday, 1 is Tuesday, and so on.
- The last two numbers are defaults for the day of the year and daylight savings time.
t = time.struct_time((2025,9,28, 13,45,0, 6, -1,-1))
rtc.datetime = t
The next lines print the current time. Check that the clock is set.
t = rtc.datetime
print(t)
For more info about setting the clock see Adafruit's DS3231 RTC Library.
Test the NeoPixel strip
Open Mu, paste the following code, and save to the Feather.
import board
import time
import neopixel
# set up the neopixels
pixels = neopixel.NeoPixel(board.D6, 7,
auto_write=True, brightness=0.2)
on = (0, 0, 255) # set a color for on, such as blue
off = (0, 0, 0)
pixels.fill(off)
# light each neopixel for one second
while True:
for x in range(7):
pixels[x] = on
time.sleep(1)
pixels.fill(off)
# SPDX-FileCopyrightText: 2025 Jay Martin # # SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2025 Jay Martin # # SPDX-License-Identifier: MIT
Assemble the case
3D printing
The case has three parts, a base, a shelf, and a lid. The stl file includes all three parts, along with seven round pieces.
[stl file or a link to it]
Glue a round piece to the back of each pill box, in the center, behind the Wednesday compartment. The round piece will make the pill box fit only one way. If the round pieces are lost, glue a nickel to the pill box.
Position the electronics
Variations
A larger version might be better. Some people might need or prefer a larger pill case, which is easier to open.
The button might be better on the front. The project was made for a person who is left-handed, so the button went on the left, next to Sunday.
The row of NeoPixels could be individual NeoPixels connected with short wires, which might be easier to solder than the pieces of NeoPixel strip. To make room for individual NeoPixels, edit the stl file with any CAD program, even with easy TinkerCad. Make the case 1 mm taller. Make the shelf 4 mm narrower. Maybe add pegs on the shelf for positioning the individual NeoPixels.
Or the case could be redesigned to use a NeoPixel strip with 48 per meter, a spacing that aligns perfectly with the pill case. However, that strip has the NeoPixels in pairs. It can't be cut to a strip of seven, it has to be a strip with eight NeoPixels. Maybe the extra NeoPixel could fit under the button, if the button could be raised.
Another way to make the row of NeoPixels would be a custom PCB board, which would replace the shelf inside the case. Its top side could have the NeoPixels and button. Its bottom side could have the Feather and clock.
For an upgrade, use the Adafruit RP2040 Prop-Maker Feather, a precise clock, and a speaker, like the project Prop-Maker Feather Talking Adabot Clock. Add code to play an mp3 that says the day, "Monday," "Tuesday," and so on. Optionally, add a short reminder, like "One blue pill in the evening."
Please help with other suggestions for this project. For example, should the NeoPixel strip be protected by a piece of clear heat-shrink tubing? Comment on this project by replying in the Forum.
Inspiration
This project is a variation of Liz Clark's Prop-Maker Feather Talking Adabot Clock, except that less happens when the button is pressed.
The case is a variation of Ruiz Brothers's 3D Printed Case for Adafruit Feather.
Other relevant guides:
- Introducing Adafruit Feather RP2040
- Adafruit PCF8523 Real Time Clock
- Deep Sleep with CircuitPython
- Make It Glow: How to Solder NeoPixels, A Beginner's Guide
Many thanks to the authors of those projects and guides!
This page (Pill case light to show each day) was last updated on September 27, 2025.