CANopen protocol with Arduino

Thread Starter

Dawud Beale

Joined Feb 10, 2012
275
Hi everyone.

I am looking to interface an Arduino with a sensor that can only communicate with the CANopen communication protocol.

Does anyone know how I might do that?

Is there any libraries, can I use an ordinary CAN-BUS shield in conjunction with some code that has previously been written, and has anyone else tried using CANopen with an Ardunio.

If anyone has any advice or useful resources etc then please do feel free to share.

Note that changing to another protocol is not possible so I need to find a solution for CANopen communication with an Ardunio.

Thanks in advance for any useful posts.

Many thanks and best wishes.

Dawud Beale.

p.s. if Arduino is not possible then any other potential solution that doesn't involve large sums of money would be of interest.
 
Last edited:

Thread Starter

Dawud Beale

Joined Feb 10, 2012
275
Can open is complex but microchip has a solution pls read
ww1.microchip.com/downloads/en/AppNotes/00945a.pdf
all info and cross refs are in that document
Many thanks for your suggestion. The document said its primarily aimed at "slave" applications. I am looking to read in CANopen data from a sensor, so I would suppose the sensor is the slave and the PIC would be the "master" in this case. Would this cause me any problems?

Also, are there any other options available, such as going directly from the sensor to my laptop via a USB to Serial D-Sub cable with some software to read the CANopen data?

If I undertake this method using the PIC18 ECAN with very little experience with CANopen or writing communication protocols onto microcontrollers, do you think I could be able to read in some data within 10 days of development or would it take considerably longer?
 

Picbuster

Joined Dec 2, 2013
1,008
It will take more than 10 days with experience. Study can open takes at least one week.
The problem lays in complexity, possibilities and exceptions.
the best thing to do is to buy a plc with can and connect your sensor to it a few hundred $ and problem is solved.
The only thing then is to worry about the settings of can and sensor not the protocol anymore.
In my opinion is can open a bit misleading due to all type of variations designed by suppliers to 'slave' customers to their products.
 

Thread Starter

Dawud Beale

Joined Feb 10, 2012
275
Thank you for your advice. Could you point me in the right direction for the PLC that costs a few hundred dollars that is capable of reading in CANopen data from the sensor? Or any hardware that could do that for me without me having to code CANopen into the software? I agree it would be far simpler and more preferable.

If I did want to go down the other route, where would you suggest I learn about CANopen to in my week of learning time you mentioned prior to development? Any useful tutorials or resources that could get me going from scratch?
 

Papabravo

Joined Feb 24, 2006
13,924
Thank you for your advice. Could you point me in the right direction for the PLC that costs a few hundred dollars that is capable of reading in CANopen data from the sensor? Or any hardware that could do that for me without me having to code CANopen into the software? I agree it would be far simpler and more preferable.

If I did want to go down the other route, where would you suggest I learn about CANopen to in my week of learning time you mentioned prior to development? Any useful tutorials or resources that could get me going from scratch?
Hire an expert to be your tutor.
 

Thread Starter

Dawud Beale

Joined Feb 10, 2012
275
Unfortunately I don't think I could afford that. Was more thinking like a few youtube videos and online tutorials and maybe a book on amazon
 
Last edited:

Papabravo

Joined Feb 24, 2006
13,924
Problem is that professionals may or may not take the time to express themselves in that medium for your benefit. If that's the case then great, but I fear your going to have to do it the hard way, like we had to do it in the days before all the new media options. I wish I could help you more, but my CAN expertise is in DeviceNet. Good luck in either case.
 

Thread Starter

Dawud Beale

Joined Feb 10, 2012
275
How would you have done it before online resources became more widespread?

Thanks, hopefully I will get this figured out. The annoying thing is I actually had a choice of 4 different protocols including EtherCAT, Profibus etc and didn't really appreciate at the time how much that decision would affect the complexity of the project down the line. I thought they were all suitable in terms of speed of data transfer etc. I guess I have learned the hard way for next time.
 

Thread Starter

Dawud Beale

Joined Feb 10, 2012
275
Lol I appreciate the sarcasm.

If you can point me in the right direction for a manual that can explain how to code CANopen then that would be great. I dont mind sending off for a paper copy or printing something from online. I didn't find anything that would take me through the process, just general overviews.
 

Papabravo

Joined Feb 24, 2006
13,924
That's the thing about open standards. The printed material I was talking about is 'the spec', or 'the standard' which doesn't tell you jacks**t about how to code an application. What you have to do is read the abstract specification and understand it well enough to code a device. I'm not saying that the thing you're looking for doesn't exist, I'm just saying that I have no idea how to go about finding it. I do wish I could be more helpful, but I just don't quite have the information you're looking for. We did make a bit of scratch by being able to explain standards, like DeviceNet, that we helped to develop and write before other folks figured it out. Our two day class, with hands on experiments, cost $995.00. The companies, with many engineers in your condition, were happy to pay us that price. The engineers were happy to invest the two days. The Q&A sessions with the two of us were gold for them.
 

Thread Starter

Dawud Beale

Joined Feb 10, 2012
275

Thread Starter

Dawud Beale

Joined Feb 10, 2012
275
Yes I would love if my company would send me on those types of courses. They would be highly valuable. Whats your company so I can keep an eye open?
 
Top