Skip to content

tuxmann/ToothBrushTimer

Repository files navigation

🪥 ToothBrush Timer - Deluxe Edition

A fun, interactive 2-minute toothbrush timer designed to make brushing teeth enjoyable for kids. Features 16 colorful LEDs and 10 randomized celebration animations to reward good brushing habits!

License

📋 Overview

This Arduino-based toothbrush timer uses an ATtiny88 microcontroller to create an engaging brushing experience. Press the button to start a 2-minute countdown visualized by progressively lighting up LEDs. When time's up, enjoy a random celebration animation as a reward!

✨ Features

  • 2-Minute Timer: Precisely timed for the dentist-recommended brushing duration
  • Visual Progress Bar: 16 LEDs (Green → Yellow → Red) fill up as you brush
  • 10 Celebration Animations: Random reward animation after each session
  • No Repeat Logic: Never shows the same animation twice in a row
  • Low Power Idle Mode: Gentle pulsing LEDs when waiting for button press
  • USB Powered: Runs on any standard USB power bank

🎨 LED Layout

[G] [G] [G] [G] [G] [G] [G] [G] [G] [Y] [Y] [Y] [Y] [Y] [R] [R]
 0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
  • Green LEDs (0-8): First 60 seconds
  • Yellow LEDs (9-13): Next 40 seconds
  • Red LEDs (14-15): Final 20 seconds

🎭 Celebration Animations

After completing the 2-minute timer, one of these animations plays for 15 seconds:

  1. Strobe - Fast flashing all LEDs
  2. Confetti - Random LEDs popping like fireworks
  3. Scanner - "Knight Rider" style back-and-forth sweep
  4. Curtain - LEDs close in from edges to center
  5. Fill & Drain - Sequential fill and empty pattern
  6. Meteor - Light trail falling from top to bottom
  7. Breathing - Smooth fade in/out effect
  8. Middle-Out - Explosion effect from center outward
  9. Marquee - Theater-style chasing lights
  10. Bouncing Ball - Single LED bouncing between edges

🔧 Hardware Requirements

  • Microcontroller: ATtiny88
  • LEDs: 16x (9 Green, 5 Yellow, 2 Red)
  • Button: Momentary push button (active low)
  • Power: USB power bank (5V)
  • Case: 3D printed enclosure (STL file included)

Pin Configuration

  • Button: Pin 8 (INPUT_PULLUP)
  • LEDs: Pins 0-7, 16-23 (see code for mapping)

📦 Project Files

  • ToothBrushTimer.ino - Main Arduino sketch
  • ToothBrush Timer.stl - 3D printable case design
  • Wire List.ods - Component wiring diagram
  • Cktbd Atmel Side.jpg - Circuit board photo (ATtiny88 side)
  • Cktbd LED Side.jpg - Circuit board photo (LED side)
  • Pinout_x8.jpg - ATtiny88 pinout reference
  • 3d case back.jpg - Photo of assembled case

🚀 Getting Started

Software Setup

  1. Install Arduino IDE
  2. Add ATtiny board support:
    • Go to File > Preferences
    • Add to "Additional Board Manager URLs":
      https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json
      
    • Go to Tools > Board > Boards Manager
    • Search for "attiny" and install
  3. Select Tools > Board > ATtiny88
  4. Upload ToothBrushTimer.ino

Hardware Assembly

  1. 3D print the case using ToothBrush Timer.stl
  2. Wire components according to Wire List.ods
  3. Program the ATtiny88 using an ISP programmer
  4. Assemble in case and connect USB power

💡 Usage

  1. Power On: Connect USB power bank
  2. Startup: LEDs sweep back and forth
  3. Idle: LEDs gently pulse waiting for button press
  4. Start Timer: Press the button
  5. Brush: LEDs fill up over 2 minutes
  6. Celebrate: Enjoy the random animation!
  7. Repeat: Timer automatically returns to idle mode

🎯 Technical Details

Timing

  • Total Duration: 120 seconds (2 minutes)
  • Per LED: 7.5 seconds (120s ÷ 16 LEDs)
  • Celebration: 15 seconds
  • Idle Pulse: 300ms cycle per LED

Key Features

  • Random Seeding: Uses micros() for true randomness on each button press
  • No Repeat Logic: do...while loop ensures different animation each time
  • Time-Based Animations: All animations accept duration parameter for consistency
  • Software PWM: Breathing effect uses fast switching for smooth fading

📸 Photos

Check out the included images to see the circuit board assembly and 3D printed case!

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🤝 Contributing

Contributions are welcome! Feel free to:

  • Add new celebration animations
  • Improve the timing or LED patterns
  • Enhance the 3D case design
  • Submit bug fixes or improvements

👨‍💻 Author

Created with ❤️ for making toothbrushing fun for kids!

🙏 Acknowledgments

  • Inspired by the need to make dental hygiene fun
  • Knight Rider scanner animation pays homage to the classic TV show
  • Thanks to the Arduino and maker community for inspiration

Happy Brushing! 🦷✨

About

A simple tooth brush timer for the kids.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages