Battery powered binary clock

Hi,

I'm planning to build a binary clock.
I will be using an Arduino pro mini 3.3v, a real time clock module and ~20 LEDs which I will build into an LED matrix with additional resistors.
I also plan to use shift registers to help control the LED matrix and save on Arduino pins.

Before getting into it, I'm trying to understand how feasible it would be to power the project using a 3.3v LiPo battery.

Assuming I want the clock to constantly show the time, is there any useful advice to get the most out of the battery and allow it to last several days before recharging?

Thanks,

Meir

Nick Gammon has a good tutorial on low power techniques.

...R

Your problem is the leds will consume the majority of the power.

If you run them at say at 5mA , then that is 100mA if all are lit , and say an average of 50mA ( not all the leds will be lit all the time ) . The processor and clock
will also take some power , but putting it to sleep for some of the time might be possible - no idea say 10mA.
So 60mA... Battey life is capacity (mAh)/ 60. In hours .

To save power your options could be to turn it off when it’s dark, turn off when no one is present , or maybe look for an alternative display or run it off the mains . If you flashed the display on /off ( say on 2sec off 2sec you would double the battery life)

One suggestion for battery power is to use a PIR module to turn it on.

I'm trying to understand how feasible it would be to power the project using a 3.3v LiPo battery

Not feasible for a hobbyist, especially when using LEDs for the display.

There are no battery chargers on the hobby market that can safely and properly charge a LiPo battery while it is powering other circuitry.

thanks everyone for the useful advice

Use the most efficient (luminous) LEDs you can find. I have some that are more than bright enough for a display when driven at 1mA.

Another thing, it is a clock so it knows the time - perhaps there are some times of day when it isn't needed, and you could put it to sleep.

Well, it uses a RTC, so it will be sleeping most of the time anyway, in between the 1 second interrupts. If you know a time range when it is not required, you disable the 1 second interrupts in favour of the alarm interrupt. But the PIR is probably the better idea. :sunglasses:

Hi,

I'm planning to build an LED matrix for a binary clock.
I have 20 LEDs in 3 different colors. Some of them require a voltage drop of ~2v and others require 3v.
current requirement is ~20ma per LED.

For the controller I'm planning to use an arduino pro-mini 3.3v.

As this is a clock, there will be cases where I'll need to power 3 or 4 LEDs at the same time from the same row or column and other cases where I'll need to power only 1 of them.

And now to my questions:

  1. I assume that the 3.3v from the Arduino pin will be insufficient to power more than one LED and the current requirements for 3 or 4 LEDs will probably fry the card.
    I was thinking of using an external power source + transistors but then, what happens in the case where only a single LED in a row needs to light up? Won't it fry after a while due to the large voltage drop?

  2. As for the resistor placement: I saw LED matrices where a resistor was placed after each LED, and others where there was a single resistor per row and per column. What would be the best recommendation for my case?

Thanks,

Meir

Some of them require a voltage drop of ~2v and others require 3v.

No they do not require a voltage drop they have a voltage drop. The difference between the Voltage drop and the supply voltage is taken up by the resistor. The resistor to use with the LED is then found by the voltage across the resistor divided by the current you require.through the LED.

You do not require 20mA through the LED, that is the maximum you should have, modern LEDs work quite well on 10 mA or less.

I assume that the 3.3v from the Arduino pin will be insufficient to power more than one LED and the current requirements for 3 or 4 LEDs will probably fry the card.

It is not the voltage so much as the current capability off the pin that limits you, this varies depending on the sort of Arduino you have.

I saw LED matrices where a resistor was placed after each LED, and others where there was a single resistor per row and per column. What would be the best recommendation for my case?

It depends on how you wire up your matrix and how you drive it in software. There is no best way only a correct way or incorrect way depending on these factors.

what happens in the case where only a single LED in a row needs to light up? Won't it fry after a while due to the large voltage drop?

No because the current path through each LED will always contain one and only one resistor.

You seriously need to explain why you would propose to use a 3.3 V processor for this project, given that it will cause you trouble in driving the LEDs which you clearly do not comprehend to begin with (which is fair enough :grinning: ).

Simply using a 5 V processor will make it a lot easier, I am inclined to suggest you use a MAX7219 (readily available Chinese modules from eBay/ Aliexpress if you can wait), but you need to give a genuine outline of your project before we can help you. :roll_eyes:

Binary clock implies something other than 7-segment display kind of arrangement.
Your description of the clock being based on a matrix implies that you need to multiplex the LEDs, driving one a time, rapidly switching between those that are on at any one time so they all appear to the eye as being on at the same time (persistence of vision).
If some have a 2V drop and others a 3V drop, then perhaps the matrix could be arranged to have those with the same drop be connected up in the same row or column.

This page shows an 8x8 matrix (but omits current limit resistors, generally a mistake in my opinion for long term longevity of the 328P - they are needed in series with the row outputs, or the column outputs), you could just use a 4x5 portion of it, putting the common Vf parts so they share the same current limit resistor. Then as you scan the matrix, the combination of one high Row output and one Low column output will turn on just one LED as described in the comments in the code.

There are transistors in the outputs of the microprocessor - one connects to Vcc to drive an output high (sourcing current), and one connects to Gnd to drive it low (sinking current). The two transistors will have some voltage drop across them that may limit the total voltage available to support Vf of the LED (the 2V and 3V you describe). You should do some experimenting before wiring everything up to see if you have the right LEDs and current limit resistors. Write some code that turns on the LED 1/20th of the time and see if the brightness will satisfy your needs.
I would suggest using the code on the linked page and adjust it for 4x5 size as a starting point.

Paul__B:
You seriously need to explain why you would propose to use a 3.3 V processor for this project, given that it will cause you trouble in driving the LEDs which you clearly do not comprehend to begin with (which is fair enough :grinning: ).

Simply using a 5 V processor will make it a lot easier, I am inclined to suggest you use a MAX7219 (readily available Chinese modules from eBay/ Aliexpress if you can wait), but you need to give a genuine outline of your project before we can help you. :roll_eyes:

The reason I'm planning to use the 3.3v Arduino pro-mini is because I want to power the project by batter and prefer to save on power as much as possible.
I'll look into the MAX7219, it seems like an interesting option that can save me some pins.

Thanks Paul, CrossRoads and Grumpy Mike for the excellent advice

Meir

You can use 4x 1.2V AA with 5V/16MHz Promini andMAX7219. The MAX7219 will add to your total current draw.
What else are you doing that needs more pins?
Serial - 2 pins
Matrix - 9 pins
2 analog pots - 2 pins
13 total.

Or
Serial - 2 pins
2 analog pots - 2 pins
MAX7219 - 3 pins
7 Total.
Will be more difficult to match brightnesses with MAX7219. You to select one current level for all connected LEDs.
If the too-bright ones are on their own Digit pin, I suppose an extra resistor could be added to try and tone them down. I've never tried that.

meirgold:
The reason I'm planning to use the 3.3v Arduino pro-mini is because I want to power the project by batter and prefer to save on power as much as possible.

Thought that might be the story. :grinning:

Well now, you are really asking for trouble here. :astonished: What sort of battery did you have in mind?

OK, i now realise this has been dealt with before, so i will leave it to see if we can get your cross posts merged. :roll_eyes:

3.3V 8MHz Promini with LiPo starting at 4.2V and fading down to 3.7 would be fine. No regulators needed. Connect battery to Vcc and not Raw.

@meirgold

Other post/duplicate MERGED

Please do NOT cross post / duplicate as it wastes peoples time and efforts to have more than one post for a single topic.

Continued cross posting could result in a time out from the forum.

Could you also take a few moments to Learn How To Use The Forum.
It will help you get the best out of the forum in the future.
Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.

However the MAX7219 will not be as appropriate at 3.7 V.

If you are going to do that, then directly driving a LED matrix with the Arduino (Pro Mini) probably would be the best. That will require nine pins. Your original notion of using a shift register is probably not a good idea as the Arduino has better drive capability than a 74HC595 however if you used a TPIC6B595 as part of the arrangement (cathode driver), it is more effective again than a ATmega328 pin.

So your matrix could be driven by eight outputs of the TPIC6B595 and three Arduino pins, total six pins. Why are you concerned about the pins? You can add five or eight switches (with diodes) to the matrix with one additional pin.

TPIC6B595, TPIC6C595 needs 4.5V Min also, so they're just as inappropriate as MAX7219.

Oh well!