Driving 5 inch 7-segment display

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'am trying to make a timer using 5 inch common anode 7-segments and atmega16 microcontroller, I already now that it needs around 15v to work. I got it working with smaller 7-segments that works fine with atmega16 5v but I have no idea drive the 15v 7-segments using atmega16 5v signal.

Last Edited: Mon. Jan 28, 2019 - 11:39 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Use a bipolar transistor or FET (open collector or drain), one for each segment. The base/gate of each transistor can then be driven by a M16 port pin.

 

Jim

 

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ULN2003 is a good choice, an array of NPN darlington transistors ,
.
WARNING!
ULN2003 sinks the outputs at max current, it doesn't do any current regulation.
Don't forget to add current limiter for each segment,
Otherwise you will damage the 7-segment
.
See the current rating of 7-seg from specs.

Majid

Last Edited: Mon. Jan 28, 2019 - 10:17 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Good point -

 

Whether bipolar or FET, current limit resistors are needed. For common anode display, the resistors would normally be between the transistor (which functions as a switch to ground) and the segment cathode.

 

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

Last Edited: Mon. Jan 28, 2019 - 10:19 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


What kind of circuit are you trying to build, what are the details?

 

- How much current do your LED's need?

- Do you want to be able to dim the display?

- Do you want to build a PCB or is it a one-off on Vero board?

- SMD or THT?

- Are your displays Common Anode, or Common Cathode?

 

 

For the low side a chip like the ULN2003 or ULN2803 (which has 8 Darlingtons instead of 7) is often used and it is very cheap.

 

There are similar chips for driving the high-side but these are much less common and therefore cost significantly more.

For the high side, often a combination of 2 transistors is used.  An NPN transistor to create an open collector output that draws current from the 15 or higher and a PNP transistor

 

I've cobbled together an example of how to build a discrete lineair current source to drive your leds.

If the AVR pin PB7 is low, then both transistors Q5 and Q6 are off and the leds in your display (D1 through D4) are also off.

If the AVR pin PB7 is high (I assume 5V) then the Emitter of Q5 rises to  5V - 0.6V = 4.3 V.

The Current through R5 is then 4V3 / 4k7 = approx 1mA.

This 1mA is pulled from the "high voltage" supply +Vdc through R6.

R6 has a voltage drop of approximately 1mA * 2k2 = 2V2

The voltage drop over R7 is one diode drop lower: 2V2 - 600mV = 1V6.

If you want a LED current of 50mA, then you dimension R7 to be 1V6 / 0.05 = 32 Ohm (33 Ohm is a standard value).

How you combine the LED strings from your display to the display drivers depends on whether you have Common Anode or Common Cathode displays.

The "high" voltage needs to be at least 2V higher than the voltage over the LED string, but is not critical, anything beetween 18V and 30V probably works, but if the voltage gets high then it increases the dissipation of Q6 and you may need to cool it (add a small heatsink).

 

 

The circuit around Q5 and Q6 is also sold in an integrated IC form, and is then called a "high side switch" (But without the current limiting).

Sometimes these are built out of FET's, sometimes with BJT's or a combination of one of each.

 

Recently I bought a bunch of PT4115 LED driver chips from Ali, and these chips are very cheap. (about 2ct each).

These are supposed to be used as a current regulated SMPS and can probably also be used.

I am almost certain these can also be used as high side switch by simply shorting the current sense resistor, but I have not tested this.

This is a pretty small SMD chip though and is finicky to work with if you do not have the proper tools and a PCB with a fitting footprint.

In the picture below you can see an experimental test circuit for the PT4115, together with an SMD diode and a few other THT components in "Dead Bug Manhattan" style.

file:///home/paul/fotos/2018--foto/IMG_7145_pt4115_small.jpg

Doing magic with a USD 7 Logic Analyser: https://www.avrfreaks.net/comment/2421756#comment-2421756

Bunch of old projects with AVR's: http://www.hoevendesign.com

Last Edited: Tue. Jan 29, 2019 - 03:47 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The OP wrote "common anode".

 

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ka7ehk wrote:
OP wrote "common anode".
Ah, well. Well see if OP can extrapolate from #5.

Doing magic with a USD 7 Logic Analyser: https://www.avrfreaks.net/comment/2421756#comment-2421756

Bunch of old projects with AVR's: http://www.hoevendesign.com