2 Digit 6 Inch ,7-Segment using mono Red Color Strip

Dear Sirs,

Greetings!!

I have been struggling with 6 Inch height 7-Segment display.I have checked hardware circuit 4-5 times seems ok.
Rui Santos, https://randomnerdtutorials.com code is being tested on said display.Although thid code for temp,here I use POT as
Temp Sensor is not available with me.

Above code is already tested on tiny 7-Segment display was working on same common anode method.

But when I have used same code for 6 Inch LED Strip display,nothing happened even none of anystrip powered up.

A) Both 5V & 12 V GND connected together
B) initially 100 nF capacitor put near 74HC595 between VCC & GND,later stage 1000mF tried.

7-Segment (8 Inch Height)
Method : Common Anode
LED : Mono Color (Red) LED Strip (3 Led per strip)-12Volt

What could be possible cause not to allow me ?

a) Circuit diagram is attached.(Current limiting resrtors are not used as LED strip has own limiting resistance)

Please guide & help me.

Thanks

Kind Regards.

Dino_T

/* Common anode
   Temperature Sensor Displayed on 4 Digit 7 segment common anode
   Created by Rui Santos, https://randomnerdtutorials.com
*/

//#include <ShiftDisplay.h>

const int digitPins[4] = {4, 5, 6, 7};                 //4 common anode pins of the display  //  const int digitPins[4] = {4, 5, 6, 7}; 

const int clockPin = 11;                               //74HC595 Pin 11
const int latchPin = 12;                               //74HC595 Pin 12
const int dataPin = 13;                                //74HC595 Pin 14

const int tempPin = A0;                                //temperature sensor pin

//const int DISPLAY_TYPE = COMMON_ANODE; 
//ShiftDisplay display(latchPin, clockPin, dataPin, DISPLAY_TYPE, 4);

const byte digit[10] =                                 //seven segment digits in bits
{
  B00111111, //0
  B00000110, //1
  B01011011, //2
  B01001111, //3
  B01100110, //4
  B01101101, //5
  B01111101, //6
  B00000111, //7
  B01111111, //8
  B01101111  //9
};

int digitBuffer[4] = {0};
int digitScan = 0, flag = 0,  soft_scaler = 0;
;

float tempK, tempC, tempF, temp;

void setup() {
  for (int i = 0; i < 4; i++)
  {
    pinMode(digitPins[i], OUTPUT);
  }
  pinMode(tempPin, INPUT);
  pinMode(latchPin, OUTPUT);
  pinMode(clockPin, OUTPUT);
  pinMode(dataPin, OUTPUT);
  pinMode(tempPin, INPUT);
}

//writes the temperature on display

void updateDisp() {
  for (byte j = 0; j < 4; j++)
  digitalWrite(digitPins[j], LOW);

  digitalWrite(latchPin, LOW);
  shiftOut(dataPin, clockPin, MSBFIRST, B11111111);
  digitalWrite(latchPin, HIGH);

  delayMicroseconds(1);//100
  digitalWrite(digitPins[digitScan], HIGH);

  digitalWrite(latchPin, LOW);
  if (digitScan == 2)             // Hame 4 Digit Chahiye without DP
//**********************************************************************************************************************************
    shiftOut(dataPin, clockPin, MSBFIRST, ~(digit[digitBuffer[digitScan]] | B10000000)); //print the decimal point on the 3rd digit
//**********************************************************************************************************************************
  else
    shiftOut(dataPin, clockPin, MSBFIRST, ~digit[digitBuffer[digitScan]]);

  digitalWrite(latchPin, HIGH);
  digitScan++;
  if (digitScan > 3) digitScan = 0;
  
}

void loop() {
  
  tempK = (((analogRead(tempPin) / 1023.0) * 5.0) * 100.0);
  tempC = tempK - 273.0;                     //Converts Kelvin to Celsius minus 2.5 degrees error
  tempF = ((tempK - 2.5) * 9 / 5) - 459.67;
   
  tempC = int(tempC * 100);                  //Celsius temperature display
  
  digitBuffer[3] = int(tempC) / 1000;
  digitBuffer[2] = (int(tempC) % 1000) / 100;
  digitBuffer[1] = (int(tempC) % 100) / 10;
  digitBuffer[0] = (int(tempC) % 100) % 10;

  updateDisp();
  delay(2);

 }




I saw it for a moment but it disappeared!

The problem might be that 74hc595 will be damaged by 12V. You could use tpic6b595.

Good Day Sir,

Here I have been searching any mistake with my Circuit,one blunder is discovered.Rectified it...Now Some how Circuit started working...Now problem is Some of LED strip working perfectly and which supposed to be off,too glowing dimmed.

Do you think I have to use Resistance additionally ?

You forgot to attach it.

Because 74hc595 is not suitable for use with 12V strips, it is a 5V chip.

Sir,74HC595 still alive,I havent gievn 12V to 74HC595. 12V is only for ULN2803 & 7-Segments Digit Via PNP Transistor

Sir,I have attached Circuit diagram.I think 12V is not disturbing to 74HC595. Reasonbeing as you suggested TPIC6B595 unfortunately not possible to make available with me,even from ALiexpress.

:smile:

The problem is that the Arduino pins are not able to switch off the PNP transistors. It will require 12V to the base pin of the PNP to switch them off, and the Arduino pin can provide only 5V. So both PNP are switched on at all times.

You could use 2 npn transistors to switch the PNP transistors off.

Ok Sir,I will try & update you .

Like this (but your displays are connected where the schematic says "motor").

Thank you Sir,I will

For your information, you do not need to connect the COM pin of the ULN chip to 12V, you can leave it unconnected. Is is only required to be connected when the chip is used to drive relays, solenoids, motors etc. It is not required to be connected with LEDs.

Implemented mentioned Circuit,seems this arrangement work as timer....after some time all Leds turned off and reset arduino glowing again and after some time all LED turned off

It should not act like that.

Looking at the circuit I suggested before, I think there may be a resistor missing. So try like this:
lamp_source2
In the above, "la2" is your display.

1 Like

Thank You Sir,I will try

Sir,here again I got confused...I think 0.7 volts is enough to drive base...could you explain further why 5V feom Arduino is not sufficient for PNP transistor (Here BC557 is used)

These are PNP transistors, in many ways they work in the opposite way to NPN transistors. You probably need to get the voltage on the base to above (12-0.7) = 11.3V to get them to switch off. Anything below that and they will switch on.

:pray: :pray: :pray: :pray:

Still the same result,Unwanted segment glows in dim fashion