Sunday, 26 May 2013

Start Up Logos & Tachometer

Bitmap of MR2
MR2 Black-and-White Image
I got bored today and started mucking around with a start-up logo for the vehicle data system.  The Arduino TV-Out library has a neat 'Bitmap' function that will load a properly encoded 1-bit image into the image buffer.  I spent a bit of time on PhotoShop working on a photograph of an MR2 until I got reasonable 1-bit black-and-white picture.  This was converted to a C++ style array using Image2Code, a neat little application and with a bit of editing, this was included into the Arduino sketch (program).

The result is pretty good for a 1-bit picture at 184 x 72 pixels and extremely Sinclair ZX81 retro.  The idea is to have this as a start logo and also for display when the system is in any idle mode.  It looks a lot sharper on a 6-inch or a 7-inch screen too.

I also got the Tachometer routine working on the 18F4520 PIC microcontroller.  It counts the time between pulses arriving on the INT0 interrupt pin and the inverts the time to give a frequency in Hz, which is converted to RPM x10 and sent serially with the other data.

The 18F4620 has 4 timer modules as opposed to the 16F series PICs 2 so there is an option to use another timer/interrupt to get road speed from the speed sensor signal that comes off the back of the speedometer.  I'll have to look into this, but it looks fairly straightforward.  This would give RPM, speed and 10 analogue metrics from the single microcontroller.

No comments:

Post a Comment