johnridley: (555)
[personal profile] johnridley
This was goal #3 in getting this blinkie up and running. This was the last significant hurdle as far as the software is concerned. Now I just need to develop some nifty patterns. I may add one more thing, which is a simple pushbutton for on/off and modes, rather than just an on/off switch. Depends on how the patterns go.

I was kind of dreading this step because interrupts on this chip was one thing I knew nothing about, and I must admit I was dragging my feet on getting to it, but I finally decided I'd better get moving. I was tearing my hair out for about an hour because the compiler kept optimizing out all my pattern generation code. Finally I realized that I had to define the values as volatile, and it started right up.

Of course the board needs to be laid out but I have a friend who will help with that (I don't know the CAD software used and he's done a ton of this stuff). I also need to determine how long it will run off a CR2032 battery (I did test that it DOES run off one today) - and also I need to see if I can decrease the duty cycle of the LEDs without a lot of difference in brightness - that will increase battery life.

Depending on battery life, I may have multiple options. Two AAA cells on the back would run it for quite a long time but would be too heavy for earrings, OK for a necklace.

CR2032s in quantity are QUITE cheap, on the order of 12 cents, but I don't know what my runtime would be with them. A single CR2032 has very nearly the same energy as the four LR44s that the previous blinkies have been using (3v x 225mAH = .675 watt hours, vs 6v x 120mAH = .72 mAH) but it's a lot smaller and lighter and both the battery and the holder are cheaper.

Date: 2010-11-30 04:30 am (UTC)
From: [identity profile] ann-totusek.livejournal.com
Yay! What's "charlieplexing"?

Date: 2010-11-30 12:22 pm (UTC)
From: [identity profile] johnridley.livejournal.com
It's a technique to drive the maximum number of LEDs possible off a given number of wires. It's why I'm able to drive 20 LEDs and up to 5 switches off 5 wires and light any single light in the group I want to.

It's not really hard to understand if you care to look:
http://en.wikipedia.org/wiki/Charlieplex

But the drive software for it is a little more complex than average.

February 2026

S M T W T F S
123456 7
891011 121314
15161718192021
22232425262728

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 14th, 2026 09:31 am
Powered by Dreamwidth Studios