More light! — Prolly my LAST large perfboard prototype

I’m still alive — physically that is.

Recently I felt the urge to do some soldering an I promptly succumbed to it. 3 days later I was done and totally fed up with having to solder using the “W-word”. The ZEN like qualities of soldering definitely don’t last for 3 whole days…

This piece is intended to be mounted to the back of my bicycle “one day”. It uses an UDN2981A 8-channel NPN source driver, 3 MBI5168 constant current shift registers and the usual ATmega168. The low-level ‘make the LEDs glow’-code is derived from my 8×8 RGB matrix project. I added double buffering, so the little state machine that takes care of features like “blink left/right”, “break-lights” and normal “tail-light” can just write and over-write the shadow-buffer according to their priority. Once that is done, the buffers are switched. I ran into a C-problem related to “pointers to 2-dimensional arrays”. As it turns out such a thing doesn’t really exist, but has to be a 1D array of pointers to 1D arrays… ARGH. I just couldn’t get the hang of that and chose to convert the 2D array into a simple 1D array and use some pointer math calculating the proper offset to do what I want. Here’s a short excerpt to illustrate the concept:

Pictorial illustration:

And a few obligatory videos as well:

a) just some testing the basic capabilities, colors, brightness…


b) more real life example with blinking, normal taillight and break lights

Only 320×240 this time. My uplink is just 40kb/s — but cheap ;-)

Youtube has finally found the problem and fixed the ‘video processing forever error’, so here it is:

The LED drivers need at least 6-7V supply voltage to make the LEDs happy. The inevitable internal voltage drop of the drivers (collector-emitter saturation voltages or I*R(DS)_on if FETs are involved) must be compensated. It still runs at 5V, but not as well as it could. Either I’ll have to add some sort of boost converter or just use 4x AA cells or maybe 2 LiPo batteries in series. The LiPos would be much better in terms of energy usage, as they’re quite empty at around 3.1V (or 6.2V in series). But I’d have to include a management chip (charging / preventing deep draining) for them I think. The low battery shutdown could easily be implemented using the analog comparator of the ATmega168 chip as well.

EOF

This entry was posted in Arduino., Electronics., Soldering & PCBs. and tagged , , , , , , , , . Bookmark the permalink.

2 Responses to More light! — Prolly my LAST large perfboard prototype

  1. Hi! I like your project. I will feature it today in pcbheaven.com

  2. Asdf says:

    PROBABLY*

Comments are closed.