Running the Simulation

Before running the simulation, change the parameters discussed in the above section to something that fits the intended DC motor. Simulate by selecting Simulator → Run Schematic or by pressing Function Key F9.

Figure 1. Simulation

The resulting output graph is shown above in Figure 1. The blue line is the current draw, red is the motor speed in RPM, green is the output from the op amp, turquoise is the EMF voltage and yellow is the failure detection. It can be seen that at about 250 µs something is obstructing the fan causing it to stall and the current to spike, the current spike triggers the fault event and the motor is turned off.

The code for Mindi models can be found on GitHub here: