Had an interesting bit of troubleshooting…
The base originally had 4 motors, each with a gear that connected to a gear on the central shaft…
One of the motors was bad so I ran things with just 3 motors…
Each of the motors had a fair bit of play in the gear train so no fancy alignment was needed to get the central gear shaft assembly put in place…
I setup the motor controller (using the RC servo signal driven Arduino NANO driving a H Bridge driver) and all seemed ok except that every once and a while it would seem the drive train would shudder with a big clunk…
I thought this may be due to misalignment of the various motor gears and really even 3 motors was overkill as there was more than enough torque…
So I needed up going with a single motor. This seemed to have more than enough torque and would avoid any issues with the gear train. This seemed to solve the issue until it didn’t. I was still getting the occasional shudder and clunk… This would happen randomly as I panned the base back and forth…
Lucky for me the motor driver board has LED indicators for direction. I finally noticed that when got the cluck and shudder that the LED for the opposite direction would flash ever so briefly… So something was sending bad motor control signals…
First I thought it may be the DMX lighting panel I was using. I thought it may be sending bad data at times. Moved it to a PC driven DMX driver and although it wasn’t happening as often I still got the odd clunk…
I then setup the NANO code to print out the variables in real time. What I did notice was that somewhat randomly, the variable for the PWM input would go nuts (but just for a 20-60 milliseconds). I then used the Arduinos IDE Serial Plotter function to graph the variables in real-time and confirmed this.
Now I thought it may be the code but it’s petty simple and uses an example I found on the web that no one else complains about. So I hoped it wasn’t the code.
Then on a whim I disconnected the motor and ran the test. Now I had no issue what so ever. I then realized that it may be noise from the DC motor affecting the system. I had long wires running to the motor right next to long wires connection the RC PWM input on the NANO. I separated the wires and the issue seemed to go away. I moved them closer together and the problem appeared and was much worse…
So turns out it was noise from the DC brushed motors which are pretty old and probably act as a pretty good spark-gap transmitter. A better motor would help but I only have what I have…
So spent a bit of time researching and are going with this:
- Sticking some capacitors across the motor terminals
- Using twisted pair wired for power supply
- Keeping the motor leads as short as possible
- Using shielded cable for the various signal runs
My plan is to have the AC power supply (a switching 12V 20A supply) in a remote box and may run an earth ground with the power leads to ground the metal motor cases. I’m hoping that this larger motor in the base is the most noisy one and that the smaller motors in the arm don’t make as much noise. But I have re-designed the layout of the remaining controller boards to keep the motor and power leads as far away from the signal leads as possible…