Electronics 101
Tl;DR
Prep-work for watering plants :)
Intro
You might have tinkered with IoT
But without really understanding the under lying layer.
This sits on top of Electromagnetism, yet below IoT
Circuit Boards Design
Everything is…code.
Same applies to circuit boards:
MIT | Design circuit boards with code! ✨ Get software-like design reuse 🚀, validation, version control and collaboration in hardware; starting with electronics ⚡️
Write hardware like software. atopile is a language, compiler, and toolchain for electronics—declarative .ato files, deep validation, and layout that works natively with KiCad.
Conclusions
So…mbsd is code, CAD and blender renders are code:
ElectronicsElectronics board design…yep, also code from now on.
#git init && git add . && git commit -m "Initial commit: Starting electronics 101" && gh repo create electronics-101 --private --source=. --remote=origin --push
#uv init
#uv add -r requirements.txt
#uv sync
#cd sample-pyscipe
uv run main.py
#make run #requires .env.localYou know whats coming
right?

Wait…if this is code…can it be animated with remotion?
In this folder i have added a pyscipe that simulates a particular circuit
(see the makefile entries), I have also added a video remotion folder, with
agents skills you can use. My idea is to generate a video animation of what
happens in that given circuit with the intensities and voltages. Do you need
to clarify sth? Ive dare to generate such explanatory video:
#git clone VideoEditingRemotion
cd ./remotion-electronics/my-video
# npx remotion render MosfetProtected mosfet_protected.mp4
#npx remotion render MosfetUnprotected mosfet_unprotected.mp4
npx remotion render SchematicKickback schematic_kickback.mp4#sudo apt update && sudo apt install ffmpeg
ls *.mp4 | sed "s/^/file '/; s/$/'/" > file_list.txt #add .mp4 of current folder to a list
ffmpeg -f concat -safe 0 -i file_list.txt -c copy output_video.mp4 #original audioToy models can NOT predict
Why would someone pay you if you can just overfit past and give just a vague range of possibilities for the future?
Will the mosfet be fried, yes or no?
No more: will I get an unexpected quickback due to transitory behaviour?

Just…simulate: see thats going to happen, before it happens
#cd sample-pyscipe
uv run main.py --only mosfet --scenario compare # overlay: with vs without diode The Meta-Lesson
All of these curiosities point to one theme:
Linear analysis predicts steady state. Nonlinearities dominate transients.
- The motor inrush looks linear for 100µs, then saturation takes over.
- The capacitor impedance is Ohmic for DC, but ESR-dominated for 150kHz ripple.
- The MOSFET is a resistor at steady state, but an avalanche diode in stress.
- The flyback diode’s nonlinearity is the only thing preventing the circuit from killing itself.
Real circuit design is about:
- Identifying which nonlinearities matter (flyback diode → essential; parasitic R → helpful)
- Ensuring they trigger safely (clamp at 12.7V, not 101.7V)
- Controlling their speed (ESR damping, gate slew rate)
- Testing edge cases (cold start, aged battery, old capacitors)
That’s why the simulations included these three scenarios: protected, unprotected, and compare.
The math alone doesn’t tell you the story.
You have to see it.
FAQ
About Electronical Simulations
- KiCad
- Atopile