1 / 6
Smart Coin Jar with Sound & RGB Lights (ESP32) — image 1
1 / 6

Smart Coin Jar with Sound & RGB Lights (ESP32)

Order a print of this model

We calculate the final price from your selected file. You review and accept it before payment.

Saved on this device.

Coin jar that lights up and plays a sound when you drop a coin in.

Rating
0 / 5
Likes
0
Downloads
1
Makes
1
Views
21
Reviews
0

Updated at source:

Model information

License
Creative Commons — Public Domain

Smart Coin Jar – ESP32 piggy bank with sound & light

A compact 3D-printed coin bank with a "smart" lid. Every coin you drop in is detected by an infrared light barrier – the jar plays a short chime through two small speakers and lights up from the inside with addressable RGB LEDs. All electronics are hidden in the lid, powered by USB-C, and the firmware updates itself over Wi-Fi (OTA) from GitHub releases, so the lid never needs to be opened again.

WHAT IT DOES

  • Detects every inserted coin (IR LED + phototransistor break-beam in the coin slot)

  • Plays a chime on 2 speakers (I2S stereo amplifiers)

  • 5 RGB LEDs shine down into the jar and flash on every coin

  • Automatic over-the-air firmware updates from GitHub releases

  • Powered by a 5 V USB-C adapter; the cable exits downward along the jar neck

  • All coins fit through the slot

PRINTING

  • Printed in PETG

  • No supports needed – all overhangs are 45° or less

  • Lid: body, top cover and small holders (amplifier bar, USB-C holder, LED plate, sensor caps, ESP clamps)

  • Jar: see-through diamond lattice body (Ø90 mm), the neck fits the lid groove; openings are small enough that no coin can fall out

SOFTWARE

GitHub (PlatformIO, Arduino framework, ESP32)

HARDWARE

WIRING (ESP32-DevKitC 38pin, pins labelled as on the board)

  • Power

    • USB-C adapter: VBUS -> 5V rail, GND -> GND rail (D+/D- not used – power only)

    • 5V rail feeds: ESP32 "5V" pin, both amplifiers (Vin) and the LEDs (VDD)

    • GND is common for everything: ESP32, amplifiers, LEDs, IR LED, phototransistor

    • 470 µF electrolytic capacitor at the left amplifier between Vin (+) and GND (−) – buffers current peaks from audio and LEDs

    • Recommended power supply: 5 V / 3 A USB-C

  • Audio – 2× MAX98357 (I2S), wired in parallel

    • G26 -> BCLK (both amplifiers)

    • G25 -> LRC (both amplifiers)

    • G22 -> DIN (both amplifiers)

    • Vin -> 5V, GND -> GND (both amplifiers)

    • Channel select via the SD pin:

      • Left amplifier: SD wired directly to Vin

      • Right amplifier: 470 kΩ resistor between SD and Vin

    • GAIN left unconnected (9 dB)

    • Speaker wires soldered directly to the + / − pads of each amplifier (screw terminals and headers not used)

  • RGB LEDs – 5× WS2811 5 mm (pin 1 = DOUT on the flat side, pin 2 = VDD longest leg, pin 3 = GND, pin 4 = DIN)

    • G33 -> 330 Ω -> DIN of LED1

    • Daisy-chain: DOUT LED1 -> DIN LED2 -> ... -> DIN LED5 (DOUT of LED5 stays unconnected)

    • VDD of LED2–LED5 -> 5V, GND of all LEDs -> GND

    • VDD of LED1 is fed through 2× 1N5819 Schottky diodes in series from 5V (stripes towards the LED). This lowers LED1's supply to ~4.3 V, so the 3.3 V data signal from the ESP32 is read reliably. LED1 then regenerates a full 5 V signal for the rest of the chain.

    • 100 nF ceramic capacitor between VDD and GND directly at every LED

    • All LEDs mounted with the flat side facing towards LED5

  • Coin sensor – IR break-beam across the coin slot

    • IR LED (940 nm): G32 -> 100 Ω -> anode (longer leg), cathode (shorter leg) -> GND

    • Phototransistor 5800B (flat top):

    • collector (shorter leg) -> 3V3

    • emitter (longer leg) -> G34, plus 10 kΩ from G34 to GND

    • Optional: 100 nF between 3V3 and GND (not across the phototransistor legs)

    • Note: G34 is input-only on the ESP32 – it can read the sensor but cannot drive the IR LED

  • Optional

    • 10 µF capacitor between EN and GND – the board then enters upload mode automatically, without holding the BOOT button


Designed & built by Ing. TULák

GitHub: https://github.com/davidvancl

If you print it, please share a Make – I'd love to see your version! Questions, ideas or improvements are welcome in the comments or as an issue/PR on GitHub.

Thanks for downloading and happy saving! 🪙

Tags