Friday, May 25, 2012

There was a question on the PICAXE forum asking about building up a "Knight Rider" display. The '80s TV show "Knight Rider" featured a 1982 Pontiac Trans Am named "KITT" that had some blinky lights mounted in the hood that somehow let the car solves crimes and do some other amazing stuff. Pretty impressive technology for an early '80s American car!

-----
The authentic way to do the "KITT" display is to show LEDs moving back and forth by turning a "main" LED on full bright and surround that full bright LED with progressively dimmer LEDs. That is not that hard to do using the PWM (Pulse Width Modulation) features of the PICAXE, but I thought there may be an easier way.

I wanted to test a simpler way to simulate the display on "KITT" by just turning the LEDs on/off in sequence quickly. I was also interested in experimenting with the PICAXE "let dir", "let pins", and "lookup" and this seemed like an easy platform to do this. In the first attempt a PICAXE 18M2 was used to simulate an eight LED "KITT" display. The result was surprisingly excellent. To me, the PWM is not really needed due to the persistence for your vision and the LEDs. An ADC input on the PICAXE was used to allow for an adjustable delay on how fast the display moves. Here is a short video of the results:

The original forum question was asked by Jacob2803. He gave it a try with my code as well and here is a short youtube video of his nice result: http://www.youtube.com/watch?v=HwoHKqRI-sY
-----
After seeing an eight LED Chaser display the discussion of using more LEDs came up. More is always better, right?. The PICAXE forum is an interesting place. It has participation of users from all levels; beginner to expert, and the brainstorming of solutions (on many problems) can be inspiring. Many options were provided on increasing the LED count. My thought on increasing the count on the LED Chaser display was to use the PICAXE 08M2 and the 74154 (4:16 Decoder). The PICAXE 08M2 has fewer outputs than the 18M2 that was used above, but the 74154 only needs four control signals to turn on any one of 16 LEDs at a time.

Here is a picture and short video of what the 16 LED Chaser looked like on the development board:

-----
The 16 LED Chaser looked so cool, I decided to move it to a PCB and keep it "forever". It barely looks like it has any similarity to the development board build. Since the circuit is very minimal it cleans up well on the PCB.

-----
I programmed a few different chaser patterns into the PICAXE that can be selected with a button press. Here is a short video of the PCB version of the 16 LED Chaser in action.

-----
My code and schematic is below in case you want to build your own. If you build it and mount it to a 1982 Pontiac Trans Am please send us a pic. ;)

Select Case WhatCase
Case 1 'LEDs scan up and repeatgosub LEDsUp
Case 2 'LEDs scan down and repeatgosub LEDsDown
Case 3 'LEDs scan up the down and repeat. This simulates the display on the "KITT" car in KnightRidergosub LEDsUpgosub LEDsDown