Integrating the 5010 360 kV BLDC Motor with the NDrive Z1 Using the On-Board Encoder: Step-by-Step Tutorial
This tutorial provides a step-by-step walkthrough to set up, configure, and operate the NDrive Z1 with the 5010 360 KV BLDC Motor using its onboard 14-bit absolute encoder.
Introduction
This tutorial provides a step-by-step procedure for connecting and configuring the 5010 360 kV BLDC motor with the NDrive Z1 using its onboard absolute encoder. The procedure covers hardware connections, CAN communication setup via the NLink adapter, initial parameter configuration, PID tuning, and calibration using the NMotion CLI Tool. Upon completing these steps, the motor will be tuned, calibrated, and ready for stable closed-loop operation.
What You Need
Before diving into wiring and configuration, make sure you have all the essential components and tools required to integrate the NDrive Z1 with the 5010 360kV BLDC motor.
NMotion Components
- NDrive Z1 Motor Driver
- NLink Adapter (for USB/CAN interface)
- NMotion CLI Tool (for configuration)
Electronic Parts
- 5010 360kV Brushless Motor (24V rated, 7 pole pairs)
- Wires [16 AWG wire for DC+(Red) and DC-(Black)]
- CAN cables (2-pin JST PH, 2mm pitch)
- Type C USB Cable
General Parts
- 3D-Printed Mount for the Motor-Driver Setup
- 3D-Printed Magnet holder
- 6x2.5mm Diametrical Neodymium Magnet
- SHCS Allen Bolt M3x6mm x4
- SHCS Allen Bolt M3x8mm x4
- M3 Brass inserts x4
Tools and Supplies
- Allen Key 2.5mm
- Screw Driver
- Wire Stripper
- Power supply (12–48V)

Hardware Setup and Connections
With the components in place, the next step is to connect the 5010 360kV motor and the power supply to the NDrive Z1. This section walks you through how to connect the 5010 360kV BLDC motor to the NDrive Z1, ensuring the setup is safe, secure, and ready for calibration.
- 1
Mount the 5010 BLDC to the 3D-Printed Mount:
Before mounting the 5010 BLDC motor onto the 3D-printed plate, insert the 6 × 2.5 mm Neodymium magnet into the magnet holder and ensure it is properly seated. Press-fit the magnet holder axially into the rear shaft opening of the motor, confirming that it is fully inserted and correctly aligned.

Magnet holder placed over the rear shaft. Once the magnet holder is securely installed, position the motor on the 3D-printed mounting plate and align the motor’s threaded holes with the corresponding openings on the mount. Fasten the motor to the plate using 4 × SHCS M3 × 8mm Allen bolts, tightening them uniformly to maintain proper alignment and ensure stable, reliable operation.

5010 BLDC mounted to the Mount plate 
Mount plate rear-side - 2
Mount the NDrive Z1 onto the Back of the Motor:
Begin by installing the M3 brass inserts into the designated holes on the 3D-printed mount. Once the inserts are properly seated, mount the driver to the back of the mounting plate using 4 × SHCS M3 × 6mm Allen bolts.

Magnet and NDrive distance of at most 1 mm. The NDrive Z1 features an onboard 14-bit absolute magnetic encoder (MA732). In this guide, we will be using an onboard encoder as a motor encoder, so no external encoder wiring is needed.

NDrive Z1 mounted to the Motor - 3
Connect the Motor and Power Wires:
Wire the three motor phases from the 5010 BLDC to the NDrive Z1’s motor terminals A, B, and C. The order isn’t critical for this setup.
Next, connect your power supply. Connect the Positive of the Power Supply to DC+ and the Negative to DC- .
dangerEnsure that the power connection is made correctly, as a reverse polarity connection can damage the driver board.

Motor Phases and Power Connected to NDrive Z1 - Make all electrical connections with the power supply switched off to avoid accidental shorts or damage.
- Do not connect or disconnect CAN cables while the NDrive Z1 is powered on. Ensure the driver is completely powered OFF before handling CAN connections to prevent hardware damage.
- 4
Communication:
Connect the NDrive Z1's CAN bus interface to the NLink Adapter using a 2-pin JST PH connector. The NDrive Z1 has a daisy-chainable CAN bus with two ports. Since only two devices are connected(NDrive and NLink), turn on the termination resistor switch in both NDrive and NLink. Refer to the DIP Switch settings.

NLink Adapter Connected to NDrive Z1 - 5
Connect to PC:
Plug the NLink Adapter's USB-C port into your system.

Final Assembly of NDrive Z1 with 5010 360kV BLDC Motor
Configuring the NDrive Z1
The NMotion CLI is a command-line interface used to configure and manage NMotion devices. It supports setup, calibration, and testing of the NDrive Z1 through simple terminal commands.
- 1
Install the NMotion CLI Tool:
Download and install the latest NMotion CLI tool on your computer.
- 2
Powering up the NDrive:
Turn ON the power to the driver. The COM LED (yellow) should blink during boot-up, indicating normal startup. If the LED does not blink, ensure that the DIP switch is configured to RUN mode.

Powering up NDrive Z1 - 3
Connect via NLink and Launch the NMotion CLI:
Plug the NLink adapter into your PC using a USB cable. Open a terminal and start the NMotion CLI.

If everything is set up correctly, the NLink will be connected as a USB device, and its corresponding object will be created successfully. If the expected output is not displayed in the CLI Tool, refer to the troubleshooting guidelines to identify and resolve the issue.
When the driver is powered ON, the CLI automatically detects it and creates a corresponding object (e.g.,
Driver_0_ttyACM0) based on its default CAN Node ID. - 4
NMotion CLI API Functions
The configuration can be written using set commands and can be read using get commands. Refer API Documentation for more details.
- 5
Configure CAN Bus:
It is crucial to assign a unique CAN Node ID to the driver, especially if multiple devices are on the CAN bus. The default ID is 0. You can change it using the
setNodeId()function.noteSetting the CAN Node ID will cause the driver to disconnect and reconnect as a new object name in the CLI (e.g., from
Driver_0_ttyACM0toDriver_10_ttyACM0if you set the ID to 10). To save the new node, save the node ID using thesave_configuration()function. After the command, the driver will save and reboot.
- 6
Power Configuration:
Configure the under-voltage and over-voltage trigger levels. The driver will trigger a voltage trip error if the voltage goes below the under-voltage trip level and above the over-voltage trip level. The under-voltage trigger level is configured as 10V, and the over-voltage trigger level as 25V.
No brake resistor is used in this configuration, so the regenerative current should be set to a suitable value (default: 8 A). Configure the regenerative current to 8 A using
Driver_10_ttyACM0.setRegenCurrentTripLevel(8). Also disable the brake resistor usingDriver_10_ttyACM0.disableBrakeResistor().
- 7
Motor Configuration:
Configure the motor parameters such as pole pairs, kV rating, and current limit using
Driver_10_ttyACM0.setMotorParameters(pole_pairs, kV_rating, current_limit). For the 5010 360kV BLDC motor, the pole pair is set to 7, and the kV rating is set to 360. Set the current limit to 25A.
- 8
Encoder Configuration:
Use
Driver_10_ttyACM0.configureMotorEncoder(1,16384)to configure the onboard absolute encoder as the motor encoder. The encoder_type for the onboard absolute encoder would be 1 (TYPE_ONBOARD_ENCODER). The onboard encoder's resolution is 14 bits. Remember to save the configuration for the encoder settings to take effect.
- 9
Calibration Configuration:
For the 5010 BLDC motor, set the calibration voltage to 3 V and the calibration current to 5 A to ensure safe operation and accurate phase parameter estimation during the calibration process. Refer setting calibration parameter.

- 10
Save Configuration:
After setting all parameters, save them to the driver's non-volatile memory using
Driver_10_ttyACM0.saveConfigurations(). This ensures settings persist after reboot. Saving triggers a reboot. Be mindful that the non-volatile memory has a limited number of write cycles, so avoid saving too frequently.
Calibrating NDrive Z1 with Motor
Before running the calibration sequence, ensure that the motor is free to move and all loads are disconnected. Also, ensure that the motor and power connections are properly connected and the driver is properly mounted.
Initiate the calibration sequence by using Driver_10_ttyACM0.runCalibrationSequence() command.
During the calibration, the NDrive Z1 measures motor phase parameters, determines the encoder offset, and verifies the configured pole-pairs and counts per revolution (CPR). The motor will draw some current and emit a short beep during the inductance measurement phase, followed by slight rotations in both directions for encoder offset calibration.
If no errors occur, the NDrive Z1 has been successfully calibrated with the motor. Save the calibrated configuration to complete the process. Your NDrive Z1 is now ready for motor control.
If any error is triggered, the error LED (RED) will be ON. You can check the specific error code using Driver_10_ttyACM0.getErrorCode() function and then refer the Error Handling section for troubleshooting the issue.
Tuning PID Gains
By default, the the VelocityControllerGains is set to (0.075, 0.33) and PositionControllerGain is set to 60. For the 5010 BLDC motor, configure the control loops using the recommended values. Set the position loop with setPositionControllerGain(60) and configure the velocity loop using setVelocityControllerGains(0.02, 0.2). These values provide a solid baseline for stable and responsive motor control. For more detailed tuning guidance, refer to the PID tuning blog post.
Operation
After calibration, the motor can operate in various control modes such as position, speed, and torque. Here, the motor is commanded to move to an angle of 180 degrees at a speed of 60 degrees per second.

Ensure safe and reliable operation of the motor controller by monitoring the error LED and checking the error codes reported by the controller.
By completing the hardware connections, configuration, basic PID tuning, and calibration steps, the 5010 360 kV BLDC motor is now integrated with the NDrive Z1 and ready for use. The system is configured to use the onboard absolute encoder, power handling is set up correctly, and the driver is calibrated through the NMotion CLI Tool.
For more details, check out our documentation or reach out to our support team!