TTL Communication Problem Between Pololu Micro Maestro, Arduino UNO, and Joystick

Hello,

I am currently experiencing a technical issue with my Pololu Micro Maestro and would appreciate assistance in resolving it. I have assembled a system comprising an Arduino UNO, a Pololu Micro Maestro, a joystick, and multiple servo motors. While the system initially functioned as expected, the servo motors have inexplicably ceased responding to commands.

The Pololu Micro Maestro is connected to the Arduino UNO via SoftwareSerial, using pins RX (10) and TX (11). The joystick is wired to the analog pins A0 (X-axis) and A1 (Y-axis) of the Arduino, while the servo motors are connected to the channels of the Micro Maestro and powered by an external power supply suitable for their operation. The Arduino code is designed to read the joystick values, map them to servo position values, and send these values to the Micro Maestro for execution. The complete code is provided below:

cpp

#include <PololuMaestro.h>  

#ifdef SERIAL_PORT_HARDWARE_OPEN  
#define maestroSerial SERIAL_PORT_HARDWARE_OPEN  
#else  
#include <SoftwareSerial.h>  
SoftwareSerial maestroSerial(10, 11); // RX, TX  
#endif  

MicroMaestro maestro(maestroSerial);  

// Joystick pins  
const int joyXPin = A0;  
const int joyYPin = A1;  

void setup() {  
    Serial.begin(9600); // Standard serial for debugging  
    maestroSerial.begin(9600); // Serial for Maestro  
    pinMode(joyXPin, INPUT);  
    pinMode(joyYPin, INPUT);  
}  

void loop() {  
    int joyXVal = analogRead(joyXPin);  
    int joyYVal = analogRead(joyYPin);  

    Serial.print("joyXVal: ");  
    Serial.print(joyXVal);  
    Serial.print("\tjoyYVal: ");  
    Serial.println(joyYVal);  

    maestro.setTarget(0, map(joyXVal, 0, 1023, 4000, 8000));  
    maestro.setTarget(1, map(joyXVal, 0, 1023, 4000, 8000));  
    maestro.setTarget(2, map(joyYVal, 0, 1023, 4000, 8000));  
    maestro.setTarget(3, map(joyYVal, 0, 1023, 8000, 4000));  

    delay(50);  
}  

The Arduino successfully executes the code and sends the expected debug messages via the Serial Monitor, confirming that the program is functioning. However, the servo motors remain unresponsive.

To troubleshoot, I have verified all physical connections, including those for power and signals. I tested the servo motors directly with the Pololu Micro Maestro, and they functioned correctly in isolation. I also tested the joystick, Arduino, and Micro Maestro independently, with each component performing as expected. Additionally, I reconfigured and restarted the Pololu Micro Maestro using the Pololu Maestro Control Center. During this process, I ensured that all channels were set to “Servo,” the device was set to UART mode with a baud rate of 9600 to match the Arduino UNO, and CRC was disabled. I also updated the firmware of the Pololu Micro Maestro to the latest version 1.04.

Despite these efforts, the servo motors still fail to respond when all components are integrated into the system. I kindly request assistance in identifying the cause of this issue and resolving it. Any guidance or recommendations would be greatly appreciated.

Kind regards,
Nikolle Lima.

Hello.

Thank you for including your Arduino code and thorough details about your setup and what you have tried.

When you try to run the system, does the red LED on the Maestro turn on (indicating an error)? How are you powering the logic side of the Maestro when the USB is not connected? Could you post some pictures of your setup that show all of your connections, as well as a copy of your Maestro settings file? You can save a copy of your settings file from the “File” drop-down menu of the Maestro Control Center software while the controller is connected.

Brandon

The LED is functioning normally and is not red. I tested changing the RX and TX pins to observe the outcome, and the LED turned red. However, I reverted to the initial pin configuration and it is now operating correctly.

I am powering the Maestro through the Vin pin with 5 V when the USB is not connected.
maestro_settings.txt (1.5 KB)


Thank you for the pictures and settings file. Your settings look fine to me, but it looks like you have the RX and TX wires swapped. RX on the Arduino (pin 10 as defined in your code) should connect to TX on the Maestro, and TX on the Arduino (pin 11) should connected to RX on the Maestro.

If swapping those connections is the setup gives you the red LED, I suspect the Maestro might be browning out, since it looks like you’re powering the servos and Maestro from the same 5V supply, and 5V is the minimum operating voltage of the Maestro. Could you try removing the 5V connection to the Maestro’s VIN pin and powering it through USB to see if it behaves any differently? If you still get a red LED, you can connect it to the Maestro Control Center while your system is running and check the “Errors” tab to see what is causing it.

Brandon

Thank you for your detailed guidance! I checked the RX and TX connections as you suggested and adjusted them accordingly. I also powered the Maestro through USB, and everything is working perfectly now.

I really appreciate your help in resolving this issue! Thank you so much again.

Best regards,
Nikolle Lima

1 Like

I am glad to hear you got it working! Thank you for letting us know.

Good luck with your project!

Brandon