Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

7 segment

Saeedk9574

New Member
Hi everyone
I am using a common anode 4 digit 7 segment to show the time, but the problem is whenever I increase voltage above 3.8v All LEDs of the 7 segments gets lighted up and the correct number can not be seen
I have connected the common pins (A-G) of 7 segments to the PNP transistor, and the common pins connected to 300-ohm resistor.
 
1699263085655.png


I used this diagram. However, I chose BC640 transistor and 1K resistor for base. It works well below 3.8v, but as soon as I increase it above 3.8 changes to this.

1699263363816.png
 
If you change the multiplexing frequency to about 1 hZ do you see the individual digites displayed in sequence and are all of the digits displayed correctly ? (Or look at the segnals to the LEDs with an oscilloscope if you have.)
Check that you have not reversed the collector and emitter connections to the transistors.

Les.
 
I have connected the common pins (A-G) of 7 segments to the PNP transistor
Did you say this incorrectly or is your schematic wrong? Because, this line doesn't make sense that you have A-G connected to the PNP (not shown that way in the schematic).


Also, a PNP must be pulled high to turn it off (low to turn it on). You should have only one of your PNP bases in a low-state at a time for proper multiplexing.
 
In round numbers, with a 5 V supply each PIC output is trying to sink around 30 mA. IIRC, too much. There is a limit to the max continuous current for each I/O pin and another limit to the total GND current for the chip.

Increase the segment resistors to 470 ohms each and see if things work correctly. It will be much dimmer, but once things are working you can decrease them for increased brightness. Without drilling down into the datasheet, keep the segment resistors above 220 ohms.

ak
 
In round numbers, with a 5 V supply each PIC output is trying to sink around 30 mA. IIRC, too much. There is a limit to the max continuous current for each I/O pin and another limit to the total GND current for the chip.

Increase the segment resistors to 470 ohms each and see if things work correctly. It will be much dimmer, but once things are working you can decrease them for increased brightness. Without drilling down into the datasheet, keep the segment resistors above 220 ohms.

ak
Good catch. That chip has max I/O current of 25mA.
 
In round numbers, with a 5 V supply each PIC output is trying to sink around 30 mA. IIRC, too much. There is a limit to the max continuous current for each I/O pin and another limit to the total GND current for the chip.

Increase the segment resistors to 470 ohms each and see if things work correctly. It will be much dimmer, but once things are working you can decrease them for increased brightness. Without drilling down into the datasheet, keep the segment resistors above 220 ohms.

ak

It's almost certain that it wouldn't cause all the segments to be lit though - in fact I wouldn't ever consider that possibility.

It's not 'nice' but the PIC will simply limit the current itself - by all means though, increase the limiting resistors to a more sensible value.

But it would be more plausible that it's because the base/emitter resistors are missing, or/and a coding error.
 
Have you simulated the circuit in proteus or any other simulation software? If yes, what do you see in the simulation? As somebody has already said, You must have only one of your PNP bases in a low-state at a time for proper multiplexing. You can review the part of your code where you're controlling this scanning time.
 
Did you say this incorrectly or is your schematic wrong? Because, this line doesn't make sense that you have A-G connected to the PNP (not shown that way in the schematic).


Also, a PNP must be pulled high to turn it off (low to turn it on). You should have only one of your PNP bases in a low-state at a time for proper multiplexing.
Yes, you're right. that was type mistake.
 
In round numbers, with a 5 V supply each PIC output is trying to sink around 30 mA. IIRC, too much. There is a limit to the max continuous current for each I/O pin and another limit to the total GND current for the chip.

Increase the segment resistors to 470 ohms each and see if things work correctly. It will be much dimmer, but once things are working you can decrease them for increased brightness. Without drilling down into the datasheet, keep the segment resistors above 220 ohms.

ak
Thank you, I will try it.
 
Have you simulated the circuit in proteus or any other simulation software? If yes, what do you see in the simulation? As somebody has already said, You must have only one of your PNP bases in a low-state at a time for proper multiplexing. You can review the part of your code where you're controlling this scanning time.
No, I have not. However, most of the time I can not work with proteus, but I will try it in.
 

Latest threads

Back
Top