MotorCell isn't just for continuous motion - it can also be pulsed for a short bursts of movement. This is particularly useful for kinetic art projects, where controlled, rhythmic motion can create stunning visual effects. By pulsing the motor for a few milliseconds at a time, you can achieve coordinated spinning effects across multiple motors.
This example demonstrates how to pulse six motors for 2000 milliseconds (2 seconds) each, creating a sequential spinning effect. The function Pulse(IN_pinX, pulse_ms)
activates each motor for a set duration before moving to the next.
#include <MotorCell.h>
#define IN_pin1 1
#define IN_pin2 2
#define IN_pin3 3
#define IN_pin5 5
#define IN_pin6 6
#define IN_pin7 7
#define pulse_ms 2000
int motor_num = 0;
MotorCell myMotorCell(1,2,3);
void setup() {
}
void loop() {
delay(100);
motor_num++;
switch (motor_num) {
case 1:
myMotorCell.Pulse(IN_pin1, pulse_ms); /* Pulse motor 1 for 2000ms */
break;
case 2:
myMotorCell.Pulse(IN_pin2, pulse_ms); /* Pulse motor 2 for 2000ms */
break;
case 3:
myMotorCell.Pulse(IN_pin3, pulse_ms); /* Pulse motor 3 for 2000ms */
break;
case 5:
myMotorCell.Pulse(IN_pin5, pulse_ms); /* Pulse motor 5 for 2000ms */
break;
case 6:
myMotorCell.Pulse(IN_pin6, pulse_ms); /* Pulse motor 6 for 2000ms */
break;
case 7:
myMotorCell.Pulse(IN_pin7, pulse_ms); /* Pulse motor 7 for 2000ms */
motor_num = 0; /* Reset the sequence */
break;
}
}
motor_num
variable tracks which motor is currently active.motor_num
and selects the corresponding motor.Pulse(IN_pinX, pulse_ms)
is used to activate each motor for 2 seconds before moving to the next.pulse_ms
to adjust the spin time of each motor.Ready to start experimenting? Grab a MotorCell today and check out the MotorCell GitHub Repository for more code examples and technical documentation!
MotorCell utilizes the BD67173NUX three-phase back-EMF controller with a sensorless drive system, allowing speed control via a PWM input signal duty cycle. The IN pin defaults to low, running the motor at full speed when pulled high (2.5V–5V). You can adjust the speed in 1,000 RPM increments via the duty cycle, or directly use the MotorCell library functions.
To get started, install the MotorCell library from the Arduino Library Manager:
The library includes examples to help you quickly get started with MotorCell control.
We going to start with control the speed level using the Spin function. This function adjusts the motor’s speed to the desired percentage of its maximum capability and returns the current RPM value. This value is also automatically printed on the Serial Monitor, for easy debugging. If the motor stalls, it will automatically attempt to restart.
#include <MotorCell.h>
#define IN_pin1 2
#define OUT_pin2 3
#define FR_pin2 1
MotorCell myMotorCell(IN_pin1, OUT_pin2, FR_pin2); /* Configure the MotorCell pins */
void setup() {
Serial.begin(115200); /* Set up serial - Ensure Tools/USB_CDC_On_Boot is enabled */
myMotorCell.Init(); /* Initialize the MotorCell */
}
void loop() {
uint16_t MotorRPM = myMotorCell.Spin(25); /* Set speed to 25% of maximum speed */
}
⚠ Note: For this function we recommend using an ESP32 device like the CodeCell to avoid delays when reading the RPM
This next example demonstrates how to reverse the motor’s direction every 5 seconds while running it at full speed. The MaxSpin function sets the motor to its maximum speed, while the ReverseSpin function changes its rotation direction. This alternates between clockwise and counterclockwise rotation with a 5-second delay between each direction change.
#include <MotorCell.h>
#define IN_pin1 2
#define OUT_pin2 3
#define FR_pin2 1
MotorCell myMotorCell(IN_pin1, OUT_pin2, FR_pin2); /* Configure the MotorCell pins */
void setup() {
Serial.begin(115200); /* Set up serial - Ensure Tools/USB_CDC_On_Boot is enabled */
myMotorCell.Init(); /* Initialize the MotorCell */
}
void loop() {
myMotorCell.MaxSpin(); /* Set motor to maximum speed */
myMotorCell.ReverseSpin(); /* Reverse the motor's rotation direction */
delay(5000); /* Wait for 5 seconds */
myMotorCell.MaxSpin(); /* Maintain maximum speed */
myMotorCell.ReverseSpin(); /* Reverse direction again */
delay(5000); /* Wait for another 5 seconds */
}
This final example implements a PID controller to regulate the motor speed to the desired RPM using the SpinPID function. The PID controller dynamically compensates for disturbances and load variations, ensuring smooth operation. If the motor stalls, the function will automatically restart it and notify you if the target speed cannot be reached. This is also automatically printed on the Serial Monitor, for easy debugging.
#include <MotorCell.h>
#define IN_pin1 2
#define OUT_pin2 3
#define FR_pin2 1
MotorCell myMotorCell(IN_pin1, OUT_pin2, FR_pin2); /* Configure the MotorCell pins */
void setup() {
Serial.begin(115200); /* Set up serial - Ensure Tools/USB_CDC_On_Boot is enabled */
myMotorCell.Init(); /* Initialize the MotorCell */
}
void loop() {
uint16_t MotorRPM = myMotorCell.SpinPID(15000); /* Set target RPM to 15,000 using PID */
}
⚠ Note: The SpinPID()
function uses a high-speed PWM timer, making it compatible only with CodeCell and ESP32-based devices.
With the MotorCell library installed, you can easily control speed, direction, and monitor its RPM!
Ready to start experimenting? Grab a MotorCell today and check out the MotorCell GitHub Repository for more code examples and technical documentation!
MotorCell’s shaftless design keeps things slim and easy to integrate. The rotor is made from 3.3mm aluminum with knurling on its edge, allowing direct press-fit attachment to the rotor’s teeth for a secure connection.
For installing press-fit 3D-printed parts, we recommend an inner diameter of 16.4mm to 16.6mm, depending on your 3D printer’s tolerance. Once printed, simply press the part onto the rotor’s teeth to hold it in place.
If additional security is needed, superglue can be applied to the rotor’s teeth. Make sure the glue is only applied to the sides, and doesn't enter near the MotorCell's bearing.
A variety of 3D-printed mounts can be found in the MotorCell GitHub repository: 👉 MotorCell 3D Mounts
Examples include:
We aim to make integrating MotorCell into your projects as seamless as possible.
Ready to start experimenting? Grab a MotorCell today and check out the MotorCell GitHub Repository for more code examples and technical documentation!
When working on projects that require high-speed motion in a compact form factor, traditional brushless motors can be difficult to integrate due to their size and complexity. This is why MotorCell is unique as it combines the rotor, stator, and driver into a single, ultra-compact module.
In this post, we’ll explore the MotorCell’s design, driver functionality, and integration into your projects.
MotorCell is the smallest coreless high-speed PCB motor with planar PCB windings and built-in sensorless control, eliminating the need for extra sensors! By integrating everything into a single module, it provides a tiny and compact solution for makers and developers working on applications requiring high speed motor control.
Designed for low-torque, high-speed applications, MotorCell supports PWM-based speed control and works seamlessly with the MotorCell library, which includes prebuilt PID control for CodeCell and other ESP32-based devices.
It's PCB stator is made from a 6-layer FR4 board, that has 6 copper windings connected in a star-shape configuration. This makes the motor a 3-phase axial-flux brushless motor. These type of motors need to be powered with specific timings to generate a commutation waveform and rotate the magnetic rotor on top.
This is why MotorCell also utilizes the BD67173NUX chip as its three-phase back-EMF controller, enabling a sensorless commutation, so no Hall sensors required. This driver allows speed adjustments via the input signal PWM duty cycle, with a resolution of around 1,000 RPM increments. The IN pin is by defaults low, running the motor at the maximum speed when pulled high (2.5V–5V).
If the motor is forced to stop, it enters a 5-second lock protection mode, which can be instantly resets when PWM is set to 0% and restarted - this is automatically managed by the MotorCell library’s Spin function.
We believe the exciting advantage of PCB motors lies in their ability to integrate seamlessly with electronics, eliminating the need for additional PCBs. That’s why we’ve made it simpler to incorporate the Stator directly into your custom PCB, thanks to its Open Source Design - available here.
However, building a high-speed rotor remains a complex challenge. To make things easier, you can purchase the rotor separately, allowing you to effortlessly add a PCB motor to your board for a more compact design while ensuring a reliable rotor configuration!
To get started with Arduino:
With the MotorCell library installed, you can easily control speed, direction, and monitor its RPM, explained in more detail in our other tutorials.
Ready to start experimenting? Grab a MotorCell today and check out the MotorCell GitHub Repository for more code examples and technical documentation!
MotorCell ist ein ultrakompakter, wellenloser PCB-Motor, der für Anwendungen mit hoher Geschwindigkeit und niedrigem Drehmoment entwickelt wurde. Mit seinem innovativen Pfannkuchendesign und den planaren PCB-Wicklungen ist MotorCell perfekt für Robotik, Kunstinstallationen und Heimwerkerprojekte geeignet. Dieser Motor vereinfacht die Integration durch sensorlose Steuerung mit PWM-Geschwindigkeitsanpassungen.
In diesem Tutorial behandeln wir:
Was ist MotorCell?
Die MotorCell erfindet das Motordesign neu, indem Rotor, Stator und Treiber in einer einzigen flachen Leiterplatte integriert werden. Diese einzigartige Struktur:
MotorCell ist ideal für Anwendungen, die kleine, leichte und kompakte Motoren erfordern, wie etwa kleine Roboter, kinetische Kunst oder sogar tragbare Geräte.
Einrichten Ihres Motors
Führen Sie zunächst die folgenden Schritte aus:
Pins:
Öffnen Sie die Arduino IDE, gehen Sie zu Sketch > Include Library > Manage Libraries , suchen Sie nach „MotorCell“ und installieren Sie es. Fügen Sie es dann in Ihren Code ein und richten Sie Ihre Pins ein:
#include "MotorCell.h"
#define IN_PIN 2
#define OUT_PIN 3
#define FR_PIN 1
MotorCell myMotorCell(IN_PIN, OUT_PIN, FR_PIN);
void setup() {
myMotorCell.Init(); // Initialize the MotorCell
}
Funktionen der MotorCell-Bibliothek
Hier sind die Kernfunktionen der MotorCell-Bibliothek:
myMotorCell.Init();
uint16_t rpm = myMotorCell.Spin(50); // Spin at 50% speed
uint16_t rpm = myMotorCell.SpinPID(12000); // Maintain 12,000 RPM
myMotorCell.ReverseSpin();
Pulse(uint8_t p_pin, uint8_t ms_duration): Sendet einen kurzen Impuls für eine bestimmte Dauer (in Millisekunden) an den angegebenen Pin. Nützlich für schnelle Bewegungsausbrüche oder kurzzeitige Signale.
myMotorCell.Pulse(FR_PIN, 50); // Sends a 50ms pulse to the FR_PIN
uint16_t currentRPM = myMotorCell.RPMRead();
myMotorCell.MaxSpin();
Beispielprojekt: Drehzahlüberwachung
Hier ist ein einfaches Projekt für den Einstieg:
#include "MotorCell.h"
#define IN_PIN 2
#define OUT_PIN 3
#define FR_PIN 4
MotorCell myMotorCell(IN_PIN, OUT_PIN, FR_PIN);
void setup() {
Serial.begin(115200);
myMotorCell.Init();
}
void loop() {
uint16_t rpm = myMotorCell.Spin(50); // Mit 50 % Geschwindigkeit drehen
}
Weitere Beispiele sind auf GitHub verfügbar. Wenn Sie jedoch Fragen zu MotorCell haben, können Sie sich gerne an uns wenden !
Ein PCB-Motor ist eine innovative Lösung, die die Mechanik des Motors in die elektronischen Komponenten integriert und dabei die PCB selbst als Struktur des Motors nutzt.
Was ist ein PCB-Motor?
Ein PCB-Motor ist ein einzigartiger Motortyp, der die Kupferspuren auf einer Leiterplatte (PCB) nutzt, um ein Magnetfeld zu erzeugen, das den Motor antreibt. Dieses Konzept ist davon inspiriert, wie Funksysteme PCB-Spuren als Antennen verwenden. Dasselbe Prinzip wird angewendet, um ein Magnetfeld zu erzeugen, das stark genug ist, um einen Rotor zu drehen. Dieser Motortyp ist als bürstenloser Axialflussmotor bekannt, bei dem der PCB-Stator und der Rotor parallel ausgerichtet sind.
Entwurf und Aufbau eines PCB-Motors
Der erste Schritt bei der Entwicklung eines PCB-Motors ist die Entwicklung der PCB-Statorspulen. Bei herkömmlichen Motoren bestehen diese Spulen häufig aus Draht, der zu dichten, dreidimensionalen Formen gewickelt ist. Bei einem PCB-Motor werden die Spulen stattdessen als flache Spiralbahnen hergestellt, die auf die Schichten einer PCB gedruckt werden.
Eine der Herausforderungen dieser Planarmotoren besteht darin, genügend Windungen in den kleinen verfügbaren Raum zu bringen, um einen ausreichenden magnetischen Fluss zu erzeugen. Diese Spulen müssen in einer Stern- oder Dreieckkonfiguration verbunden werden, um ein dreiphasiges System zu erzeugen. In unserem 6-schlitzigen, sternkonfigurierten MotorCell- Design konnten wir die Spulen auf vier Schichten stapeln und zwei zusätzliche Schichten für den Controller nutzen, um das erforderliche Magnetfeld zum Drehen des Rotors zu erzeugen.
Im Laufe der Jahre haben wir auch gelernt, dass das Design des Rotors entscheidend für die Verbesserung der Motoreffizienz ist. Es ist wichtig, hochwertige Keramikkugellager zu verwenden und die Lager präzise auszurichten, um die optimale mechanische Lösung zu erreichen. Dies erfordert normalerweise Spezialwerkzeuge, daher bieten wir den Rotor der MotorCell auch einzeln an, sodass Sie ihn problemlos in Ihre benutzerdefinierte Leiterplatte integrieren können.
Synchronisierung im PCB-Motor erreichen
Einer der wichtigsten Aspekte beim Antrieb eines bürstenlosen Motors ist die Sicherstellung, dass der Rotor mit dem elektromagnetischen Feld des Stators synchronisiert bleibt. Bei herkömmlichen Motoren mit Bürsten wird die Synchronisation mechanisch durch die Bürsten selbst gesteuert. Bei einem dreiphasigen bürstenlosen Motor wie einem PCB-Motor ist jedoch eine sensorische Rückmeldung erforderlich, damit der Motor reibungslos läuft.
Die Gegen-EMK wird normalerweise als Rückkopplung verwendet, um die Motordrehzahl zu steuern. Die Gegen-EMK ist die Spannung, die vom rotierenden Motor selbst erzeugt wird und die gemessen werden kann, um die Rotordrehzahl zu bestimmen. Diese Informationen werden dann in die Steuerelektronik des Motors eingespeist und stellen sicher, dass die Statorspulen synchron mit der Rotorbewegung angetrieben werden. Bei der MotorCell wird all dies direkt vom integrierten Chip gehandhabt, was den Prozess vereinfacht.
Erfahren Sie als Erster von neuen Projekten und sichern Sie sich spannende Angebote!
© 2025 Microbots.