Intro: Circuit Planning: Create a Dual Flashing LED Circuit on Protoboard With 555 Timer
The goal for this DIY project is to take you through all stages of circuit development that a company would typically go through when prototyping a product; not just a simple “how-to.”
- Mapping out the electronics
- Designing the schematic
- Creating a bill of materials
- Testing a proof-of-concept on the bench
- Laying out the PCB so that a custom board can be made by a PCB manufacturer, like San Francisco Circuits.
- Specifically, this article will focus on a dual LED flasher circuit.
Step 1: The Idea & Requirements
All circuits begin with a need or, maybe, just an idea. The idea usually stems from a need, in this case, a simple, blinking LED circuit. In the real world of engineering, market research will determine what the need is and it’s up to the engineers to come up with the solution. So let’s pretend the flashing dual LED light circuit is the solution and we need to develop it, test it and optimize it into a compact circuit laid out on a board.
Configuration and Requirements
We know what has to be made, but what will we use for the components and what will the configuration look like? What kind of technology? Will it be digital? Analog? Adjustable? Fixed? Single? Dual? An entire array of LEDs?
There are many approaches, so let’s assume our requirements are simple.
We have a few requirements:
- A dual LED version
- It needs to flash at 1Hz (1 time per second)
- They need to last a certain amount of time, let’s say 100 hours of on time.
Note that although most board components now-a-days are surface mount, let’s stick to thru-hole for ease of assembly and prototyping. Also, let’s try to keep it as compact as possible.
Normally, these requirements start out as user needs and engineers address them through a system requirements specification, outlining the components used and how it’ll achieve the desired functionality, as well as considerations further down the road, such as physical characteristics and exterior design, configurations (single vs. dual), packaging and shipping, service and customer support, sourcing, manufacturing, regulatory (meeting certain standards or having electrical certifications such as CE mark), labeling/product documentation, and a revision history block to keep track of product revisions.
All of this seems a bit overkill for an LED flasher but even the smallest, simplest designs need some or all of these to be released as a final product for commercial use!
Step 2: LED Circuit Diagram Schematic
The design starts with a schematic, our LED circuit diagram.
For more complex designs, it’s common to start with a high level diagram first containing the core technologies used and how they interface with other on-board parts/systems, and maybe a software flowchart if there are any embedded devices. But for this simple, analog design, let’s start with a schematic.
This figure demonstrates the circuitry needed to accomplish our requirements.
There are several ways to make an LED flash over and over but one of the simplest, trusted ways is using a 555 timer configured in astable mode. These are very common interconnects used for a variety of purposes and they keep a steady beat, so it is perfect to use here. Walking through the schematic, the following components are used:
- U1 is a typical 555 timer used in astable mode which provides a continuous stream of rectangular pulses with a frequency determined by a few external components. The rectangular pulses will drive an LED on the output high or low. These timers can often supply or sink enough current for several LEDs (200mA!).
- C1 is charged through R1 and R2 but only discharged through R2. We need to make sure that R1 and R2 are a high enough impedance so that the output stays close enough to zero during discharge. Choose R1 at 10k and go from there. The equation for frequency in astable mode is shown as well.
- Reset is pulled high, as we aren’t using that feature of the chip.
- Control is left floating with a 10nF capacitor on it to reduce interference. This puts the timer in its default trigger setting of 2/3 supply voltage.
- R3 is used as a current limiter for the LED. Most hobby LEDs like this one operate at around 20mA max forward current. You calculate a current limiting resistor for an LED using Ohms Law. V = RI, or voltage = resistance * current. The voltage differential is 9V (since we’re using a 9V battery) minus the forward voltage (2.1V), divided by the current of 20mA, which gives you 345. Let’s use a 330 Ohm resistor since it’s a common value for prototyping.
Adding R4 and D2 allow the timer to drive D1 when HIGH and sink current through D2 when LOW.
So this timer will turn the OUTPUT pin high and low at 1 Hz. When the output is high, it’ll turn on the LED and when off, falls below the forward voltage needed to activate it.
For a dual LED setup, you need to alternate between supplying and sinking on the OUTPUT.
These schematics were designed using Altium Designer, a premium PCB design software but there are several lower cost (even free) PCB layout programs out there. Find what’s right for you.
Step 3: Bill of Materials (BOM)
You'll see the Bill of Materials here for the parts used. We included a red LED as well for a different color or a dual flashing LED circuit.
When creating these schematics, library components needed to be made including both schematic and PCB footprints. Also, some information on the part such as a manufacturing part number and short description help in BOM creation.
This was easily generated by Altium and helps greatly when it comes to ordering the board components and tracking the reference designators.
Step 4: Proof-of-Concept
It’s generally a good idea to test your idea on the bench before moving forward with board layout.
Since these parts are so common and easy to assemble, why not?
All of these components can be found at a local Radioshack but can also be ordered via Digikey.com or Mouser.com. I just ended up going to a Radioshack, picked up a small proto board, the 555 timer, went back to my lab, and put some hardware together. It helps to buy the resistor and capacitor kits of various values so that you don’t have to order new parts every time you need them. I also had some LEDs laying around, as well as a 9V battery connector with leads.
Step 5: Assemble the Dual LED Flasher
Following the schematic in Step 3 will get you the assembly here, which is a single blinking LED at 1 Hz.
Connect the battery and fire it up! And when you confirm it works, add R4 and D2 as shown in the schematic in Figure 2 to get your dual LED configuration.
Now you have a festive LED flasher device that can be used in a variety of final products. It’s pretty bulky and needs a little optimization with regards to size (and perhaps battery selection).
Step 6: Circuit Layout - 3D Visualization
Once the prototype has been proven to work, we create that custom PCB.
That way at least you don’t have to worry about hand-wiring it every time, the connections will already be there and all you’ll have to do is assemble it with the components. For more complex projects with more components, a PCB assembly provider is also commonly used, which is often the same as the PCB fabricator.
Using Altium Designer and its great 3D visualization works very well for sketching up board layout concepts and getting it to fit inside of small, compact housings. It’s also great for importing non-circuit components such as batteries or mechanical elements. Here's what the circuit looks like in 3D mode.
Step 7: Generate Manufacturing Files for Fabrication
Now it’s time to route and finish up the design. If we were building for a commercial setting, we’d wait for the mechanical team to give us the green light on form/fit tests on their end (assuming there is a mechanical team, as ultimately you’d probably want a housing for it).
This shows what a routed design looks like. Note the footprint for the LEDs. This allows you to bend the LEDs over at a 90 degree angle for a horizontal interface.
The last step is to generate manufacturing files and send them to a board vendor for fabrication (and assembly if needed).
With these steps, you have a custom LED flasher that you can make several copies for production quantities.