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.