DieBieSlave - LAN9252 and STM32 based EtherCAT slave demonstration with NunChuck and MPU9250

Sdílet
Vložit
  • čas přidán 23. 08. 2017
  • This is an explanation and demonstration video of my OpenSource EtherCAT slave based on the LAN9252. I first explain why I did this project and elaborate on my motivation, then ill briefly show the pinout and schematic followed by a demonstration of two slave implementation with the DieBieSlave. The first being a NunChuck slave and the second a dual MPU9250 slave.
    All firmware, schematics and design files can be found on my github page:
    github.com/DieBieEngineering/...
    github.com/DieBieEngineering/...
  • Věda a technologie

Komentáře • 52

  • @tiendatbk85
    @tiendatbk85 Před 3 lety +5

    Dear Mr. Danny, Thank you very much for your open source. I succeeded to build up ECATslave and application based on your source code and guide. Brilliant !!

    • @DannyBokma
      @DannyBokma  Před 3 lety +1

      That sounds awesome! I get lots of questions and project requests of this project, the more info available on the LAN9252 the better. If share your project on github please share the link here or mail it to me such that I can point to your project as well! Good luck with the project!

    • @tiendatbk85
      @tiendatbk85 Před 3 lety +1

      @@DannyBokma Thank you for your very nice suggestion. I now upgrade to STM32F446-LAN9252 which is connected with another Nucleo-F401 via SPI. I would love to share it with the community on GitHub as well as email it to you soon.

  • @markcjohnsen
    @markcjohnsen Před 6 lety +1

    Wow - you da the man! I watched most of your video - great job, really like it. On the linuxcnc mailing list, there was a bit of talk about ethercat and someone found your project and this video. Really neat and good work.

    • @DannyBokma
      @DannyBokma  Před 6 lety

      Awesome! Yeah I noticed EtherCAT support on linuxCNC and I really like it (not used it myself but might in the future)! Is there somewhere I could find the mailing list conversation? Or isnt it public? (I am a newb on these mailing list traditions :P) .

  • @yannickasselin1
    @yannickasselin1 Před 6 lety

    Great Work! Thanks for sharing.

  • @ajairaj9624
    @ajairaj9624 Před 3 lety

    Fantastic Danny.

  • @johnkraker6572
    @johnkraker6572 Před 6 lety

    Great job thanks man !!!

  • @CHSElectronics
    @CHSElectronics Před 6 lety

    That's a very nice looking board.

  • @sebaschtl9710
    @sebaschtl9710 Před 5 měsíci

    just greate. I want to do it.

  • @himanshudhedhu728
    @himanshudhedhu728 Před rokem +1

    How do you load a fresh firmware on LAN9252. Firmware as well as eeprom write.

  • @kipkerluke2508
    @kipkerluke2508 Před 4 lety

    Were you able to use the params (0x8000 variables), I'm assuming those get sent throught he mailbox and are dealt with that way on the slave side?

  • @theja2289
    @theja2289 Před 5 lety

    Amazing work Danny. I'm planning to use SOES on XMC4800 relax kit instead of the SSC and was wondering how to generate the ESI file. Did you use the Ethercat SDK kit from rt-labs ?

    • @DannyBokma
      @DannyBokma  Před 5 lety

      Yes I used that one! When I used it back when I was doing this project the tool wrongly assumed that I was using the ET1100 as ASIC, this resulted in the wrong config in the ASIC init hex code at the bottom of the XML file, to make sure to check this is correct for your controller.

    • @theja2289
      @theja2289 Před 5 lety

      Thanks for the info Danny, but isn't the SDK super expensive to buy. Or did you just use the slave editor only and used twincat or something for network exploration ?

  • @Coyote973
    @Coyote973 Před 6 lety

    Could this board handle some X-NUCLEO board for PMSM FOC control?

  • @TheShorterboy
    @TheShorterboy Před rokem

    Fantastic project and do you remember the build cost.
    A whine, if you could import it into Easyeda JLPCB's pcb designer as it imports Altium and share it would simplify getting one built chasing parts is always a struggle and I don't need to solder any more 0603's.

  • @SteveWindsurf
    @SteveWindsurf Před 5 lety

    Hi Danny,
    This is definitely the best little ECAT implementation I have seen, really nice, so:
    I am tempted to change the CPU to a STM32F405 for more power and larger flash and also since it is used on the pyBoard. This would allow uPython to be used to connect sensors to ECAT with a standard interface. Would be good to try faster CPU?

    • @DannyBokma
      @DannyBokma  Před 5 lety

      There are many more that developed a product, this is mainly oriented towards custom sensors or devices on the EtherCAT bus, and indeed only little is to be found on the custom HW/FW side on the internet. Yes you could upgrade to a bigger uC, but do you really need it? The efforts of changing the HW might not be worth it. But it is open source so feel free!

  • @saneemp
    @saneemp Před 6 lety

    Great example and video. Could you please share a demo on servo Motor control using the ethercat .

    • @DannyBokma
      @DannyBokma  Před 6 lety

      I currently do now have any project with EtherCAT and a servo. I can just say that it is relatively easy to implement.

    • @saneemp
      @saneemp Před 6 lety

      Thank you, I was looking for Slave code for servo protocol. something like sercos. do you have any examples of this.

  • @kubiozdemir6140
    @kubiozdemir6140 Před 2 lety

    Can two microcontroller card which have ethernet ( for example LAUNCHXL2-570LC43) communicate with each other, but without ethercat slave controller

  • @UdayKumar-zh5we
    @UdayKumar-zh5we Před 2 měsíci

    Hi Danny..!
    I recently worked with lan9252 with stm32 using c but for some upgradation i am planning to use toradex boards for that we need python like some other functionalitoes also need to be implement for that so from past week i am trying to convert that code into python using spidev that lan9252 is not correctly responding can you please guide me on that
    Thanks in advance

  • @SteveWindsurf
    @SteveWindsurf Před 5 lety

    Great job, I really like the design!
    Have you or anyone done much with micropython on the STM32 CPU? (Just to add icing on cake).

    • @DannyBokma
      @DannyBokma  Před 5 lety

      Thanks! I am afraid not ( not me at least ). Currently what's on GitHub is the most recent. Most of my efforts currently go into BMS developments. Maybe ethercat again when there is a paying customer for that :p.

  • @hongsikyim5704
    @hongsikyim5704 Před 4 lety +1

    Hi, I would like to ask how to set up PC(EtherCAT master). I downloaded TwinCAT3, but It doesn't works(It can not scan the device when I connect the CAT5 cable to PC). I think the problem is a lan card. Could you share how to set up your PC

    • @DannyBokma
      @DannyBokma  Před 4 lety

      First setup can be a bit annoying but it is doable, if you recreate the tree as in the video you should get it working. I am however no expert.

    • @hongsikyim5704
      @hongsikyim5704 Před 4 lety

      @@DannyBokma Thank you for answer:)

  • @lhxperimental
    @lhxperimental Před 5 lety

    I am having a difficult time finding info on EtherCAT. Did you have to become member of EtherCAT Technology Group to gain access to the documents and the software? What are you using on the PC? A standard Ehternet NIC or something special? Also, the software we see on the screen, is it written you or is that some template EtherCAT Group / Microchip provides as part of SDK?

    • @lhxperimental
      @lhxperimental Před 5 lety

      This article linked below makes me think that Membership to ETG is required to develop on EtherCAT. Also, I know that a XML file is generated for EtherCAT devices that tells the other EtherCAT devices what kind of services a your EtherCAT slave provides. Are you generating that file? How?
      www.digikey.in/en/articles/techzone/2015/aug/mcus-and-ethercat-gear-up-for-the-industrial-internet-of-things
      "The first step in developing an application is to integrate Microchip’s LAN9252 software development kit (SDK) with an EtherCAT Slave Stack Code (SSC): Both are required to develop application code on Microchip’s EVB-LAN9252-HBI evaluation board.
      The SDK can be downloaded from Microchip’s website. The preferred SSC was developed by Beckhoff Automation - the company that originated the EtherCAT specification. Design houses must be a member of the EtherCAT Technology Group (ETG) to gain access to the Beckhoff SSC. Once the SSC is integrated with the SDK, application code can be developed with the SDK to design the EtherCAT ESC."

    • @lhxperimental
      @lhxperimental Před 5 lety

      Can the same device be the Master too? From what I understand, LAN9252 has 3 PHYs. 2 for slave and 1 for Master (I suppose). So if we add a third connector on your shield, it can also be used as a Master? Right?

    • @DannyBokma
      @DannyBokma  Před 5 lety

      Hi no the LAN9252 can not be a master, very few embedded devices can become a master actually. I is very much preferred to become a ETG member indeed for development (but it is free), you can acces loads of documentation. For the slave implementation I adapted the SOES code to work with the LAN9252. For the rest of the questions you asked you should do some more reading on EtherCAT since they are a bit to broad for me to answer..... Good luck!

    • @lhxperimental
      @lhxperimental Před 5 lety +1

      Thanks. I have many more questions but I guess, I will do some reading first. Can you recommend some source to read from?

  • @kipkerluke2508
    @kipkerluke2508 Před 4 lety

    Hello, I am trying to integrate the LAN9252 into my project and I am wondering how you flashed the eeprom with your slave configuration?

    • @DannyBokma
      @DannyBokma  Před 4 lety +1

      You can load the EEPROM from twincat, scan for slaves then go to your slave settings EEPROM section and flash it with the description file.

    • @kipkerluke2508
      @kipkerluke2508 Před 4 lety

      Rechecked twincat, cause it didn't work initially. Forgot to install the real time ethernet stuff
      Thanks for the reply, your project is awesome and and I appreciate you posting all this information. it is the reason I decided to try implementing ethercat in my capstone project, although it's been a struggle haha.

    • @himanshudhedhu728
      @himanshudhedhu728 Před rokem

      @@kipkerluke2508 only loading eeprom is enough of we need to load some firmware also, If I am buying fresh LAN9252.

  • @DUIofPhysics
    @DUIofPhysics Před 4 lety

    Would you consider making and selling them?
    Could be nice to put on Etsy or something.

    • @DannyBokma
      @DannyBokma  Před 4 lety +1

      Building and selling them is a bit to much work I am afraid...... Currently I am more focused on battery safety and management, that can still make some fun steps forward. The main goal of the project / video is showcasing my work and help others jump start with an example ^^.

  • @fahadsiddiqui2970
    @fahadsiddiqui2970 Před 6 lety

    What can i do to read all the slave data on a microcontroller instead of twinCAT? Do i need this board? Can this board act as master?

    • @DannyBokma
      @DannyBokma  Před 6 lety

      No this board is only meant to be a slave. You should do some more reading on the topic, you need a powerful processor to handle the master task, if you want an alternative for TwinCat you could look at SOEM (simple open ethercat master) or EtherLAB.

    • @fahadsiddiqui2970
      @fahadsiddiqui2970 Před 6 lety

      Yeah upon reading various documents and papers i got a bit clearer picture now. I have STMF769 discovery board, which is able to send ethernet frame. I'm trying to port SOEM to it. I think that would work. I contacted the SOEM community and look out the code for SOEM. There are some ports available for InTIME, Linux, Win and VxWorks. I'm trying to use FreeRTOS as OS layer and the STM provided lwIP layer2 driver as the OShw layer. What do you think, is it a good idea or to switch to linux is better?

    • @DannyBokma
      @DannyBokma  Před 6 lety

      That sounds interesting and would love to see your work once you have it ready and working! Do you need the small footprint or require a low power application? If not I think that I would go for the lazy approach and build it on an affordable SBC eg NanoPi or Solid-run.

    • @fahadsiddiqui2970
      @fahadsiddiqui2970 Před 6 lety

      I need small footprint. Hardware design is not a problem once this whole software part start working. Could you mail me at faahadms@gmail.com. i would like to be in contact with you and may need some of your suggestion. Its always nice to have an experienced one.

    • @kelvinvincent9880
      @kelvinvincent9880 Před 6 lety

      Hi Danny, do you sell this board (DieBieSlave) ? If yes, how to order it? Thanks!

  • @michaelbrown4396
    @michaelbrown4396 Před 2 lety

    note for future videos you dance around the point of the video with seemingly random bits of information this had me screaming at the video GET ON WITH IT but other than that well done man