Motorized Knob

by nikzin in Circuits > Electronics

39 Views, 0 Favorites, 0 Comments

Motorized Knob

IMG_20251105_214052.jpg

Motorized Knob to interface with devices via BLE to control for example a PCs volume.

You can find the code for this project on github: https://github.com/nikzin96/motorized_knob

Supplies

What you need to build this project:

  1. 1x ESP32-C3 Super Mini
  2. 1x BLDC-Motor (ROB-20441, already has the necessary magnet attached)
  3. 1x SimpleFOCMini motor driver
  4. 1x 5V to 8V mini boost converter (to boost 5V USB to 8V for BLDC motor)
  5. 1x AS5600 magnetic sensor board
  6. 1x 12-Bit Neopixel LED Ring (35mm inner and 50mm outer diameter)
  7. 1x 1,5mm high SMD push button (mute button)
  8. 7x M3x4 (4.5mm outer diameter) heat inserts
  9. 4x M3x16 screws (for the case)
  10. 4x M3x6 screws (for AS5600 and knob)
  11. 1x 5V 3A USB-C power adapter (with less the knob shuts itself down when pushed to the end stops)
  12. 3x M1.6x4 screws (to mount motor)
  13. 4x M2x8 screws (to hold the LED-ring, needs to cut into the printed parts)
  14. connecting wires
  15. 4x rubber feet (round, 10 mm diameter, optional)
  16. glue (optional, to better hold LED-diffusor in place)

Print Parts

Spacer_LEDRing needs to be printed 4 times.

LightRing is a diffusor and needs to be printed in transparent filament. White PLA might also work (not tested)

Add Heat Inserts

IMG_20251029_195947.jpg

All heat inserts must be added to the Base_Top part.

Add LED Ring to Knob

IMG_20251029_203824.jpg

Insert the 3D printed Light ring into the knob. It is recommended to add glue before inserting it.

Add the LED Ring

IMG_20251029_195953 - Kopie.jpg
IMG_20251029_195341.jpg

Solder the needed wires to the LED ring first (5V, GND and Data).

Then add the 4 spacers to the corners of the top part.

Add the LED-Ring on top of the spacers and screw it down using M2 screws. Be carefull with the wires. Feed them through the spaces into the inside of the base.

Add the Motor

IMG_20251029_195953 - Kopie (2).jpg
IMG_20251029_200708.jpg

Add the motor to the top part and screw it in place using the three M1.6 screws. Feed the wires through the hole (see picture).

Wire Up the Electronics

IMG_20251029_200913.jpg
provisionally_wiring_diagram.png

Wire up the ESP32, boost-converter, SimpleFOCMini motor driver and the AS5600 shield.

Wire Motor

IMG_20251029_201712.jpg
wiring_diagram.png

Connect the motor to the SimpleFOCMini and the LED ring to the ESP32.

Also connect the button the the ESP32-C3 Super Mini (see final wiring diagram).

Insert Electronics

IMG_20251029_205453.jpg
IMG_20251029_205446.jpg

Put all the electronics inside the base of the case. Add the button on top of the pin in the base. You might want some super glue for it to hold properly and not stick out too high.

Use hotglue to hold the electronics in place.

Make sure that the USB-C connector of the ESP32 is in the right position. It is used to power and program the knob.

Screw the AS5600 in place (using M3 screws) with the IC facing up towards the motor.

Now insert the knob through the hollow center shaft of the motor. Make sure the two small allignment pins on the inside of the knob snap into the small holes on top of the motor. Then use a M3x4 or M3x6 screw and screw it into the hollowed shaft of the knob. This will cause it to spred and be ficed to the motor.

Next close the case. Make sure no wires are shorted or squeezed between the parts. Screw the two parts together using four M3x16 screws from the bottom side. You can add rubber feet over the screws to hide them and give the knob better grip on the table.

Programming

The last step is to program the knob. For that clone the github repo and follow the instructions in the README.md to initialize the project.

You might need to change some variables. Depending on the orientation of the knob and the AS5600 your positions might be different from the preset 0% and 100% in the code.

After uploading the code, the knob should move to zero position and start waiting for a connecting (indicated by breathing blue light).

Now you need to install all required python packages and run the script. If you want to have it running in the background, you can build an executable verion of the script using for example Nuitka.