I have reverse-engineered some existing circuit that was given to me, which consists of multiplexed 6 digits 7 segments displays driven by 2 Darlington arrays and BD227 transistors.
The original circuit had an AT89 driving all the segments and digits on individual pins and used to receive data from an MAX232; I wanted to connect the displays to an Arduino so as to be able to drive the digits myself.
This is the circuit:

I have by manged to drive all the digits and DP connecting each segment pin and each digit directly to the Arduino pins utilising the SevSeg library. The code works very well, with no flickering, high brightness and no ghosting.
Hardware config set to
I am now trying to attempt to drive the display using two 74HC595 and the SevSegShift library, a fork of SevSeg that adds support for shift registers, although I have not had great luck so far.
I have also tried the hybrid configuration (digits connected directly to Arduino and segments driven by the shift register) as listed on the library's git, but with the same results.
I can light up each digit, although I am not able to control each segment; all I am getting are the eight segments always light up. I have tried to add a delay in the loop to see if some segments were sequenced, but all I'm getting is all the segments on or off altogether.
I have tried all the HardwareConfig settings:
However, I do not see any difference besides all the segments being full brightness or slightly dimmed.
My question is, could it be something to do with the Darlington arrays interfering with the logic?
This is my shift register schematic:

And this is the code I am using:
The original circuit had an AT89 driving all the segments and digits on individual pins and used to receive data from an MAX232; I wanted to connect the displays to an Arduino so as to be able to drive the digits myself.
This is the circuit:

I have by manged to drive all the digits and DP connecting each segment pin and each digit directly to the Arduino pins utilising the SevSeg library. The code works very well, with no flickering, high brightness and no ghosting.
Hardware config set to
N_TRANSISTORS.I am now trying to attempt to drive the display using two 74HC595 and the SevSegShift library, a fork of SevSeg that adds support for shift registers, although I have not had great luck so far.
I have also tried the hybrid configuration (digits connected directly to Arduino and segments driven by the shift register) as listed on the library's git, but with the same results.
I can light up each digit, although I am not able to control each segment; all I am getting are the eight segments always light up. I have tried to add a delay in the loop to see if some segments were sequenced, but all I'm getting is all the segments on or off altogether.
I have tried all the HardwareConfig settings:
COMMON_CATHODE COMMON_ANOODE N_TRANSISTORS P_TRANSISTORS NP_COMMON_CATHODE NP_COMMON_ANODEHowever, I do not see any difference besides all the segments being full brightness or slightly dimmed.
My question is, could it be something to do with the Darlington arrays interfering with the logic?
This is my shift register schematic:

And this is the code I am using:
C:
#include "SevSegShift.h"
#define SHIFT_PIN_DS 13 /* Data input PIN */
#define SHIFT_PIN_STCP 12 /* Shift Register Storage PIN */
#define SHIFT_PIN_SHCP 11 /* Shift Register Shift PIN */
//Instantiate a seven segment controller object (with Shift Register functionality)
SevSegShift sevsegshift(
SHIFT_PIN_DS,
SHIFT_PIN_SHCP,
SHIFT_PIN_STCP,
1, /* number of shift registers there is only 1 Shiftregister
used for all Segments (digits are on Controller)
default value = 2 (see SevSegShift example)
*/
true /* Digits are connected to Arduino directly
default value = false (see SevSegShift example)
*/
);
void setup() {
byte numDigits = 5;
byte digitPins[] = {2,3,4,5,6}; // Arduino pins
byte segmentPins[] = {0, 1, 2, 3, 4, 5, 6, 7}; // 74HC595 pins
bool resistorsOnSegments = true; // 'false' means resistors are on digit pins
byte hardwareConfig = N_TRANSISTORS; // See README.md for options
bool updateWithDelays = false; // Default 'false' is Recommended
bool leadingZeros = false; // Use 'true' if you'd like to keep the leading zeros
bool disableDecPoint = false; // Use 'true' if your decimal point doesn't exist or isn't connected
sevsegshift.begin(hardwareConfig, numDigits, digitPins, segmentPins, resistorsOnSegments,
updateWithDelays, leadingZeros, disableDecPoint);
sevsegshift.setBrightness(0);
}
void loop() {
sevsegshift.setChars("Hello");
sevsegshift.refreshDisplay();
}
Last edited: