Maker Pro
Maker Pro

Need help with DC Dimming seven seg displays.

Schematicsman

Feb 14, 2018
4
Joined
Feb 14, 2018
Messages
4
Hi, everyone ,I am having trouble to find out how to design a dimmer circuit that will dim the 5 digit seven segments common anode displays, I have attached my multiplexed circuit below simulated all digits on. and I have also found a dimming circuit on the net and I am attaching below that I would like to use but not sure if it is good.

[I am using source voltage of +5V DC]
Im a newbie and would really like to know how this would be possible..?
 

Attachments

  • My_5_digit_Common Anode _circuit.PNG
    My_5_digit_Common Anode _circuit.PNG
    39.4 KB · Views: 19
  • Internet LDR_Circuit.PNG
    Internet LDR_Circuit.PNG
    42.8 KB · Views: 14

kpatz

Feb 24, 2014
334
Joined
Feb 24, 2014
Messages
334
What's driving the display now? A microcontroller? Are you writing the firmware?

Dimming of displays is usually handled via PWM. With a multiplexed display, you could change the pulse width of either the row or column outputs to control the overall brightness of the LED displays.

There are LED driver ICs that allow for brightness control without using PWM as well.
 

Bluejets

Oct 5, 2014
6,901
Joined
Oct 5, 2014
Messages
6,901
The clock pulse usually handles the time on of each segment driver transistor.
 

Schematicsman

Feb 14, 2018
4
Joined
Feb 14, 2018
Messages
4
Hi, thanks for the quick response guys.
I'm using only bc557 PNP transistors to drive the displays with 1K resistor on the base of the Transistor and 220 ohm resistors on the segments pins, and I know the circuit is a mess and needs redesigning but as Im just learning , just getting the hang off it.
I just wanted to try a simple LDR circuit connected to the Displays without a chip of sort.

And speaking of writing firmware , that is one thing I would love to learn to learn to do, especially my own specific device drivers.eg.

I would love to one day , Build the hardware device unit (As a Project) comprising of (Mechanical /Electronics part and have that connected through RS232 and or USB and write a driver to communicate to with PC software. Like X-Plane 12 , something like that.

So first thing first.......

After I learn how to get max brightness from the Common Anodes displays and control the brightness using a LDR without any microchips will move onto connecting a PIC6F628A chip in the mix-then something else.
 
Last edited:

AnalogKid

Jun 10, 2015
2,884
Joined
Jun 10, 2015
Messages
2,884
What is the "photocell" in the 2nd schematic? Is it a true photo-voltaic cell that generates a current, of a photo-resistive cell like cadmium sulfide? Or something else?

Also, what is the intent of the circuit? It appears that you want to segments to dim when the ambient light goes down, but the circuit you posted will not do that.

ak
 

kpatz

Feb 24, 2014
334
Joined
Feb 24, 2014
Messages
334
What is this display going to be used for? You have a circuit for a multiplexed 5 digit 7 segment display, but it's not connected to anything. Normally you wouldn't dim these linearly since you would have to have a dimming circuit for each of the 7 segments (where your 220Ω resistors are now). Instead, whatever is sending the signals to your display (microcontroller or whatever) would dim them by changing the pulse width of the signals as they're multiplexed.

Also you may want to rethink your resistor values, depending on the supply voltage. 1M resistors on the bases of the BC557As won't drive them to saturation, so I'd go lower, like 1-10K on those, otherwise your displays will be even dimmer, and inconsistent brightness.

(Edit, my math was wrong, the 220Ω resistors for each segment are appropriate).

If your supply voltage is higher, substitute resistor values as appropriate. 5V (or 3.3V) is common for digital ICs.
 
Last edited:

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
I'm using only bc557 PNP transistors to drive the displays with 1K resistor on the base of the Transistor and 220 ohm resistors on the segments pins,
The question in post #2 was: where do the driving signals come from that connect via the two 8-pin and 5-pin connectors, respectively?
If these signals are generated by a microcontroller, the duty cycle (ratio of on-time to total time) can easily be controlled by the software/firmware, thus achieving dimming.
I have also found a dimming circuit on the net
The "photocell" in that schematic is more likely to be an LDR, as mentioned in post #4. This circuit is unsuitable for two reasons:
  1. WYou'd need one circuit for each segment and you'd have to tie it into your circuit instead of the 220 Ω resistors.
  2. You'd would control brightness of the display by another source of light the light of same you'd have to evenly distribute among the LDRs for each segment. Unlikely to happen.
We may be able to get you along if you supply a few more details, such as:
  • Where do the signals for the 7-segment display come from?
  • What will you be using to control brightness of the display:
    - A potentiometer?
    - A sensor (if so, which one)?
    - Software?
  • What will be the dimming range? From completely off to completely on or only partially?
 

bertus

Moderator
Nov 8, 2019
3,304
Joined
Nov 8, 2019
Messages
3,304
Hello,

What kind of dispalys do you use?
The schematic tells me they are CA (common Anode).

CA display.png

Your schematic looks like you are using CC (common Cathode) displays, as your transistors are at ground level.

Bertus
 

kpatz

Feb 24, 2014
334
Joined
Feb 24, 2014
Messages
334
Your schematic looks like you are using CC (common Cathode) displays, as your transistors are at ground level.

Bertus
Good catch. There's other issues with the schematic when taking a closer look (it's hard to follow all those red lines going everywhere!). The common pins on the displays are connected to the collectors of the transistors but also to the +5V rail. Also, the emitters of the PNPs are connected to ground (correct for NPNs driving common cathode displays, but not for this). Assuming common anode displays, the emitters of the transistors need to go to the +5V rail and the common pins on each display are connected only to it's transistor collector and not to any rail.

EDIT: Another issue is pin P7 is connected to ground (directly above the connector). Usually ground symbols aren't upside down like that either. Some of the middle display's segments are connected to ground too.
 
Last edited:

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
as your transistors are at ground level.
Looks like the intention may have been to have ground in this circuit being +5 V. Could be done, but then things get out of control with Vss being at 5 V, too.

The common pins on the displays are connected to the collectors of the transistors but also to the +5V rail.
Another issue is pin P7 is connected to ground (directly above the connector).
Like this:
upload_2020-10-13_8-45-16.png
Good catch, too. This won't work as intended as all anodes are permanently "on".
Also 2 different symbols are being used for ground (single line and 3 lines). So it is unclear whether these are the same grounds or different ones.

The circuit needs to be redesigned and re-drawn in a readable manner. See e.g. this very clear example.

@Schematicsman : I'm afraid without an answer from you to the issues thrown up here we cannot help more.
 

kpatz

Feb 24, 2014
334
Joined
Feb 24, 2014
Messages
334
Another thing I just realized (these things keep popping out)... Vss is usually ground or the negative rail, while the positive rail is marked Vdd or Vcc. Vss and Vdd are voltage to source and drain of an N channel MOSFET; Vcc is the voltage to the collector of an NPN transistor.

But, until the OP returns with an updated schematic, best to let this one rest me thinks. Unless someone wants to take the challenge of untangling the one already posted. :)
 

bertus

Moderator
Nov 8, 2019
3,304
Joined
Nov 8, 2019
Messages
3,304
Hello,

This would be a better way to draw a CA multiplexed display:

CA multiplex.png

Bertus
 

ratstar

Aug 20, 2018
485
Joined
Aug 20, 2018
Messages
485
What is the "photocell" in the 2nd schematic? Is it a true photo-voltaic cell that generates a current, of a photo-resistive cell like cadmium sulfide? Or something else?

Also, what is the intent of the circuit? It appears that you want to segments to dim when the ambient light goes down, but the circuit you posted will not do that.

ak

I think it would be a photo resistor- when light hits it, it turns the transitor off - because it creates a direct connection to battery, so the base would miss out on current. :)
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
This would be a better way to draw a CA multiplexed display:
PNP transistors work better in this application (emitter to +5V) than NPNs, see the example I linked in post #10. Of course, the logic level for driving the transistors is then inverted.

@Schematicsman : we need your reply otherwise we're left in the dark.
 

AnalogKid

Jun 10, 2015
2,884
Joined
Jun 10, 2015
Messages
2,884
I think it would be a photo resistor- when light hits it, it turns the transitor off - because it creates a direct connection to battery, so the base would miss out on current.
Nope. The resistance of an LDR increases with darkness. When it's dark, a photo-resistor is t its highest resistance, possible high enough to be considered open circuit. This lets the 22 K resistor turn the transistor on (or more on), not off, increasing LED current and brightness,

ak
 

kpatz

Feb 24, 2014
334
Joined
Feb 24, 2014
Messages
334
Nope. The resistance of an LDR increases with darkness. When it's dark, a photo-resistor is t its highest resistance, possible high enough to be considered open circuit. This lets the 22 K resistor turn the transistor on (or more on), not off, increasing LED current and brightness,

ak
The gist of that circuit is that the LED gets brighter when less light hits the photocell. Probably not what the OP wanted with his 7 segment displays... he probably wants them dimmer when it's dark, which could be done with that circuit by swapping the photocell and resistor in the circuit (and adding another resistor in series with the photocell to limit base current at max light).

Assuming a microcontroller would be controlling the display, the photocell would be connected along with a resistor in a voltage divider configuration to an analog input on the micro, and the firmware would read the voltage on that pin to get the ambient light level, and control the display's brightness by varying the duty cycle (pulse width) of the rows or columns.
 

AnalogKid

Jun 10, 2015
2,884
Joined
Jun 10, 2015
Messages
2,884
The gist of that circuit is that the LED gets brighter when less light hits the photocell. Probably not what the OP wanted with his 7 segment displays... he probably wants them dimmer when it's dark,
That was my thinking in my first response.

ak
 

ratstar

Aug 20, 2018
485
Joined
Aug 20, 2018
Messages
485
Nope. The resistance of an LDR increases with darkness. When it's dark, a photo-resistor is t its highest resistance, possible high enough to be considered open circuit. This lets the 22 K resistor turn the transistor on (or more on), not off, increasing LED current and brightness,

ak
Yeh I know, when the light hits the resistor it shorts the power away from the base of the transistor. :)
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
Nope. The resistance of an LDR increases with darkness. When it's dark, a photo-resistor is t its highest resistance, possible high enough to be considered open circuit. This lets the 22 K resistor turn the transistor on (or more on), not off, increasing LED current and brightness,
@AnalogKid : Why "nope"? your's is the same statement as @ratstar 's, only in negative logic. Where you consider increasing resistance with darkness, he considers decreasing resistance with brightness. Two sides of the same coin. At least in the circuit as shown in the original post.
 
Top