![]() |
8 volts over talons
Hi guys,
First, thank you to all of Long Island for having is this past weekend! I'm having a weird issue, I'm using Talons to power CIM Motors for our shooter. When a button is assigned to them, the voltage reads 8Volts, when the joystick is applied I get the full volts, solid green and red lights. After calibrations and such, I can't figure it out. Can we just not use assign buttons to talons? We are using JAVA. Thank you in advance. -Mike |
Re: 8 volts over talons
Can you post the relevant part of your code?
Something like this should work: Code:
if (joystick.getRawButton(SHOOTER_BUTTON)) |
Re: 8 volts over talons
It seems like a code issue. Could you post the code? Also, are you using the command based model or the simple template?
|
Re: 8 volts over talons
For the most part, when running a blank code it was essentially just a simple
Code:
if (js.getRawButton(11)){ |
Re: 8 volts over talons
Electrical resistance will make your voltage drop.
There is some resistance in a talon, but not that much. This particular talon could be a bad one though, with a greater resistance. Wire has resistance as well. If you have long wire runs, the voltage could easily drop to 8v by the time it reaches the motor. This calculator shows you how severe that effect may be. http://www.calculator.net/voltage-drop-calculator.html There could be a loose or badly terminated wire somewhere along the path. This would increase resistance, further lowering voltage. Also, it is possible the value you get is what the current battery voltage is. These batteries don't always output 12v, but I'm sure you knew that. It could also be that your voltmeter isn't great, or has poor connections. If the lights on the talons are flashing as you press the button, I'd think it was code. if their not, its probably something else. Your code looks correct, assuming it runs every loop. |
Re: 8 volts over talons
You can debug by printing the values that the talons are set to.
You can do this by writing: Code:
System.out.println(shooter.get()); |
Re: 8 volts over talons
Its set to two talons, but for the sake of this i'm just writing the program as it would be if i only have one. The wire length is closer than any other motor control set up that we have.
So when I revised the program to have it read as such Code:
if (js.getY()> 0)I've even switched out these talons with other talons to eliminate as much as could be and for some strange reason, being set to a button doesn't give it full speed. |
Re: 8 volts over talons
Quote:
Try setting the speed to a variety of values (I would go 1.0, 0.9, 0.8, etc, all the way down to -1.0) and see what voltage you get out of the Talon for each value. Then do the same thing feeding in a joystick, printing out the joystick value as you go so you can get it at about the same values. This will let you plot two response curves, which may help us figure out what's wrong. |
Re: 8 volts over talons
Quote:
|
Re: 8 volts over talons
I've stripped down the code, and removed it from all other variables, started a new file so all i have running is the button, and the js.getY(), (1 is being commented out when the other one is in use). And the results are still the same with the main program. It reads out 1.0 on the driver station, but shows a blinking light, and only reads ~8 volts on a voltmeter when done on a button.
|
Re: 8 volts over talons
So with the striped down code, the only way to stop the motor is to disable the robot?
Try getting rid of the "if" part all together - just set the motor to 1.0 and see what happens. I would also try 0.9, see if the output value changes. |
Re: 8 volts over talons
Also, it would be helpful to post all of the code so we can see what else might be affecting the output
|
Re: 8 volts over talons
yea as i essentially just have the shooters set up to the drive train so its just the wheels running forward, rather than an arm just swinging around I didn't want to risk any other method of coding to be part of the issue. I'll try putting it on different speeds and seeing if the output values change
|
Re: 8 volts over talons
Makes no sense that the axis is causing the Talon to give a different voltage than the button. If it were an electrical problem, you should see consistent and identical results for axis vs. button.
One problem I've frequently seen is: Code:
if (js.getRawButton(SHOOTER_BUTTON))Code:
shooter.set(0.7);If you're multi-threading, maybe something else in another thread is modifying the shooter? It just doesn't make sense that the problem is electrical related. If you don't want to post your code, it's fine, but we can at least help you eliminate the possibility of the problem being your code. |
Re: 8 volts over talons
I tried opening a new project
Code:
public class WhyYouNoWork extends SimpleRobot{ |
| All times are GMT -5. The time now is 02:37. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi