Hi!
So I've been writing a few questions on this forum about my project.
Although I successfully troubleshoot most of my problems because of the forum members, I just encountered a major problem right before finishing the project.
So to basically explain about my project, I am controlling four servos and four motors together.
But the problem is the servos.
I'm using LiPo 3s1p 40c 5200mAh as a single powersource.
Everything is working perfectly as I intended. When I only control the motors wirelessly, it works fine. And servos work fine as well.
However, when I control these two together, it becomes a problem.
When I run all four motors(two each on two motor drivers), all four servos start to rotate continuously, and then when I stop the motors, it returns to its original position.
I am using the HS-785HB servo motor from servocity.com, which is a 3.5 revolution servo with positioning feedback. It behaves like a continuous servo(like when I only attach power without the signal pin, they will rotate continuously forever), but they still work with regular Servo library with regular commands.
Here were some of my predictions:
- The current is overloaded when the motors are running, therefore the motor driver gives reverse current to the servos and make them behave like when signal pins were not connected. The behavior looked like to me that the current in power(red and black line) was forcing the servo to ignore the signal pins.
- but this didn't make sense to me since most of the motor drivers would have built-in diodes to prevent reverse current.
-
The overloaded current created by the motors somehow gave noises to the arduino signal pins.
-
When the motors are running, arduino gets less current and therefore gives not enough signal to the servos.
I noticed that when the servos were disconnected, the motors work fine. But when I attach the servos' power, Arduino suddenly resets itself and stop the motors. It seemed to me like the motor stole all the currents that are going to Arduino, and therefore stopped the Arduino. I tried adding a external power(4 AA battery, 6V, but when I removed Lipo battery and only supplied it with external battery, it seems to be flickering; so I guess the battery wasn't the fresh one.), and it seems like motors would run for a longer time. I am planning on adding a fresh 9V battery to arduino as an external power tomorrow.
Here are the components link, and I'll attach the wiring diagram(I apologize, I couldn't learn how to draw schematics for this. I'll try my best)
170RPM Motor:
HS-785HB Servo:
Motor Driver(MDD10A):
https://www.robotshop.com/media/files/pdf/user-manual-mdd10a.pdf
I'm just so close to finishing the project but this small, but major issue is stressing me so much. Any ideas or suggestions are greatly appreciated!
Thank you,
Tyler