Tuesday, February 20, 2018

PortaLED

I was also able to assemble the other PCB, the portable LED circuit thing. It was rather interesting assembling it since I had to go in and fix a few places that didn't reflow well, and I accidentally dumped a ton of flux on the board (didn't realize the flux pen would release so much). After a bit of debugging, the main LED driver seems to work and I am able to program the microcontroller. However, the battery charger doesn't work, or at least charging indicator light doesn't work. I'll need to figure that out later. Also, during my debugging process I lifted a pad somehow and one capacitor is soldered in at an angle now.

Completed board. A bit gunky from the left over flux.
My idea to program the microcontroller with the pads on the bottom of the board turned out to not work so well. It was too difficult to maintain good contact with all the pins without some sort of clamping rig, and for now I just soldered in some pins. I can take them off when I'm happy with the firmware.

Programming header.
This thing is stupidly bright. And hot. Running the LEDs at full power generates quite a bit of heat from the LEDs, and I'll likely limit how long that mode is allowed to run for.

Bright.
Things to do (updated 2/25!):
  • Fix charger (seems to work but LED doesn't turn on during charging)
  • Add different brightness modes (added 8 brightness modes; thinking about implementing a brightness ramp and shutting down some brightness levels when battery gets lower)
  • Add battery low voltage shutdown (code doesn't allow lights to turn on when battery is below a certain level, need to add warning)
  • Add battery voltage blink out (done, but code is blocking and a little buggy)
  • Design a case (in progress)
All updates 2/25:

I've just written a simple firmware for the light; it now has 8 brightness modes and can display the battery (or VCC in general) voltage. I'm still considering adding more brightness and blinking modes, but for now my focus is designing a nice case for it. (Code at my Github here.)

Reading more into the datasheet of the ATtiny85, I think I've just found my new favorite microcontroller for small projects. It can has 4 PWMable outputs (some can be setup to be opposing pairs with a deadtime generator) and a differential analog input mode with internal 20x gain, and everything else in a normal AVR. The PWM I know isn't that special, but I'm not sure how common the differential input mode is among 8-bit AVRs. Regardless, a cool feature I will want to try out some time.

No comments:

Post a Comment