Marcus' Counter!

by Marcus727 in Circuits > Arduino

11 Views, 0 Favorites, 0 Comments

Marcus' Counter!

WIN_20250609_14_01_26_Pro.jpg

I made a sensor that when on, will immediately detect if anything passes in front of it and count it, regardless of the distance. It uses code that sets the "standard" distance being the wall it is facing, and detects if anything comes in front of that wall.

Supplies

components circuit.jpg
  1. Many, many wires!
  2. Arduino UNO
  3. 2 Breadboards
  4. Ultrasonic sensor (HC-SR04)
  5. 7 Segment display
  6. 2 Push buttons
  7. RGB LED
  8. Standard LED
  9. Piezo buzzer
  10. 3 330 ohm resistsors (Image has one extra, can be used on the buzzer if it is too loud)
  11. 2 1k ohm resistors

Button and OUTPUTS!

step 1.jpg

Connect the buttons and the outputs! LED, RGB, and piezo buzzer are the output components to put in first. Also plugin the buttons with the 330 ohm resistors.

Pins:

2 = Button

3 = LED

4 = Button

A0 = Blue pin

A1 = Green pin

A2 = Red pin

A3 = Piezo buzzer

7 Segment Display

step 2.jpg

Connect the 7 segment display to the Arduino! Pins are hard to explain so try to follow the the wires.

5V and Ground

step 3.jpg

Connect the 5V and GND on the Arduino to the breadboard.

Ultrasonic Sensor

step 4.jpg

Connect the ultrasonic sensor to the Arduino! Trig to pin 5, Echo to pin 6.

FInished!

Finished, now you can run the code and see it work!