Posts tagged with “avr” and “electronics”
My knight rider lights are complete!
09:04 PM | Tags: avr, electronics, projects, knight rider, videoMy knight rider lights temporarily mounted, at night, with the headlights on.
08:53 AM | Tags: car, projects, electronics, avr, knight riderMy lights mounted temporarily mounted to my car with duct tape.
08:52 AM | Tags: projects, electronics, car, avr, knight riderPrototype 2 of my light scanner.
10:28 AM | Tags: video, projects, avr, electronics, car, knight riderAVR for Knight Rider Scanner
Today I focused on the control system for my knight rider lights. Originally I was going to just turn one of my standard AVRs into an Arduino, build the support circuitry and call it done, but as you may have surmised that isn’t what I did.
After looking at some example code for the Atmega8 I realized that it couldn’t be all that hard to implement my ideas in straight C++ and compile/burn it directly. I’d be giving up the pretty IDE for Arduino, and simple serial communication but these are things I could do without. Using Xcode doesn’t scare me and neither do make files or the command line. The upside is that I get a pretty decent performance boost (yea, I know we’re talking blinkenlights here) and from my initial inspections I am somehow getting lower power consumption.
The lower power consumption may be a result of that the micro-controller is doing less now, or more likely that I am no longer powering the extra hardware bits for an Arduino. My controller board is fairly bare bones right now - it is just the AVR, a 10K pull-up resistor on the reset line, a 7805 voltage regulator, power LED and resistor, and a filtering capacitor on the output of the regulator.
I opted to use the internal oscillator to reduce component count; it is just blinken-lights after all and being off by a couple percent in timing isn’t really going to hurt me at all.
After measuring the current consumption and letting my ammeter average the values for a few minutes, my lights are pulling 14.25 mA. I really don’t expect that value to go too much higher once I get all the panels built since the pattern I am having it do is fairly simple. After a little bit of research, I’ve got amp-hour estimates for car batteries ranging from 70Ah to 150Ah. Being that the battery in car isn’t very big, I expect it to be on the lower side of that spectrum. Using worst case numbers (60Ah, 20mA), that brings be to damn near 3,000 hours of run time. With power consumption that low, I may very well leave the lights running all the time.
It won’t be very difficult to have the controller monitor the ACC line or some other signal in the car and have the pattern change based on that. I may just have the pattern slow down by some fairly large factor - almost as if my car is resting. With the appropriate circuitry, the system would survive engine crank and not even stop for it!
This project is making good progress, I just have to build the final version. I can hardly wait!
01:25 AM | Tags: knight rider, electronics, projects, avrMore ATTiny13 and LEDs
Ever since I discovered charlieplexing some time ago, I’ve wanted to implement it and I finally have - at least on a small scale. There are six LEDs controlled by three pins on the micro-controller. Since I didn’t really have the board space, I only used those six LEDs, but once I etch the board (or have it fabbed) there will probably be something like 20 LEDs.
Once I get to that many LEDs, I’ll really have to refine my code since as of now it is fairly rudimentary.
At one point I was putting together a rather nifty animation, but due to my rather inefficient code I ran out of memory to finish it. I only have 1K after all. And while yes, I could drop down to assembly to program it - I don’t know assembly; I know C/C++.
The next step for this little gizmo is to design it a board to use, etch it, and get some proper SMD components.
12:32 PM | Tags: avr, electronics, projects