Go to Post I want to use some of that mass-less rod in our robot - saves weight. - ebarker [more]
Home
Go Back   Chief Delphi > Technical > Electrical
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 24-03-2016, 13:29
team3192 team3192 is offline
Registered User
FRC #3192
 
Join Date: Oct 2015
Location: Tigard
Posts: 3
team3192 is an unknown quantity at this point
Question Severe voltage drop

Our team at the last second has encountered a catastrophic issue with our robot that we don't know how to fix. When driving, the voltage drops to unacceptably low levels, regardless of what battery we use. It has happened to us before on a completely different robot and motor controllers, and we were not able to isolate the issue then either. I will list as much information as I know about the problem.

The voltage drop only occurs when using the driving motors, and it occurs regardless of how charged a battery is and how new a battery it is. The team has checked the terminals to the motor controllers, motors, and battery and have found no issues with the wiring.

The drivetrain is a tank drive tank tread configuration. One cim motor drives each tread. The cim motor is geared down using a CIMple box. I do not know the gear ratio as of yet. I have been told that the CIMple boxes and cim motors should not be a problem as the robot has run fine before without voltage drops using the same motors and gearboxes. Each cim motor is powered by a VEX Victor, both which are wired as according to wpilib. The team is not using the CAN interface. Driving forwards and backwards drops the voltage from 12ish to about 9, and turning the robot (driving either side in the opposite direction) drops the voltage from 12 to 6 on average.

The team also uses a unique motor controller class that is included below. Our main coder was not available so we were not able to figure out if it was a code problem.

Code:
package edu.wpi.first.wpilibj.templates;

import edu.wpi.first.wpilibj.Jaguar;

public class SafeJaguar{
    private final Jaguar jag;
    private final UpdateThread updater;

    public SafeJaguar(int port){
        jag=new Jaguar(port);
        updater=new UpdateThread(this,jag);
    }

    public void set(double targetSpeed){
        updater.targetSpeed=targetSpeed;
    }

    public void setDirect(double targetSpeed){
        updater.targetSpeed=targetSpeed;
        updater.speed=targetSpeed;
        jag.set(targetSpeed);
    }

    public void setPIDRate(int millis){
        updater.pidRate=millis;
    }
}
class UpdateThread extends Thread{
    long time;
    int pidRate;
    double speed,targetSpeed;
    SafeJaguar safejag;
    Jaguar jag;
    boolean active;
    public UpdateThread(SafeJaguar s, Jaguar j){
        super();
        pidRate=100;
        time=System.currentTimeMillis();
        speed=0;
        targetSpeed=0;
        safejag=s;
        jag=j;
        start();
    }
    public void run(){
        active=true;
        while(active){
            long dt=System.currentTimeMillis()-time; //dt = difference in time
            time=System.currentTimeMillis();
            if(speed!=targetSpeed){
                double amt=(double)dt/(double)pidRate;
                if(speed<targetSpeed){
                    speed+=amt;
                    if(speed>targetSpeed)speed=targetSpeed;
                }
                if(speed>targetSpeed){
                    speed-=amt;
                    if(speed<targetSpeed)speed=targetSpeed;
                }
                jag.set(speed);
            }
            try {
                sleep(10);
            } catch (InterruptedException ex) {
                //ex.printStackTrace();
            }
        }
    }
}
I do realize this account is relatively new, but I hope the moderators will show this online as soon as possible, as this problem has occurred a day before our competition and our members and mentors are stumped.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 15:55.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi