> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hlaboratories.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Motor Test Mount

> Get started with the Motor Test Mount to quickly try new ACB firmware and parameters.

<Frame>
  <img src="https://mintcdn.com/hlabs/wR1R070sgLeFOjJ3/images/motor_mount/full_package.JPG?fit=max&auto=format&n=wR1R070sgLeFOjJ3&q=85&s=86daf56991dfe8ef07d0f07088efcf01" alt="Package" height="200" noZoom className="rounded-lg" data-path="images/motor_mount/full_package.JPG" />
</Frame>

# Assembly

Included with the MTM is a small bag of bolts, you should have:

* 4x M4 4mm for mounting the ACB
* 2x M3 10mm for fixing the ACB mount plate to the base
* 4x M3 8mm to mount the motor to the base

Also included is:

* A 3-phase BLDC 1000kv Motor with a **7 Pole Pair count**
* The base plate to mount the motor
* The ACB mount that attaches to the motor
* Flywheel with encoder magnet

Start by pushing the flywheel onto the motor shaft, don't worry too much about the alignment right now as this will be handled later on.

<Frame caption="Insert the motor into fly flywheel">
  <img src="https://mintcdn.com/hlabs/wR1R070sgLeFOjJ3/images/motor_mount/flywheel_attachment.JPG?fit=max&auto=format&n=wR1R070sgLeFOjJ3&q=85&s=82514ec7898678581f3927d728af624a" alt="Flywheel" height="200" noZoom className="rounded-lg" data-path="images/motor_mount/flywheel_attachment.JPG" />
</Frame>

Then use the M3 8mm bolts to screw the motor into the base plate, make sure to align the wires with the relief area.

<Frame>
  <img src="https://mintcdn.com/hlabs/wR1R070sgLeFOjJ3/images/motor_mount/motor_mounting.JPG?fit=max&auto=format&n=wR1R070sgLeFOjJ3&q=85&s=ca130d2bd60d479a57fc72e7a63a8b1a" alt="Flywheel" height="200" noZoom className="rounded-lg" data-path="images/motor_mount/motor_mounting.JPG" />
</Frame>

Once secured you can then slip the front ACB mount onto the base plate putting the flywheel into the bearing. Use the 10mm M3 bolts to secure it in place. The bolts insert at an angle which lets you center the mount as you tighten or loosen the bolts.

<Frame>
  <img src="https://mintcdn.com/hlabs/wR1R070sgLeFOjJ3/images/motor_mount/acb_mount.JPG?fit=max&auto=format&n=wR1R070sgLeFOjJ3&q=85&s=8a297422359853ef0beffe2f3129f732" alt="ACB Mount" height="200" noZoom className="rounded-lg" data-path="images/motor_mount/acb_mount.JPG" />
</Frame>

You're now able to solder the 3-Phase wires to the ACB and mount the ACB as shown below:

<Frame caption="The fully mounted ACB - solder the phases to the exposed areas in the bottom right of the board.">
  <img src="https://mintcdn.com/hlabs/wR1R070sgLeFOjJ3/images/motor_mount/mounted_acb.JPG?fit=max&auto=format&n=wR1R070sgLeFOjJ3&q=85&s=1c79df0c26b90693f000476722e7affa" alt="Mounted ACB" height="200" noZoom className="rounded-lg" data-path="images/motor_mount/mounted_acb.JPG" />
</Frame>

# Running the motor for the first time

Before running the board it's important to make sure you have a correct power supply. It's reccomended to use a 12V (3S LiPo) power supply with the motor on the test mount - you can test higher but results may be unpredictable especially if you modify the firmware.

Connect the board to a USB-C cable and power up! You should see a blue status light turn on indicating the nominal startup procedure, and a serial port show up on your computer - **if the serial doesn't show up try disconnecting the USB-C on the board and insert it again after rotating 180 degrees**.

All ACBs are shipped with firmware suitable to drive the motors used in the test mount. You can download the test script used to test every ACB from our [Github here](https://github.com/h-laboratories/open-actuator/blob/main/examples/production_test.py)(make sure you setup your python environment for OpenActuator, instructionos in that repo README). This script validates core functionality of the board, including recalibration for the specific motor you have and testing two types of FOC. This script also acts as an example for running the motor from python.

The fastest way to get started is to run the board via commands from a serial interface like the one in the Arduino IDE. Startup the Arduino IDE and you should see the addional port open, select any arduino board for the moment and then open the serial interface console. A normal "hello world" procedure looks like this:

```
recalibrate_sensors
save_config
set_velocity 400
enable
```

Here's a short description on these commands:

* `recalibrate_sensors`: this allows the FOC engine to calulate the orientation of the encoder magnet relative to the mechanical system.
* `save_config`: this saves the encoders position to permanent memory that persists on reboot.
* `set_velocity`: sets a target velocity of 400deg/sec
* `enable`: enable the motor drivers

To disable the motor it's `disable`, also `reset` will do the trick if you don't like something that's going on.

You can find a full list of upto date commands in the [OpenActuator](https://github.com/h-laboratories/open-actuator/tree/main) repo, and more information on tuning the PID settings in [Setup a New Motor](/motors/Setup%20a%20New%20Motor)
