Reading hall values

Thread Starter

electronicsLearner77

Joined May 26, 2012
127
I am trying to drive BLDC motor by hall values. I am facing the following issue i am not able to detect the exact transition of hall values. How should i proceed? The hall values are analog values given to adc. I am finding a delay between 20 to 70 micro seconds to detect transition. I am using pic controller and operating at 20 mhz.
 

MrChips

Joined Oct 2, 2009
30,810
Hall Effect (HE) sensors detect the presence of a magnetic field and is used to determine the rotational position of the shaft of a motor. Motor controller circuitry are only interested in the transitional information detected by the HE sensor. Digitizing the analog voltage using an ADC is not the correct approach. As you have discovered the ADC conversion process and subsequent processing of the data takes time and not suited for your application.

What you need is an analog comparator that detects rising and falling transitions of the HE signal and then apply this to an interrupt input pin of the MCU.
 

dendad

Joined Feb 20, 2016
4,476
Can you use switching Hall sensors in place of the analog ones? The BLDCs I have used all have open collector digital outputs, not linear.
And my BLDC driver board has pullups for the outputs.
The controller is a dsPIC30F4011 and it includes the hardware needed to run a BLDC. See their app notes.
 

Thread Starter

electronicsLearner77

Joined May 26, 2012
127
Thank you both for the replies. Yes i will look into the application notes. But one clarification is suppose if i have 3 analog Sensors and using comparator use only either high or low. Should i give them separately to 3 external interrupts or somehow combine them and give to single interrupt? If i give them separately in which interrupt should I do the processing?
 

dendad

Joined Feb 20, 2016
4,476
Have you looked at ...
http://ww1.microchip.com/downloads/en/AppNotes/BLDC MC 00957a.pdf

These have hardware to help.
Page 5 says...
"The three Hall effect sensor inputs are connected to input pins that have Change Notification circuits associated with them. These inputs are enabled along with their interrupt. If a change occurs on any of these three pins, an interrupt is generated."

Therefor you need to generate an interrupt on every change of state on any pin.
What PIC are you trying to use?
The dsPIC30F4011 20E P is a DIP part, making it easy to prototype.
Here is a picture of a proto made with a DIP part...
ProtoHiPowerBLDC.JPG
and a production version...
ProductionBLDC.JPG

Using a PIC (or other controller) with built in hardware helps a great deal.
 

Thread Starter

electronicsLearner77

Joined May 26, 2012
127
Will the analog comparator not face the problem in cross over of two hall signals because of noise or voltage fluctuations in that region.
@dendad
Can you please suggest me the part number of hall effect sensor. Please advise.
Thanks
 
Top