Custom interface board questions

More
16 Apr 2025 07:55 - 16 Apr 2025 08:41 #326432 by ajar171
Custom interface board questions was created by ajar171
Hi everyone!

Long time lurker here :)

Being fed up with the random avaiability of Mesa hardware in the EU, I decided to start designing an open source interface board. The schematics and PCB designs are almost finished, the firmware works so far, that I have communication between a development board and LinuxCNC and can control digital and analog inputs and outputs, read encoder inputs, etc.. So far so good...

Now to my questions:
- encoder scaling: where is it applied with a Mesa board? In the FPGA (did not find anything in the VHDL) or the hostmot2 driver or in LinuxCNC main software?
- motor acceleration and max speed: the same question :)

Thanks in advance!



 
Last edit: 16 Apr 2025 08:41 by ajar171.

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

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
16 Apr 2025 09:02 #326434 by tommylight
Replied by tommylight on topic Custom interface board questions

Now to my questions:
- encoder scaling: where is it applied with a Mesa board? In the FPGA (did not find anything in the VHDL) or the hostmot2 driver or in LinuxCNC main software?
- motor acceleration and max speed: the same question :)

 

In LinuxCNC, in the ini file.

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

More
16 Apr 2025 09:10 #326436 by meister
Replied by meister on topic Custom interface board questions
why something new again ?

there are now enough projects, why not bundle the work?


- encoder scaling: where is it applied with a Mesa board? In the FPGA (did not find anything in the VHDL) or the hostmot2 driver or in LinuxCNC main software?

RIO calculate the offset and scaling inside the hal_component


- motor acceleration and max speed: the same question :)

and this inside LinuxCNC and the PID controller

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

More
16 Apr 2025 09:28 - 16 Apr 2025 09:35 #326439 by ajar171
Replied by ajar171 on topic Custom interface board questions
Thanks for the answers!

Why new? I use ethercat a lot at work, so I also wanted ethercat on my machines :)

Yes, a lot of hardware (stepper, servo drives, etc.) have ethercat and I also use them, but an encoder input from Beckhoff costs a fortune even on the second hand market. Also the ethercat driver in LinuxCNC works very nicely, and is in my opinion easier to configure than a Mesa card.

The I/O board is only a side project to be honest, my main goal is an open source ethercat MPG pendant with a display.
Last edit: 16 Apr 2025 09:35 by ajar171.

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

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
16 Apr 2025 09:34 #326440 by tommylight
Replied by tommylight on topic Custom interface board questions

Also the ethercat driver in LinuxCNC works very nicely, and is in my opinion easier to configure than a Mesa card.

So far you are the only one who thinks so! :)
That is from reading here, i have no EtherCAT experience, yet, so i can not deny nor confirm that.
But i can configure Mesa while sleeping...

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

More
16 Apr 2025 09:43 - 16 Apr 2025 09:46 #326441 by ajar171
Replied by ajar171 on topic Custom interface board questions
With EtherCAT, after You made your XML file, there is no real difference between Mesa or EtherCAT to be honest.
I got a Beckhoff coupler with 10 natively supported modules running in LinuxCNC in about 5 Minutes. For my custom board it was about 10 Minutes.
The only real additional work is making the XML file.

I also like the Mesa boards, but the boards I need are never on stock, when I need them (of course alway on stock, when I don't want to buy one).

I think the huge advantage of EtherCAT are the cheap (chinese) AC-servo and stepper drives and the really simple wiring. Advanced diagnostics are also simple with the TwinCAT software, but that sadly requires a Windows PC and a supported NIC.

The main reason designing a pendant is, that I have seen a nice one with a display for Mach3, and I really got envios :D
Last edit: 16 Apr 2025 09:46 by ajar171.

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

More
16 Apr 2025 09:47 #326442 by unknown
Replied by unknown on topic Custom interface board questions
hostmot2 is open source.

I've put to together a couple of open source boards that work with a dev board, so far I've only had some interest from some guy on github.

There's nothing special on the FPGA side that is different from a Spartan6 dev board, SPI & EPP are easy to do. Ethernet is a little bit more difficult, but it is doable, I'm just having issues with using Mesaflash writing bitfiles.

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

More
16 Apr 2025 09:48 #326443 by meister
Replied by meister on topic Custom interface board questions
Ok, sorry, did not know that it is about ethercat.
building new boards for this is of course a good thing, i thought there would be another ESP32/Arduino board or something.

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

More
16 Apr 2025 10:20 - 16 Apr 2025 10:22 #326445 by ajar171
Replied by ajar171 on topic Custom interface board questions
If I understand the source of the hostmot2 driver correctly, it is limiting the acceleration and also the driver does the encoder scaling.

This will make the firmware a bit more complicated, but I really want to use the original EtherCAT source already in LinuxCNC, and not develop a driver. This HW should be plug-and-play :)
Last edit: 16 Apr 2025 10:22 by ajar171.

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

More
19 Apr 2025 20:38 #326733 by rodw
Replied by rodw on topic Custom interface board questions
You won't need to develop a driver, you just need to write an xml file.
the wiring is substantially reduced using Ethercat drives over mesa.
Do you really need an encoder? The only purpose I can see is rigid tapping but thread milling is more efficient and it does not require it.

Everything about Ethercat is more expensive but it is the emerging standard. It does add a bit of complexity to the config. The bit that is not really worked out is the internal drive homing but using Linuxcnc homing is just as simple as mesa. I've had good luck finding reasonably priced Beckhof modules on ebay (including encoders) but some are outrageously priced, more expensive than new modules.

Ethercat with rs485 controlled VFD is the simplest way to run your spindle but there is now a linuxcnc driver for Omron mx2 VFD's .

 

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

Time to create page: 0.070 seconds
Powered by Kunena Forum