Menu
Microbots
0
  • Learn
  • Shop
    • Maker-Modules
    • Maker-Packs
    • Tools & Gears
    • Robots & Displays
    • All Products
  • Community
    • Education
    • Software
  • About
    • Our Story
    • Reach Out
    • FAQs
  • English
  • Your Cart is Empty
Microbots
  • Learn
  • Shop
    • Maker-Modules
    • Maker-Packs
    • Tools & Gears
    • Robots & Displays
    • All Products
  • Community
    • Education
    • Software
  • About
    • Our Story
    • Reach Out
    • FAQs
  • Language

  • 0 0

MotorCell Basics: Your First Steps

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.

Full Video Tutorial Coming Soon

In this tutorial, we’ll cover:

  • What is MotorCell and how does it work?
  • Setting up your MotorCell
  • Getting started with its Arduino library
  • Example projects to bring MotorCell to life

What is MotorCell?

The MotorCell reimagines motor design by integrating the rotor, stator and driver, into a single, flat PCB. This unique structure:

  • Reduces size to just a few millimeters in thickness.
  • Provides speed control via PWM and also speed feedback.
  • Operates sensorlessly, meaning fewer components and easier setup.
  • Simplifies integration with standard pitch pins.

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:

  • Connecting Your MotorCell

Pins:

  • IN: Connect to VDD (for full speed) or a PWM-capable GPIO pin on your microcontroller to control motor speed.
  • OUT: Optional for reading the MotorCell's RPM - requires a pull-up resistor (internal-pullup automatically configured by the MotorCell library)
  • FR: Optional to control motor's direction - connect to VDD, GND or to a GPIO pin for forward/reverse switching.
  • GND: Connect to ground pin.
  • VDD: Connect to supply pin 2.5V to 5V
  • Installing the MotorCell Library

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:

  • Init(): Sets up the MotorCell for operation.
myMotorCell.Init();
  • Spin(uint8_t speed_percent): Spins the motor at a specified speed (0–100%).
uint16_t rpm = myMotorCell.Spin(50); // Spin at 50% speed
  • SpinPID(uint16_t target_rpm): Maintains a target RPM using PID control (requires ESP32/CodeCell).
uint16_t rpm = myMotorCell.SpinPID(12000); // Maintain 12,000 RPM
  • ReverseSpin(): Reverses the motor’s direction.
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
    
  • RPMRead(): Reads the motor’s current RPM.
uint16_t currentRPM = myMotorCell.RPMRead();
  • MaxSpin(): Spins the motor at maximum speed.
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!

  • Share:

Follow

Github

  • About
  • Software
  • Education
  • Contact
  • FAQs
  • Terms
  • Refund Policy
  • Privacy Policy

Join our Community ~ Be the first to know about new products and get exciting deals!

© 2025 Microbots.