Forums

Is this possible with an FPGA?

Started by Joe3502 12 months ago8 replieslatest reply 11 months ago57 views

Hi All, 

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!


Best Regards, 

Joe M 

[ - ]
Reply by rajkeerthy18March 19, 2020

Joe,

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

[ - ]
Reply by Joe3502March 19, 2020

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...

[ - ]
Reply by Joe3502March 19, 2020

Post deleted by author

[ - ]
Reply by Joe3502March 19, 2020
Here is the question that I have. The A and B signals are already covered in that file that you attached, but the Z signal (time signal) is not discussed. I am looking to use all three hall sensor values in order to get one output that mimics an encoder with that timing signal. Do you think you could assist me with this?
[ - ]
Reply by rajkeerthy18March 20, 2020

Joe,

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.

[ - ]
Reply by cbradleyMarch 19, 2020

Hi Joe,


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!


Chris

[ - ]
Reply by martinthompsonMarch 19, 2020

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.

Fun project!



[ - ]
Reply by martinthompsonMarch 19, 2020

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.