FOCn Is an IoT-Capable BLDC Drive Module Compatible with the SimpleFOC Library

Matej Planinšek's ESP32-based FOC with 10A motor drive, Wi-Fi, Bluetooth, and ESP-NOW support that you can buy assembled or build yourself.

James Lewis
13 days agoHome Automation

Electronics engineer Matej Planinšek created a brushless DC motor controller compatible with the SimpleFOC library and offers Wi-Fi connectivity. FONc is ideal for communicating wirelessly with a motor controller, such as in-home automation projects. You can build one yourself or purchase one off-the-shelf from Planinšek's Tindie store.

FOCn is a medium-powered brushless DC (BLDC) motor driver (up to 10 amps) with Wi-Fi and Bluetooth. It is compatible with the SimpleFOC library, which makes it easier to drive BLDCs with an Arduino-compatible microcontroller. It operates with input voltages from 9 to 45 volts.

The name has a dual meaning. FOC stands for field-oriented control and is also known as vector control. It is an efficient algorithm for driving BDLCs (and stepper motors). The SimpleFOC library works with Arduino-compatible microcontrollers. The other meaning refers to a Slovenian translation.

"Why FOCn? It means a face slap in Slovenian 🙃"

An ESP32-S3 gives FOCn Wi-Fi and Bluetooth connectivity. It also supports communicating with other microcontrollers using Espressif's ESP-NOW protocol. This capability allows multiple FOCn boards to communicate directly.

Planinšek demonstrated a potential use case by replacing a pile of boards in a past project with an FOCn. That project, HoverGate, repurposed two hoverboard motors that drive the two leaves of a dual swing outdoor gate. Home Assistant communicates via MQTT and Wi-Fi to one of the FOCn devices, and then the two controllers synchronize their movements via ESP-NOW.

FOCn has one high-power PWM-capable output for driving loads such as solenoids or latches with up to 5 amps. A low-power PWM output can drive 300 milliamps. There are three inputs for hall effect sensors or GPIOs and a header for I2C encoders.

You have several options for obtaining a FOCn. First, you can buy one for $64 from the PLab store on Tindie. Second, you can download the Altium design files, PDF schematic, and PCB Gerbers from the FOCn GitHub repository. The GitHub repo also has detailed specifications and documentation.

James Lewis
Electronics enthusiast, Bald Engineer, and freelance content creator. AddOhms on YouTube. KN6FGY.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles