Log in

View Full Version : Window Motor/Snowblower and 12v only one way


cusack80
10-02-2015, 13:53
We have tried both motors both ways. We are running off a talon. It works great one way and stutters the other direction. When we check voltage 12v working going up and hardly anything going down. When we reverse our pos and neg on motor the problem reverses. If we hardwire (mentor does this) to battery it runs both directions fine. We go back and wire it back to the talon problem reappears and one direction works flawless other direction stutters like it is not getting power....this is for our elevator mechanism. We have tried switching PWM cable, window motor and snow blower motor and tried victor or talon and problem replicates. Any ideas?

Jon Stratis
10-02-2015, 13:59
Two thoughts...

First, have you removed the locking pin in the window motor? (R19 part C)

Do you need variable seeps control? Have you tried using a spike relay instead? This would act the same as hooking it up straight to a batterychoking you full speed in both directions. (Table 4-4 under R42)

cusack80
10-02-2015, 14:05
Will check the spike relay tonight as we have one from last year...

GeeTwo
10-02-2015, 14:09
The thing that seems common to all of these scenarios is the signal coming from the 'RIO.

It is unlikely that you have a bad port on the hardware, but it's an easy thing to check.

What seems more likely is that you've declared an unusual motor controller class (or perhaps a servo) which has a different range of pulse widths than the controllers.

What language and motor controller class are you using to program?

Alan Anderson
10-02-2015, 15:08
I'm going to guess that you're using a pair of buttons to control the motor. You probably have an if/then for each button, where the first chooses either forward or off, and the second chooses either reverse or off. If you press the second button, you get reverse power to the motor. But if you press the first button, you get forward power just for an instant before the second if/then shuts it off again.

If that's what your code is doing, you need to fix it to turn off the motor only if neither button is pressed.

cusack80
11-02-2015, 06:29
Update to issue: seems to be related to snowblower/window motors and not cims.....

FYI, changed code so upper motor could successfully operate in both directions. Motor operated smoothly. Then hooked snowblower motor to upper motor talon, problem persists with that motor. So, still the same problem, but with different (otherwise successful) talon, pwm port, pwm wire, code, and 12v supply to talon...




Dakota plans to research how to code the relay in case that ultimately ends up being a simpler workaround. Changes to wiring were undone before putting away bot.






Thanks,

Al Skierkiewicz
11-02-2015, 08:16
cusak,
It could be that the one direction has significant current demands. As such, the breaker may be tripping open. Do you hear a clicking sound when the motor stops? The motor controller may also be going into over current protect. Do you notice any LED behavior on the controller that is different than the other direction?

cusack80
11-02-2015, 08:18
Hi, the light on the PDB board are blinking orange? You definitely feel the motor running smooth when you put your hand on it going one direction and then the other direction you can feel where the motor almost has a pulsating current where the loop starts and then cuts out...

Mark McLeod
11-02-2015, 08:36
PDP blinking yellow means you have or had at one time a low battery.
If you don't clear the yellow sticky fault though, it stays around forever.
Clear it by using the roboRIO WebDash, clicking on PDP and clicking the Self-Test rapidly in succession.

cusack80
11-02-2015, 09:11
We will check the speed controller to check signal light....Not sure why the current would want to be different one way than another...

Alan Anderson
11-02-2015, 09:18
Not sure why the current would want to be different one way than another...

You said this is for an elevator. Unless you have an effective counterweight, gravity makes it easier to go down than to go up.

Pay attention not only to the speed controller LEDs but to the Power Distribution Panel too. You'll hear a definite click if the circuit breaker trips.

cusack80
11-02-2015, 09:34
Thanks Alan,

The weird thing is going hard wired to battery both work fine either direction. If we switch neg and pos we can manipulate if the problem occurs going up or going down...It will work one way or another, but not both. I can get it to go up fine, switch power leads get it to go down, but it will not act right both directions.

Alan Anderson
11-02-2015, 09:40
You said you fixed the code and it started working properly, but then it went back to having the problem. What did you do to the code? Did the change perhaps not get loaded permanently into the roboRIO?

cusack80
11-02-2015, 10:01
I did not change code, but when I change the power leads from the motor and flip them on the speed controller, I can flip flop the problem to show up. So one time it works going up, flip the power leads from the motor to the speed controller goes down, but it won't do both correctly at the same time using 2 buttons on joystick. You can also call me 616-527-1255

Alan Anderson
11-02-2015, 10:14
FYI, changed code so upper motor could successfully operate in both directions. Motor operated smoothly....

I did not change code,...

Please post the code that you are currently using to control the motor. It still sounds like a common mistake with if/else button control.

gpetilli
11-02-2015, 12:01
I did not change code, but when I change the power leads from the motor and flip them on the speed controller, I can flip flop the problem to show up. So one time it works going up, flip the power leads from the motor to the speed controller goes down, but it won't do both correctly at the same time using 2 buttons on joystick. You can also call me 616-527-1255

We blew half an H-Bridge on a speed controller a few years back and the resulting uni-direction behavior was very similar. We were debugging a PID loop at the time and the PID commanded full forward, overshot and then reversed direction to reduce the speed maybe 2%. Ultimately, we went to a PIDF loop so that the PID operates only on the error, and the F works on the commanded velocity.

cusack80
11-02-2015, 15:54
Here is our labview code

https://docs.google.com/file/d/0B2Bk3n8BUPKoZ2ZqYlpkaWFyczQ/edit

Alan Anderson
11-02-2015, 17:55
Here is our labview code

You did exactly what I suspected. You're controlling the "mec2" motor in two places, and only one of them wins.

Your pair of case blocks for that motor need to be changed. You can move the reverse block inside the false case of the forward block, but I suggest that you remove the case blocks entirely and replace them with the code from the Button Control of Motor Example (http://www.team358.org/files/programming/ControlSystem2015-2019/labview/index.php#ButtonControlofMotor) from Team 358.