Feed on
Posts
Comments

The PCBs for the AT Mini Matrix Ctrl (new name for the AT Mini LED Matrix) have arrived!

IMG_2953

IMG_2952

After cutting up the PCB by hand, we are ready to build it. There’s a small mistake with middle PCB’s silkscreen being the wrong way round.

IMG_2958 IMG_2959

Soldered an ATmega168 with programming wires on the bottom, the 32KHz crystal, 1K SMD resistors and LED matrix on the top. There’s a small grap between the LED maxtrix and the PCB, thought it would fit right on but the 32KHz crystal must be a little too big.

IMG_2961 IMG_2965

Final product assembled, with the 3rd bottom PCB on it’s a little larger in height than I would have expected. The middle PCB has the battery holder and I had to cover up the VCC and GND pins with tape which you can see. The bottom PCB is optional but has a male and female header to stablise it all on a flat surface, I should probably only have male headers to reduce the gap by about half and have the PCB touching the battery holder. I could flip the middle PCB and use a CR1220 battery to make it a 2 PCB design and smaller but it wouldn’t last as long.

IMG_2966

I now removed the female headers and just have male headers. It measures 20mm x 20mm x 19mm height (but lets round up to 20mm), so 20mm all round.

Battery Life

I measured the current consumed whilst on power save and it’s very low at 0.75uA, normally an ATtiny85 or similar with the watchdog timer enabled when sleeping is 4 or 5uA. When it’s awake and driving the LED matrix it consumes about 2 – 2.5mA and lets say each animation lasts for 8 seconds.

at1-2

In a 24 hour period, we should take out 11pm to 6am for sleep. Let’s say we want the battery to last 2 years, we need to keep it down to every 32 minutes per 8 second animation, of course we wouldn’t run an animation every day (or would we?) but for me I’m thinking more birthdays, holidays, special occasions, etc, so possibly at most it would run one day every 1 week.

When I want it to run I’d like it to be frequent between the hours of 6am to 11pm. We can add up all the time we can spend during a week – 24 hours x 7 days / 0.53 hrs (32 minute pulses) = 316 times then divide by 17 hours running time during the day = 18.5 times an hour for those 17 hours on one day of the week (every 3.2 minutes) which seems pretty good. If you wanted to you could display an animation every day – say at a specific time – 9am to 10am and more frequently so it’s really up to you how you decide to use it.

For comparison, using a CR1220 30mAh battery with a pulse of every 4 hours would give us 2.47 times an hour for 17 hours.

Small code changes

trigger_delay = 0; // Reset trigger delay
TCNT2 = 0; // Reset timer to 0 count as it's still counting
while ((ASSR & ((1<<TCN2UB))) != 0); // Wait until one TOSC1 cycle has elapsed
TIFR2 = 0; // Clear the Timer/Counter2 Interrupt Flags
TIMSK2 |= (1<<TOIE2); // Enable overflow interrupt

I’ve decided to remove the code which stopped the timer when the animation was running because this will obviously affect the real time after lots of animations have been displayed. It’s now up to the user to know how long their animation runs for and add in the appropriate delay to wait until re-displaying the animation. Download AT_Mini_LED_Matrix_v0.3

Worked on the first go!

Part 1
Part 2
Part 3
Part 4
Part 5: Modifying a PIR module

Leave a Reply