Control three digit 7 segment displays from Pro Mini

I'm looking at a very small project. Sensor, Arduino Pro Mini, and 3 digit 7 segment LED. All to run on 3.3V from battery power. Problem is I'm a few pins short. 1x sensor plus 3x7 for the display is 22 pins. The pro mini only has 20. Size matters, the smaller the better. What cheap small options do you know of to jump this hurdle?

P.S. Changing the display is not an option. The digits are 1.2" tall and must be able to be read from 20 meters away. In testing, the numbers were just right.

If you multiplex the LEDs you could go with 11 pins for the 3 digits (8 for segments [7 seg, 1 dp] and 3 for digit select) or use 3 595 shift registers (one for each digit) would use 3 pins (clk, data out, latch).

Or a driver such as this...

MAX6958/MAX6959

No decimal point required. Hmmm. 595's so 4 pins total. Is there a smaller Arduino than the pro-mini with at least 1 analog in and 3 digital out and run on 3.3V?

look into Attiny45 or 85

wolframore:
look into Attiny45 or 85

Can that be programmed from the Arduino IDE? I don't see the option.

Tinyy85 has 5 pins available after Vcc, gnd and reset. So that meets the 1 analog in an 3 digital out requirement. They can run on 3.3V and the 8 MHz internal oscillator. To program them you need to install a "core". I use the ATTinyCore for my tiny 85 projects. They are easy to bootload (to set fuses) and program using the Arduino as ISP sketch and an Uno (or other Arduino board) as a programmer.

groundFungus:
Tinyy85 has 5 pins available after Vcc, gnd and reset. So that meets the 1 analog in an 3 digital out requirement. They can run on 3.3V and the 8 MHz internal oscillator. To program them you need to install a "core". I use the ATTinyCore for my tiny 85 projects. They are easy to bootload (to set fuses) and program using the Arduino as ISP sketch and an Uno (or other Arduino board) as a programmer.

I see there used to be an Arduino Gemma based on the ATTiny85.

This is starting to sound like a lot of extra work. But I'm curious and knowledge is power. Where can I find more detailed information on this?

Here is a better link to The ATTiny core documentation. This page describes the wiring for ISP programming a tiny85 with an Uno. Just use the ATTinyCore instead of the attiny by Davis A. Mellis core.

adwsystems:
I see there used to be an Arduino Gemma based on the ATTiny85.

I can vouch for the Gemma, the Trinket and the Tiny AVR Programmer, but I haven't played with the DigiSpark, and judging by the comments on the kickstarter page, getting the real thing might be a test of patience. But, there are clones on Amazon, and the above link is one with a positive comment. I only included the DigiSpark 'cuz it kept appearing in my searches, and it looked interesting -- good luck :wink:

BTW: SparkFun and Adafruit both do a good job of supporting their products, so check out the websites:

groundFungus:
If you multiplex the LEDs you could go with 11 pins for the 3 digits (8 for segments [7 seg, 1 dp] and 3 for digit select) or use 3 595 shift registers (one for each digit) would use 3 pins (clk, data out, latch).

Not sure the 595s would work. They test only up to 8mA and a total continuous current of 35 mA. I expect to be targeting 10-20mA per segment. The CD4511 seems promising since my displays are common cathode.

adwsystems:
Not sure the 595s would work. They test only up to 8mA and a total continuous current of 35 mA. I expect to be targeting 10-20mA per segment. The CD4511 seems promising, if my displays are common cathode (I hope they are :slight_smile: )

Not sure where you are getting the 8ma number. A 74HC595 should be able to do your 35 ma.

If your displays are actually common cathode, then multiplexing by segment would be another option, using a single 74HC4017 as the segment driver if you're closer to the 10ma per segment than 20ma. That would be a 4-pin setup.

There's a video referenced in the README.

The TPIC6B595 has much greater current capability.

TPIC6B595 needs Vcc of 4.5V tho. Might have to use some CMOS parts driving transistors.

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.

CrossRoads:
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.

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.

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.

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).

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

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