Hi, I am using the Romi Robot Kit for FIRST for my Science Olympiad event. Since receiving my kit, I have been unable to read the encoder value of the motor on the right side. The board can read the encoder on the left side, but not the right. I have tried switching the motors, but it gives the same result. I believe this is not an issue with the motors, so I have come here to ask for help. I tested the encoders using the Arduino Romi32U4 encoder example, resulting in this screenshot. The encoder value on the right flickers between 0 and 1, reacting when I spin the wheels, but providing no other useful data. Is this a firmware issue? Thanks in advance.
Hello.
I am sorry to hear you are having problems with the encoders on your Romi 32U4 robot. If the problem stays on the right-side of the robot when you try swapping the motors, then it is likely caused by the programming or some problem with the circuitry on the Romi 32U4 Control Board that reads the encoder signals.
Could you clarify what program you are running? It sounds like you’re referencing the Encoders.ino example from our Romi32U4 Arduino library, but that does not look like an output from that program (which also only outputs to the display on the robot).
Brandon
I’m running the Arduino IDE. The Encoders.ino example from the library also outputs to the serial monitor, which is where the previous screenshot comes from. It displays the left motor encoder, right motor encoder, left motor error, and the right motor error in that order. I don’t have an LCD on the robot.
Is it possible to fix the circuitry in any way, or would I need to replace the circuit board entirely? Thanks for your response.
Just to confirm:
- You’re running the unmodified Encoders.ino example from the Romi32U4 library.
- The count for the right-side encoder never changes from 0 when you rotate the right motor, but the left one works correctly.
- The count for the right-side encoder still doesn’t change when you swap the motors, but the left one continues to work correctly.
If all three of those are true, could you try measuring the voltage between ground and the ERA and ERB pins on the Romi 32U4 Control Board as you slowly turn the wheel with the robot powered up (those pins are right next to the connector for the right motor)? You should see them alternating between high and low as you turn it. Also, could you post some close-up pictures of the top-side of your Romi Robot?
Brandon
I will not have access to a multimeter for a day or two, but I will update you when I have the readings. Everything is as you said except for number 2; the right-side encoder flickers between 0 and 1 when rotated.
Here are the pictures of the top-side as requested. The wires near the top of the board connect to an MPU6050 gyroscope/accelerometer.
I am not getting any voltage when spinning the wheel and testing the pins, but I am also not getting anything when I test the left side. Am I doing this wrong?
Is the robot powered on while you’re turning the wheels? Can you post a picture of your multimeter showing what setting it is on?
Brandon
To measure the voltage, your multimeter should be in the DC voltage setting (the V with the solid line over a dashed line). Please note that while in the current measuring mode that you’re using, the meter is essentially shorting the two points together, which might have damaged something if it was not already. Please try measuring the encoder signal pins (ERA and ERB) on both sides of the robot with your multimeter in the DC voltage setting?
Brandon
Okay, I just tested the robot using the DC voltage setting, and it does what you said. The multimeter displays 5 volts when it is not moving and drops to roughly 2.5 volts when the wheels are spinning. It does this for both motors.
Unfortunately, it sounds like something on your Romi 32U4 Control Board is probably damaged, in which case we’re at the limit of what we can do to troubleshoot it here on the forum. Please email us with your order information and a reference to this forum thread and we can help you out with a replacement.
Brandon
I will see if I can retrieve any information. This robot was gifted to me by my teacher, who received it as a prize for winning a competition; I likely don’t have access to order information. Am I still able to receive a replacement?
Thank you for your support in walking me through this issue! Your patience and knowledge are admirable.