View Full Version : Arduino runing CAN Bus
I have an Arduino Mega2560 and I was wondering is there any documentation on how the c-rio talks to the black Jags? My Arduino has 3 extra serial ports which I am thinking I can talk to a Jag since the connection from the c-rio to the first Jag is serial. Any help is appreciated!
Jeremy Germita
22-03-2012, 18:57
If you look in the CANJaguar classes in Java or C++, you'll see some clues on how the cRIO communicates to the Jags.
On the hardware side, the CAN Jag has one RS232 serial port. Arduinos typically have TTL serial ports. You need a level converter(tutorial here (http://www.uchobby.com/index.php/2007/06/11/ttl-to-rs232-adaptor-explained/)) to properly communicate to the Jaguar to start.
Another way to do it is to get a 2CAN (http://www.crosstheroadelectronics.com/2CAN.htm) and use the ethernet shield for the arduino.
Yet another alternative is SparkFun Electronics' CAN-Bus shield (http://www.sparkfun.com/products/10039).
Code resource for it: http://code.google.com/p/canduino/
Good luck and communicate back with results. :)
I would be nice to run the Jags through the RS232 with my computer's serial adapter, like how I can with the Jag test program, but with LabVIEW. I've looked a the code for the CAN in LabVIEW, It looks like it all goes down to the "FRC_Communication". What I really need is how that the data goes from "FRC_Communication" to the port so I can change it the VISA Serial in LabVIEW.
TI offers the RDK-BDC24 (Research Development Kit), which is essentially the MDL-BDC24 (Black Jaguar) with all the source code and development tools you need. It should contain documentation about the serial communication methods used to control the Jaguars.
FourPenguins
04-04-2012, 00:04
One of my old teammates has been working on this. It's a Robot Operating System Node for controlling Jaguars over serial. You may be able to pull out some useful stuff about the Jaguar serial protocol.
https://github.com/jmesmon/jaguar
kalfuswi
11-04-2012, 12:52
CAN isn't required to operate the Jags. You can use a PWM line on an Arduino and connect it to the PWM input on the Jag. Then, use the Servo library in Arduino to control the Jags (90 is brake, the farther down you go the faster in one direction and the farther up then the faster in the other direction).
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.