กลับไปหน้ารวมไฟล์
4-digit-7-segment-shift-register-counter-3864b3-en.md

Just an experiment to see if I could display digits on a 4 digit display using fewer wires on the arduino by adding a shift register.

The project works by enabling the first digit, then sending the data to the shift register, which sends it to the enabled digit. Then the first digit is disabled, the second digit enabled and the process repeated.

EXPANDED TECHNICAL DETAILS

High-Efficiency Display Multiplexing

This project explores the professional technique of controlling a 4-digit numeric display using only a handful of Arduino pins.

  • 74HC595 Shift Register Hub: Instead of using 12+ pins, the Arduino uses one or more 74HC595 chips to "Shift" the segment data via the SPI protocol. This frees up the Arduino for other sensors or inputs.
  • Multiplexed Scanning Logic: To keep all 4 digits lit, the Arduino cycles through them 100 times per second ($100Hz$). Only one digit is actually ON at a time, but the "Persistence of Vision" makes them appear as a solid, continuous number.

Practical Counting Applications

  • Real-Time Data Ticker: The counter can be mapped to a Pulse sensor or an Infrared beam-break, creating a professional-grade visitor counter or industrial tachometer.

ข้อมูล Frontmatter ดั้งเดิม

title: "4-Digit 7-Segment + Shift Register Counter"
description: "A pretty simple experiment using a shift register and PWM to cycle through the LEDs on a 4 digit 7 segment display."
author: "goarray"
category: ""
tags:
  - "lights"
  - "clocks"
  - "robots"
views: 28368
likes: 4
price: 1120
difficulty: "Intermediate"
components:
  - "1x Resistor 220 ohm"
  - "1x Shift Register- Serial to Parallel"
  - "1x Breadboard (generic)"
  - "20x Jumper wires (generic)"
  - "1x Arduino UNO"
  - "1x 4 Digit 7 Segment Common Anode Display"
tools: []
apps:
  - "1x Arduino IDE"
downloadableFiles: []
documentationLinks: []
passwordHash: "057eb21004a26670319c8b125d4dbb000a944512a279390a2fac90a2d0fe31ee"
encryptedPayload: "U2FsdGVkX18aEmfSPo9X3JKEtX6GohJ4IHB8CrDif/8bw46oyN1//m2sgYwHqVqU6FyKs+wf7oGATXRlWq4+NYsSTcomGnwPaRq3vxLuvbU="
seoDescription: "Learn to build a 4-Digit 7-Segment counter using a Shift Register and PWM for LED control on Arduino."
videoLinks: []
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/4-digit-7-segment-shift-register-counter-3864b3_cover.jpg"
lang: "en"