Building servo drivers and more into mesa cards
- TheWylieStCoyote
- Topic Author
- Offline
- Junior Member
- Posts: 27
- Thank you received: 0
This is my first post on the LinuxCNC form, so please go easy. I am a Electrical engineering student so i am not a total noob to electronics. I have been working with embedded systems for the passed 5 years or so, same for programming, and I have some experience with FPGA and other programmable logic.
Is it possible, reasonable, useful, or piratical to build things like DC or AC servo drivers or other into the FPGA. There is more then enough room, there is 1.5 million gates on the 5I22 card so there is not shortage of space. On the 5I22 card page they talk "4 or 8 channel micro-controller based servo motor controller (DSP built into FPGA)". Does this work with a servo drive or is this interface with a half-bridge for each phase of the motor? If the later Then would it a possibly to build a VFD for the main motor of lets a mill or a lathe? I am referring to the digital control circuity for a servo drive or VFD, and not the power circuity or analog signal side of things.
Thanks!
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
- Posts: 23559
- Thank you received: 4858
Does this work with a servo drive or is this interface with a half-bridge for each phase of the motor? If the later Then would it a possibly to build a VFD for the main motor of lets a mill or a lathe
It is nearly possible. I have even tried it.
The three-phase PWM module in some bitfiles creates the 6 required signals to drive an 3-phase H bridge.
You can then use the "bldc" HAL component without any feedback to calculate the phase amplitudes.
You will have noticed that not all of this is in the FPGA.
The problem is that such a system is voltage-mode not current-mode, as there is no curent feedback into HAL.
When I tried it, the IRAMS module I was using went "poof" but I don't think that this necessarily means that a more competent electronics chap couldn't make it work.
Please Log in or Create an account to join the conversation.
- TheWylieStCoyote
- Topic Author
- Offline
- Junior Member
- Posts: 27
- Thank you received: 0
It is more then possible to do things like PID on only the FPGA ( this or using a 32bit micro-controller is probably how the big guys do this, this would just integrate all into one FPGA controller). How would interface a construct in the FPGA with the CPU software side of things? opencores.org/project,pid_controller,overview is a good example of building PID into a FPGA. To look at walk I am talking about from a block diagram perspective would look like the PID object taking input from an encoder and the CPU or some other object in the FPGA, with the output being fed into a object to handle what phase does what and current limiting and so on, then this would output 2n PWM outputs for n phases.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
- Posts: 23559
- Thank you received: 4858
It is more then possible to do things like PID on only the FPGA ( this or using a 32bit micro-controller is probably how the big guys do this, this would just integrate all into one FPGA controller).
Indeed, and have a feeling that some of the Mesa firmwares (Soft DMC) do this.
You can download the Mesa firmware VHDL from Mesa, and you can also download the Xilynx webpack, and create your own firmwares if you want.
(I have made small changes to the Hostmot2 firmwares to get specific combinations of functions)
Please Log in or Create an account to join the conversation.
- TheWylieStCoyote
- Topic Author
- Offline
- Junior Member
- Posts: 27
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
- Posts: 23559
- Thank you received: 4858
git.linuxcnc.org/gitweb?p=hostmot2-firmw...3eb762883cfdd49951e5Maybe this is documented some but I have not managed to find
Look at the README file.
Please Log in or Create an account to join the conversation.
- TheWylieStCoyote
- Topic Author
- Offline
- Junior Member
- Posts: 27
- Thank you received: 0
I will have to spend some time reading over this.
I see there is a 3 phase PWM object, git.linuxcnc.org/gitweb?p=hostmot2-firmw...3eb762883cfdd49951e5 . I guess all that's needed is to link this to a gray code converter, a PID object, and some way of taking input from the software side of things for the digital side of things.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
- Posts: 23559
- Thank you received: 4858
I guess all that's needed is to link this to a gray code converter, a PID object, and some way of taking input from the software side of things for the digital side of things.
if you are talking about Hall sensors, then there is C-code for that here:
git.linuxcnc.org/gitweb?p=linuxcnc.git;a...f78ae2aefb43;hb=HEAD
Though that covers the general case of all possible Hall-sensor outputs, which you might not need.
Please Log in or Create an account to join the conversation.
- TheWylieStCoyote
- Topic Author
- Offline
- Junior Member
- Posts: 27
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- TheWylieStCoyote
- Topic Author
- Offline
- Junior Member
- Posts: 27
- Thank you received: 0
Please Log in or Create an account to join the conversation.