Custom tool development on CAN

Hi!

I understand how we can create a custom tool with the Microcontroller Kit, and using raw canbus messages from a brain app. Is there any way to hook into the native PTO and/or H-Bridge commands and functionality to allow a custom tool to be controlled with the pendant and the ActuatorCommands API? I saw that you sell a H Bridge model but is there any other way to do it?

Hey @adamskrz,

thank you for your question. Not sure if I understood the question, so feel free to elaborate if this doesn’t answer your quesiton.

The H-Bridge and the PTO tools can be controlled from the pendant out of the box. So, if you want a digital output, for e.g., you can use H-Bridge to power your external device (including stoping it when E-stop is active). When not in AUTO_READY or AUTO_ACTIVE you would be able to use the pendant. When a microcontroller or Brain take over, you would be able to power it from software.

does that make sense?

Thanks for the reply! I understand how the farm_ng tools work with the pendant etc.

My question is about creating custom tools (as we’ll be doing for the Farm Robotics Challenge) - is there any way to control them in the same way as the farm_ng ones other than by buying a farm-ng H-Bridge module?
If we are creating something from scratch with a microcontroller, is there a CAN device definition we can use to match what the pendant is looking for? Or would the only way to control it be a custom app on the brain with raw CAN commands?

I hope that’s a bit more clear!

I see. So, in short, the answer is yes. But I would like to elaborate.

In our microcontroller examples you will find a library that, with some studying, you will learn the node IDs for the motors, pendant, dashboard. As long as you do not have a ID conflict, you can follow the concepts of CANopen and create your own implement. Then you can write your own service to decode those messages and use it in your logic.

Now, in terms of this being practical, unless you have a good reason to se CAN I would go with other way to get the data into the Brain. You could use ethernet, wifi, or even USB. I would say even if you decide to go with CAN, I would use a second bus to debug while developing it. Any CAN bus error causes the machine to stop, which is counterproductive to prototyping and testing.

Maybe you want to set up a call with us to discuss ideas? Shoot me an email at marcelo@farm-ng.com :slight_smile: