MotorCell is an ultra-compact, shaftless PCB motor designed for high-speed, low-torque applications. With its innovative pancake design and planar PCB windings, MotorCell is perfect for robotics, art installations, and DIY projects. This motor simplifies integration by using sensorless control with PWM speed adjustments.
In this tutorial, we’ll cover:
What is MotorCell?
The MotorCell reimagines motor design by integrating the rotor, stator and driver, into a single, flat PCB. This unique structure:
MotorCell is ideal for applications that require small, lightweight, compact motors, such as small robotics, kinetic art, or even portable gadgets.
Setting Up Your MotorCell
To get started, follow these steps:
Pins:
Open the Arduino IDE, go to Sketch > Include Library > Manage Libraries, search for "MotorCell," and install it. Then include it in your code and setup your pins:
#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
}
MotorCell Library Functions
Here are the core functions of the MotorCell library:
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): Sends a short pulse to the specified pin for a given duration (in milliseconds). Useful for quick bursts of motion or momentary signals.
myMotorCell.Pulse(FR_PIN, 50); // Sends a 50ms pulse to the FR_PIN
uint16_t currentRPM = myMotorCell.RPMRead();
myMotorCell.MaxSpin();
Example Project: RPM Monitoring
Here’s a simple project to get you started:
#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); // Spin at 50% speed
}
More examples available on github, but if you have any questions about MotorCell, feel free to contact us!
Soyez le premier informé des nouveaux projets et bénéficiez d'offres intéressantes !
© 2024 Microbots.