Introduction: Mirror "Tube" - LED Optical Illusion

About: www.kukata86.com

One day, looking for interesting schemes with light effects to construct, came across this wonderful effect. Quite liked the idea but did not know how to accomplish is, until one day found the way. Subsequently construct my own mirror that had to not only try out my skills in electronics but and processing of wood (to create a frame). In this article I will share all the difficulties faced by all subtleties and found that while it is constructed. Many experimented with different windows and mirrors until desired effect is achieved. To facilitate lovers of electronics and in particular light effects as I would describe it as detailed. I will apply the schemes and boards and everything that I constructed. Of course I designed mirror frame on my taste and choice, but everyone has a different look beautiful, and you can use your imagination instead of myne in his own choice. I guess that schemes are found here will facilitate the development of such a mirror to your liking.

You can buy kit for assembling and see another interesting projects in my website: www.kukata86.com

Step 1: What Is the Mirror "Tube"?

          The device is constructed as a mirror that creates the optical illusion of a tunnel formed by the LEDs. The effect is quite interesting and very hot right lately. Its true effect observed especially impressive when viewed in a dark room or in a room with not very strong light (then you really see the entire depth of the tunnel and the effect of changing colors), a during daylight hours drive takes the role of a simple mirror .



Step 2: How Is Made and How It Creates the Illusion?

The device consists of a frame and two electronic units.
  • Some wood frame (size and shape of your choice) on the inside and countries are LEDs. The rear of the frame is a regular mirror and the front - glass with mirror properties. Thus the light emitted by the LEDs is reflected in the rear mirror and the windshield with mirror properties and that multiple internal reflection creates the illusion of a tunnel. The ability to see with my own eyes the effect comes from the glass with mirror properties repeatedly missed out internal reflection, and this allows us to glimpse what is happening between the two glasses. This gives the illusion of multiple meter tunnel from the device until between 5-10 cm thick
  • Controller, which sets different modes of RGB light boards, control the LEDs. This controller manages separate each color of RGB LEDs (red, green, blue), thus achieving different shades of colors formed by combining these three colors.
  • Another important element is the board with RGB LEDs or LED Strips (I designed the 3 different sizes of boards / 8.7 cm X 1.5 cm X 0.7 cm / / 19.5 cm X 1.5 cm X 0.7 cm / / 39 cm X 1.5 cm X 0.7 cm / whose number of LEDs also depends on appropriate / 4 / / 9 / and / 19 / LED) boards can be combined so that they are comfortable length for your purposes. When use LED strips, keep in mind that it is cut in a certain size, amount mostly through 3 LEDs.
You can buy kit for assembling and see another interesting projects in my website: www.kukata86.com

Step 3: Construction of Mirror "Tube"

The first thing needed to create such a mirror is to focus on the shape and size that we like. I personally stopped a regular hexagon.

Step 4:

Each inner sides will work out dimensions of 40 cm (in order to be able later to mount LED board size 39 cm)

I worked six equal square battens with dimensions 5 cm X 5 cm X 20 cm.

Step 5:

For a regular hexagon is formed by six corners of 120 degrees. To achieve proper form the end of each piece of wood finishes with a slope angle of 60 degrees and 40 cm high plateau of the trapezoid.

Step 6:

IMPORTANT!

Remember to follow the length of the plateau of the trapezoid. As I mentioned in my case it is 40 cm so I can mount the PCB with LEDs with a length of 39 cm. In your case it may be a different size but, comply with what length card or combination of boards to use. If you use  LED Strip is not required to comply with such factors, only inside tour of the frame.

Gathering all the shingles to each other on the mirror frame shape - regular hexagon.

Step 7:

Each of them has an internal groove which to place the board with LEDs sizes / 39 cm x 1.5 cm /. Flap is 7 mm deep (as the height of the LED board). If you use LED Strip, flap is not binding or it may be quite shallow - about 1 mm (almost enough to hide the double sided tape on the back of the strip), but not deep enough to hide the LEDs.

Edge to the back of the mirror can save it if you find a better way to attach the mirror, but in any event not glued to the frame because the windshield will be stuck in this case if you need to replace or repair any of boards with LEDs opening the mirror becomes impossible.

Step 8:

Once you paint them all with plain black spray glued with glue all 6 mounting rails to form a hexagon. Boards tucked in groove provided them solder each other with short wires observing the colors of buses R with R, G with G, B with B and + with +. From one of the sides of the hexagon idrilled hole to lead the LED power cable circuits which will later connect to the controller. If you use LED Strip simply glue the runners made earlier for this purpose and bring out the frame cables.

View of adhesive frame without glass - front
In yellow visible groove provided for LED circuits.

Step 9:

View of frame - rear
In yellow visible groove provided for LED panels and "nest" provided a mirror on the back of the frame.

Step 10:

I ordered to a glass company to cut a hexagon of my mirror glass for glass packs (without excessive color / brown or green /). He ordered a glass 5 mm larger in diameter than the outside of the frame to have a good overlap with the side mirrors that will put more later.

I glued glass mirror mounting adhesive on the front of the frame

View of mirror - front:

Step 11:

View of mirror - rear
In the mirror glass side of the glass is noticeably better properties mirror (mirror coating is applied on the country) on the other. Experimental realized that this was it's better to be on the inside of the mirror to the LEDs. To reinforce mirror properties and took the outside mirror foil for car windows and taped on the outside of the glass. This reinforced the ability to look at myself in the mirror during the day and svetodeodite properties to reflect better at night.

And mirror cut to size appropriate to enter the nest that predicted. Once I put it in its cradle on the edge between the glass and frame it taped with duct tape. Thus strengthened it does not fall and I opened it without difficulty have an ace.

Step 12:

Before you close the mirror finally cleaned both windows so that no dust to close between the two glasses. Emphasize the fact that visible dust is not visible during the day can be seen very clearly in the mirror tunnel.

Finally, cut out five mirrors the size of the external frame pages and pasted them from outside the country and to hide the visible wooden part. At the top of the frame does not put a piece of glass as there put two D shaped brackets which attached the mirror hanging on the wall. Side mirrors have given quite finished mirror and made really good-looking aesthetic.

Step 13: Preparation and Assembly of LED Boards

I designed three types of LED boards.
  • 8.7cm % 1.5cm % 0.7cm – 4 LEDs
  • 19.5cm % 1.5cm % 0.7cm – 9 LEDs
  • 39cm X 1.5cm % 0.7cm – 19 LEDs
Number of LEDs of each depends on the length her LED boards can be combined according to your needs and depending on the chosen framework, but their number should not exceed 300. This is the maximum count that mirror's controller (discussed below) can handle without risking damage.

You can buy kit for assembling and see another interesting projects in my website: www.kukata86.com

Step 14:

Led Board 8.7cm % 1.5cm - 4 LEDs

Board Top-PDF
Board Top with white masK-PDF
Board Bottom (mirrored)-PDF

Led Board 19.5cm % 1.5cm -  9 LEDs

Board Top-PDF
Board Top with white mask-PDF
Board Bottom (mirrored)-PDF

Led Board 39cm X 1.5cm - 19 LEDs

This board is divided into two parts. To be printed in real size is divided into two A4 sheets.
Board Top:
Part 1-PDF
Part 2-PDF
Board Top with white mask:
Part 1-PDF
Part 2-PDF
Board Bottom (mirrored):
Part 1-PDF
Part 2-PDF

The accompanying drawings boards are life-sized. For the preparation of PCB important to use methods of amateur laser printer or photo-method.

You can buy kit for assembling and see another interesting projects in my website: www.kukata86.com

In the attached file the top of the board is flipping to be suitable for carrying laminated after printing.

Step 15:

After making the board you can make caps to pass through only a small part of the tip of LEDs. Board-cover may be of laminated MDF, painted in black lacquer. For both plates connected to one another at the top left to see only the tops of the LEDs and all other elements remain hidden between the two boards. The total height of the two boards connected to each other should be 7 mm. Just as there are grooves in the 6 wooden slatted frame.

Step 16: List of Elements for LED Boards

To assemble the scheme you need 2 types of elements

R1,R2,R3-820 Ohm / 0.25W
5mm RGB-Led (OPEN Cathode)

NOTE!
RGB LEDs are driven by "-" which means that you must choose LEDs with common anode and separate cathodes.


Once constructed or buy boards and weld components necessary to connect them to one another following the colors of the tracks.
R- RED - Red

G-GREEN - Green

-BLUE - Blue

  - The track without sign is "+" all LEDs.
Using LED Strips
Like with LED boards is very important LED Strips to be drived by "-", what mean that led strip must be with common anode. When selecting the type of LEDs i suggest looking for LED Strips with transparent LEDs rather diffuse, as they give a nice outline of the tunnel. Preferably not too small SMD Leds and to have visible part that is clearly visible and viewed from the side.

Step 17: Preparation and Assembly of the Mirror "Tube"

Description

     The controller of mirror "Tube" is a device that can control RGB LEDs, so to achieve different shades and colors. RGB LED itself is LED with 3 colors of light in one case ("red-green-blue"). With the appropriate combination of intensity and time of illumination of each of these colors can be made a variety of other colors created by combining these three colors.

Step 18:

Schematic of Controller for mirror "Tube"

At the input of the schematic shall be powered around 12 AC volts. BR1 - Schematic Bridge make constant  voltage from transformer. This voltage power the LED boards. The same voltage is stabilized with IC. U2 stabilizer of 5V and powered processor IC. MOSFET transistors are IRF540 and managed by the microcontroller. Resistors R2, R4, R6 limit the gate current of the final transistors a R1, R3, R5 contribute to rapid clogging of the MOSFET-s braking control voltage. The PIC is powered up at the pin 4 passing in R7 , and 6 pin remains pending because it is not used in our case.

IMPORTANT!

The board is designed for external LED driver and power bridge.Limit from  500  leds written on the board  do not apply to the configuration in this article. Described below circuit can drive up to 300 LEDs from RGB LED boards, which is about 7A in light of all colors. (in LED borards each LED consumes 3x15mA = 45mA but as managed by PWM and constant glow about 22 mA forLED is about 300 LEDs) With LED strips you must comply with their individual consumption. To control more LEDs use other switching transistors and bridge rectifier or put the second mirror controller.

Step 19:

Board of Controller

Board of Controller - Top-PDF
Board of Controller – Top with white mask-PDF
Board of Controller - Bottom-PDF

You can buy kit for assembling and see another interesting projects in my website: www.kukata86.com


IMPORTANT!

The board is designed for external LED driver and power bridge.Limit from  500  leds written on the board  do not apply to the configuration in this article. Described below circuit can drive up to 300 LEDs from RGB LED boards, which is about 7A in light of all colors. (in LED borards each LED consumes 3x15mA = 45mA but as managed by PWM and constant glow about 22 mA forLED is about 300 LEDs) With LED strips you must comply with their individual consumption. To control more LEDs use other switching transistors and bridge rectifier or put the second mirror controller


Step 20:

List of Elemetns for Controller


D1-RS 804 Bridge (8A/400V)

C1-2200uF / 25V

C2-1000uF / 16V

C3,C4-100nF / 50V

R1,R3,R5-100k / 0.25W

R2,R4,R6-10R / 0.25W

R7-1k / 0.25W

R8-47K / 0.25W

U1*-PIC 12F629

U2-LM7805

Q1,Q2,Q3-IRL540

RGB-OUT, IN1, SWITCH

6 PIN connector


Download in PDF

* U1 requires programming before it is used in the controller


You can buy kit for assembling and see another interesting projects in my website: www.kukata86.com

Step 21:

Alternative MOSFET-s

Specially designed  MOSFET-s with letter "L" is finally set to work with 5V logic voltage of the gate. In this pressure they fully unclog, unlike conventional requiring to 20V. Not recommended, but you can use ordinary MOSFET-and with identical parameters but with a voltage of 5V Gate will be unstopped much less and you can feed the little LEDs on the controller output.

Tips for assembling the controller
  • Before starting note that MOSFET-s elements are sensitive to electrostatic energy. Approach them with caution and solder a ground or off (after heating) soldering.
  • It is desirable to tinker path that will varnish to withstand large currents at high load
  • Not tinned holes provided for mounting the board in the box. They are not connected to the GND of the board .
  • Be careful when soldering the capacitors and be careful with their polarities.
Tips to connect the controller with LED boards

The greatest amount of LEDs that Unitronics one can manage is 300 pieces. Must take into account the thickness of the cable to be used to power the LED boards. Note that 300 LEDs consume about 7 amps.

RGB-LEDs are generally positive input. Note that each different color managed minus and purchasing LED note that you must have a common anode and separate cathodes.

For calculation of the elements around the LEDs you can use this link http://led.linear1.org/led.wiz


Requirments
  • The board only needs a transformer (AC) to be put into action. Note that the scheme has built-in rectifier. The voltage should be from 12 volt transformer, although not a problem to light varies as granitsi.Sashto power transformer must comply with a number of savetodiodite which will manage.
  • If you use all the power of device is desirable to put the heatsink to power transistors to prevent possible damage from overheating.

Step 22: Software

Programming the CPU must have programmer PIC microcontroller series of Microchip. You can get a PIC programmer to the nearest electronics store, or you can use a hand-made JDM programmer. I advise using PICkit2, but it is still your choice e.

Setting the software of your choice

You can download the source code for the software in this article. Individual tuning software helps make various modes to experiment with modes and how to light the LED. Setup is simple, you only need to understand the algorithm of the software. The data that you can edit the file contains "MIRROR_TUBE_SequenceData.inc". It can change, add or remove different ways of light, but you must follow directions algorithm. In the programmed chip that is sold in the online store I wrote a program that fills the optimal chip and personally I like the most. Regimes and how the software was written by me appears in the video. It does not require anyone to use my program mandatory for everyone to experiment with their own personal choice.

I suggest you a site which can test CPU software written by you: RGB LED Simulator

Step 23:

Here's the file MIRROR_TUBE_SequenceData.inc and algorithm to follow.
Note that each end of the mode is marked with "dt 255", but the program as a whole should be completed "dt 255" as shown in the picture.

To operate the chip should normally have 1% of 256 places for individual modes, this concept does not overdo the effects and I'm sure you do not have such a variety.

Step 24:

Algorithm and  creating our own modes

a. Each row of data begins with 'dt' (data table) assembler directive

b. All data used decimal numbers.

c. All data must be separated by commas

d. The data for each mode contains five values:

1. Speed of change: Change the speed of color from the current value to the new (in. Larger or smaller) Each step of the color change is performed for a time 5ms value discoloration p.1.

The rate of change of 0 means that the change of current to the new colors will be done immediately without delay
The rate of change of color should be set to 255 because that would mean the end of the procedure (described above)
2. Time-delay: After the change of color, this time line shows that will keep the current color before the program forward. 50mS interval by the number of vremezadrazhkata in 2.

Time-delay 255 and Speed 255 color change means the end of the whole program 
3. Value of red PWM. 0 = 0% (LED stopped) or 255 = 100% (LED fully lit)

4. Value of Green PWM. 0 = 0% (LED stopped) or 255 = 100% (LED fully lit)

5. Value of blue PWM. 0 = 0% (LED stopped) or 255 = 100% (LED fully lit)

Usually the change of intensity in the range 0 and 128 is more noticeable than in the 128 to 255.Intenziteta also depends on the color of the LEDs at the moment. For example a value of 128 blue lights slightly red with the same value. This is because different colors of LEDs are not designed with the same intensity and perceived differently by the human eye.
e. End mode is indicated by dt255 which makes the program start again current mode

f. To end the whole program put dt255 2 times in a row.


After changing MIRROR_TUBE_SequenceData.inc file should be saved and MIRROR_TUBE.asm compiled again. I use the original software from Microchip to compile the code. After compiling generated file MIRROR_TUBE.hex(which is contained in the program folder in the use of that MPLAB IDE), can now be programmed chip. Note that the program specified bits "Read Protect" and if you read the code from the chip will not see its contents, but it does not bother you, if everything is done correctly the software must be written on the chip.

Step 25:

Files for Download

Source code – This is the source code of the program with which you can create your own management regimes LED boards

MPLAB IDE – it's Microchip program to build a HEX file of your choice modified source code.

HEX file – It was created by software that fills me optimal chip and offers quite a variety of operating modes of the controller

The password for all archives in the article is: www.kukata86.com

Step 26:

TIPS WHEN PROGRAMMING

When using 12F629 careful not to delete the setting of the internal generator chip. Instructions to save the internal oscillator of the chip can be read Microchip datasheet for the 12F629 / 675 Section 9.2 and subsection 9.2.5.1. Council to use my programmer was PICkit2 entropy because it is a convenient not very expensive and extremely intelligent progremetor for this type of processor. PICkit2 after version 2.61 can automatically kalkulera OSSCAL parameter chips and record it, so this programmer you will not risk losing data generator. 12F629 chip factory is synchronized generator and data are stored on the last bit in memory. After programming the software should read this information is correlated with the program that will record and still record information is there. Le delete this value chip will be able to adjust its internal 4 Mhz oscillator to operate normally. In such cases the application stored in the chip will not work correctly. In order not to get into that situation just remember the information in this box.

After buying a new chip put it in the controller and read by READ.



Beginning of the cell starts with 34 which is RRETLW instruction but the other two numbers are for each individual chip. This information is for the internal oscillator. Just sign up and is a possible problem with the chip simply overwrite there again.

You can buy kit for assembling and see another interesting projects in my website: www.kukata86.com

Step 27: Assembling the Board

You can buy kit for assembling and see another interesting projects in my website: www.kukata86.com