Go Down

Topic: Control three digit 7 segment displays from Pro Mini (Read 468 times) previous topic - next topic

ShermanP

74HC595 would work, but total current thru the IO pins needs to be limited to  <= 70mA Absolute Max to avoid blowing the VCC or Gnd pins.
So roughly 8mA per IO pin as mentioned above.
But if you multiplex one segment at a time, instead of one digit at a time, the maximum load would be three segments, which any HC part should handle easily.  And the maximum common cathode load would be one segment, which any Arduino pin should handle easily.


PaulRB

Normally, multi-digit 7-seg displays have common anodes and common cathodes and there is no choice but to multiplex. A 3-digit display would have 11 or 12 pins. Does your display have more? Like 27 pins for example?

Also you say that the digits are 1.2" high but you need to drive them with 3.3V.  Large digits often contain two or more LEDs in each segment, meaning 3.3V will not be enough to drive them. What is the forward voltage of the segments in your display?

You also say you want to drive them with 10-20mA per segment. Is this to achieve high brightness, for outdoor use for example? If so, this will be difficult to achieve if you need to multiplex. Multiplexing lowers the average current and therefore brightness. Multiplexing by digit would result in a 1 in 3 duty cycle and would lower the average current and brightness to one third of your target. This can be compensated for by increasing the current and over-driving the display, but if you don't have data sheet, you don't know if that's safe to do without damaging the display.

Also, even at 10mA per segment, you would need 210mA at 3.3V if not multiplexing. This is close to the limit of what the Nano's regulator can provide. Even large batteries will be quickly drained.

So... please provide much more information, if you truly want our help. A link to the data sheet for the display, if you have it, or any codes printed on the display to allow a Google search. And details of the batteries to be used.

adwsystems

#17
Apr 19, 2019, 08:27 pm Last Edit: Apr 19, 2019, 08:28 pm by adwsystems
Normally, multi-digit 7-seg displays have common anodes and common cathodes and there is no choice but to multiplex. A 3-digit display would have 11 or 12 pins. Does your display have more? Like 27 pins for example?

Also you say that the digits are 1.2" high but you need to drive them with 3.3V.  Large digits often contain two or more LEDs in each segment, meaning 3.3V will not be enough to drive them. What is the forward voltage of the segments in your display?

You also say you want to drive them with 10-20mA per segment. Is this to achieve high brightness, for outdoor use for example? If so, this will be difficult to achieve if you need to multiplex. Multiplexing lowers the average current and therefore brightness. Multiplexing by digit would result in a 1 in 3 duty cycle and would lower the average current and brightness to one third of your target. This can be compensated for by increasing the current and over-driving the display, but if you don't have data sheet, you don't know if that's safe to do without damaging the display.

Also, even at 10mA per segment, you would need 210mA at 3.3V if not multiplexing. This is close to the limit of what the Nano's regulator can provide. Even large batteries will be quickly drained.

So... please provide much more information, if you truly want our help. A link to the data sheet for the display, if you have it, or any codes printed on the display to allow a Google search. And details of the batteries to be used.
They are individual 7-segment elements, each element has 10 pins, so 30 pins total. The displays are listed as Vf=3.3V and If=20mA max. There are no markings on the devices. I determined the pinout at trial-and-error. Power is planned to be from a 2-cell 18650 battery pack (rated 4400mAh).

xl97

Curious:

I dont see any one mention/suggest the MAX72xx cips at all?

I find them very easy to work with... is there a reason why is was not recommended?


Edit:

Nevermind.. a quick re-read showed me that I originally glazed over:

"All to run on 3.3V from battery power"

as I believe all MAX72xx chips require 5v..

PaulRB

You can't run displays with Vf of 3.3V with only a 3.3V supply. You need around a volt more.

CrossRoads

#20
Apr 20, 2019, 12:18 am Last Edit: Apr 20, 2019, 12:18 am by CrossRoads
"Power is planned to be from a 2-cell 18650 battery pack (rated 4400mAh)."
So why not regulate that down to 5V with a switching regulator and use standard parts? Will make the design easier.
Can use MAX7219 then to do the multiplexing. Or ten pins off the Arduino; use three to drive NPN transistors or N-channel MOSFETs to sink the common cathode from the 3 digits; or if single segment multiplexing, then sink the current with an IO pin.  Or save some pins by shifting the anode data into a MIC5891
https://www.digikey.com/product-detail/en/microchip-technology/MIC5891YN/576-1310-ND/771779
to provide the source current into the anodes, and multiplex across all 3 digits for a brighter output.
Three transistors for sinking current, and use fewer pins overall. Clock, data, latch for the shift registers, and 3 pins to drive current sink transistors.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

ReverseEMF

Nevermind.. a quick re-read showed me that I originally glazed over:

"All to run on 3.3V from battery power"

as I believe all MAX72xx chips require 5v..
The MAX7219/7221 Datasheet offers MAX6951 as a 3V alternative [2.7V to 5.5V].
"It's a big galaxy, Mr. Scott"

Please DON'T Private Message to me, what should be part of the Public Conversation -- especially if it's to correct a mistake, or contradict a statement!  Let it ALL hang out!!

CrossRoads

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

adwsystems

#23
Apr 20, 2019, 03:36 am Last Edit: Apr 20, 2019, 04:03 am by adwsystems
"Power is planned to be from a 2-cell 18650 battery pack (rated 4400mAh)."
So why not regulate that down to 5V with a switching regulator and use standard parts? Will make the design easier.
Regulate 3.6-4.2V down to 5V? Lost me there.

Can use MAX7219 then to do the multiplexing.
This looks like a viable option. One chip to drive all 3 digits (I guess I would just send 0 to the other 5).

Or ten pins off the Arduino; use three to drive NPN transistors or N-channel MOSFETs to sink the common cathode from the 3 digits;
At first I didn't follow. But I see it now.

or if single segment multiplexing, then sink the current with an IO pin.  Or save some pins by shifting the anode data into a MIC5891
https://www.digikey.com/product-detail/en/microchip-technology/MIC5891YN/576-1310-ND/771779
to provide the source current into the anodes, and multiplex across all 3 digits for a brighter output.
Three transistors for sinking current, and use fewer pins overall. Clock, data, latch for the shift registers, and 3 pins to drive current sink transistors.
The MIC5891 is a 5V part, I don't have 5V.


What about using three CD4511 chips? Vcc 3-18V, output 25mA per channel, Latching so only 7 pins required (4 for display and 3 latch pins).

PaulRB

Quote
Regulate 3.6-4.2V down to 5V? Lost me there.
I think CrossRoads is suggesting you connect the batteries in series to give 7.2~8.4V, then regulate that down to 5V. A linear regulator would waste much of your battery capacity. A DC-DC step-down convertor would only waste a little. Or connect the batteries in parallel and use a DC-DC step-up convertor to make 5V.

I'd like to help with more suggestions, but a couple of my questions from post #16 have not been answered yet, around required brightness. That will help with the decision to multiplex or not.

PaulRB

Quote
What about using three CD4511 chips? Vcc 3-18V, output 25mA per channel, Latching so only 7 pins required (4 for display and 3 latch pins).
They could work. The chip drops around 1V, and you need to drop some voltage across your series resistors, so you would need a supply voltage at least 1.5V higher than the Vf of your segments.

If you supplied 5V to the chip and you wanted 10mA per segment, the driver output voltage would be around 4.1V. Your series resistors would need to be (4.1 - 3.3) / 0.01 = 80R. For 20mA, the output would be 3.95V, so the series resistors would be (3.95 - 3.3) / 0.02 = 33R

33R is quite low for a series resistor. A small change in the Vf of your LEDs, because of variation between the LEDs, or rise in temperature when the LEDs have been on for some time, can result in a large change in the current. For example if the Vf was as low as 3.0V, the current would be (3.95 - 3.0) / 33 = 31mA.

If you supplied the chip directly from the batteries, assuming a nominal voltage of 3.7V, the chip's output drivers would still drop around 0.9V at 10mA, so the output would only be 2.8V, not enough to drive your LEDs.

adwsystems

I think CrossRoads is suggesting you connect the batteries in series to give 7.2~8.4V, then regulate that down to 5V. A linear regulator would waste much of your battery capacity. A DC-DC step-down convertor would only waste a little. Or connect the batteries in parallel and use a DC-DC step-up convertor to make 5V.

I'd like to help with more suggestions, but a couple of my questions from post #16 have not been answered yet, around required brightness. That will help with the decision to multiplex or not.
Series is not an option, I have not found cost effective series LiPo Charger.

Yes this is for outdoor use. The test was not multiplexed an readable at the required distance.

PaulRB

And was the test 10 or 20mA per segment?

Max7219 can source up to 30mA per segment when only 3 digits are scanned, so that will average 10mA, making a multiplexed display with one chip and no segment series resistors needed, just a couple of caps and one current setting resistor. This might be the simplest option, if 10mA per segment is bright enough.

PaulRB

Are 18650 size LiPo batteries made? I have only seen Li-ion. You don't have to charge them in series, you simply remove them and charge them in parallel in a dedicated charger.

adwsystems

#29
Apr 20, 2019, 02:21 pm Last Edit: Apr 20, 2019, 02:28 pm by adwsystems
Are 18650 size LiPo batteries made? I have only seen Li-ion. You don't have to charge them in series, you simply remove them and charge them in parallel in a dedicated charger.
Yes, technically LiIon. Most chargers do both.
And was the test 10 or 20mA per segment?

Max7219 can source up to 30mA per segment when only 3 digits are scanned, so that will average 10mA, making a multiplexed display with one chip and no segment series resistors needed, just a couple of caps and one current setting resistor. This might be the simplest option, if 10mA per segment is bright enough.
I don't recall. It may have been either. 10mA because I didn't want to blow up the display or 20mA because that is the typical maximum and it is outdoors.

And 5V that I don't have.

I'm looking at the MAX6950. SMD only but I have a stash of adapter boards (I use a lot of PCF8575s).

The MAX6950 specifies LED Vf=~2.2V. I don't see the same specification in the MAX7219.

Go Up