Enterprise View Screen LED Scroll

by bleatingspectre in Circuits > LEDs

2653 Views, 12 Favorites, 0 Comments

Enterprise View Screen LED Scroll

videotogif_2018.02.07_19.06.05.gif
X5P5O09 - Imgur.gif

This tutorial will show you how reproduce the scrolling LED effect from this scene from Star Trek: The Next Generation with the ArduinoUNO, and assumes basic familiarity with the Arduino system.

The viewing screen from the bridge of the Enterprise features a scrolling LED effect just beneath and in the center:

What You'll Need:

IMG_20180207_191554760.jpg

In the picture:

1 generic brand ArduinoUNO circuit board and connecting USB cable

1 solder-less breadboard

1 extra long solder-less wire

Use more or fewer or these in equal measure :

10 solder-less wires

10 white LEDs, 1.8-2.2v, 20mA forward current

10 resistors, 150ohms

Circuit Configuration

IMG_20180207_191915479.jpg

The negative leg of the LED is inserted in the negative rail of the breadboard, the positive leg is inserted inline of the negative leg on the central portion of board with a 150ohm resistor and one end of a solder-less wire.

Repeat

IMG_20180207_193236893.jpg
IMG_20180207_193248344.jpg

Repeat the configuration for as many LEDs as you require.

Connecting to ArduinoUNO

IMG_20180207_193323706.jpg
IMG_20180207_193526485.jpg
IMG_20180207_193546099.jpg

Identify the input/output pins on the ArduinoUNO circuit board. Connect the other ends of the solder-less wires in the same order, starting at pin 2. The first two pins, 0 and 1, are unavailable for the type of connections we're making without extra steps.

Completing the Circuit

IMG_20180207_193731521.jpg
IMG_20180207_194041591.jpg

Locate the GND pin in line with the other output/input pins. This is the ground for completing the circuit. Connect the extra long solder-less wire at the GND pin and to the negative rail of the breadboard. In the configuration shown, I accidentally left no room for the ground wire toward the center of the board, so I crossed to the end of the breadboard so as not to interrupt the continuity of the LED effect.

Coding

instructable 1a.png

The Arduino programming software includes an example program called Blink. Starting with this code as a template, I named the LEDs led1-led10 as constant variables and assigned them to the input/output pins.

Set each pin to output.

The basic concept for the effect is that the two LEDs in the center of the line:

5 and 6, will turn on, then off, then

4 and 7 will turn on, then off, then

3 and 8 will turn on, then off, then

2 and 9 will turn on, then off, then

1 and 10 will turn on, then off.

Between each pair of LEDs turning on and off, there is a timed delay. After playing with the values using the find and replace feature of the coding software, I selected 200 as the duration that matched the sample clip most closely.

const int led1 = 2;

const int led2 = 3;

const int led3 = 4;

const int led4 = 5;

const int led5 = 6;

const int led6 = 7;

const int led7 = 8;

const int led8 = 9;

const int led9 = 10;

const int led10 = 11;

void setup() {

pinMode(led1, OUTPUT);

pinMode(led2, OUTPUT);

pinMode(led3, OUTPUT);

pinMode(led4, OUTPUT);

pinMode(led5, OUTPUT);

pinMode(led6, OUTPUT);

pinMode(led7, OUTPUT);

pinMode(led8, OUTPUT);

pinMode(led9, OUTPUT);

pinMode(led10, OUTPUT); }

void loop() {

digitalWrite(led5, HIGH);

digitalWrite(led6, HIGH);

delay(200);

digitalWrite(led5, LOW);

digitalWrite(led6, LOW);

digitalWrite(led4, HIGH);

digitalWrite(led7, HIGH);

delay(200);

digitalWrite(led4, LOW);

digitalWrite(led7, LOW);

digitalWrite(led3, HIGH);

digitalWrite(led8, HIGH);

delay(200);

digitalWrite(led3, LOW);

digitalWrite(led8, LOW);

digitalWrite(led2, HIGH);

digitalWrite(led9, HIGH);

delay(200);

digitalWrite(led2, LOW);

digitalWrite(led9, LOW);

digitalWrite(led1, HIGH);

digitalWrite(led10, HIGH);

delay(200);

digitalWrite(led1, LOW);

digitalWrite(led10, LOW);

}

Launch Code

instructable 1.png
videotogif_2018.02.07_20.04.22.gif

Connect the ArduinoUNO circuit board to a computer with the USB cable. Make sure that the correct port is selected to upload the code to the hardware.