Connect with us

Need help with DC Dimming seven seg displays.

Discussion in 'General Electronics Discussion' started by Schematicsman, Oct 11, 2020.

Scroll to continue with content
  1. Schematicsman

    Schematicsman

    4
    0
    Feb 14, 2018
    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..?
     

    Attached Files:

  2. kpatz

    kpatz

    329
    88
    Feb 24, 2014
    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.
     
    HellasTechn likes this.
  3. Bluejets

    Bluejets

    5,043
    1,052
    Oct 5, 2014
    The clock pulse usually handles the time on of each segment driver transistor.
     
  4. Schematicsman

    Schematicsman

    4
    0
    Feb 14, 2018
    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: Oct 12, 2020
  5. AnalogKid

    AnalogKid

    2,525
    718
    Jun 10, 2015
    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
     
  6. kpatz

    kpatz

    329
    88
    Feb 24, 2014
    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: Oct 12, 2020
    Harald Kapp likes this.
  7. Harald Kapp

    Harald Kapp Moderator Moderator

    11,710
    2,718
    Nov 17, 2011
    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.
    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?
     
  8. bertus

    bertus Moderator

    2,070
    780
    Nov 8, 2019
    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
     
  9. kpatz

    kpatz

    329
    88
    Feb 24, 2014
    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: Oct 13, 2020
  10. Harald Kapp

    Harald Kapp Moderator Moderator

    11,710
    2,718
    Nov 17, 2011
    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.

    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.
     
  11. kpatz

    kpatz

    329
    88
    Feb 24, 2014
    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. :)
     
  12. bertus

    bertus Moderator

    2,070
    780
    Nov 8, 2019
    Hello,

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

    CA multiplex.png

    Bertus
     
    kpatz likes this.
  13. ratstar

    ratstar

    486
    20
    Aug 20, 2018
    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. :)
     
  14. Harald Kapp

    Harald Kapp Moderator Moderator

    11,710
    2,718
    Nov 17, 2011
    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.
     
  15. AnalogKid

    AnalogKid

    2,525
    718
    Jun 10, 2015
    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
     
  16. kpatz

    kpatz

    329
    88
    Feb 24, 2014
    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.
     
  17. AnalogKid

    AnalogKid

    2,525
    718
    Jun 10, 2015
    That was my thinking in my first response.

    ak
     
  18. ratstar

    ratstar

    486
    20
    Aug 20, 2018
    Yeh I know, when the light hits the resistor it shorts the power away from the base of the transistor. :)
     
  19. AnalogKid

    AnalogKid

    2,525
    718
    Jun 10, 2015
    ak
     
  20. Harald Kapp

    Harald Kapp Moderator Moderator

    11,710
    2,718
    Nov 17, 2011
    @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.
     
    ratstar likes this.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-