Quick Startο
This guide will get you up and running with Circuit-Synth in just a few minutes!
Note
New to Circuit-Synth? This page shows you how to create your first circuit in under 5 minutes. For more complex examples, see our Examples page.
Basic LED Circuit Exampleο
Letβs start with a simple LED circuit that demonstrates the core concepts:
3.3V βββ¬ββ R1 (330Ξ©) βββ¬ββ D1 (LED) ββ GND
β β
βββ Power Input βββ Current Limiting
Hereβs how to implement this circuit in Circuit-Synth:
from circuit_synth import Circuit, Component, Net, circuit
@circuit(name="simple_led")
def simple_led():
"""
Simple LED circuit with current limiting resistor.
Perfect for getting started with Circuit-Synth!
"""
# Create power nets
VCC_3V3 = Net('VCC_3V3')
GND = Net('GND')
# Create LED component
led = Component(
symbol="Device:LED",
ref="D",
value="Red",
footprint="LED_SMD:LED_0603_1608Metric"
)
# Create current limiting resistor
resistor = Component(
symbol="Device:R",
ref="R",
value="330",
footprint="Resistor_SMD:R_0603_1608Metric"
)
# Make connections
VCC_3V3 += resistor[1] # Power to resistor
resistor[2] += led[1] # Resistor to LED anode
led[2] += GND # LED cathode to ground
# Generate KiCad files
if __name__ == '__main__':
circuit = simple_led()
circuit.generate_kicad_project("my_first_circuit")
print("Circuit generated! Check the 'my_first_circuit' folder.")
Core Conceptsο
Componentsο
Components are the building blocks of your circuits. Each component needs four key properties:
symbol: KiCad library symbol
ref: Reference prefix (R, C, U, etc.)
value: Component value/name
footprint: Physical package for PCB
# Standard 10kΞ© resistor (0603 package)
resistor = Component(
symbol="Device:R", # KiCad symbol
ref="R", # Reference prefix
value="10K", # Resistance value
footprint="Resistor_SMD:R_0603_1608Metric" # Physical footprint
)
Netsο
Nets represent electrical connections (wires) between components:
# Power and ground nets
VCC_3V3 = Net('VCC_3V3') # 3.3V power supply
VCC_5V = Net('VCC_5V') # 5V power supply
GND = Net('GND') # Ground reference
# Signal nets
SPI_MOSI = Net('SPI_MOSI') # SPI data line
USB_DP = Net('USB_DP') # USB D+ signal
Circuitsο
Use the @circuit decorator to define circuit functions:
@circuit
def my_circuit():
# Define your circuit here
pass
Pin Connectionsο
Connect component pins to nets using indexing:
# Connect pin 1 of resistor to power net
resistor[1] += power_net
# Connect pin 2 of resistor to signal net
resistor[2] += signal_net
Hierarchical Designο
Circuit-Synth excels at building complex systems from reusable building blocks:
Tip
Professional Practice: Keep one circuit per file for better organization and reusability.
# power_supply.py - Reusable 3.3V regulator
@circuit(name="ldo_3v3")
def ldo_3v3_regulator(vin, vout, gnd):
"""3.3V linear regulator with decoupling caps"""
regulator = Component("Regulator_Linear:AMS1117-3.3", ref="U")
# ... implementation details
# led_indicators.py - Reusable LED circuit
@circuit(name="status_led")
def status_led(vcc, gnd, control_signal):
"""LED with current limiting resistor"""
# ... implementation details
# main_board.py - Complete system
@circuit(name="esp32_dev_board")
def esp32_development_board():
"""Complete ESP32 board with power and LEDs"""
VIN_5V = Net('VIN_5V')
VCC_3V3 = Net('VCC_3V3')
GND = Net('GND')
# Compose subsystems
ldo_3v3_regulator(VIN_5V, VCC_3V3, GND) # Power supply
status_led(VCC_3V3, GND, esp32_gpio) # Status indicator
# ... ESP32 and other circuits
Hierarchical Project Structure: βββ components.py # Reusable parts library βββ power_supply.py # Voltage regulators βββ led_indicators.py # Status LEDs βββ main_board.py # System integration
Next Stepsο
Ready to dive deeper? Hereβs your learning path:
What to explore next:
Examples - Complete ESP32, STM32, and power supply projects
API Reference - Comprehensive API documentation and advanced features
contributing - Help make Circuit-Synth even better
GitHub Issues - Report bugs or request features
Note
Stuck? Join our community discussions or file an issue on GitHub. Weβre here to help you succeed with Circuit-Synth!