Chat
Welcome to Flux
Treat Flux like your intern. Tell it what you'd like to build and it'll get to work. You can also ask it questions, brainstorm ideas, and teach it your preferences. Learn More
Ready.
Python
import matplotlib.pyplot as plt def draw_circuit(): fig, ax = plt.subplots(figsize=(10, 6)) plt.axis('off') # Versatile elements for adjusting position radius = 0.2 led_length = 0.5 resist_length = 0.3 ic_width = 1.0 ic_height = 0.5 # 555 Timer IC ax.add_patch(plt.Rectangle((1, 7), ic_width, ic_height, fill=True, edgecolor='black')) plt.text(1.25, 6.1, '555', fontsize=12) # 4017 Decade Counter IC ax.add_patch(plt.Rectangle((4, 7), ic_width, ic_height, fill=True, edgecolor='black')) plt.text(4.25, 6.1, '4017', fontsize=12) # LEDs ax.add_patch(plt.Circle((7, 9), radius, color='red')) ax.add_patch(plt.Circle((7, 8), radius, color='green')) ax.add_patch(plt.Circle((7, 7), radius, color='blue')) plt.text(6.8, 9.3, 'LED1', fontsize=10) plt.text(6.8, 8.3, 'LED2', fontsize=10) plt.text(6.8, 7.3, 'LED3', fontsize=10) # Resistors ax.add_patch(plt.Rectangle((8, 8.8), resist_length, radius / 2, fill=True, edgecolor='black')) ax.add_patch(plt.Rectangle((8, 7.8), resist_length, radius / 2, fill=True, edgecolor='black')) ax.add_patch(plt.Rectangle((8, 6.8), resist_length, radius / 2, fill=True, edgecolor='black')) plt.text(8.2, 8.9, '330Ω', fontsize=8) plt.text(8.2, 7.9, '330Ω', fontsize=8) plt.text(8.2, 6.9, '330Ω', fontsize=8) # Connections # 555 Timer IC Pins ax.plot([2, 2], [7, 6.5], color='black') # Pin 1 to GND ax.plot([2, 2], [8, 8.5], color='black') # Pin 8 to Vcc ax.plot([1.1, 3.9], [7.25, 7.25], color='black') # Pin3 (Output) to 4017 Pin14 (Clock) for i, y in zip(range(2, 9), [7, 7.5, 8, 8.5, 9, 9.5, 10]): plt.text(0.8, y, f'Pin {i}', fontsize=8) for i, y in zip(range(16, 9, -1), [7, 7.5, 8, 8.5, 9, 9.5, 10]): plt.text(5.1, y, f'Pin {i}', fontsize=8) for i, y in zip(range(1, 9), [7, 7.5, 8, 8.5, 9, 9.5, 10]): plt.text(1.1, y, f'U1_{i}', fontsize=8) for i, y in zip(range(10, 17), [7, 7.5, 8, 8.5, 9, 9.5, 10]): plt.text(4.8, y, f'U2_{i}', fontsize=8) ax.plot([4.5, 6.9], [7.75, 9], linestyle="--", color="black") ax.plot([4.5, 6.9], [8.25, 8], linestyle="--", color="black") ax.plot([4.5, 6.9], [8.75, 7], linestyle="--", color="black") plt.text(2, 4, '555 Timer IC', fontsize=12) plt.text(4, 4, '4017 Decade Counter IC', fontsize=12) # Vcc and GND marks plt.text(1.9, 5.9, 'GND', fontsize=8) plt.text(1.9, 8.6, 'Vcc', fontsize=8) plt.text(7.1, 8.9, 'to 4017 Q0', fontsize=8) plt.text(7.1, 7.9, 'to 4017 Q1', fontsize=8) plt.text(7.1, 6.9, 'to 4017 Q2', fontsize=8) plt.text(1, 2.9, 'Note: Resistor and Capacitor values\nare indicative and may vary\nas per requirement.', fontsize=10) # Drawing lines for connections ax.plot([7.2, 8], [9, 9], color='black') ax.plot([7.2, 8], [8, 8], color='black') ax.plot([7.2, 8], [7, 7], color='black') ax.plot([8 + resist_length, 8 + resist_length + 1], [8.9, 8.9], color='black') # Resistor to GND ax.plot([8 + resist_length, 8 + resist_length + 1], [7.9, 7.9], color='black') # Resistor to GND ax.plot([8 + resist_length, 8 + resist_length + 1], [6.9, 6.9], color='black') # Resistor to GND plt.show() draw_circuit()
Code InterpreterPython
import matplotlib.pyplot as plt def draw_circuit(): fig, ax = plt.subplots(figsize=(12, 8)) plt.axis('off') # IC configurations ic_width = 1.0 ic_height = 1.5 # 555 Timer IC ax.add_patch(plt.Rectangle((1, 5), ic_width, ic_height, fill=True, edgecolor='black', linewidth=2)) plt.text(1.3, 5.6, '555', fontsize=12, fontweight='bold') # 4017 Decade Counter IC ax.add_patch(plt.Rectangle((4, 5), ic_width, ic_height, fill=True, edgecolor='black', linewidth=2)) plt.text(4.2, 5.6, '4017', fontsize=12, fontweight='bold') # Drawing components and connections # VCC and GND plt.text(1.95, 6.5, 'Vcc', fontsize=10) plt.text(1.85, 5.5, 'GND', fontsize=10) # Connections between 555 Timer and 4017 ax.plot([2, 4], [6.0, 6.0], color='black', linestyle='-', linewidth=2) # Output to Clock plt.text(3, 6.1, 'Clock', fontsize=10, verticalalignment='bottom') # LEDs and Resistors led_x_start = 7 led_y_start = 7 for i in range(3): y = led_y_start - i ax.add_patch(plt.Circle((led_x_start, y), 0.2, color='red', fill=True)) ax.add_patch(plt.Rectangle((led_x_start + 0.3, y - 0.1), 0.7, 0.2, fill=True, edgecolor='black')) plt.text(led_x_start - 0.5, y - 0.1, f'LED{i+1}', fontsize=10) plt.text(led_x_start + 1.1, y - 0.1, '330Ω', fontsize=10) # Connections from 4017 to LEDs ax.plot([5, led_x_start - 0.2], [6.0, y], color='black', linestyle='-', linewidth=1) plt.show() draw_circuit()
Python
import matplotlib.pyplot as plt def draw_circuit(): fig, ax = plt.subplots(figsize=(12, 8)) plt.axis('off') # IC configurations ic_width = 1.0 ic_height = 1.5 # 555 Timer IC ax.add_patch(plt.Rectangle((1, 5), ic_width, ic_height, fill=True, edgecolor='black', linewidth=2)) plt.text(1.3, 5.6, '555', fontsize=12, fontweight='bold') # 4017 Decade Counter IC ax.add_patch(plt.Rectangle((4, 5), ic_width, ic_height, fill=True, edgecolor='black', linewidth=2)) plt.text(4.2, 5.6, '4017', fontsize=12, fontweight='bold') # Drawing components and connections # VCC and GND plt.text(1.95, 6.5, 'Vcc', fontsize=10) plt.text(1.85, 5.5, 'GND', fontsize=10) # Connections between 555 Timer and 4017 ax.plot([2, 4], [6.0, 6.0], color='black', linestyle='-', linewidth=2) # Output to Clock plt.text(3, 6.1, 'Clock', fontsize=10, verticalalignment='bottom') # LEDs and Resistors led_x_start = 7 led_y_start = 7 for i in range(3): y = led_y_start - i ax.add_patch(plt.Circle((led_x_start, y), 0.2, color='red', fill=True)) ax.add_patch(plt.Rectangle((led_x_start + 0.3, y - 0.1), 0.7, 0.2, fill=True, edgecolor='black')) plt.text(led_x_start - 0.5, y - 0.1, f'LED{i+1}', fontsize=10) plt.text(led_x_start + 1.1, y - 0.1, '330Ω', fontsize=10) # Connections from 4017 to LEDs ax.plot([5, led_x_start - 0.2], [6.0, y], color='black', linestyle='-', linewidth=1) plt.show() draw_circuit()

Image
Reviews
Developed Peach Holodeck
Properties
Properties describe core aspects of the project.
Pricing & Availability
Distributor | Qty 1 |
|---|
Controls
Welcome 👋
Flux helps you build PCBs faster with an AI teammate!
Create your account to collaborate, stay updated, fork your own version, and get instant answers from our AI agent.
iblum
copilot
Table