Spark Max PWM "Interference"

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.

Any help is much apperciated.

Sounds similar to this: PWM motor runs when CAN drivetrain is active

Just wrapping pwm cable in foil won’t work unless it’s grounded.

Thank you for the quick response.

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.

Again, thank you for the time and quick response.

Thoughts …

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.

What are the LED’s on the Spark Max doing when

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.

Sorry about the jumbled wires. I’m still working on the layout for wiring, signal wires are directly tied to the digital sidecar.

For the code, I went through line by line. Currently I just made a “Simple Robot” in Java and it is the smallest amount of code possible just to drive with one joystick and steer with another.

The cRio currently sits on Masonite board and (I believe) should be sufficiently isolated from the frame.

I’ll work on twisting all of the power cable to try and reduce noise that way. I’m not currently using a PDP - I’m using a standard fuse block (That might be found in a car).

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.

This actually gives credence to the problems of this topic PWM Motor Runs When CAN Drivetrain is Active

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.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.