![]() |
CAN vs PWM
Myself and another member on my team were discussing whether to shoot for CAN or PWM for the jaguars next year.
we do not plan on using any victors, as we were rookies in 2009 and all we have are a few stray ones on a donated prototype chassis. We also plan to program using labview. as i understand from the table at nationals, next year's KOP has solely black jaguars in it. a little gracious advice would be helpful as my last 3 years of FRC wiring have been pwm only. |
Re: CAN vs PWM
We used CAN last year, and though it's a little temperamental, when it works it works well.
Be warned, our problems included difficulty in making the cables, a higher sensitivity to slowdowns in your robot code (We cannot safely enable the bot until the camera feed starts at the driver station), jags randomly resetting their IDs (this has been fixed), and under last year's code the system cannot handle more than 2 jaguars being unpowered (if all goes well that won't be a problem again this year). On the plus side, the wiring is infinitely simpler with CAN (assuming you can make the cables), as there is only one wire going to the cRIO. I also would have been gutted by the drive team if I pulled the robot apart trying to get at the two jags which power our kicker so I could switch the coast/brake jumper on the day before shipping (true story). Instead, I was able to override it through code. And if there are any problems, you can quickly plug the bus into a computer and check if any jags are not operating properly. Overall the decision of if to switch should be based on whether you have a use for the extra abilities of the CAN bus and whether you can devote the resources to the problems that will most likely arise from the bus. disclaimer: I'm a C++ programmer so I may have a different experience with the CAN bus than the LV teams |
Re: CAN vs PWM
Try it out before the season. We're happy to support you on any issues you run into, but this is NOT something you want to have to figure out when you should be testing your robot design.
I have data on the performance of CAN using the Black Jaguar plugin at this thread: http://www.chiefdelphi.com/forums/sh...ad.php?t=86259 2CAN should provide better performance, but I have not tested it. |
Re: CAN vs PWM
i have another question:
if what i remember from the demo at nationals is right, do you use rg45 patch for the lead in and rg11 2 line phone cord (4 wires) for the rest? or do you use all six rg11 pins? i know the extra pins of the black are what make it a black (and hence why using all blacks next year works) |
Re: CAN vs PWM
If using a serial interface: RJ-45 is used to communicate between the cRIO and the black jaguar. For the rest of the system only 2 wires are needed
If using a 2CAN: Everything is 2-wire |
Re: CAN vs PWM
Quote:
sounds like making the wires requires modular phone cord, RJ-11 (phone) jacks, the proper crimp tool, and a CAT 5e patch cable. i think i saw the crimp tools for phone wire at Lowe's cheap... |
Re: CAN vs PWM
You are correct.
|
Re: CAN vs PWM
cool.
so i guess the wiring side is established. now for the programming side, which is not quite my thing... i know labview basics, i imagine the place to find the jags is not pwm with CAN... |
Re: CAN vs PWM
You're looking for the CANJaguar project at FIRST Forge.
http://firstforge.wpi.edu/sf/frs/do/....canjaguar/frs |
Re: CAN vs PWM
my team might try it... since we will end up buying a black jag anyway, all it is to us is a db9 plug and a some rj11 parts (we already have the crimper).
i fiund a good pdf by 116 on the subject, but the programming instructions are for C++. we are using labview. two questions: 1. what all does the programmer need to know to convert the code written for pwm to CAN? 2. is the cRIO FTP thing the same? the electrical and firmware thing i have down... I was made electrical subteam leader today and i read the pdf and my laptop is set to be a reflash device (you use the homemade serial dongle to do that, right?). any other advice? |
Re: CAN vs PWM
Quote:
Quote:
Side note: Your PDF may not have said this, but you need to make sure to undo the change to ni-rt.ini before attempting to re-image the cRIO. For some reason it fails if the CAN plugin is loaded. Quote:
Make sure you have plenty of extra cables. One broken cable will most likely take the entire network down. We have 2 or 3 spare jag-jag (2 wire) cables, and an extra jag-cRIO (6-wire) cable. We also found it useful to make a second serial dongle and keep the spare jag-cRIO cable with it so we don't have to dig the connection out of the robot if anything goes wrong (like last year's device number reset bug). A spare termination resistor is also a good idea. Also, be extra careful about disconnecting power to jaguars. Even though the bus can still travel through an unpowered jaguar, C++ had a (hopefully fixed) bug that would cause glitches if it didn't receive responses from a jaguar. Not sure if LV had that same bug. |
Re: CAN vs PWM
i'm confused. the six wire cord is only for the first bit?
ok... i assume 8 wire patch cord with rj12 pluds (2 wires not used) would work? one other dumb thing- is only one 100 ohm resistor needed or is one needed at each end? |
Re: CAN vs PWM
Quote:
http://www.chiefdelphi.com/forums/sh...88&postcount=4 |
Re: CAN vs PWM
gotcha.
ok... luckily I have a bunch of 100 ohm resistors thanks to some junk power supplies i desoldered as soldering practice... already have the end terminator made. |
Re: CAN vs PWM
Quote:
There should be an example drive project in the CAN release. If you're using speed or position mode, you should understand PID and how to use encoders. If you're using Current mode, you should know that the sensor is only accurate within 1 amp, and is not suitable for small motors. |
| All times are GMT -5. The time now is 02:50. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi