Hello friends, I hope you all are doing great. Today, I am going to share the new 42BLF Hall BLDC Motor Library for Proteus Simulation, the 38th library of our motor series. If you have searched for a Proteus simulation of a brushless DC motor with Hall sensors, this is the one: the 42BLF01, a NEMA 17 BLDC motor of the kind you find in small robots, conveyors, pumps and 3D printer fans. It has no brushes, so it cannot run from a battery on its own; a driver has to switch its three coils in the right order, and three Hall sensors inside tell the driver where the rotor is.

Updates

42BLF Hall BLDC Motor Library for Proteus Simulation

Latest version: V1.0 (November 2026, this tutorial)

Other motors: SG90 Servo · TT Gear Motor · 28BYJ-48 Stepper · NEMA 17 Stepper · MG996R Servo · N20 Encoder Motor · JGA25-370 Encoder Motor · FS90R 360 Servo · 130 DC Motor · A2212 Brushless · X27.168 Gauge · Analog Panel Meter · DC Tachogenerator · LM393 Speed Sensor · MG90S Servo · DS3218 Servo · L12 Linear Servo · JGB37-520 Motor · RS-775 Motor · JGY-370 Worm Motor · 12V Linear Actuator · Coin Vibration Motor · Mini Submersible Water Pump · 12V Peristaltic Pump · 4-Pin PC Fan · 12V Push-Pull Solenoid · NEMA 23 Stepper Motor · Micro Linear Stepper · TYJ50 Synchronous Motor · Quartz Clock Movement · Air-Core Gauge · Electromechanical Counter · Split-Flap Display · Electric Bell · Wind Turbine · 8520 Coreless Motor · Car Wiper Motor · Car Door Lock Actuator · 12V Solenoid Water Valve · 12V Holding Electromagnet · Mini Air Pump · Planetary Gear Motor · 540 RC Motor · LRA Vibration Motor · 2204 Gimbal Motor · 120mm 230V AC Fan · NEMA 17 Closed-Loop Stepper · NEMA 17 Linear Stage · Pan-Tilt Bracket · 4-DOF Robot Arm

Motor drivers: L298 · L9110S · TB6612FNG · BTS7960 · A4988 / DRV8825 · 28BYJ-48 + ULN2003 · PCA9685 Servo · Relay Module · 30A Brushless ESC · TB6600 Stepper Driver · 60A Brushed ESC · DRV2605L Haptic Driver · ZS-X11H BLDC Driver · SimpleFOC Mini Driver · AC Dimmer Module · TMC2209 Stepper Driver · DRV8833 Motor Driver · L293D Motor Shield

Helping Tools

Our library brings the 42BLF01 into your Proteus simulation at its true size, a 42 mm square body 47 mm long with its 5 mm shaft, its three phase wires and its five-wire Hall cable. The simulation model follows the maker's datasheet: 24 V, 4000 RPM and 0.063 N.m at 1.9 A, three windings in star with a trapezoidal back-EMF, eight poles, and three Hall outputs that switch at the rotor's angle, every edge at its time. It measures what a lab would: the speed, the torque, the phase currents, the efficiency and how well the driver commutates. In the demo an Arduino runs it through our ZS-X11H driver board, at three speeds, under the rated load, coasting, in reverse and braking.

NOTICE: Our team has put a lot of effort into these small parts: the bodies, the animation and the pop-ups are all our own design, and you get them free. Your feedback is the fuel that keeps us going, so please tell us what you think in the comments below or in the Motor Driver board of our forum. And if our free libraries help you, you can buy us a coffee. So, let's get started with the 42BLF Hall BLDC Motor Library for Proteus Simulation:

Figure: The 42BLF Hall BLDC Motor Library for Proteus Simulation.

What is a Hall BLDC Motor?

A brushless DC (BLDC) motor turns the brushed motor inside out. The permanent magnets sit on the rotor and the coils stand still in the stator, so nothing rubs: no brushes to wear, no sparks, and a long, quiet life. The price is that the motor cannot switch its own coils. In a brushed motor the commutator does that mechanically as the shaft turns; in a BLDC motor an electronic driver must do it, and to do it at the right moment it has to know where the rotor is.

That is the job of the Hall sensors. Three small magnetic sensors in the stator, 120 electrical degrees apart, each give a high or low level as the rotor's magnets pass. Together they form a three-bit code that changes every 60 electrical degrees: six codes, 101, 100, 110, 010, 011 and 001, then the cycle repeats. Codes 000 and 111 never occur in a healthy motor. For each code the driver connects one phase to the supply, one to ground and leaves the third open. That is six-step, or trapezoidal, commutation, and it suits these motors because their back-EMF, the voltage each coil generates as the magnets pass, is flat-topped like a trapezoid.

The 42BLF01 has eight poles, four pairs of magnets, so the field turns four times for one turn of the shaft. That gives 24 Hall edges a turn. Its electrical figures also show the BLDC's close family tie to the brushed motor: the speed follows the voltage, 3.7 V for every 1000 RPM, and the torque follows the current, 0.035 N.m for every ampere.

The 42BLF01 at a glance
The 42BLF01 (maker's datasheet)
Rated24 V, 4000 RPM, 0.063 N.m at 1.9 A (26 W)
Peak0.18 N.m, 5.7 A
Constants0.035 N.m/A torque, 3.7 V per 1000 RPM back-EMF
Construction8 poles, 3 phases in star, Hall sensors 120 electrical degrees apart (5 to 20 V)
MechanicsNEMA 17: 42 mm square, 47 mm long, a 5 mm shaft; rotor 24 g.cm2
Wiresphases U yellow, V green, W blue; Halls +5V red, HU yellow, HV green, HW blue, GND black

The resistance is not in the table of this series, so the simulation takes it from the rated point: at 4000 RPM the back-EMF is 14.8 V, the other 9.2 V of the 24 V drive the 1.9 A through the windings, which gives 4.8 ohm line to line. With that figure the stall current comes to 5.0 A and the stall torque to 0.17 N.m, right by the datasheet's peak.

Features of the 42BLF Hall BLDC Motor Library for Proteus Simulation

  • The motor at true scale: the NEMA 17 body, the end caps, the shaft with its flat that turns at run time, the phase wires and the Hall cable in their real colours.
  • Three windings with trapezoidal back-EMF: 2.4 ohm a phase in star, the back-EMF flat for 120 electrical degrees, solved together with the driver in the simulation.
  • The torque from the currents and the angle: each phase adds its current times its back-EMF shape, so a driver that switches the wrong pair gets less torque, or none.
  • The Hall sensors: HU, HV and HW switch at the rotor's angle, every edge at its time, powered from +5V and GND.
  • The shaft: the rotor's inertia plus the INERTIA property, friction, and the LOAD property as a brake on the shaft; the pop-up's chips change the load at run time.
  • Lab measurements: speed, torque, phase currents, back-EMF, power in and out, efficiency, and the commutation figure: the torque against the best the same current could give.
  • A pop-up: the rotor and stator with the Halls and the coil currents, the speed-torque line with the working point, a scope of the Halls and the phase currents, graphs, an event log and a check page.
  • A complete package: about 1.2 MB with the library, our Arduino UNO V4.0 and the demo, without the source code of the model.

The 42BLF Motor in Proteus

The device is BLDC42BLF01TEP in TEPBLDC42.LIB, under Electromechanical > Motors, with the prefix M and the mixed model TEPBLDC42.DLL: the windings are analog, the Hall outputs digital. Search BLDC42 in Pick Devices. The pins come out on the left like the real cables: U, V and W for the phases, then +5V, HU, HV, HW and GND for the Hall cable. Two properties set the mechanics: LOAD, the load on the shaft in N.m (0.02 by default, 0.063 is the rated torque), and INERTIA, extra inertia in g.cm2 for a flywheel, a fan or a pulley; the rotor's own 24 g.cm2 is always included.

Figure: The 42BLF01, drawn at its true size.

Download 42BLF Hall BLDC Motor Library for Proteus Simulation

Click the button below to download 42BLF-Hall-BLDC-Motor-Library-for-Proteus-v1.0.zip (about 1.2 MB, without the source code of the models):

42BLF Hall BLDC Motor Library for Proteus V1.0
  • README.txt: installation, the demo, the wiring, troubleshooting and the limits of the simulation.
  • Proteus Library Files: TEPBLDC42.LIB and ArduinoV4TEP.LIB.
  • Proteus Model Files: TEPBLDC42.DLL and TEPARDUINO.DLL.
  • Arduino Code: the demo sketch.
  • Proteus Simulation: the demo project, its HEX file and copies of the DLLs.

No Proteus yet? Read How to Download and Install Proteus 7 and 8. New to libraries? Follow How to Install a New Library in Proteus.

How to Install 42BLF Hall BLDC Motor Library for Proteus Simulation

  1. Close Proteus and extract the whole zip file, for example to your Desktop.
  2. Copy the files from Proteus Library Files into the LIBRARY folder of Proteus.
  3. Copy the files from Proteus Model Files into the MODELS folder.
  4. Delete TEPBLDC42.IDX from the LIBRARY folder if it is there.
  5. The demo's driver is our separate ZS-X11H BLDC Driver Library for Proteus Simulation: install its LIB and DLL too.
  6. Start Proteus, press P and search for BLDC42.

Proteus Simulation of the 42BLF BLDC Motor with Arduino

The demo has our Arduino UNO Library for Proteus V4.0 with its built-in monitor, the same window as our TEP Serial Monitor Advance for Proteus. The motor is driven by U1, the ZS-X11H board from our separate ZS-X11H library (TEPZSX11H.LIB and TEPZSX11H.DLL), so install it first. The ZS-X11H is the red 6 to 60 V board that people buy with these motors: it reads the Halls and does the six-step switching itself, so the UNO only gives it a speed and the controls. Its V+ is on a 24 V terminal, MA, MB and MC go straight across to the motor's U, V and W, and its Hall connector takes the motor's Hall cable, which runs back under the board on the A3 sheet. Open BLDC42-ZSX11H-ArduinoUnoV4.pdsprj.

Five wires go to the UNO. D9 drives P, the speed input, with a PWM; D7 is DIR, low for reverse; D4 is STOP, low to stop; D8 is BRAKE, high to brake; and the board's SC output, its speed pulses, comes back to D2. The motor M1 carries a light load of 0.02 N.m and a 300 g.cm2 flywheel, so you can watch it coast and brake.

Figure: The whole simulation on an A3 sheet.

The Sketch

The speed is a percentage that the sketch turns into a PWM duty on D9. Timer1 is set to 3.9 kHz first, because the board takes a PWM of 1 to 20 kHz and the UNO's default 490 Hz is below that:

void speedPct(uint8_t pct) { analogWrite(P_PIN, map(pct, 0, 100, 0, 255)); }
  TCCR1B = (TCCR1B & 0xF8) | 0x02;                                      // D9 PWM at 3.9 kHz (the board takes 1 - 20 kHz)

Each step of the program is a few pin writes. Forward and reverse differ only in DIR; STOP lets the motor coast, BRAKE shorts its windings:

    case FWD: digitalWrite(BRAKE_PIN, LOW); digitalWrite(DIR_PIN, HIGH); digitalWrite(STOP_PIN, HIGH); speedPct(pct); break;
    case REV: digitalWrite(BRAKE_PIN, LOW); digitalWrite(DIR_PIN, LOW); digitalWrite(STOP_PIN, HIGH); speedPct(pct); break;
    case STOPPING: speedPct(0); digitalWrite(STOP_PIN, LOW); break;
    case BRAKING: speedPct(0); digitalWrite(BRAKE_PIN, HIGH); break;

The speed comes from SC. The board toggles it at every Hall edge, so it gives 12 rising edges a turn for this eight-pole motor. An interrupt counts them, and once a second the sketch prints the count times 60 over 12:

volatile unsigned long scRises = 0;
void onSc() { scRises++; }

The program: forward at 30 % at 2.5 s, 60 % at 5 s, 100 % at 7.5 s, STOP at 12 s, reverse at 60 % at 13.5 s, BRAKE at 16 s and the end at 17.5 s. Afterwards you can type in the monitor: f 80 runs forward at 80 %, r 50 in reverse at 50 %, s stops and b brakes.

42BLF BLDC Motor Simulation Results

Open the project and press Run. The program runs 18 simulated seconds, which Proteus ran in about four minutes on our PC with both pop-ups open and the pictures being taken. Click the motor to open its pop-up. Every number below comes from one simulation run, the demo exactly as it ships, plus two clicks on the load chips.

Forward at 30 %

At 2.5 s the UNO sets 30 % on P. The board ramps its duty up in a quarter of a second, its soft start, and the motor settles at 1043 RPM. The Motor tab shows the rotor with its eight magnets, the three coils and the Hall sensors around them, the coils coloured by their current. The Hall code is 011 in the picture, and the line under the rotor names what the driver does with it: driven W+ U-, the current into W and out of U, exactly the pair that code asks for. The scope shows the Halls stepping and the phase currents switching from phase to phase at each Hall edge, six steps for every electrical turn. The motor gives 24.3 mN.m, the light load plus its own friction, at 0.69 A. It takes 4.8 W and gives 2.2 W at the shaft, 45 % efficient: at this low speed most of the power heats the windings. The commutation figure reads 100 %, so every ampere gives the full torque.

Figure: Forward at 30 %.

The UNO's monitor prints the program's steps and, each second, the speed it counts from SC. Its counts follow the motor's own speed through the whole run.

Figure: The speed from SC in the monitor.

60 % and the Full 24 V

At 5 s the speed goes to 2996 RPM at 60 %, as the Event log notes it; the current stays at 0.69 A because the load has not changed, the input is 10.0 W and the efficiency rises to 63 %. In the same second the UNO counts 2995 RPM from SC, 599 rising edges. At 7.5 s the UNO sets 100 %, a constant high level on P, and the motor runs at 5571 RPM on the full 24 V. The back-EMF between two phases is 20.6 V, the electrical frequency 371 Hz. It takes 16.7 W and gives 11.7 W, 70 % efficient. The working point sits on the speed-torque line, the straight line from no-load speed to stall torque that every DC motor has.

Figure: Forward at 60 %.
Figure: The full 24 V with a light load.

The Rated Load

Now the test the datasheet is about. At full speed we clicked the Rated 0.063 chip on the motor's pop-up, which puts the rated torque on the shaft as a brake. The motor slows down until its torque matches, and it settles at 3987 RPM with 67.4 mN.m and 1.91 A in the phases: the datasheet says 4000 RPM at 1.9 A. The working point now sits right on the rated mark of the speed-torque line. It takes 45.7 W, gives 26.3 W at the shaft and runs 58 % efficient.

Figure: The rated load.

The ZS-X11H's own pop-up shows the same moment from the driver's side: the Hall code, the two switches that are on, the current's path through the bridge and the phase currents. The supply gives 1.93 A at 24 V, 46.2 W, and the board counts SC at 797 Hz, the same 3987 RPM.

Figure: The ZS-X11H at the rated load.

On the sheet the board's power LED is lit and the flat on the motor's shaft turns.

Figure: The board and the motor running.

STOP: the Motor Coasts

We clicked the 0.02 N.m chip again to take the load off, and the motor sped back up. At 12 s the UNO pulls STOP low. The board switches all six transistors off, and the motor has no current at all: it coasts from 5430 RPM, and only the load and the friction slow the flywheel. In the picture, at 12.35 s, it is still turning at 3536 RPM; the state reads COASTING and the line under the rotor reads no current. The Halls keep running and the back-EMF is still there, but nothing drives a current. The Event log notes the motor stopped 0.76 s after STOP.

Figure: Coasting after STOP.

Reverse and BRAKE

At 13.5 s the UNO sets DIR low and 60 %. The board now switches the same pairs the other way round, and the motor runs in reverse at 2998 RPM with 0.70 A; the speed and the torque read negative. The Hall code in the picture is 011: turning forward, that code asks for W+ U-, and the line under the rotor reads driven U+ W-, the same two phases with the current the other way.

At 16 s the UNO sets BRAKE high. The board turns on the three low-side transistors, which short the windings together. Now the motor works as a generator into a short circuit: its own back-EMF drives the current, and that current makes a torque against the motion. The Event log notes BRAKING at 2817 RPM with 2.32 A. In the picture, at 16.09 s, it has slowed to 2222 RPM with 2.00 A in the windings and 65.8 mN.m against the motion; the state reads BRAKING and the commutation figure turns negative because the torque fights the turning. The scope shows the shorted windings' currents, now smooth slopes that follow the back-EMF. The motor stopped 0.18 s after BRAKE, where the coast took 0.76 s from a higher speed.

Figure: Reverse at 60 %.
Figure: BRAKE: the windings shorted.
Figure: The simulation in the workspace at the end.

The Graphs, the Event Log and the Check Page

The Graphs page plots the speed, the torque, the peak phase current and the commutation figure over the last 2, 6 or 15 simulated seconds. The last six seconds show the whole difference between STOP and BRAKE: after STOP the speed falls in a long straight slope, slowed only by the load and the friction, while after BRAKE it drops to zero in a fraction of a second, with a current pulse and a torque against the motion. In between, the reverse run sits below zero.

Figure: The Graphs page.

The Event log writes every steady speed with its torque, current, power, efficiency and commutation figure, the load changes, the coast, the brake and the stops. The Check page sums up the Hall supply, the Halls, the speed and the torque against the ratings, the current, the efficiency and the commutation.

Figure: The Event log.
Figure: The Check page.
Figure: The monitor at the end.

Try It Yourself

  • Click the 0.12 N.m chip at full speed: the speed falls and the current rises along the speed-torque line, past the motor's rating.
  • Swap the HV and HW wires: the driver now switches the wrong pairs, the commutation figure falls and the motor stalls or runs rough.
  • Set INERTIA to 0 and to 2000: the coast and the brake get faster or slower, while the steady speeds stay the same.
  • Type f 50, then r 50 without a brake: the motor is driven against its own turning, and the current jumps.
  • Disconnect the Hall +5V: the pop-up warns NO HALL SUPPLY and the driver can no longer commutate.

Ideas to Extend the Demo

  • Close the loop: compare the SC speed with a target and adjust the PWM, a PI speed controller.
  • Read a potentiometer on A0 and turn it into the speed, like a fan controller.
  • Commutate the motor yourself from the UNO through three half-bridges, reading HU, HV and HW, and use the commutation figure to check your table.

Your Own Sketches

The demo sketch is in the zip file, and you can change it in the Arduino IDE. New to Arduino? Start with our Arduino Tutorial for Beginners. Export the compiled binary, and set the UNO's PROGRAM property to the new file. Our guide on How to get the HEX file from Arduino shows you where the file ends up.

Things to Know Before Using a Real 42BLF Motor

  • Match the phases and the Halls: the colours help, U and HU yellow, V and HV green, W and HW blue; swap two phases and two Halls together to change the direction.
  • The Halls need a supply and pull-ups: they are open-collector outputs on a real motor, and the driver board provides the pull-ups.
  • Mind the ratings: 0.063 N.m and 1.9 A continuously; the 0.18 N.m peak is only for a moment.
  • Brake before you reverse: reversing at speed drives the motor against its own back-EMF and draws a large current.

Troubleshooting

  • STALLED: current flows but the shaft does not turn: too much load (0.18 N.m peak), or the phases and Halls are mixed up.
  • WRONG COMMUTATION: the driver switches a pair the Hall code does not ask for; check the order of U V W and HU HV HW.
  • NO HALL SUPPLY: +5V or GND of the Hall cable is not connected, so HU, HV and HW float.
  • OVER-CURRENT: over 5.7 A for 0.2 s, a stalled start or reversing at speed.
  • The part is not simulated: TEPBLDC42.DLL is missing from MODELS and from the project folder.

Limitations of the Simulation

  • The windings' inductance is not modelled, so the current follows the voltage at once; at the speeds of this motor that changes little.
  • Cogging, the magnets' temperature and the Halls' own delay are not modelled.
  • The winding resistance and the friction are our figures from the rated point, because the datasheet gives neither.
  • Arduino is a name of Arduino; this library is not made or endorsed by Arduino, Labcenter or any motor maker.
  • Tested in Proteus 8.5 in November 2026 (the demo as shipped). Proteus 7 is not supported.

So, that was all about the 42BLF Hall BLDC Motor Library for Proteus Simulation. I hope it helps you try brushless motors in a simulation first: the Halls, the six steps, the speed-torque line, the rated point, coasting and braking, with a pop-up that shows the rotor, the currents and how well the driver commutates. If you have any questions, ask in the comments and I will help you out. Till the next tutorial, take care and have fun!