Is this possible with an FPGA?Started by 3 years ago●8 replies●latest reply 1 month ago●92 views
I am starting to learn Verilog in order to program FPGAs. I have a project where I need to take three digital signals coming from three hall sensors on a linear motor (These hall sensors are placed on the motor such that each hall sensor puts out a wave 60 degrees out of phase from one another) and convert them into a signal that mimics an incremental encoder (A, B, and Z signals). My goal is to feed said A, B, and Z signal into a variable frequency drive for high-precision positioning.
Do you think that this is possible? If so, how would you go about it? I am still learning how to code with Verilog. This seems like a fairly complicated task for a beginner, so if anyone is willing to help that would be greatly appreciated!
Hall sensors have various applications. Seems you are looking for an encoder type converter for discrete wave outputs. The following note could help. http://www.ti.com/lit/an/sboa200/sboa200.pdf
Thank you for your reply. I am indeed looking for a converter to take three hall sensor inputs to a single encoder-type outputs. I will take a look at the note that you attached...
You have to know the hall sensor characteristics. If the output is analogue which is most likely, you have to deal with a digital number along with phase relationship. The issue is of verilog or FPGA. The variables, their behavior and what is desired to be done with it - the physical problem and your solution is the focus. Verilog and FPGA is my 10% of the whole effort. Could you share the hall sensor details? I can take a quick look.
I'm not an expert with verilog either, but as a first step I would try to implement it traditional logic gates and registers first, and then turn that
design into verilog code. There are (expensive) simulation tools out there to
help with this. Hopefully there will be more knowledgeable followups!
Everything is possible :)
First figure out how it's going to work in maths, equations or just write a high-level description. Think about how you can go from your very low resolution angle input and create a high resolution angle output. You have to make some compromises - maybe assume the motor is going to rotate at an approximately constant angular rate. Once you have seen the first 2 hall effect edges, you know how fast it is going, and you can interpolate the angle until you get to the next hall edge. Tracking changes in speed could be done instantly, or you could filter or track it. If you want to extend to an accelerating or bidirectional motor, you may have to accept you'll be badly wrong until a new hall transition happens.
Once you have an understanding of whhat your limits are, then write a model for that description in a high-level language. Persuade yourself it's going to work with a variety of motor situtations: slow, fast, stopped, maybe jittering around one of the hall transition points...
Once this works you have a good set of input and output data you can work with and build something in gates to match.
Oops, I just noticed you said linear motor... but talk about degrees out of phase. Not sure how those two things interact, but the general gist of what I wrote still applies... First understand, then model, finally implement.
Although most has been alread said to that, one add of mine:
Hall Sensors and others require noise processing and leveling in order to be easily processed with a digital interpretation like here the A,B - Encoding. This can be done the analog way in order to process it with a controller.
To do this the digital way requires some signal processing math which has to be adapted to the particular problem. Then there is also the chance to overcome the analog approach.
Regarding your problem, some calibration will have to be applied to adjust the variable sensor positions in production (BTDT) and also suppression of EMI on the cables must be performed too to obtain good signals to be fed into the module which will drive the motor. Here again some positioning feedback and calibration will be done too. (BTDT too).
Not sure if an FPGA is really required for that.
In case an FPGA is choosen - not sure if that is an appropriate project to learn to deal with them.