The KITT-duino, DIY Larson Scanner With an Arduino

Intro: The KITT-duino, DIY Larson Scanner With an Arduino



It is my understanding that many Larson Scanners can only pulse from side to side. I felt that that needed to be changed, seeing as that in the newer (yet short-lived) Knight Rider series revival on NBC for about 1/2 of a real season, the iconic red lights would move from right to left and back, start on both sides to meet in the middle (and then return), go from left to right and back, to middle, and then repeat... I drew out in sequence how the LEDs will light up. The arrow indicates the direction the LEDs will light up.

This simple project for the Arduino will produce pretty good results for the time and money, and the code can be modified very easily, which will be detailed later...

Please share improvements on the code with me, this is my first Arduino project (other than the "Blink" tutorial) so I'd enjoy hearing where it could be better.

Now... Onto the materials list.

Also, please rate and comment if you have a minute. It is all very much appreciated.

Step 1: Materials

Assuming you already have an Arduino, there is very little to purchase... This will only require about $4.50 USD in materials and about 3 hours to make if you don't know how to solder well (like me) or maybe under an hour if you are very good at it.

Materials needed:

10 5mm LEDs, any color (I chose red in true KITT style and bought them for about $.05 a piece)
10 220 ohm resistors (Radio Shack part no. 271-1111)
1 Perf board (Radio Shack part no. 276-170)


Soldering Iron
1 ft CAT5 wire or 5.5ft 22 AWG wire
Wire stripper
Wire cutters

And of course, an Arduino. I used a Duemilanove for mine.

Step 2: Board Prep

To begin, plug in the Soldering Iron.. Let it heat up until you complete the following

1- Take the CAT5 wire, splice it down the side, and separate in into a bunch of little insulated wires.
1a- Cut the 22 AWG into 6 inch lengths

2- Strip one end of the wire to about 5mm copper showing. Strip the other ends at about 3mm. Repeat for a total of 11 wires

3- Snip the leads of the Resistors and the down a little so they are easier to work with on the board. DO NOT CUT THE LEDs... If you do, there's no easy way of telling anode from cathode
( + from - ) because from the factory, each LED has a long leg and a shorter leg. Shorter= negative, longer = postive.

FOR THE NEXT STEPS... I drew up a schematic and put a picture of it so if it will help you, that is how it is on the board.

4- Insert the LEDs into the board as shown. The actual gap between them is up to you. Every 3 holes worked for me. Fold the leads down to keep it in place. Make sure the negative side is going through a hole that is plated onto a long strip to connect with all other LED anodes.

5-Insert the one side of the resistor into a hole that is VERTICALLY inline with the cathode of each LED. Insert the other end in a hole that is over the gap with no holes. Make sure it isn't the bottom one. Bend the leads to make it stay.

6- Insert the little wires into the perf board by the 3mm stripped end, one below each resistor. This size will solder well and the 5mm side will fit into the pins on the Arduino. Tape these on, there won't be enough copper to bend it very well.

TIP- Alternate colors of wire (if using CAT5) so it is easier to troubleshoot connections later.

7- Insert one wire as a common lead at the top of the board connected to the anodes.

8- If it similar to the picture, flip it over (or put in some gentle sort of vise) and prepare to solder.

Step 3: Soldering and More Soldering

By now, the soldering iron should be very toasty. We'd better put it to use right about now...

Make sure all of the LEDs are parallel so they won't look zig-zaggy or something weird when they set. I "trued" mine to a tabletop side

Then, solder all connections, taking care not to join any lead to a copper conductor except the one it should be at. See picture for clarification. I connected some of the leads with solder and the built in copper conductors. Like I said, I am not very good at soldering so if you are, don't make the globs of solder so large. Note how the resistors are inline with the LEDs and in line with the small wire. This is key to the project so that when the Arduino turns one pin on, the other LED won't turn on by mistake...

DISCLAIMER- The board, joints, and leads will get very hot!!! Don't try to move anything on the board with your hands while there is hot solder on the board if you can help it.

Step 4: Code and Programming

Now for the actual Microcontroller part.

I have attached a .txt file with the code.

Fair warning, it looks weird but all operations are there. It should work fine.

If it doesn't work right for you, contact me and I will work on debugging it for you.

Note the two integer (int) values to manipulate timing. Much easier than a find and replace.

Now, upload this to your board and then connect the wires as shown on the next page...

Step 5: Wiring the Arduino to the Board

Twist the ends of the wires so that each one has a nice, slender, copper lead.

Insert each one into its respectable pin with the farthest left LED (according to my picture) being in Pin 13, next one to its right in Pin 12, and so on and so on. If done correctly, the furthest LED to the right will be in Pin 4.

Connect the common wire to the GND port on the Arduino.

Step 6: Testing And... Voila?

Now it is time to test everything. If you want to get fancy and technical, check all of your soldering with a multimeter and then correct it with another round of soldering. If you want to be low tech, plug the Arduino with the newly uploaded code to a power supply and let it run. make a note of which LEDs don't light up (by tracing the colored wire if you alternated colors) and then correct only those.

If there is no error, congratulations. You didn't make a mistake which means I must not have made a major one either. We should both be proud of ourselves. I posted a video of what should happen if it is correct. If you have Quicktime on your computer, you should be able to view it. If not, please let me know. The video is of the previous code but with this update, it should run better for you.

If you want more LEDs, get an Arduino MEGA and modify the code for yourself. I don't have any way of debugging it since I only have a Duemilavove.

Thanks for looking



    • Fix It! Contest

      Fix It! Contest
    • Metalworking Contest

      Metalworking Contest
    • Audio Contest 2018

      Audio Contest 2018

    21 Discussions


    6 years ago on Introduction

    led on pin 13 of the arduino is very dim
    i changed numbers in program thinking it was pin 13
    i did from 12-3 but same thing but on pin 12
    can you help

    4 replies

    Reply 1 year ago


    This is because by connecting a LED to PIN 13 makes it connecting a LED parallel to the onboard LED. As in the arduino you have a built in LED connected to PIN 13 of the micro, so if you connect another LED to PIN 13, that means you are connecting a led in parallel to the led on board, so the current consumption increases and the led is DIM! Change the pin


    Reply 6 years ago on Introduction


    Sorry to hear you are having problems... I don't have time to check the code again but if you have time to wait, I may be able to check it sometime later this week.

    Did you use all 220 ohm resistors? If your pin 12 is a higher value resistor, it may be more dim than the others.

    The code doesn't deal with PWM so I'm guessing its a hardware thing... I'll double check that though as I haven't edited the code for awhile and its not committed to my memory... Also. that individual led may have different specs than the rest because of manufacturing variances...

    Let me know,


    Reply 6 years ago on Introduction

    I fixed the code on the last cycle but that should only reduce blinking of LED 4.

    Maybe that 'll work for you; my board isn't set up to test this out so I can't say for sure.

    As far as I can tell, all of the loops are at "thispin ++" so there shouldn't be any amperage change on that... Does it occur on the loop only of when it goes to and from the middle as well?


    7 years ago on Introduction


    i like your instructable. I want to ask you a question: im new to these things and if i use 100 ohms instead of 220, will it destroy my leds?

    4 replies

    Reply 7 years ago on Introduction

    Glad you liked the instructable,

    On an Arduino, the current is low enough that it will not necessarily destroy the LEDs entirely. It may, however, shorten its (LED) lifespan, and, adjust the brightness level.

    The main reason to use a resistor on a project like this is because due to variances in LED manufacturing, many times, 2 LEDs are not exactly the same in terms of electrical requirements, unless you know that they came off of the same batch at the factory. The resistor is used as a precaution to ensure they won't burn out due to a manufacturing flaw or power surge.

    In short, I would go ahead and use 100 ohm resistors. If it doesn't last very long, consider changing the resistors out on the board. But, I don't forecast any major problems in the future.

    (note: the "Blink" tutorial for the Arduino gives a short explanation of using an LED on an Arduino. You can put the two leads right into the Arduino board and they will work as is done in the tutorial.)


    Reply 7 years ago on Introduction

    Thank you so much for your reply which is full of valuable information. I will use 100 ohm resistors too. Good luck with your works.


    Reply 6 years ago on Introduction

    Hi again, i tried your instructable with your arduino code. it only lit LEDs from pin 12 to pin 9 in a loop. Other LEDs didnt light up. I checked connections, LEDs, resistors and cables if they work fine or broken. They work fine by themselves separately. But couldnt do this together. I dont know so much about Codes of Arduino so i cant find if there is a code wrong somewhere. can you help me please? Thanks


    Reply 6 years ago on Introduction

    Sorry for my ignorance but i solved my problem. I did this using a solderless breadboard and i thought the end rows (which are + and - ) are connected from top to bottom. But there is a distinction i saw. I put all LEDs one side of the board and voila :) . Thanks for this instuctable. This was my second Arduino work after blink and it helped me a lot for understanding basic things.


    7 years ago on Step 6

    the video downloads as a .tmp file (does it to me to), but if you rename it as a .mpg file it runs fine in quicktime for me

    3 replies

    Yes, I did notice that... It worked for me on quicktime when my browser said "open with" and I chose quicktime. If this doesn't work for anybody else, let me know and I can try to fix it. Thanks!


    Reply 6 years ago on Introduction

    Glad to hear it. Please note that while the code is updated, the video is not, so you may notice the one LED skipping a beat. That has been taken care of as far as I am aware.


    7 years ago on Introduction

    nice instructable.

    A better way of altering values is to define them as an integer.
    Here's how I would do it......

    inside the setup area add "int value;"

    void setup(){
    int value;

    This creates an address called value which you can then assign a value to.
    (BTW, you don't have to call it value, you can call it Fred if you like)

    Then inside the loop() area, add "value=1000;"
    and then call on value later one.


    void loop(){


    digitalWrite(13, HIGH); // set the LED on


    next command.... etc......


    That way, when you want to change the delay time (in this instance) then all you have to alter is the value of value/frank/whatever.

    Hope this advice from one Arduino beginner to another helps, sorry if I've explained it badly.

    Great first project though.

    1 reply

    I've noticed something when I've put this ible together on a breadboard, just using the back and forth (Not meet in middle) part of your code, the 13th LED blinks twice, any idea's on how to fix that?

    1 reply
    Robot Lover

    6 years ago on Introduction

    Instead of putting a resistor together with each LED, why not just put one on ground? It would save a lot of resistors.

    1 reply

    Good question,

    If you have various LEDs laying around, the odds are pretty good that they were not manufactured from the same "lot" or if you purchased a non-name brand of LEDs, there are variances in manufacturing that would cause each LED to draw a different current; yes, the variations are minimal. However, the difference in current draw is enough that sometimes, one LED will be brighter than the others. In my case, I used LEDs I had purchased from several manufacturers. To ensure even brightness between all of the lights, I put a resistor on each one. Hope that helps.

    Also, I plan on updating the code with a cleaner revision sometime in the next week or so; check back for the most current code that will be debugged.