Custom EtherCAT device

More
3 years 5 months ago #272247 by RDA
Replied by RDA on topic Custom EtherCAT device
Expensive is subjective I guess. I would say also that it is expensive and not for a hobbyist.
If the price is let’s say 30$ then it’s roughly double compared to LAN9252 paired with an MCU.
Then as it’s BGA packaged you probe need to get the whole pcb bought as assembled, that’s going to increase you cost even more. So let’s say you can do the LAN9252 version for 50$ and the TI version ends up at 100$ (imaginary numbers), at that point I would call it expensive (the TI dev kit is around 300$, LAN9252 ~166$).
Looking at just the chip price doesn’t matter if you don’t consider all the other things you need to take care to be actually able to use it.

Please Log in or Create an account to join the conversation.

More
3 years 5 months ago #272249 by Tady
Replied by Tady on topic Custom EtherCAT device
Aslo I live in centeal Europe and I source all of my parts from Farnell. And they don't source them.
For now I'm sticking with the LAN chip but I think this one is not souited for motion control (I read it somewhere) but I will try to interface it with an Sanyo Denky analog driver just for fun...

Please Log in or Create an account to join the conversation.

More
3 years 5 months ago #272250 by RDA
Replied by RDA on topic Custom EtherCAT device
I dont know why the LAN9252 would not be suitable for motion control? Well the chip alone is not, but paired with a microcontroller and you can do “whatever” you want.
Unlike the TI and Axis chips, you need to pair the LAN chip with a MCU for anything else than simple IO.
The TI and Axis chips combine the ethercat gateway and MCU so they are faster but the LAN through SPI will be fast enough for any “normal” project.

Please Log in or Create an account to join the conversation.

More
3 years 5 months ago #272254 by Tady
Replied by Tady on topic Custom EtherCAT device
I'm in early stages of coding this but I did some measurements of the time it takes and I couldn't get it under 1ms.. More like 1.7ms cycle time.. I did try overclocking the SPI from 18MHz to 36MHz and there wasn't any improvement... I will try a different IC just fir the heck of it. The LAN IC dies support up to 50MHz. I'm curently using pooling mode for testing, but I did see different projects that tried using DMA but were unsuccessful ..

Please Log in or Create an account to join the conversation.

More
3 years 5 months ago #272262 by RDA
Replied by RDA on topic Custom EtherCAT device
I’m now writing this the third time as previous posts lost in bit space because of a forum error…

You should be able to get much faster (sub ms) speeds. You can see some hackaday benchmarks from here:
hackaday.io/project/181058-ethercat-serv...an9252-spi-with-soes

Maybe push the SPI speed to 50Mhz?:

microchip.my.site.com/s/article/My-SPI-a...o-do-to-improve-this

You should also check out SOES if you didn’t already know about it:
github.com/OpenEtherCATsociety/SOES

As far as I know LAN9252 does not support DMA.

Good luck with the project.
The following user(s) said Thank You: Tady

Please Log in or Create an account to join the conversation.

More
3 years 5 months ago #272263 by Tady
Replied by Tady on topic Custom EtherCAT device
Yes I saw this... I think the problem is the library.. I tried EasyCat on arduino platform and I ported the code to STM32. The first thing that I saw is that SPI_Transmit (or spi.write in arduino ) gets called each time for ever y single byte.. This has to be a bottleneck.
So my work starts here. If there will be no improvement I will use abothwr stack. But rhis one is veryyyy simple.
I can't push it to 50MHz because the current MCU that I used only supports 18MHz (manual overclocking gets it up to 36 but stability can be an issue)
Thank you for the links and the debate :)

Please Log in or Create an account to join the conversation.

Time to create page: 0.313 seconds
Powered by Kunena Forum