Me and the Cap’n

So, it turns out that clock crystals need a “load capacitance” between each of their two pins and ground. I’m not entirely certain what these capacitors even do, but I do know that they are critical to keeping good time.

That nixie tube clock that I made originally had a clock crystal in it that had no load capacitors. This resulted in it being inaccurate.

Tik Tok

I have a clock!

So last night/today, I worked on getting the clock part of my AVR working. Here’s the basic rundown.

The ATmega48A has what’s called an asynchronous timer. A timer usually works by simply incrementing a number on a fixed interval of time and doing something special when that number reaches a certain value. Most of the time, the timer will just increment every time the processor’s clock ticks. An asynchronous timer is special in that it can clock along at an entirely different pace.

While the processor is chugging along at 8MHZ, my clock timer is clicking along at 32.768kHz. How do I know this? Because I have it connected to a 32,768Hz clock crystal. Why such an odd number? Lemme explain.

Dearly Departed

So today was something of a downer.

I received my LGA-16 breakout board from proto-advantage.com yesterday, and decided to give reflow soldering another shot with my digital accelerometer, the LIS33DE.
The LIS33DE is the first 3V chip I’ve used that cannot also run at 5V. Because of this, I decided to re-do my breadboard and get myself a 3V power supply. I found an old PC power supply that can output 3.3 volts which is close enough. I’ve got some mounting posts that I’m planning on bolting to the power supply to make it a little easier to manage, but for tonight, I just used some alligator clips to bring the 3.3V to my board.

Now, along this process, I did a very stupid thing. I left my micro controller and temperature probe connected to the board. I’ve always been a fan of hot-plugging in the face of adversity, but in this case, I was a little too reckless, and not only killed another micro controller, but also the temperature probe!

Luckily, I had backups of both, and while desoldering a SOIC part is tedious, it’s by no means impossible.

I think I’m thinking too hard

I’ve been pondering this current-limiting nonsense all day, and I think I’m overthinking.

The issue is this: If I want to get maximum brightness out of my LEDs, I’m going to want to overdrive them a bit because I can run them at a maximum of33.3% duty cycle (if I have three LEDs lighting up at the same time). LEDs that are rated for 20mA of constant current might be rated for up to 100mA of peak current. Apparently, nobody make a 40+mA constant-current LED driver that runs at 3V. Oh well. Continue reading

A greener watch

I’ve been thinking more about energy savings with my watch.

I’m already going to be using some kind of Real Time Clock chip so that it only draws a tiny bit of precious power from my battery when in standby, but what about when I power the thing on?

Well, LEDs aren’t current limiting. This means that unless you do something special, they’ll draw a ton of current (and if you supply them with enough current) blow themselves up or at least severely shorten their lifespan. Because of this, you always need to add a current-limiting resistor to protect them.

Here’s how it works: Continue reading