How To Use EPMC With Arduino
Learn how to test and integrate the Easy PID Motor Controller (EPMC) in your Arduino project
Last updated
Learn how to test and integrate the Easy PID Motor Controller (EPMC) in your Arduino project
Last updated
When using the EPMC with I2C, you'll need to power the EPMC module via the power port (7v to 12v), while the 5V3 pin of the EPMC I2C port will be connected to the Arduino-based microcontroller power for reference during I2C communication.
For example, if it is connected to an ESP32 microcontroller, the 5V3 pin of the EPMC I2C port will be connected to the ESP32 3.3v power (while the EPMC module is powered via the power port (7v to 12v)).
Also, if it is connected to an Arduino UNO, MEGA, or NANO, the 5V3 pin of the EPMC I2C port will be connected to the Arduino microcontroller’s 5V power (while the EPMC module is powered via the power port (7v to 12v)).
Don’t forget to ensure the EPMC module and the Arduino microcontroller are connected to a common ground.
if you download it, extract it and change the folder name to
epmc_arduino
Move the downloaded library file - epmc_arduino
- to your Arduino library folder
e.g on linux: ... home/Arduino/libraries/
e.g on windows: ... Documents/Arduino/libraries/
(or any where your arduino libraries are stored)
restart your ArduinoIDE and copy this example code into your project to test the EPMC Module (feel free to modify it to your taste).
pid_motor_control.ino
watch the motors controlled precisely
read output from serial monitor.
adjust the code to your taste and use.
Ensure you have your Geared DC motors connected to the EPMC Module and the motor PID gains already set up. If not, follow the instructions here []
Download the epmc_arduino I2C comm library from by clicking on the green Code button.