Printed circuit with led lights

Design and assembly of a simple printed circuit with 6 blinking led lights.

Circuito impreso con luces led, ya montado.

Printed circuit board already assembled. JPG format.

Oscillator circuit operation

The blinking lights circuit is based on an oscillator that changes its output every so often, turning the led on and off.

Circuito eléctrico oscilador.

This oscillator circuit consists of an inverter with a schmitt trigger, a capacitor C1 and a feedback resistor R3.

The schmitt trigger inverter circuit changes its output at different input voltages. This behavior is called input hysteresis and is what allows the circuit to function as an oscillator. In the following graph we can see how the inverter output voltage changes for different input voltages. This rectangular figure with two horizontal lines is the one with the inverter inside and indicates that it works with hysteresis.

Histéresis del circuito inversor Schmitt.

When the circuit is first turned on, the capacitor is discharged and therefore its voltage at the positive terminal is zero volts. The schmitt inverter therefore has zero volts at its input (a logical zero) and a positive supply of 5 volts at its output (a logical one). In this situation, the feedback resistor R3 gradually charges the capacitor voltage until it reaches 3.33 volts, the voltage above which the schmitt inverter considers that the input is a logical one and therefore changes its value. output to zero volts (logic zero).

Now, the feedback resistor R3 gradually discharges the capacitor voltage until it reaches 1.66 volts, the voltage from which the schmitt inverter considers that the input is a logic zero and therefore changes its output to five volts (a logical one) returning the cycle to repeat itself over and over again.

The oscillation speed will depend on the values ​​of the capacitor and resistor. The larger they are, the longer it will take for the circuit to oscillate. The approximate formula for oscillation time is:

Oscillation time = 0.8·R3·C1 = 0.8 · 220000 · 0.000010 = 1.76 seconds
Circuito eléctrico.

LED D1 connected to the oscillator output by means of a limiting resistor R1, will turn on and off at the same speed as the oscillator.

LED D2 connected to the output of another schmitt inverter through a limiting resistor R2, will turn on when D1 is off and will turn off when D1 is on, producing alternate blinking.

This behavior is repeated in the three oscillators that the complete circuit has, at different frequencies since R3, R6 and R9 have different values ​​and therefore different blink rates.

Printed circuit (PCB)

Circuito impreso.

Design of the electrical circuit and the printed circuit. KiCad format.

Gerber files for the manufacture of the printed circuit. ZIP format.

The gerber files are used to request the manufacture of the printed circuit board from a printed circuit board manufacturing company such as JLCPCB or PCBWay.

In total there is a set of 7 different gerber files, 3 files for the front, 3 files for the back layer and one for the edges of the board. There is also a file that indicates where the holes should be made (drill).

The gerber and drill files are partitioned as follows:

  • Front Layer Copper Tracks (F_Cu)
  • Back layer copper tracks (B_Cu)
  • Front Layer Solder Mask (F_Mask)
  • Back Layer Solder Mask (B_Mask)
  • Front component silkscreen (F_SilkS)
  • Back component silkscreen (B_SilkS)
  • Edges to trim the plate (Edge_Cuts)
  • Drill file (.drl)
Circuito impreso. Capas frontales. Circuito impreso. Capas traseras.
Copper Tracks:
They are the conductors that connect all the components of the printed circuit board together. They appear in the drawing as yellow (no solder mask) or light green (already covered with solder mask).
Solder Mask:
It is a layer of paint, normally green although it can have other colors, which serves to protect the copper tracks from corrosion and to prevent short circuits when carrying out the welding process. Solder mask is not applied on top of solder pads.
Component Screen Printing:
It is a layer of paint, generally white, which is used to indicate the name of the components of the circuit and to write indications or drawings. This layer of paint is applied with the screen printing technique and hence its name.

List of components (BOM)

The list of components (also called BOM or Bill Of Materials) is a list where all the components of the printed circuit appear with their quantity and their reference to be able to obtain them before carrying out the assembly.

The list of components may also have the purchase reference of an electronic component distributor. In the following document, the references of the distributor TME have been added.

List of components of the board with led lights. PDF format.

List of components of the board with led lights. SDG format.

Mounting order and position

When soldering the components it is convenient to follow an order, so that the lowest components are soldered first and then the highest ones. In this way, when the printed circuit board is turned over, the components can rest on the table and will not be detached from the board.

In addition, each component has a soldering position. If we do not respect this position we run the risk of damaging the component or making the circuit not work.

The mounting order and position are as follows:

1. Resistors:

They don't need any particular order to work correctly, but the color coding is more elegant and easier to read when all the gold bands are aligned to the right (horizontal resistors) or facing up (vertical resistors) as in the image below. beginning of this unit.

2. Power Switch SW1:

It will need to be mounted so that the switch lever is positioned outside of the PCB so that it is easy to operate the switch.

3. Integrated circuit socket:

The socket has a small tab at the top that needs to be lined up with the tab on the component silkscreen, also at the top of the socket.

If we insert the integrated circuit in the wrong direction (downwards) we run the risk of damaging it when current flows.

4. Capacitors:

Electrolytic capacitors have a white band on one of their two pins that indicates the negative pole of the component and that must be mounted in the also white area of ​​the printed circuit silkscreen.

It is very important that the capacitors are correctly assembled because if they receive voltage in the opposite direction they will break down and also generate gas inside that can cause them to explode.

5. LED diodes:

Diodes only conduct in one direction and do not work in the opposite direction. In the screen printing of the printed circuit board the negative pin or cathode of the LEDs is always facing to the left. It is distinguished by the fact that the circle has a chamfer and that the solder pad is square.

Cátodo de un diodo led en la serigrafía.

When it comes to distinguishing the cathode in LED diodes, the easiest way is to look inside and look for the largest metal area, where the LED rests and which is connected to the negative pin (cathode).

Cátodo de un diodo led.

6. Battery cables:

It is very important to respect the order of the battery cables so as not to burn the circuit.

The red wire is positive and is connected to the top hole (indicated by a + symbol on the silkscreen).

The black wire is negative and is connected to the bottom hole (indicated by a - symbol on the silkscreen).

Welding

Note

Welding is done by adding material that is made up of tin and lead, so it is necessary to follow some safety procedures.

It is important to wear gloves or wash hands properly after handling tin-lead wire.

During welding, toxic gases are produced from the antioxidant flux. These gases should not be inhaled. Welding should be done in a well-ventilated place with the windows open.

The welding technique is relatively simple, but it does not hurt to have some clear concepts on how to do it correctly before starting.

In the following video you can see the correct technique for soldering the components.

In the following video we can see the big difference between a good quality solder and a low quality one. Good quality tin is much easier to work with and leaves a shiny, less oxidized and more robust solder.

The following video shows us the usefulness of flux in soldering. By keeping a solder point hot for too long, the flux evaporates and the solder oxidizes and loses its shine.

Repair a weld

In the event that we solder a component incorrectly, we can desolder it to re-solder it in the correct position. To desolder there are many techniques, one of the simplest is to absorb the solder with a mesh of fine copper wires.

In the following video you can see some desoldering techniques.