We have a pair of Spike relays on our robot, driving a pair of Window motors. Both of them are exhibiting some rather odd behavior.
When we energize them to FORWARD (via code), the lights come on Green (both side car and Spike) and the motors work just fine. Output with a multimeter is measured at 12V (or is it is -12V…) Anyways, the motors spin and everything is fine.
However, when we energize them with REVERSE (via code), weird things happen. We do get Red lights at the correct places (side car and Spike) but they blink very very quickly, almost pulsing. The Spikes emit a very clear, and very fast, clicking sound. The one the left measures around 10.8V and the one on the right measures the proper 12V, but it dips erratically every few seconds or so down to like 5V.
Even more strange, the left one was measuring 4.8V with a mutlimeter in Reverse before that. We then changed both the Spike and the PWM cable to get to where we are now.
We’ve tried swapping PWM cables, changing RELAY Ports on the Side Car, swapping out the entire Side Car itself, changing the crimp-on wiring connectors. Just about everything. We even checked the fuses on the Power Distribution board. We also double-checked that our Relays were set to “both directions” in LabVIEW.
Again, the really odd part is it only does this in Reverse (red lights). It seems to work fine in Forward (green lights).
Thoughts? Suggestions? Anything else we can swap or check? Anyone ever see this before?
If the lights are flickering the way you say they are, it sounds like a programming problem. My wild guess:
Your program has a pair of case blocks or if/then statements. One decides whether the Spike should be set REV or OFF. The other decides whether the Spike should be set FWD or OFF.
Anyone think that maybe the motors are drawing more than 20 amps in the reverse mode and are tripping breakers? The breakers are fast reset and will exhibit a clicking sound when they trip. Is it possible the clicking is coming from the breakers and the Spike? Remember that one of the window motors has a stall current of 21.5 amps.
I can get the code from the Programmer a little later on today, but that’s basically exactly what we have Mr. Anderson. We have code that sets the relay(s) to FORWARD if Button 1 is true, and OFF if button 1 is false. And then I think they’re REVERSE if Button 2 is true, and OFF if button 1 is false.
We’ve never programmed Spikes like this before. The only one we ever used was “always Forward” and it was for a harvester brush in 2009.
What’s the proper way to program the Spike relays to accomplish what I described above?
[should I move this to Programming/LabVIEW, or start a new thread there?]
You need to use nested Case sttructures or multiple Select VIs to get down to a single Relay Set VI. The multiple Relay Sets are conflicting, sometimes one is in control and sometimes the other is so sometimes your Spike gets set forward and sometimes it gets set to off. It’s likely just sheer luck that is preventing you from seeing the same behavior in the forward direction.
I can think of three “proper” ways to do it. One is conceptually simple but has nested case statements that are hard to read at a glance. One is elegant but unobvious, using boolean arrays to derive a single number that selects from four cases. My favorite isn’t exactly pretty, but it’s small and easy to explain.
Place two Select functions (you’ll find them in the Comparison palette). Wire button 1 to the s input (labeled with a question mark) of the first one. The f (bottom) input should have a relay “Off” constant, and the t (top) input should have a relay “Forward”. The second Select’s s input should be wired from button 2, the f input from the output of the first Select, and the the t input should have a relay “Reverse”. The output of the second Select goes to the input of a Relay Set.
When neither button is pressed, the Off is selected through to the relay. When button 1 is pressed (and button 2 is not), the relay sees the Forward. When button 2 is pressed, the relay is set Reverse.