Skip to content

Arduino Counter System with EEPROM, LCD, and Relay Control

Notifications You must be signed in to change notification settings

Frazix12/ArduinoDigitalCounter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Ÿ Arduino Counter System with EEPROM, LCD, and Relay Control

This project is a digital counting system using an Arduino, equipped with:

  • LCD display for live count and limit
  • EEPROM storage for saving settings
  • Relay for triggering external devices when a set limit is reached
  • Buzzer feedback (enable/disable)
  • Multiple buttons for user interaction
  • Sensor input (e.g., IR beam break, magnetic switch, etc.)

πŸ–ΌοΈ System Diagram

System Diagram

Diagram showing the wiring and connections of the Arduino Counter System.


πŸ”§ Hardware Components

Component Description
Arduino (Uno/Nano) Main microcontroller
LCD (I2C 16x2) Display count and limit
Relay module Control external load
Buzzer Optional audible feedback
Push Buttons (x4) Start/Stop, Reset, Limit +/-
Digital Sensor Any digital sensor (e.g., IR)

πŸ› οΈ Pin Configuration

Function Arduino Pin
Sensor Input D5
Relay Output D12
Buzzer Output D3
Start Button D6
Reset Button D7
Increase Limit D8
Decrease Limit D9

🧠 Functional Overview

βœ… Features

  • Count Events: Count each time a digital sensor is triggered (active LOW).

  • Start/Stop Toggle: Toggle counting with the Start button.

  • Set Limit: Adjust limit using Increase/Decrease buttons.

  • Reset Options:

    • Short Press Reset: Resets current counter only.
    • Long Press (β‰₯1 sec): Resets both counter and limit.
  • EEPROM Storage:

    • Counter value
    • Counter limit
    • Buzzer enable state
  • Relay: Turns OFF when the counter reaches the limit.

  • Buzzer: Feedback for button presses and events (can be disabled).


πŸ“– EEPROM Memory Map

Address Variable Size
0-1 counterLimit 2B
2-3 counter 2B
4 buzzerEnabled 1B

πŸ–₯️ Serial Monitor Commands

Command Description
b Toggle buzzer ON/OFF

πŸ§ͺ Example Behavior

  1. Start the system – press Start button.

  2. Trigger the sensor – each event increments the count.

  3. Once count == limit – relay turns OFF, buzzer beeps thrice.

  4. Press Reset:

    • Short: Resets counter.
    • Long (β‰₯1s): Resets counter + limit.
  5. EEPROM ensures all values are preserved on power loss.


πŸ“‹ Setup Instructions

  1. Wire up the components per the pin map.
  2. Upload the code to your Arduino.
  3. Open the Serial Monitor (9600 baud) for debug info or toggling buzzer.
  4. Use the buttons to interact with the system.

⚠️ Notes

  • Buttons are assumed to be active LOW with INPUT_PULLUP.
  • Buzzer and relay are digital outputs.
  • Sensor must give LOW when triggered.
  • You can expand this system for automation, production counting, or security applications.

About

Arduino Counter System with EEPROM, LCD, and Relay Control

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages