Here, for your delectation is the Car-barDuino, a simple display system for analog and digital stuff, for a car, for a timer, for a thermometer, for whatever. I built it for a manifold pressure meter for friends car, I'm going to use it at work for some monitors in a research instrument.
Under the hood, it uses a micro configured to run "Arduino" sketches, so anyone can play with the code. All the spare I/O has been brought out to connectors to play with.
Enjoy and employ.
Step 1: What It Can (and Can't) Do
There are 15 levels of digital control of LED brightness, and a SINGLE resistor to set the maximum brightness of all of the LEDs on one chip.
The processor can be any standard Arduino (Atmega 168 or 328) and with the ICSP connector, you can burn your own bootloaders.
The input interface uses a simple current limiting resistor and two diode clamps to the 5V rail. DON'T make a habit of driving into the clamps !
There are no input scaling resistors on the circuit at the moment.
Step 2: How It Works
Here are the schematics. At the right hand end, Its a generalised, basic ATmega 168 or 328 layout, with the FTDI interface cable for serial connection to the outside world, and the ICSP connector for fast programming and/or bootloader installation. The LEDs are driven by a Max 7221 or Max 7219 (datasheet)
There are currently only two analog inputs wired, and they have diode clamps to the 5V supply rails.
The unit is designed to run off a 12V supply, there is an on-board 5V regulator that barely gets warm at all in use.
Step 3: Building One
The Bill of Materials shows what you need. Suggested sources ? In the UK, Rapid, RS and Farnell have everything. Farnell is Newark in the USA.
Assembly has been made deliberately easy, since Chris, who suggested it (Hi Chris !!) hasn't got access to surface mount assembly, and should present no problems at all to anyone with decent soldering skills. There are a couple of simple SM capacitors to fit, and a resistor, which should be fitted before the Arduino !!
If anyone is interested, I have some spare PCBs that I can sell on - it turned out to be as cheap to make 5 as 1 ! Go figure. The board has a couple of very minor screwups that I'll fix if I make more of 'em, but the lucky first buyers get to fix their own.
Step 4: Using It
You need to look at my "ledSetup" command to allocate the right pins to the MAX7221, and I also made things better by limiting the scanregister to 4.
Take a look at my pin mapping functions in "BarGraph" I can do dots, and bars. A bit more work, probably with the mapping function and you could do some really neat animations.
The source includes a digital filter called an "exponential forgetter" or first order low-pass filter. Its designed around binary math as far as possible, for high speed operation using shifts and not explicit multiply operations.
The input (0.1024) digits is scaled to 0..30 digits currently: there's no reason not to scale it 0.99 for the 7 segs, and scale it 0..30 for the bar.
I've got several little projects lined up, a VU meter is pretty obvious - the next gen board'll squeeze in two rows of bar, probably only 20 bits per row !
A couple of folks have asked about adding OBD-II interfaces to the thing. I am looking at suitable interfaces for it at the moment - there are three different standard interfaces !!
What I WILL be doing on my next boards is two rows of 20 bars + 4 digits, 2 on each line. Optionally, you can have just 30 bars on each line.
Here's a (future) list of other projects running on the same hardware. If you've got a project you've done using it, let me know in the comments and I'll add a link here:
- VU meter, coming soon
- Reaction timer
- Bath thermometer
- Kitchen timer
- TDS/EC meter
- Moisture meter
- Vacuum/Boost Gauge (gage !) by skullmaster20