Sleep Box by martysweet 3d model
3dmdb logo
Thingiverse
Sleep Box by martysweet

Sleep Box by martysweet

by Thingiverse
Last crawled date: 3 years, 3 months ago
sleep-box
Simple Sleep Box implementation using ESP32, inspired by https://www.dezeen.com/2019/05/03/mark-zuckerberg-sleep-box-design/
Uses an ESP32 to keep track of time and turns the LEDs on for a set time every day.
Source code is available at https://github.com/martysweet/sleep-box
Components
Adafruit Huzzah32 (ADA3405) - should also be ESP8266 compatible - adjust the PIO config and pin configuration
4x LEDs - 4 was chosen, 1 for each corner but less can be used if needed
4x Resistors - chosen for brightness, for the LEDs I used, 4.7k resistors worked well
2x Self tapping screws - 2mm thread to keep the Huzzah in place when (dis)connecting the micro-USB
A short bit of wire to connect the LED grounds
(Optional) Crypton tape - Useful for soldering the eletronics in-place with minimal damage to 3D printed parts
Software Build Instructions
Use VSCode with PlatformIO Plugin
Adjust the configuration at the top of src/main.cpp as required
Adjust the PIO settings as required
Build the project and flash the chip
See https://github.com/smurf0969/WiFiConnect/issues/5 for issues with the WiFiConnect library.
Join the ESP WiFi network with your phone at http://192.168.4.1
Click Join WiFi and enter your WLAN settings
The device should now turn on the outputs as you've programmed.
Hardware Construction
Print the STL files located in the models folder, you can optionally edit the f3d (Fusion 360) files.
Print the two parts, platform and housing in your desired material
Use the platform to align the LEDs and place crypton tape where needed at the joins
Join the neutral LEDs legs together on each side and join a wire between the two side
Solder 4x resistors to the Adafruit (A0, A1, 12, 13)
Use an resistor off-triming to join the neutral LED wiring to the GND pin on the Adafruit
Join each LED positive leg to its own resistor (wrap the resistor wire round the LED leg for ease of soldering)
Screw the Adafruit down
Place into housing so the LEDs are visable until the stop is met on both sides

Operation
Once time is synchronized with NTP over WiFi, the ESP32 will perform timekeeping using built-in timers.

Tags