Go to file
2024-12-07 07:33:44 +01:00
.vscode first commit 2024-11-19 08:15:31 +01:00
hardware first commit 2024-11-19 08:15:31 +01:00
include first commit 2024-11-19 08:15:31 +01:00
lib first commit 2024-11-19 08:15:31 +01:00
src Fix up segmentation fault 2024-11-26 20:27:05 +01:00
test first commit 2024-11-19 08:15:31 +01:00
.gitignore first commit 2024-11-19 08:15:31 +01:00
platformio.ini first commit 2024-11-19 08:15:31 +01:00
Readme.md Add readme 2024-12-07 07:33:44 +01:00

SmartCube

SmartCube is a compact and customizable project using the ESP8266 D1 Mini. It features a rechargeable power supply, three input buttons, an SSD1306 OLED display for user interface, and a piezo buzzer for sound.


Features

  • Microcontroller: ESP8266 D1 Mini (WeMos)
  • Display: SSD1306 OLED (128x64 resolution)
  • Input: Three push buttons
  • Sound: Piezo buzzer for audio feedback
  • Power: 14250 rechargeable battery with TP4056 charging module
  • Case: 3D-printable design included in /hardware directory

Bill of Materials

Component Quantity Description Notes
ESP8266 D1 Mini 1 Microcontroller module Base of the SmartCube
SSD1306 OLED Display 1 128x64 resolution, I2C interface Ensure proper wiring for SDA/SCL
14250 Rechargeable Battery 1 Lithium-ion battery For powering the cube
TP4056 Module 1 Charging and protection circuit For battery management
Push Buttons 3 Tactile push buttons Used for user input
Piezo Buzzer 1 Active buzzer Provides audio feedback
Resistors (10kΩ) 3 Pull-down resistors for buttons Ensures stable button input
Wires / Dupont Connectors Several For connections Ensure reliable wiring
Enclosure (Optional) 1 3D-printed or custom-made case For housing the components

Pin Connections

OLED Display Settings

#define SCREEN_WIDTH 128  
#define SCREEN_HEIGHT 64  
#define OLED_RESET -1  
#define FRAMERATE 8  

Connect the OLED display via I2C to the D1 Mini:

  • SDA: D2 (GPIO4)
  • SCL: D1 (GPIO5)

Buttons and Buzzer

#define PIN_BTN_L 12 // D6  
#define PIN_BTN_M 13 // D7  
#define PIN_BTN_R 15 // D8  
#define PIN_BUZZER 0 // D3  
  • Button Left (PIN_BTN_L): GPIO12
  • Button Middle (PIN_BTN_M): GPIO13
  • Button Right (PIN_BTN_R): GPIO15
  • Piezo Buzzer (PIN_BUZZER): GPIO0

Assembly Instructions

  1. Power Supply Setup: Connect the 14250 battery to the TP4056 module for safe charging and protection. Wire the output of the TP4056 to power the D1 Mini.
  2. OLED Display: Solder connections for SDA and SCL to the respective pins on the D1 Mini.
  3. Buttons: Attach each button to the specified GPIO pins with pull-down resistors to ensure reliable input.
  4. Buzzer: Connect the piezo buzzer to GPIO0. Ensure proper polarity.
  5. Enclosure (Optional): Assemble all components in a secure housing.

Usage

  • Power the device using the rechargeable battery.
  • Use the buttons for input.
  • Visual feedback is displayed on the OLED screen.
  • Audio feedback is provided through the piezo buzzer.

Notes

  • This is still a work in progress
  • Ensure all connections are secure to avoid malfunction.
  • Test the circuit thoroughly before placing it in the enclosure.
  • Handle the battery with care to prevent damage.

For questions or additional details, feel free to reach out!