Loading the figure…
Stopped · Your code isn't running yet. Until you press Run, the board runs the program already on it.
Nothing printed yet. Press Run.
Not checked yet
Run your code to check it. The checks replay a fixed script on a virtual clock, so the same code always gets the same result.
Each fault really happens in the simulation. Trigger one, watch the figure, then read why.
Change a value here or click a chip in the code.
A motor needs far more current than a pin can give. A TIP120 transistor does the heavy lifting, PWM on D6 sets the speed, and a diode catches the spike when the motor stops.
| Pin | Connects to | What it does |
|---|---|---|
D6 | 1 kΩ resistor, then the transistor's base | PWM sets the speed. |
5V | The motor's + lead and the diode | The motor's supply. |
GND | The transistor's emitter | The motor's current returns here. |
Sensors and actuators this board drives, with the real connections.
Base through a 1 kΩ resistor to a PWM pin, emitter to GND, the load from 5 V (or its own supply) to the collector.
| Part pin | Board pin |
|---|---|
| B | D6Wire colour orange |
| E | GNDWire colour black |
A motor or fan needs a 1N4007 diode across it, band toward the + supply, or switching it off sends a voltage spike into the transistor.