Category Archives: Arduino

Controlling 4-digit 7-segment LED Displays

In this project, we will discuss the functionality of a common 4-digit 7-segment LED display. First we will connect the display to constant voltage to test the displays multiplexing. Then we will connect the display to an Arduino

The LED used in this project is the “3461BS” 4-Digit 7-Segment, Common Anode display. This can be seen under similar names such as “HS-3461BX” or “ULF-3461BS” from other manufacturers. This display has 12 pins used for control. Similar displays can be found with 14 or 16 pins for controlling additional dots such as time and temperature. The pins for this display are shown below.

   

To reduce the number of needed control pins, 7 segment displays are typically multiplexed. Completing the circuit between a Digit pin and a segment pin will cause the corresponding led to light up. For example, if we connect the D1 pin to +3V and the g pin to ground, we will see the D1-g segment light up. But if we connect both the D1 and D2 pins to +3V and the g pin to ground, we will see D1-g and D2-g light up.

Unfortunately, this means we can only independently control one digit at a time. To surpass this limitation, most computers quickly cycle between the digits so that persistence of vision makes them all appear on.

Controlling the display with an Arduino

When connecting this to a Arduino or controller device, we are concerned about overloading the IO used for the Digit values. This is because load of 8 segment circuits combine into a single Digit circuit. The large current demands of the Digit-IO could potentially damage an Arduino. To protect the Arduino, we connect the Digit-pins through a transistor. The transistor’s collector provides the majority of the demand current.

In this example, we set the 2nd and 3rd digit though transistors.

Once the transistors have been tested, you may then connect all of the data lines to an Arduino.

With the data lines connected, you can test the display by blinking every-other bit. This should reveal any missed wires.

Once wired, you can make a simple program to output values to the display

 

In this project, we set the voltage across the LED screen as 5 volts. I want to point out that this display and many similar displays have a max VF rating of 2.3V. You will want to stay within that voltage if you want to preserve the life of your display.

Using Other 7 Segment Displays.

The display we are using is a common Anode display, this makes the display require positive voltage on the Digit-pins and ground voltage on the segment pins to light the LED. If the display was a common Cathode design, then the voltages would need to be reversed. A common Cathode display requires positive voltages on the segment pins and ground voltage on the digit pins to light up. When using common Cathode 7-segment displays, you will still need to connect the Digit pins to transistors to handle the large currents. 

The display’s name can be used to determine the specifications. In the device “3461BS”, “34” represents .34 inch height; “61” would represent the design type such as 4-digit; “B” represents common Anode (“A” would represent common Cathode); “S” represents the dot type.

Although I could not find a datasheet for “3461BS”, I found datasheets for similar displays here – https://e-radionica.com/productdata/LD3361BS.pdf