Analog Hall(x3) Encoder

Dear all,

So I have been forced to reorder PCB´s, but this gave me another shot at the analog hall encoder configuration. For those who know nothing about what i’m babbling about, se my other thread about the Dimmer. It is basically 3x analog hall sensors connected directly to the MCU. A typical magnetic encoder also consist of hall elements, just in a small IC package. Right. I have been messing around with some different constellations and think I have found a way of doing this.

Here is a graphical explanation. The hall sensors is spaced apart with 30 degrees in a circle centered on the shaft. 6 magnets will be mounted on the shaft so that the controller will be able to know the exact position of the shaft. As you can see, there is a blank spot. The 7th magnet will be “floating” in order to not have the same analog values twice (within 360 degrees). The magnets will be 3mm diameter and will have a gab of about 5mm from edge to edge. Having 3 hall elements will not increase the resolution as such, but will make it possible (within this constellation), to know where we are at. The sensors will go from neutral to the extend of the ADC. If a positive magnet pole is influencing the individual sensor, the reading will go towards max and opposite for negative poles. If not oversampling, the resolution (12bit ADC) should be something like (3.5 pole pairs x 4096) 14.336 tics per revolution. Way more then needed for driving a stepper. Lets say our robot (openPNP machine) is moving 100mm per revolution, this will theoretically give a resolution of 100mm / 14.336 = 0,007mm. So the limiting factor will be how small increments we can actually move the machine-axis. Recently it was brought forth in the OpenPnP community, that we should be able to move in x16 microstepping increment’s, that’s “only” 200 x 16 = 3200 per revolution. Still 100mm / 3200steps = 0,031mm precision. A 0201 component is 0.3mm wide and 0.6mm long. Oversampling to 14bit will increase the resolution of the encoder, but will not be as fast.

The green dots is the hall elements. The distance from the magnets to the sensors, should be such that the magnetic flux will saturate the sensor when it is directly on the angle of the sensor, with some room for evershoot. The MCU I am working on (SAME51) can make 1 million analog samples per second. The current sensors are also analog, so 6 analog sensor of which the MCU can make 167 samples per millisecond each.


Center circle is 5mm shaft. Secund center circle is 8mm shaft.

When the system will home, there should be some sort of tuning process, where the MCU will go through the values and map them to fit the commutation (driving steppers like 2 phase BLDC´s).

Having 50 pole pairs in the stepper requires a lot of switching, so low Rds(on) on the bridges combined with fast current sensing is the way to go. The upside to openPnP machines, is the fact, that there is not much mechanical resistance. Its not like a CNC machine where you have to push into a material with a rotating bit.

The sensors has a 20 kHz bandwidth which translates to 0.05ms intervals (change in magnetic flux measurements).

Can anyone help me convert this to approximate rev./sek?

According to this, the encoder need´s to make 4000 counts per revolution for it to be able to drive 2 phase BLDC mode. Le´t say the target speed is 5 rev. per second, which will require 20.000 counts per second / 1000 (milliseconds) = 20 * 0.05 = 1. Correct me if im wrong… Maybe it can be done smarter. 5 rev. per second is actually not bad for a stepper. Since the ADC is somewhat faster, one could oversample to 14bit, thereby increasing resolution and use a larger pulley. Maybe 200mm per rev. which will yield 1000mm sek.

Hmm… Here it says 10us from change in magnetic flux to change in output:

Hall sensor elec.