• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

CAN-FD Generic IO

Scheduled Pinned Locked Moved
General Discussion
8
35
3.1k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined
    dc42 administrators
    last edited by dc42 19 May 2020, 13:57

    You can buy a SAMC21 development board, see https://uk.farnell.com/microchip/atsamc21-xpro/evaluation-board-xplained-pro/dp/2492013. Also available from Digikey https://www.digikey.com/product-detail/en/microchip-technology/ATSAMC21-XPRO/ATSAMC21-XPRO-ND/5256707 and probably Mouser etc.

    Duet WiFi hardware designer and firmware engineer
    Please do not ask me for Duet support via PM or email, use the forum
    http://www.escher3d.com, https://miscsolutions.wordpress.com

    1 Reply Last reply Reply Quote 1
    • undefined
      dc42 administrators
      last edited by 19 May 2020, 15:06

      Here's another one: https://www.chip45.com/products/sammy-c21-1.0_atmel_smart_arm_sam_module_board_samc21_usb_dual_two_can.php

      And another: https://www.mattairtech.com/index.php/mt-d21e.html

      Duet WiFi hardware designer and firmware engineer
      Please do not ask me for Duet support via PM or email, use the forum
      http://www.escher3d.com, https://miscsolutions.wordpress.com

      1 Reply Last reply Reply Quote 1
      • undefined
        drobertson123
        last edited by 19 May 2020, 22:20

        Thanks

        The small board looks like what I was envisioning. Small form factor and a reasonable price that can handle 3-4 local sensors or outputs. I am going to order a few and see what I can make them do.

        1 Reply Last reply Reply Quote 0
        • undefined
          dc42 administrators
          last edited by 20 May 2020, 09:33

          @drobertson123, by "the small board", do you mean the one from chip45?

          If so, you should be able to fork and adapt the tool board code in https://github.com/Duet3D/Duet3Expansion. I think you need to do at least the following:

          • Decide whether to upload the code over USB using the optional chip45 bootloader, or upload the code over CAN as we do for tool boards.
          • If you use the chip45 bootloader, you may need to change the linker input file for your configuration of the expansion board project so that the code starts 4K from the start of flash instead of 16K, because that's probably where the bootloader expects the code to be.
          • If instead you use our CAN bootloader, you will need an Atmel ICE or similar to program the bootloader into that board. (You may find the ICE useful for debugging too). You will also need to do a variant of our bootloader (https://github.com/Duet3D/Duet3Bootloader) that returns a different board short name to the Duet 3. The board short name determines the file that the Duet 3 main board fetches the firmware from.
          • The chip45 board uses a 16MHz crystal, whereas our tool board uses a 12MHz crystal. Therefore you will need to change the clock multiplier (also in our bootloader, if you are using it).
          • There is a simple debug facility in the expansion/tool board firmware for writing messages to a serial port. You could adjust it to use the SERCOM device that is connected to the USB port.
          • Finally (I think!), you will need to adjust the pin table to name all the available I/O pins on the board.

          Duet WiFi hardware designer and firmware engineer
          Please do not ask me for Duet support via PM or email, use the forum
          http://www.escher3d.com, https://miscsolutions.wordpress.com

          1 Reply Last reply Reply Quote 1
          • undefined
            drobertson123
            last edited by 21 May 2020, 04:36

            Thanks a lot for the detailed advice. I did order the Sammy-C21 V1.0 from chip45 but since I couldn't find a supplier in the US the shipping nearly doubled the price (ouch).

            I also picked up a pair of NUCLEO-G474RE dev boards that have integrated CAN-FD and a small stack of MCP2558FD chips as transceivers. That actually cost me less than the one Sammy-C21 with shipping. Those dev boards are pretty solid performance-wise and have a lot of IO capability for their $15 price tag on Mouser but I have no doubt there will need to be a lot of tweaking to get things to talk.

            If I can get the CAN FD communications sorted out it will dramatically reduce a wiring nightmare I can see coming up and give me flexibility. That will leave me more time to focus on some really hard kinematics problems I need to sort through.

            The main project this is going into is effectively a sliding Delta actuator over a rotary axis. It is for printing a soluble support structure on a central tube that is then used for filament winding complex features.

            Most of the concepts can be drawn directly from other designs but it effectively has redundant ways to move in the X-Axis and my brain is getting tripped up on how to plan that movement. But I will deal with communications and control first.

            1 Reply Last reply Reply Quote 0
            • undefined
              JoergS5
              last edited by 21 May 2020, 08:43

              Teensy 4 may be an option too. It has a fast 600 MHz MCU and one CAN-FD. The new 4.1 version has some improvements like more IO ports.

              1 Reply Last reply Reply Quote 1
              • undefined
                dc42 administrators
                last edited by dc42 23 May 2020, 14:37

                I've added a SAMMYC21 build configuration to project Duet3Expansion. It's designed to work with the bootloader from chip45.com. I won't have a chance to test/debug it until the boards I have ordered arrive.

                I've set up the pin table to use the available ports on the Sammy-C21 board as follows:

                PA02 "temp0" (thermistor or other analog input)
                PA03 "temp1" (thermistor or other analog input)
                PA04 "pa04" input, output with PWM
                PA05 "pa05" input, output
                PA06 "pa06" input, output with PWM
                PA07 "pa07" input, output
                PA08 "pa08" output
                PA09 External driver EN, active low
                PA10 External driver DIR, active low
                PA11 External driver STEP, active low
                PA12 "pa12" input, output with PWM
                PA13 "pa13" input, output
                PA16 "pa16" input, output
                PA17 "pa17" input, output
                PA18 "pa18" input, output
                PA19 "pa19" input, output with PWM
                PA20 "pa20" output
                PA21 "pa21" output
                PA22 "pa22" output
                PA23 "pa23" output with PWM
                PB08 "pb08" input, output
                PB09 "pb09" input, output

                Duet WiFi hardware designer and firmware engineer
                Please do not ask me for Duet support via PM or email, use the forum
                http://www.escher3d.com, https://miscsolutions.wordpress.com

                ? undefined 2 Replies Last reply 23 May 2020, 15:55 Reply Quote 4
                • ?
                  A Former User @dc42
                  last edited by 23 May 2020, 15:55

                  @dc42 said in CAN-FD Generic IO:

                  I've added a SAMMYC21 build configuration to project Duet3Expansion.

                  much love!

                  1 Reply Last reply Reply Quote 1
                  • undefined
                    drobertson123 @dc42
                    last edited by 24 May 2020, 02:44

                    @dc42 That is great.

                    I got in some components to play with, not the SAMMYC21 yet, but some CAN-FD compliant transceivers and some NUCLEO STM32 boards that have built-in CAN-FD.

                    When my SAMMYC21 gets here I should have a decent ecosystem of boards.

                    When is the CAN-FD Stepper driver you had mentioned earlier estimated to be available? Will it have some IO for endstops? If so it would be a good fit for driving my Delta arms.

                    I already have the tool board on order(looking forward to filastruder shipping it) and I think I am picking up a second Duet 3 Mainboard for a CoreXY project. I like where you are taking your products. Keep it up.

                    1 Reply Last reply Reply Quote 0
                    • undefined
                      mwwhited @dc42
                      last edited by 26 May 2020, 08:55

                      @dc42 said in CAN-FD Generic IO:

                      A disadvantage is that a license fee is payable on any EtherCAT device, although not on on an EtherCAT host

                      As stated in their own FAQ

                      3.3 How about licences?
                      There is a licence for implementing an EtherCAT master which is free of charge - the agreement demands compatibility, ensures that the licence remains free of charge and provides legal certainty. For slave devices EtherCAT has adopted the CAN license model (CAN is an excellent example for a standardized open technology that is protected by patents): The small license fee is "embedded" in the EtherCAT Slave Controller (ESC) chip, so that device manufacturers, end users, system integrators, tool manufacturers etc. do not have to pay a license.

                      This license is only payable for dedicated embedded controllers. If you used a multi-master configuration there would be no dedicated chip and no payable license. If you did use an embedded chip the license free is included with the chip cost.

                      1 Reply Last reply Reply Quote 1
                      • undefined
                        JoergS5
                        last edited by 27 May 2020, 06:55

                        I ordered the sammy also, it is available through eb.. and is a nice small device.

                        If someone is interested in FPGAs, I detected an open source CAN-FD VHDL implementation of CAN-FD on https://gitlab.fel.cvut.cz/canbus/ctucanfd_ip_core
                        (but according to their readme one needs a license from Bosch for commercial usage)

                        undefined 1 Reply Last reply 28 May 2020, 11:50 Reply Quote 0
                        • undefined
                          drobertson123 @JoergS5
                          last edited by 28 May 2020, 11:50

                          @JoergS5 said in CAN-FD Generic IO:

                          I ordered the sammy also, it is available through eb..

                          What is eb? Is it a source in the US?

                          The SAMMYC21 is great but the shipping to the US doubles the price. I am hoping that someone here stocks them so we can get them at a more reasonable price.

                          undefined 1 Reply Last reply 28 May 2020, 11:57 Reply Quote 0
                          • undefined
                            JoergS5 @drobertson123
                            last edited by JoergS5 28 May 2020, 11:57

                            @drobertson123 sorry to abbreviate... eb=ebay, germany in my case. chip45 offers his products in ebay for the same price as in his supplier shop.

                            undefined 1 Reply Last reply 28 May 2020, 11:59 Reply Quote 1
                            • undefined
                              wilriker @JoergS5
                              last edited by 28 May 2020, 11:59

                              @JoergS5 Just to mention that: chip45 is a German company. 😉

                              Manuel
                              Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                              with probably always latest firmware/DWC (incl. betas or self-compiled)
                              My Tool Collection

                              undefined 1 Reply Last reply 28 May 2020, 12:01 Reply Quote 0
                              • undefined
                                JoergS5 @wilriker
                                last edited by 28 May 2020, 12:01

                                @wilriker I wonder why the don't offer in digikey.com, because e.g. Trimac TMC chip are german also, but offer worldwide. That's a pity for non-europe users.

                                undefined 1 Reply Last reply 28 May 2020, 12:18 Reply Quote 0
                                • undefined
                                  dc42 administrators @JoergS5
                                  last edited by 28 May 2020, 12:18

                                  If there is enough interest in it in the US, perhaps Filastruder may be interested in stocking them?

                                  Duet WiFi hardware designer and firmware engineer
                                  Please do not ask me for Duet support via PM or email, use the forum
                                  http://www.escher3d.com, https://miscsolutions.wordpress.com

                                  1 Reply Last reply Reply Quote 0
                                  • undefined
                                    drobertson123
                                    last edited by 1 Jun 2020, 20:16

                                    Having filastruder stock them would be good.

                                    I am ok with paying a bit of a premium but it doubles the price for the board to order it from the US. At that price point, I am looking at more local solutions despite the SAMMYC21 board looking good. I still have one coming to test but I am also playing with the STM Nucleo boards that I can get local for $15, add on the transceiver for $2 and I have a good base to work with.

                                    1 Reply Last reply Reply Quote 0
                                    • undefined
                                      dc42 administrators
                                      last edited by 3 Jun 2020, 19:34

                                      I have the Sammy-C21 board working with Duet 3 now and the firmware is committed to Github (there are now SAMMYC21 build configurations in the Duet3Bootloader and Duet3Expansion projects). I will write a wiki page soon on how to use it with Duet 3.

                                      Duet WiFi hardware designer and firmware engineer
                                      Please do not ask me for Duet support via PM or email, use the forum
                                      http://www.escher3d.com, https://miscsolutions.wordpress.com

                                      1 Reply Last reply Reply Quote 3
                                      • undefined
                                        dc42 administrators
                                        last edited by 4 Jun 2020, 10:17

                                        The wiki page is now available here https://duet3d.dozuki.com/Wiki/Using_the_Sammy-C21_development_board_with_Duet_3.

                                        Duet WiFi hardware designer and firmware engineer
                                        Please do not ask me for Duet support via PM or email, use the forum
                                        http://www.escher3d.com, https://miscsolutions.wordpress.com

                                        1 Reply Last reply Reply Quote 1
                                        • ?
                                          A Former User
                                          last edited by A Former User 6 Apr 2020, 10:26 4 Jun 2020, 10:19

                                          The Sammy-C21 can be purchased directly from chip45.com. We are making arrangements with them to have the Duet3D CAN bootloader pre-installed as an option.

                                          .. not sure why I keep being amazed by you guys, but I do ..

                                          (edit: it should be possible to use OpenOCD and RaspberryPi GPIO to flash the Atmel chip over SWD, might pick up one of those boards next month and give it a try, providing an alternative to pricey Atmel ICE)

                                          1 Reply Last reply Reply Quote 2
                                          20 out of 35
                                          • First post
                                            20/35
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA