Skip to the content
PCBKitNew board
2 layers43.3 × 36 mmPCutSpeedCTRL, the printed circuit board in 3D

It provides constant speed operation and remote control of single phase AC motor suitable for operation with 220 vac 50hz. When produced with BTA41 triac switching element, it provides usage up to 40 Ampere.

Size
43.3 × 36 mm
Copper layers
2
Thickness
1.6 mm
Parts
49
Nets
28
Pads
115
Tracks, vias
288, 6
Pours
6
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
27 May 2025
Updated
27 May 2025

Overview

PCutSpeedCTRL is an open-source printed circuit board by hasankarainfo, from the hasankarainfo/PCutSpeedCTRL repository on GitHub, published under the Apache-2.0 licence. It is a 2-layer board of 43.3 × 36 mm with 49 parts on 28 nets, routed with 288 tracks and 6 vias.

It is built around the CH32V003J4M6, BTB16-800B and MMBTA42. Its parts include 16 resistors, 9 capacitors, 9 diodes, 5 ICs and 4 connectors. It belongs with the RISC-V boards of this library.

Main components

3

README

README.md

PCutSpeedCTRL Constant Speed Controller

  • It provides constant speed operation and remote control of single phase AC motor suitable for operation with 220 vac 50hz.
  • When produced with BTA41 triac switching element, it provides usage up to 40 Ampere. In my initial tests I used a 1.2kW AC motor.
  • The first version component cost was calculated as $3,075.
  • Suitable for use with standard hand milling motors that are easily available on the world market.
  • The mentioned milling motors are suitable for use in CNC machines.
  • Any CNC controller can be connected directly and in isolation with a standard PWM output.
  • This resource contains design and production files for hardware and firmware.
  • PC Software used in the development process; KICAD 9 for Hardware, MOUNRIVER 2.1 IDE and C programming language were used for Firmware. OCTAVE was used to create look up tables for some mathematical equations.
  • Test Video Youtube Link
3D Front 3D Rear

HARDWARE Detail:

Schematic Detail:

Non Isolated Power Supply:
  • A cost-effective, non-isolated design was implemented for low voltage supply needs.
  • This scheme can meet the required 30mA power requirement. This power is mainly used for MCU operation, hall effect sensor operation and TRIAC triggering.
Triac gate drive circuit:
  • Phase cut topology used.
  • Some snubber components applied.
Zero cross detection circuit:
  • With q3 mosfet, a faster falling edge signal is generated.
MCU, Hall Sensor and PWM Input Circuit:
  • It was developed using the ch32v003j4m6 microcontroller from wch company.
  • DRV5023 hall sensor was used for spindle speed measurement.

Panelize Detail:

  • We use the Kikit plugin for PCB paneling.
  • We can panelize the PCB design by running the panelize_multiple.py file located in the "/HW/Panelize/" file path.
  • Phase cut topology used.
  • In panelized form, a new kicad project is created automatically.
Panelize Wiew Some Panel Settings in panelize_multiple.py

Mechanic Detail:

  • When the AC motor top cover is opened, 4 screw holes can be seen.
  • When the top cover of the spindle motor is first opened, there will be no hole in the middle
  • A metric 5 diameter hole should be drilled along the shaft, coinciding with the center.
  • While designing the PCB, compatibility was ensured by using the Mac Allister manufacturer MSR1200 model AC motor.
  • A 3x3 mm cylindrical neodymium magnet is inserted through this hole and coupled with the shaft.
  • There should be an angle of approximately ~45° between the magnet cylinder center axis and the shaft axis.
  • The shaft and magnet can be attached using super glue.

When the rotor is turned to different angles, it should be confirmed that the magnet rotates together.

Spindle Motor Controller assembly demonstration

Spindle Motor Controller Driver Applied

Firmware Detail:

  • MOUNRIVER 2.1 IDE and C programming language were used for Firmware.
  • The HYB cooperative operating system was used for the MCU resource management organization.
  • Since the cooperative real-time operating system we use is very lightweight, it can easily adapt to the Microcontroller despite its weak memory.
  • With this project, I am also sharing the cooperative operating system that I have been developing over the years as open source.
  • I also added some libraries to the firmware that are not actively in use but could enable developments that fit the structure of the project.
  • NTC temperature sensor data interpretation, ADC reading, moving average filter, some of them.

About the main routine:

  • Using 2 different input capture modules, PWM input data was taken with IC1 and the magnetic sensor digital output frequency value was measured with IC2.
  • Speed ​​change commands have been smoothed to create a ramp between the PWM data and the target speed information.
  • Zero Cross detection was performed using the external interrupt module. Triac triggering and PID routines were run with each ZC detection.
  • For linearization of the system, the source signal is assumed to be a sinusoidal signal. The equation used is the integral of the half sine signal.
  • For system linearization, PID output information was applied to the linearization function using the look up table interpolation created with the Octave PC application.
  • Thus, a more stable closed-loop system was obtained with fixed PID coefficients.
  • Duty data was evaluated as time data to convert it into TRIAC switch signal.
  • In addition to the look up table, a firmware setting option has been added to enable linearization by measurement method.
  • The firmware can be made to work with different features with a set of predefined settings.
  • The mentioned settings can be seen in the image below, as well as in the main.c file.

Firmware Managment Settings 1

Firmware Managment Settings 2

Octave Equations Plot and Print :

  • The linearization table created with Octave PC software can be examined graphically and can be evaluated by copying and pasting directly into the C code.
  • Similarly, the linearization table output from the MCU serial port output at boot up time can be directly copied and pasted into the Octave software and visually inspected.

Inverse Sine Power Equation Created

Inverse Sine Power from MCU, Equation and Measured

Some Tests:

  • As can be watched in the video link shared above, we performed some aluminum sheet and PCB drilling tests.
  • When we apply sudden strain and sudden release tests, overshooting values ​​of up to 800 rpm occur.
  • The spindle motor we tested has a 30k rpm feature at full power.
  • As is known, keeping a constant speed at low rotational speeds can be a very challenging goal.
  • Its ability to remain at low overshoot values ​​while at 1k rmp target speed is at a satisfactory level.
  • We could observe that it does not work so stably unless linearization is applied.
  • We made it possible to observe the result by disabling a single predefined setting via the firmware.

PCB Milling and Edge Cut Test Front

PCB Milling and Edge Cut Test Rear

Production:

  • Gcode files created for PCB production with DIY techniques can be found in the HW/Panelize/Plot_diy folder.
  • The bom list, along with supply links and unit prices, can be viewed in the "HW/bom" file path.
  • For PCB fabrication files, files in the "HW/Plot" or "HW/Panelize/Plot" file path can be compressed and shared directly with the PCB manufacturer.

Parts

49
QtyValueFootprintReferences
61N4148Library:D_SOD-123F-sD1, D2, D4, D5, D6, D7
44.7KLibrary:R_0603_1608MetricR7, R8, R11, R12
3100RLibrary:R_0603_1608MetricR3, R9, R10
2100nFLibrary:C_0603_1608Metric_SlimPadC5, C9
21KLibrary:R_0603_1608MetricR15, R16
2330RLibrary:R_1206_3216Metric_SlimPadR4, R5
2PC817Library:DIP-4_W7.62mmU1, U2
1100KLibrary:R_0603_1608MetricR13
1100nF 50VLibrary:C_0805_2012Metric_SmallPadC4
110MLibrary:R_Axial_DIN0207_L6.3mm_D2.5mm_P15.24mm_HorizontalR1
110nFLibrary:C_0603_1608Metric_SlimPadC7
110nF 1kVLibrary:C_1206_3216Metric_SlimPadC8
11uF 400VLibrary:C_Rect_L18.0mm_W8.0mm_P15.00mm_FKS3_FKP3C3
12.2KLibrary:R_0603_1608MetricR6
12.2nF 3kVLibrary:C_Disc_D7.5mm_W5.0mm_P7.50mmC1
122KLibrary:R_0603_1608MetricR14
122uF 6.3VLibrary:C_0603_1608MetricC6
1470uF 10VLibrary:CP_Radial_D6.3mm_H11.0mm_P2.50mmC2
147RLibrary:R_Axial_DIN0309_L9.0mm_D3.2mm_P2.54mm_VerticalR2
15.08_220VacLibrary:TerminalBlock_MetzConnect_Type101_RT01602HBWC_1x02_P5.08mm_HorizontalJ1
16.1VLibrary:D_SOD-123F-sD3
17MM 431Library:RV_Disc_D15.5mm_W5.4mm_P7.5mm_SpecRV1
1BTB16-800BLibrary:TO-220-3_Vertical_HV_TO247_AppliedQ1
1CH32V003J4M6Library:SO-8_3.9x4.9mm_P1.27mmU3
1DRV5023FA SMDLibrary:SOT-23-3-sU4
1In_PWMLibrary:TerminalBlock_4Ucon_1x02_P3.50mm_HorizontalJ4
1LOADLibrary:TerminalBlock_MetzConnect_Type101_RT01602HBWC_1x02_P5.08mm_HorizontalJ2
1LOGOLibrary:Flag_TR_FABG***
1LOGOLibrary:Flag_TRG***
1LR9102Library:TSOT-23-5_SlimPadU5
1MMBTA42Library:SOT-23-3-sQ2
1PGLibrary:PinHeader_1x04_P2.54mm_VerticalJ3
1PJA3440Library:SOT-23-3-sQ3
1RedLibrary:LED_0805_2012Metric-sD8
1WhiteLibrary:LED_0805_2012Metric-sD9

Questions

How big is the PCutSpeedCTRL PCB?

It measures 43.3 × 36 mm and has 2 copper layers, 1.6 mm thick.

What parts does the PCutSpeedCTRL use?

49 parts, built around the CH32V003J4M6, BTB16-800B and MMBTA42. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the PCutSpeedCTRL KiCad files?

From the hasankarainfo/PCutSpeedCTRL repository on GitHub, at the commit this page was made from: the board is HW/PCutSpeedCTRL.kicad_pcb and its schematic HW/PCutSpeedCTRL.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the PCutSpeedCTRL design in my own project?

Its repository publishes it under the Apache-2.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

More from hasankarainfo/PCutSpeedCTRL

1
  • 2 layers200 × 100 mmPanelize, the printed circuit board in 3D

    Panelize

    hasankarainfo/PCutSpeedCTRL

    It provides constant speed operation and remote control of single phase AC motor suitable for operation with 220 vac 50hz. When produced with BTA41 triac switching element, it provides usage up to 40 Ampere.

    556 parts1Apache-2.0

Similar boards

  • 2 layers50 × 50 mmINNER PCB, the printed circuit board in 3D

    INNER PCB

    KaiPereira/Alchemical-Cosmological-Badges

    These are alchemical-cosmological PCB hackathon badges I designed in a day for the Fallout hackathon in Shenzhen, China.

    73 parts12
  • 2 layers67 × 92 mmWindmeter modbus interface, the printed circuit board in 3D

    Windmeter modbus interface

    pe1mew/windmeters-modbus-interface

    Universal interface for cup-anemo- and wind-directon- sensor to modbus

    30 parts2
  • 2 layers50.5 × 18 mmContinuity, the printed circuit board in 3D

    Continuity

    tvecera/ch32-projects

    A collection of example projects and experiments for CH32-series microcontrollers from WCH (Nanjing Qinheng Microelectronics).

    20 parts2MIT
  • 2 layers14.2 × 26 mmUsb auto reboot, the printed circuit board in 3D

    Usb auto reboot

    74th/usb-rebooter

    We would appreciate it if you would not sell them. 販売はしないでいただけるとありがたいです。

    11 parts1MIT
  • 2 layers10.2 × 29.8 mmTikk, the printed circuit board in 3D

    Tikk

    mengstr/tikk

    CH32V003-based 1Hz->8MHz clock generator with reset for breadboards

    16 parts1