CANopen protocol with Arduino

Discussion in 'Embedded Systems and Microcontrollers' started by Dawud Beale, Jan 18, 2016.

  1. Dawud Beale

    Thread Starter Member

    Feb 10, 2012
    275
    7
    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: Jan 18, 2016
  2. Picbuster

    Member

    Dec 2, 2013
    376
    50
    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
     
    Dawud Beale likes this.
  3. Dawud Beale

    Thread Starter Member

    Feb 10, 2012
    275
    7
    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?
     
  4. Papabravo

    Expert

    Feb 24, 2006
    10,163
    1,796
    I vote for considerably longer.
     
    Dawud Beale likes this.
  5. Picbuster

    Member

    Dec 2, 2013
    376
    50
    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.
     
    Dawud Beale likes this.
  6. Dawud Beale

    Thread Starter Member

    Feb 10, 2012
    275
    7
    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?
     
  7. Papabravo

    Expert

    Feb 24, 2006
    10,163
    1,796
    Hire an expert to be your tutor.
     
    Dawud Beale likes this.
  8. Dawud Beale

    Thread Starter Member

    Feb 10, 2012
    275
    7
    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: Jan 18, 2016
  9. Papabravo

    Expert

    Feb 24, 2006
    10,163
    1,796
    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.
     
    Dawud Beale likes this.
  10. Dawud Beale

    Thread Starter Member

    Feb 10, 2012
    275
    7
    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.
     
  11. Papabravo

    Expert

    Feb 24, 2006
    10,163
    1,796
    Before there was an Internet we had to order the documents, and actually read the paper copies. Talk about tough!
     
  12. Dawud Beale

    Thread Starter Member

    Feb 10, 2012
    275
    7
    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.
     
  13. Papabravo

    Expert

    Feb 24, 2006
    10,163
    1,796
    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.
     
    Dawud Beale likes this.
  14. Dawud Beale

    Thread Starter Member

    Feb 10, 2012
    275
    7
  15. Dawud Beale

    Thread Starter Member

    Feb 10, 2012
    275
    7
    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?
     
  16. DNA Robotics

    Member

    Jun 13, 2014
    123
    26
  17. DNA Robotics

    Member

    Jun 13, 2014
    123
    26
    What sensor are you monitoring? Is it in a CAN system or just one sensor?
     
  18. Dawud Beale

    Thread Starter Member

    Feb 10, 2012
    275
    7
    Its a micro-epsilon draw string sensor using a GXMMW encoder for the CANopen communication
     
  19. Papabravo

    Expert

    Feb 24, 2006
    10,163
    1,796
    The name of the company is Huron Net Works, Inc. I'm retired now but my colleagues are still there.

    http://www.huronnet.com/
     
Loading...