Hello, I’ve been working on a hobby robot outside of my FRC team, and I’m using an old cRIO that I had.
I’m currently using Two Neo Brushless motors with Spark Max Motor Controllers for the main power train, and in the front, I built an Ackerman steering system with a linear actuator and a Victor 884 to control it.
Basically, the problem I’m having is that whenever I enable the robot, the drivetrain works fine by itself, but when I’m only trying to steer (I don’t have any PWM signal going to the Spark Max), the Spark Max Motor Controllers spontaneously engage partially.
I’ve tried EMI suppression tape/foil over the PWM cables and that hasn’t worked, I’ve tried to switch the Victor 884 out for a Talon and even a relay board to no avail.
I have been working on this problem for hours now, and I can’t isolate what the problem is.
You’re right, I completely forgot to ensure that the aluminum tape was properly grounded (something I can give a try, tomorrow); however, I’m currently led to believe that the problem might not lie in EMI because I have since moved to using relays to control the linear actuator, and it still has the same problem even though there should be (relatively) no EMI produced (since it isn’t an oscillating current).
Is there any way it could be a hardware timer problem that’s trying to produce PWM while I’m actuating the relays?
I’m also trying to ensure that the battery is COMPLETELY charged (It was at around 12.5 Volts), but I don’t think the linear actuator should be producing a large enough Inductive Spike to cause a brownout in the Spark Max.
The data cables aren’t running alongside the power cables, either.
Old cRio (good to see the old stuff used) may need to be isolated from the frame of your robot.
Shielding the PWM lines - are all drives commanded via PWM - should reduce the susceptability at the drive end, but this does not address the source.
Consider twisting the supply wires from your power distribution source - are you using a PDP? Also consider twisting or braiding the wires from the motor drives to the motors. In the case of SparkMAX and NEO, braid the wires. This minimizes the window to radiate noise.
Can you post photos showing your wiring including all the signal and power wires?
Check that the black return wires all have tight connections (crimped and bolted).
Print out your code and check through it, line by line. Make a table for all your variables and motor controller states and update the table based on what the code does, not what you think it should do.
Upon further review after trying to do as much EMI shielding as possible, I found that the only way I was able to dampen the effect was to increase the ramp time on the Spark Maxes.
I don’t know what could be causing the actual problem, but I think it might be a PWM control problem within the Spark Max firmware. Could be something in the way the Spark Max controllers handle lack of data input.
Can you post another picture showing how your battery connects to the power distribution panel?
Are all the connections tight? You should not be able to turn any of the lugs with finger pressure. The lug with the red insulation at the lower left in the third picture doesn’t look like it is making very good contact.