# Building the Actuator

Now that we have gathered all the necessary tools and parts, we are ready to begin the assembly process.

## Preparing the magnetic encoder

We need to change the configuration of the AS5600 magnetic encoder by swapping out a few resistors on the board. Please follow [this tutorial](https://notes.tk233.xyz/electrical/as5600-modification) or the video below to perform the modification.

{% embed url="<https://www.youtube.com/watch?v=ei9_t1p451A>" %}

After moving the resistors, also solder the VCC, GND, SDA, and SCL wires on the corresponding pads.

<figure><img src="https://2396875388-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJ943fa7TiyZgDTAM8Bt7%2Fuploads%2FhJAPRb6HDovzzyY08Dzo%2FWeixin%20Image_20250421131455.jpg?alt=media&#x26;token=7e4c87b5-f867-41c5-9422-6b9c6ba9e4bc" alt="" width="375"><figcaption></figcaption></figure>

<figure><img src="https://2396875388-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJ943fa7TiyZgDTAM8Bt7%2Fuploads%2FvjD2iiktkykhIifWByKe%2FWeixin%20Image_20250421131449.jpg?alt=media&#x26;token=303abb11-c457-477d-a483-bccaaa85538a" alt="" width="375"><figcaption></figcaption></figure>

## Preparing the motor

Use some hot glue to stick the magnet to the shaft of the motor rotor.

The image below shows an example for the 5010 motor. For M6C12 motor, instead of the clip, it uses a screw at the end of the shaft to hold everything together, but the procedure to mount the magnet is the same.

{% hint style="info" %}

## Note

Be sure to use the magnet that comes with the encoder. These magnet are magnetically charged along the radial axis, while normal round magnets are charged along the cylinder axis and does not work with the encoder.
{% endhint %}

<figure><img src="https://2396875388-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJ943fa7TiyZgDTAM8Bt7%2Fuploads%2FsvWkpxzukaJTy8lQRqhD%2FIMG_0198.jpg?alt=media&#x26;token=7846f6f3-717d-4431-a1c5-670f005e14f1" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2396875388-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJ943fa7TiyZgDTAM8Bt7%2Fuploads%2FM1qLqPRuttnW2ia4IISe%2FIMG_0199.jpg?alt=media&#x26;token=80b2a74a-208e-477c-8458-243212cf612b" alt=""><figcaption></figcaption></figure>

## Assembling the actuator

Please follow this video tutorial to assemble the actuator.

{% embed url="<https://youtu.be/CHPVXL-SsSo>" %}

## Soldering

Connect the encoder, motor, and the motor controller together according to the following wiring diagram.

<figure><img src="https://2396875388-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJ943fa7TiyZgDTAM8Bt7%2Fuploads%2F9GlAsf2bQZYjzWaxDpmB%2Fimage.png?alt=media&#x26;token=f26695cc-e33d-4aff-9fdd-24c4a8900771" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}

## Warning

The CAN port solder pads on the ECS are *very fragile* and very susceptible to breaking off the FR4 base layer. Please be extra cautious when soldering and handling it. Do not apply excessive force on the cables and the pads.
{% endhint %}

{% hint style="info" %}

### Hint

The solder pads of the encoder and CAN are tricky to work with. It requires some degrees of familarity of soldering. Our suggestion is that adding more flux makes it easier to have a more solid solder joint.
{% endhint %}

## Cable selection

For power cables, we are using **14 AWG** (14 Gauge) stranded silicone wire. The color coding convension is white/red for positive, and black for ground.

For CAN cables, we are using **30 AWG** (30 Gauge) stranded silicone wire. The color coding convension is yellow for CAN-H and SDA, green for CAN-L and SCL.

## Results

Here are some photos of the finished motor controller for your reference:

<figure><img src="https://2396875388-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJ943fa7TiyZgDTAM8Bt7%2Fuploads%2FCpICav50nglnuySrgefg%2F1000008386.jpg?alt=media&#x26;token=070f5426-f505-441e-96c4-55c32f4dc997" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2396875388-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJ943fa7TiyZgDTAM8Bt7%2Fuploads%2FIv46wcUmYJJrOJv4cHun%2F1000008385.jpg?alt=media&#x26;token=31ed84b9-c8ec-47ea-8021-a37035dfd57f" alt="" width="375"><figcaption></figcaption></figure>
