DIGITAL MAGICIANS · ENGINEERING GUIDES

From a Virtual Circuit to Your First PCB

Virtual examples and project-planning explanations. No account needed to read.

A practical route from a simple virtual circuit to a physical layout and a first PCB. These examples describe the actual models in the Digital Magicians Engineering Lab. Calculated values are simulation results, not measurements from a built prototype.

Choose the right workspace for your question

Electronics projects involve several different decisions. A circuit can be electrically sensible but too large for its enclosure. A neat board can have the wrong pin connections. Keeping those questions separate makes it easier to find mistakes.

  • Physical layout: enter board dimensions in millimeters, arrange component bodies, and check space. Use the side view for component height and enclosure space.
  • DC simulator: connect a supported circuit and compare voltage, current and power. This model supports one ideal DC source, resistors, switches, simplified LEDs/diodes and capacitors at steady state.
  • PCB designer: place footprints, name pin connections, and draw top or bottom copper traces. A footprint defines the solder pads and holes for a particular component.

You can read this guide without an account. The interactive lab requires a site account. Signing in does not connect an external battery or device: every circuit in the lab remains virtual.

Project 1: make an LED light with controlled current

Open the DC simulator and choose LED + resistor. The example uses a 5 V source, a 330 Ω resistor and an LED with a 2 V forward-voltage setting. It is a complete loop: source positive, resistor, LED anode, LED cathode, source negative.

5 V source + → 330 Ω resistor → LED anode → LED cathode → source −

The resistor limits current. A first estimate is R = (supply voltage − LED forward voltage) / target current. If your example LED drops 2 V and your target is 10 mA (0.010 A), a 5 V supply gives (5 − 2) / 0.010 = 300 Ω. Choose an available value and then verify the current and power for the actual LED.

The lab’s diode model also includes 10 Ω of forward slope resistance. Its current is therefore approximately (5 − 2) / (R + 10), rather than exactly (5 − 2) / R. This small detail explains why the displayed 330 Ω example is about 8.82 mA.

Resistor Lab current Resistor power With a 20 mA LED limit
330 Ω 8.82 mA 0.0257 W Below the current limit
150 Ω 18.75 mA 0.0527 W Below the current limit
100 Ω 27.27 mA 0.0744 W Overcurrent warning

These figures illustrate the model; a 20 mA setting is not a universal LED rating. Look up the exact LED’s forward voltage and allowed current. Real diode voltage changes with current and temperature. Check resistor dissipation against its rated power with an appropriate margin.

Try two mistakes deliberately

Reverse the LED’s anode and cathode connections. The idealized model blocks reverse current, so the LED stops lighting. It does not simulate reverse breakdown: a real LED can be damaged by excessive reverse voltage. Next, open the switch example. Current stops because the loop is broken. Simply placing a part next to another part never creates a connection; you must connect their terminal circles.

For a real project, consult SparkFun’s LED explanation alongside the exact part datasheet. A driver or a different LED type may need a different design.

Project 2: inspect a voltage divider

Choose Voltage divider. The example places two 1 kΩ resistors in series across 5 V. The source current is 5 / 2000 = 0.0025 A, or 2.5 mA. Each equal resistor drops 2.5 V, and each dissipates I²R = 0.00625 W.

The general unloaded divider equation is Vout = Vin × Rbottom / (Rtop + Rbottom). Change the top resistor to 2 kΩ and keep the bottom resistor at 1 kΩ. The ideal unloaded midpoint is now 5 × 1000 / 3000 = about 1.67 V. Run DC again and inspect the bottom resistor’s voltage.

A divider is not a general replacement for a voltage regulator. If you attach a significant load to the midpoint, that load changes the effective bottom resistance and the output voltage. This matters when choosing how to power a display, controller or motor: a simple divider intended for a signal is usually the wrong power source.

Project 3: plan space for a handheld device

In Physical layout, load the handheld template. Its dimensions are a starting arrangement, not a recommendation to buy particular modules. Generic display, button and charger sizes vary by manufacturer. Select a part, enter its measured width and length, and watch the top view update. Enter its height above the board and inspect the side view.

If the tallest part is 24 mm and the available space above the board is 20 mm, the remaining height is −4 mm. Increase enclosure space or choose a shorter component. A top-down footprint that fits does not mean the joystick, connector or speaker will fit vertically.

Allow extra space for plugs, wires, joystick travel, button caps, mounting and battery leads. A battery envelope should include the actual cell, protection board and leads. Do not treat a charger module as proof that the complete battery system has protection or the right chemistry.

The coach suggests supporting parts based on what you place. For example, an LED can prompt a resistor, and a speaker can prompt an amplifier. A development board may already contain decoupling capacitors; inspect its schematic before adding more. Suggestions are review prompts, not an automatic wiring design.

Project 4: turn the LED circuit into a PCB

Open PCB designer and choose Try the LED starter. It contains a power header, resistor and LED. Each pad has a net name: VCC for the supply connection, LED_A for the connection between the resistor and LED, and GND for the return. Yellow airwires show intended connections that are still missing copper.

  1. Inspect each footprint. Confirm the pad spacing, hole diameter and pin numbers match the exact component you will solder.
  2. Select Route copper, choose a copper layer and trace width, then click an assigned pad.
  3. Click empty board space to add corners. Finish on a pad with the same net name. The editor refuses to finish on a differently named net.
  4. Route the remaining connections. Avoid other pads and leave copper away from the board edge.
  5. Review the connection and spacing panel. Moving a footprint leaves old copper in place, so affected routes need repair.

The learning LED pattern uses pin 1 as LED_A in this starter. Your real LED footprint may number the cathode as pin 1 instead. Verify polarity and change the pin/net mapping as needed; matching a generic drawing is not sufficient. A custom through-hole pattern lets you enter pin offsets relative to its center when none of the provided patterns matches.

Through-hole pads connect both copper layers. The editor does not provide vias, copper pours or SMD placement. Trace width is geometric here; it does not certify a safe current rating. For a complex controller, use the manufacturer reference circuit and a full EDA workflow rather than assuming the placement template supplies the electrical design.

Review before manufacture

Export the KiCad board, open it in KiCad, verify the exact footprints and pinouts, and run its full design-rule checks. The lab’s basic checks cover several connection and spacing errors but not all manufacturing, thermal or electrical constraints. The export has structural tests; opening it in KiCad has not been verified in this development environment.

Use KiCad’s official documentation and your board fabricator’s requirements when producing Gerber and drill files. Check a 1:1 print against the actual parts before ordering. For a first design, keep the circuit small and review it with someone experienced before connecting power.

Sign in and try the Engineering Lab · More studio notes and tutorials