Develop CAN w/o Rio - use Laptop as Master w/ SparkMax /Neo Brushless

Bench setup with USB tethered to PC - Expand to a two node CAN
Reference my breadboard -


attached Looking for setup and software --preferably Java with Visual Studio Code platform -Will use as teaching aid
Have done systems with STM32 Nucleo , need show and tell with REV/FRC hardeware

So I think 195 has resources on how they’re using a CTRE Canivore and a Jetson/OrangePi coprocessor to control motors off the Rio (what they call their 2nd gen control system)

Here are some resources they provided earlier this year talking about it, some contact info, etc.

they also had a quick start for ros specifically. but there are likely portions of code using the necessary libraries in a linux enviornment for communicating with the canivore via USB.

If i have any of this wrong, I apologize, having not had the time or resources to try it myself. But hopefully this is a starting point.

1 Like

That’s more or less all right.

As it pertains to this OP specifically, CTRE provides an arm version of the Phoenix library that you can run on a raspberry pi with a carnivore (and mayyybe even a canable? I don’t recall) to control their can devices directly. That said I see that it’s a rev motor controller in the image, I’m unaware if there’s a publicly available similar capability for REV products, in the past when we’ve controlled REV products it’s always been proxied through a roboRio.

1 Like

thanks I’ll take a look

Thanks

Can confirm Canable (when it’s in stock) works for CAN 2.0 to USB and will work with CTREs non-fd hardware. I have used this with Jetson nanos on multiple occasions.

Then using the CTRE library as part of that whole Phoenix Framework you can directly call c++ functions for motor control just like you would in your real robot code on a roborio. But it’s your own custom c++ program.

Not sure if there is a similar path open for REV hardware to use their library outside of a RoboRio.

1 Like

Thanks for the input

Follow up question to all who so graciously responded " Is there an low cost /alternative to a RoboRio to run the set up - don’t need all the capability contained in the RIO just want to create the CAN two node and function two NEO motors
No sure I want to re invent the wheel

You probably know this, but if you just plug the orange USB cable into a laptop and run the REV Hardware Client, you can run multiple motors connected via CAN – they all have to be REV and one of them needs to be plugged in to USB. You might need terminating resistors on your CAN bus but for only two devices close together, you might not.

2 Likes

Thanks , in the client I did the Spark Max / Motor -I noticed the CAN BUS tab but was ignorant of it usefulness and functionality - thanks I’ll go back into it and take it for a test drive - yes may need a 120 OHM resistor - maybe ?
Thanks

2 Likes

Yes, if things don’t work well without the resistor, you may need one at each end of your CAN bus. If you only have a couple of SPARK MAXen and you keep the wires reasonably short, you probably won’t need them.

1 Like