Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   General Forum (http://www.chiefdelphi.com/forums/forumdisplay.php?f=16)
-   -   Building a RogueBot! (http://www.chiefdelphi.com/forums/showthread.php?t=137456)

teslalab2 06-06-2015 23:44

Building a RogueBot!
 
5 Attachment(s)
First off, my Friend Tim and I are trying to start a little mini local competition called RogueBotix, the emphasis is not spending much money. :) Now that thats out of the way...

It is controlled by and arduino and a ethernet shield using ArduRIO which is a piece of software I wrote to replace a roboRIO with an arduino, I will be releasing eventually.We are using Jaguars controlled with can for running our motors. The motors are neverest ftc motors, and the wheels are vex pro 8 inch omni wheels.

The last 2 days we have been hard at work,here are some pictures of the build.

Oromus 06-06-2015 23:57

Re: Building a RogueBot!
 
ArduRIO sounds like a very helpful piece of software which will make creating small cheap robots or restoring old FRC robots a much cheaper and easier experience! I look forward to when you release it!

Back on topic to your RogueBot, it's always interesting to see what interesting robots people can build while trying to keep it cheap; yours is looking quite nice! I can't wait to see it in action!

teslalab2 07-06-2015 00:04

Re: Building a RogueBot!
 
https://www.youtube.com/watch?v=AHzs...ature=youtu.be

here is a quick video of it just driving forward. The cheap chinese knock off Ethernet shield I bought malfunctioned and went babbling idiot mode, so I cant do teli-op until a new one arrives. :cool:

GreyingJay 08-06-2015 10:02

Re: Building a RogueBot!
 
Yes, I'd be very interested in ArduRio too, it would be a great prototyping tool for creating hardware that is "drop in ready" for a real RoboRio since most teams probably own only one or two of those.

Andrew Schreiber 08-06-2015 11:07

Re: Building a RogueBot!
 
Quote:

Originally Posted by teslalab2 (Post 1486026)
https://www.youtube.com/watch?v=AHzs...ature=youtu.be

here is a quick video of it just driving forward. The cheap chinese knock off Ethernet shield I bought malfunctioned and went babbling idiot mode, so I cant do teli-op until a new one arrives. :cool:

Please please please put some breakers on this thing. From what I can see you have two bus bars mounted on a 2x4. Screams fire to me.

Main Breaker: http://www.amazon.com/Xscorpion-CB15...SM5VW8KHEY 1W

http://www.amazon.com/gp/product/B00...p age_o01_s01 For each branch

It'll take the self resetting FRC fuses, if you don't have those handy, buy some fuses - they won't reset but it'll at least cut current should something happen. http://www.amazon.com/Cal-Hawk-120-F...N0F30C9C5X 9B


Please spend the $30, just the peace of mind is worth it...


Sorry to be a wet blanket on this, it looks like a good project but I'd really like to not hear when it catches fire.

timytamy 08-06-2015 12:07

Re: Building a RogueBot!
 
Quote:

Originally Posted by Andrew Schreiber (Post 1486138)
Please please please put some breakers on this thing. From what I can see you have two bus bars mounted on a 2x4. Screams fire to me.

[snip]

Please spend the $30, just the peace of mind is worth it...

Sorry to be a wet blanket on this, it looks like a good project but I'd really like to not hear when it catches fire.

Listen to this, a normal FRC battery will have ~800kJ of energy. That's equivlient to a 160kg mass moving at 100m/s (someone check my physics please). You don't want to lose control of that. (Check out videos of spanners flying when shorted accross batteries)

Also, are you using what looks like an AC light switch? Please check that this switch is rated for a reasonable DC current/voltage. DC dosen't have regular "zero-crossings" which makes it more prone to arcing on disconect. I've seen cases where 240VAC switches have fused closed when used with 12VDC. If this is your only disconect point, you may end up with no good way to disconect the battery if you get fault currents (short circuits).

OT: Looks great. Please post a copy of your software if you get a chance, I'd be interested in taking a look.

teslalab2 08-06-2015 19:30

Re: Building a RogueBot!
 
Not to worry ya people :P There is a 20 amp fuse in series with the switch under the switch in the box. and btw you'd be surprised what a light switch can take... I used a light switch to shut off the power supply for my capacitor bank before it fires, the power supply is 4 microwave oven transformers which draw roughly 12amp a piece, and the switch never failed, even after a lot of use. But I understand your cringing and concern for safety.::safety::

evanperryg 09-06-2015 12:45

Re: Building a RogueBot!
 
Quote:

Originally Posted by teslalab2 (Post 1486197)
Not to worry ya people :P There is a 20 amp fuse in series with the switch under the switch in the box. and btw you'd be surprised what a light switch can take... I used a light switch to shut off the power supply for my capacitor bank before it fires, the power supply is 4 microwave oven transformers in series which draw roughly 12amp a piece, and the switch never failed, even after a lot of use. But I understand your cringing and concern for safety.::safety::

christ... do you have video of that? I've been working off and on (no pun intended) on a capacitor bank of my own, and I'd be interested to see how yours is set up.

teslalab2 09-06-2015 18:45

Re: Building a RogueBot!
 
Quote:

Originally Posted by evanperryg (Post 1486257)
christ... do you have video of that? I've been working off and on (no pun intended) on a capacitor bank of my own, and I'd be interested to see how yours is set up.

I'll PM it too you.

teslalab2 13-06-2015 01:15

Re: Building a RogueBot!
 
HERE WE GO!!! A video of it finally driving teli-operatedly https://www.youtube.com/watch?v=dZdm...ature=youtu.be

next im gonna add a gyro for driver centric control, as well as maybe run the jags in speed mode and use the built in encoders on the wheels. cheers m8's

timytamy 13-06-2015 08:39

Re: Building a RogueBot!
 
You're running the Jags on CAN?

Would you mind sharing that code, I'd be very interested...

teslalab2 13-06-2015 09:07

Re: Building a RogueBot!
 
Quote:

Originally Posted by timytamy (Post 1486646)
You're running the Jags on CAN?

Would you mind sharing that code, I'd be very interested...


Of course! :cool: It's all going to be released with arduRIO. the arduino is not actually generating the can, its generating TTL, then I built a simple little circuit board to convert TTL to Uart, Then the first jaguar which must be a black jaguar is used as a Uart to can bridge. right now the canjag library I wrote is a mess and only fully supports voltage mode, I'm working on Vcomp mode right now, but I have some kinks to work out with scaling the values correctly. all in good time, hard to find time to write code when you work 10 hour days!

here is a little preview, I reverse engineered BDC-COMM to figure out how this works.

Code:

#include <CanJaguar.h>
#include "Arduino.h"
#include <SoftwareSerial.h>
SoftwareSerial canserial(2,3);
CanJaguar::CanJaguar(int rx,int tx){
}
//SoftwareSerial canserial(10,11);//rx,tx
void CanJaguar::Initialize(void){
vmode = false;
vcmode = false;
cmode = false;
smode = false;
pmode = false;
canserial.begin(115200);
}

void vcompenable(int id){
    byte message[] = {0xFF,0x04,id,0x08,0x02,0x02};
 canserial.write(message,sizeof(message));
}
void venable(int id){
    byte message[] = {0xFF,0x04,id,0x00,0x02,0x02};
 canserial.write(message,sizeof(message));
}

void encodebytes(float val,int data[]){
  int integer = (int)val;
  float decimal = val - integer;
  int numofdata = 0;
    if(decimal == 0xFF){
        data[numofdata++] = 0xFE;
        data[numofdata++] = 0xFE;
        }
            else if(decimal == 0xFE){
        data[numofdata++] = 0xFE;
        data[numofdata++] = 0xFD;
            }
                else{
                data[numofdata++] = decimal;
                }
       
        if(integer == 0xFF){
        data[numofdata++] = 0xFE;
        data[numofdata++] = 0xFE;
        }
            else if(integer == 0xFE){
        data[numofdata++] = 0xFE;
        data[numofdata++] = 0xFD;
            }
                else{
                data[numofdata++] = integer;
                }
    }
   
void CanJaguar::SetVoltage(int id,float value){
    if(!vmode){venable(id);vcmode=false;vmode=true;cmode=false;smode=false;pmode=false;}
    int stuff =  value*127.5;
    power = (stuff & 0xFFFF) | stuff << 8;         
    int data[3] = {0}; 
    encodebytes(power,data);
    byte message[] = {0xFF,0x06,0x80+id,0x00,0x02,0x02,data[0],data[1],data[2],data[3]}; 
 canserial.write(message,sizeof(message));
}

void CanJaguar::SetVcomp(int id,float value){
    if(!vcmode){vcompenable(id);vcmode=true;vmode=false;cmode=false;smode=false;pmode=false;}
    int stuff =  value;
    power = (stuff & 0xFFFF) | stuff << 16; //the first value converts the int, the second converts the float, serperate to 2 differnt values
        if(value < 0){ //also should be stuff&0xff
        power = 0xFFFF - power;
        }
    int data[3] = {0}; 
    encodebytes(power,data); 
    byte message[] = {0xFF,0x06,0x80+id,0x08,0x02,0x02,0xfe,0xfe,0xfe,0xfe};// neg values subtraced from max end

 canserial.write(message,sizeof(message));
}



All times are GMT -5. The time now is 00:09.

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