Hi All
This is my second post after I went back to the drawing board. I was originally using 74HC595 with ULN2003 to drive a 12V seven segment display.
CrossRoads suggested that I use TPIC6B595 as it can handle higher load.
I am attaching the schematic diagram of the circuit I am using. Also below is the code I am using to count 0 to 9.
////Pin connect to Latch
const int latchPin = 5;
////Pin connected to Clock
const int clockPin = 6;
////Pin connected to Data
const int dataPin = 7;
//This is the hex value of each number stored in an array by index num
byte digitOne[10]= {
B11111001, //1
B10100100, //2
B10110000, //3
B10011001, //4
B10010010, //5
B10000010, //6
B11111000, //7
B10000000, //8
B10010000, //9
B11000000 //0
};
int i;
void setup() {
//set pins to output because they are addressed in the main loop
pinMode(latchPin, OUTPUT);
pinMode(dataPin, OUTPUT);
pinMode(clockPin, OUTPUT);
}
void loop() {
for(int i=0; i<10; i++){
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, MSBFIRST, ~digitOne[i]); // digitOne
digitalWrite(latchPin, HIGH);
delay(1000);
}
}
I have tested this circuit with a small 0.5 inch seven segment display with appropriate resistors using 5V from Arduino. It worked perfectly.
However, when I tried to use the circuit with the large seven segment running on 12V I have encountered some problems. When the Arduino is loaded with the above code and powered along with the 12V going to the seven segment, the segments instead of lighting up just flickers quickly.
The strange thing is that when I hold the joints on the Vcc and GND wires going to seven segment and TPIC6B595 respectively the segments light up perfectly. But as soon as I let go of the joints the segments start flickering again.
All joints are properly soldered.
Specifications of the the power supply I am using are 12V 6A.
I have been googling and reading anything I could find on TPIC6B595 for the last few days and have come across this website:
They are selling exactly what I need but unfortunately they do not ship outside Romania. I am attaching the picture of their board. The reason I am attaching this is because Robotfun people have used a couple of diodes. I have tried emailing them to ask why have they used diodes and what are their values. I am still awaiting a reply. Could lack of these diodes in my schematic be the cause of my seven segment flickering or am I just being thick and missing something obvious.
Regards
T