Introduction: 4-Digit 7-Segment Arduino Stopwatch

This is a stopwatch project I made a while ago. It uses two 74HC595 shift register chips, one 4-digit 7-segment display, one Arduino Uno, some resistors. You can add buttons to control the stopwatch but it is your choice. The main issue I tackled was that the 4-digit 7-segment display usually takes a lot of pins of the Arduino Uno, taking up to 12 pins. Using the two ICs, it reduces it from 12 pins to only 3 pins (excluding the power pins). The following Instructable will follow into how to setup this project! Happy Reading!

Here is the Wokwi project link to it: https://wokwi.com/projects/346440685466944083

Supplies

For this Arduino project, you will need:

Step 1: Hooking Up the Project in the Breadboard

  1. Lay out your 4-digit 7-segment display and your ICs on the breadboard. Choose one of the IC chips and label it as '1' and the other as '2'. It will be important as the chip '1' controls the seven segments of each digit while chip '2' controls the four digits.
  2. Connect pin 16 and pin 8 (as labelled from the diagram) of both chips to positive (VCC) and negative (GND) rails of the breadboard. (NOTE: Remember to use the "notch" on top of the chip as a way to identify the pins).
  3. Connect 1k resistors to pin 15 and pins 1 - 7 (i.e Qa - Qh)on chip 1.
  4. Connect the resistors from pins 15, 1,2,3,4,5,6 and 7 of chip 1 to pin A,B,C,D,E,F,G and 'DP' of the 4-digit 7-segment display (Check diagram of the digits display). So, pin 15 resistor would be connected to pin A, pin 1 resistor to pin B, pin 2 resistor to pin C, pin 3 resistor to pin D, pin 4 resistor to pin E, pin 5 resistor to pin F, pin 6 resistor to pin G and pin 7 resistor to pin 'DP'.
  5. Now, connect pin 15, pin 1, pin 2 and pin 3 of chip '2' to the pin D1, D2, D3 and D4 of the display respectively. NOTE: Chip 2 does not need resistors.
  6. Now, connect pin 9 of chip '1' to pin 14 of chip '2'. Pin 9 of chip 2 will be unconnected.
  7. Connect pin 12 of chip '1' to pin 12 of chip '2'. Then, connect from pin 12 of chip '2' to pin 3 of Arduino Uno.
  8. Connect pin 11 of chip '1' to pin 11 of chip '2'. Then, connect from pin 11 of chip '2' to pin 2 of Arduino Uno.
  9. Connect pin 10 of both chip '1' and chip '2' to VCC.
  10. Connect pin 13 of both chip '1' and chip '2' to GND.
  11. Finally, connect pin 14 of chip '1' to pin 4 of Arduino Uno.

Now, for closing part of this step, connect the VCC and GND rails to 5V and GND pins of Arduino Uno repsectively.

Step 2: Coding the Project

Start your Arduino IDE and connect your Arduino Uno. Upload the code and see the magic happen! The code will basically start running a stopwatch and continues till it reaches 9999 and all of it becomes 0000. I have uploaded two files for you. The files are not very different from each other. The only difference is it that one of them is for common-anode display (when the LEDs inside the display share the same ground), while the other file is for common-cathode display (when the LEDs inside the display share the same positive voltage). If one of the files uploaded into the Arduino is not displaying the numbers properly, then use the other one :) .

Step 3: Conclusion

Here is a picture of it working :D. If you want to understand it in-depth how the project works, you can ask it in the comments. If you want to add buttons to it, you can definitely add to it now as this projects frees up a lot pins for other inputs. This is my first Instructable and I hope to know your comments, feedback and experience from this. Happy Tinkering yall!

Making Time Contest

Participated in the
Making Time Contest