Browse over 10,000 Electronics Projects

Back to the Future – Build your Flux Capacitor

Back to the Future – Build your Flux Capacitor

Our project

In order to simulate the flux capacitor device that once casted the DeLorean in time, we made use of the now ubiquitous Arduino Uno that, with a dedicated sketch loaded (and this time without need for any shield) drives three strips, each one with 8 Neopixel LEDs. The strips are managed in parallel, by a single Arduino line, that in our case can be easily modified at leisure by specifying it in the sketch; the communication is a one-directional one and manages a group of LEDs, that in our case are 24.

The connections of the set are illustrated in these pages in the wiring diagram.

Before continuing, it is appropriate to spend a few words about the Neopixel technology, since it enables the creation of “smart” RGB LEDs with a controller onboard. They can be easily integrated in the Arduino environment, thanks to proprietary libraries that Adafruit (www.adafruit.com) has made freely available. A distinctive trait of the Neopixel LEDs is that they can be connected in cascade, so that the data line from one may pass to the following one. The price to pay, however, is that a beyond a certain number of LEDs the management speed must be considerably reduced; because of that, if in need to create matrices to show some fast graphics, one must use many lines with few LEDs for each one.

But this kind of limitation does not concern our project.

 

DSC_8672 DSC_8671

 

Each RGB LED can be individually managed by means of a dedicated command, included in the serial string and can produce up to 256 tones of its own colour, thus determining a total of 16.777.216 colour combinations. In practice, Neopixel is a solution that considers the integration of a driver and of its relative RGB LED in a SMD case, thus allowing the direct command, LED by LED.

The data channel that is used for the communication with the Neopixel LEDs, and thus with the strips, is similar to those of the oneWire type. The power source considered for the Neopixel LEDs is a 5 volts one; the communication takes place at a maximum of 800 kbps.

For each LED strip it is possible to set the refresh frequency at leisure, in order to make certain tricks of the light imperceptible. In our case, the scan frequency of the LEDs is 400 Hz, for each strip.



Advertisement1


Further strips may be connected in cascade or in parallel, in order to create various effects, but in this case such a configuration does not concern us. Keep in mind, however, that the more strips are connected to a single data channel, the more the refresh frequency will be limited (it being understood the maximum data-rate allowed). Briefly, the refresh frequency and thus the turning on/off speed for the single LEDs is inversely proportional to the number of LEDs to manage.

The Neopixel system’s command protocol considers the sending of three bytes in a 24 bit string, each one of them containing the lighting state for each base colour (the eight bits of the green first, then those of the red, and finally those of the green). Let’s analyze, therefore, the strip’s circuit diagram. The extreme simplicity of the creation is obvious: each smart LED is connected in cascade, given that the data line entering the terminal DI exits from DO, that repeats its data. The power source is a 5 volt one (the strip’s voltage), that can be drawn from Arduino’s 5V contact, given that the current absorption for each strip does not reach 200 mA, and that the Neopixel three coloured LEDs are alternatively lighted. The reference ground for the power source and data (it is the only one, depending on the strip’s G contact) is always Arduino’s one and goes to the GND of this last board. The many capacitors placed on the power source are needed to filter the impulses created on the tracks as an effect of the absorption by the LEDs, when they are lighted. This is necessary, since the pulsation of the diodes’ power supply’s is at a high frequency, and otherwise the noises (that in the end are voltage drops, even if feeble ones, that are concurrent with the lighting of the single LEDs) could interfere with the proper operation of Arduino.

1222_Schema

 

Let’s get back to Arduino, now, and see that beyond the the board and the three strips in parallel we connected a button, that we need in order to be able to choose among the tricks of the light considered by the sketch. The button is normally an open one and is connected to Arduino’s pin 6 and to the ground (the pull-up resistor of the corresponding Atmega’s pin is enabled by the software, so to save us an external resistor and to simplify the wiring). Everything is powered via USB, thus via a PC, but it is also possible to power Arduino by means of a dedicated plug; in this case it is advised to use a power supply with an output voltage not greater than 7,5V, in order to not “stress” too much Arduino’s internal regulator. Once the powering has been supplied, Arduino loads the sketch and periodically checks the button’s state; at the same time it starts the default trick of the light, that considers the LEDs lighted with a white colour, and moving from the periphery to the center, all being synchronized while converging. Pressing the button once makes all the LEDs turn red in the same fashion, another pressure does the same with the green light LEDs and a further intervention on the button repeats the game with the blue lighted LEDs. Pressing the button further will produce more light games, for a maximum of 10 as a total. Among these, you will find a trick we created, that perfectly reproduces the effect of the movie’s flux capacitor. Once the tenth one has been reached, it will restart from the default one at the start.

Pages: 1 2 3 4 5 6

 


Top