Fan Circuit.
A circuit board that actually works, in one HTML file.
Best on a phone: it fills the screen and scrolling cannot interfere.
Trying it loads its libraries from unpkg.com, a public CDN, so that host sees the request like any other. Nothing you do in it is sent to us. The downloaded file does the same when you open it.
What You’re Looking At.
Fan Circuit is a 3D circuit board that behaves like the real thing. Two AA cells in series feed a small brushed fan motor through a three-position slide switch: OFF, LOW and HIGH. In HIGH the motor is wired straight across the 3 V pack. In LOW the current goes through a 22 ohm resistor first, so the motor sees about a third of the voltage and turns slower. A red indicator LED sits across the motor and only lights when the motor terminals rise above its forward voltage, which in practice means HIGH.
Nothing about it is animated by a timer. The motor is simulated as a real DC motor with armature resistance, a back-EMF constant, bearing drag and air drag, stepped many times per frame. Switch it on and the current spikes to about 500 mA while the rotor is still, then falls as the fan spins up and its back-EMF builds. Settled, HIGH draws about 290 mA at roughly 600 RPM and LOW about 87 mA at roughly 264 RPM. Switch it off and the rotor coasts down on drag alone. The panel shows the supply, the voltage across the motor, the current, the power and the shaft speed, and says in words which path the current is taking.
The board is drawn in code: the copper traces, pads, labels and silkscreen are painted on a canvas and wrapped onto the board, and the cells, switch, resistors, LED and motor are built from simple shapes. Glowing dots travel along each wire that is carrying current, faster when more current flows. Airflow particles rise from the fan with its speed. The on-screen spin is slowed down so it does not strobe, and the readings stay true to the real speed.
What’s in it
- Two AA cells in series, a three-position switch (OFF, LOW, HIGH) and a fan motor
- A real DC-motor model: back-EMF, drag, inrush current when it starts, coast-down when it stops
- LOW runs the motor through a 22 ohm resistor; HIGH wires it straight to the pack
- Live readings for voltage, current, power and shaft speed
- Glowing dots follow the current along each wire that carries it
- An indicator LED that lights only when the motor voltage is high enough
- Orbit and zoom the board, click the switch lever or use the keys 1, 2 and 3
- Copper traces, labels and textures drawn in code, no asset files
How To Use It.
Keyboard and mouse
- Click the switch leverCycle OFF, LOW, HIGH
- 1 / 2 / 3OFF / LOW / HIGH
- OFF, LOW, HIGH buttonsSet the switch from the panel
- DragOrbit the board
- ScrollZoom
- HHide or show the readings panel
Touch
- Tap the switch leverCycle OFF, LOW, HIGH
- OFF, LOW, HIGH buttonsSet the switch from the panel
- DragOrbit the board
- PinchZoom
- Tap the panel titleCollapse or expand the readings
Kael wrote this from a single prompt in a chat interface, with no tools and no follow-up, as one HTML file.
The one prompt
Make electrical circuit board in 3js that actually "works". It should be a small fan that is controlled by a switch that has low, high and off. It is connected to a AA batteries. In html
- Model
- Kael Pro Beta, z-low
- Tokens
- 57,613
- Time to finish
- 7 min 44 s (463,640 ms)
One take: a single prompt in a chat window, no tools, and no follow-up asking Kael to check or fix anything. What you see here is the file it wrote.
More Demos.
- Game3DSandboxProcedural
Blockscape
Explore an endless generated world of forests, deserts, mountains and oceans, then dig and build with ten block types. Sunrises, stars, rippling water and wandering animals, in one file.
Play it - Game3DAI opponents
Ouroboros
Steer a snake around a walled arena at sunset, eat glowing orbs and outlast the AI hunters. Three.js, procedural textures and synthesised sound, all in one file.
Play it - Game3DAI opponent
3D Chess
Play chess on a rendered black-and-white board against the built-in AI, or switch it off to play a friend. Click a piece to see every move it can make, and watch captured pieces float away to rest.
Play it