Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Interfacing hall-effect sensor to embedded CPU

Status
Not open for further replies.

stube40

Member level 3
Joined
Feb 10, 2010
Messages
55
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,288
Location
Queensland, Australia
Activity points
1,825
I'm trying to interface an Allegro A1160 half-effect sensor to a TI MSP430 CPU.

The A1160 is a 5V device whilst the MSP430 operates from a 1.8V to 3.6V supply. The MSP430 has onboard ADC, but the analog input pins have an absolute max rating of VCC + 0.3V.

I have both 3.3V and 5V regulators on my PCB design and I'm assuming that I'll need some opamps or something to interface between the MSP430 CPU and the A1160 sensor.

I'm still fairly new to electronics design and I'm looking for advice as to a good way to interface these two devices.
 

Is your A1160 a sensor or a switch? It doesn't turn up in a google search.

A hall effect sensor may only put out microvolts. An op amp or two can amplify the signal several hundred times.

You'll have to test your sensor's behavior. Place it physically close to the magnetic field. Try orienting it every which way, while watching its output on an oscilloscope, to see how to make it work the way you want.

If it has a built-in amplifier then its output may be a couple volts nominal. You'll need to reduce this to a range between zero and 0.3V. Reduction by potentiometer might be sufficient then.

Helpful article about hall-effect sensors and switches:

**broken link removed**
 

Is your A1160 a sensor or a switch? It doesn't turn up in a google search.

A hall effect sensor may only put out microvolts. An op amp or two can amplify the signal several hundred times.

You'll have to test your sensor's behavior. Place it physically close to the magnetic field. Try orienting it every which way, while watching its output on an oscilloscope, to see how to make it work the way you want.

If it has a built-in amplifier then its output may be a couple volts nominal. You'll need to reduce this to a range between zero and 0.3V. Reduction by potentiometer might be sufficient then.

Helpful article about hall-effect sensors and switches:

**broken link removed**

I'm so sorry Brad - terrible typo in the first post. The part number is A1360 (I'm a total dumbass today!).

Having read your email, I went back and had a better look at the part output and it seems that I should expect a maximum of around 280mV from the output, whilst expecting normal usage to be in the 0 to 59mV range. Hence, maybe I need some amplification to make best use of the MSP430's 10-bit ADC?? Would need to "clamp" the amplifier to make sure it doesn't jump above, say, 3V in the case of spike in the magnetic field though.
 
Last edited:

The datasheet speaks of a 'user-adjustable quiescent voltage'. The sensor output ranges above and below the quiescent voltage.

This means the sensor does not put out zero V with zero magnetic field. You won't get directly proportional output.

You must determine what is your useful range of sensor output. If you are measuring the degree to which the magnetic field is positive or negative, then you set quiescent voltage about halfway between V+ and ground. Output will range above and below that point.

Or else you can choose 10% of supply V, if you intend to measure only one polarity of magnetic field. This will allow you (for instance) to set a low level as OFF and a high level as ON.

The output may or may not be inside a suitable range to be used by your ADC. This is where you'll need to tailor-make a conditioning circuit. You may find it easiest to use an op amp. You'll be lucky if you find you only need a resistor or two.

Do you need proportional output (say for current measuring)? Then you must remove the DC component, before you feed it to the ADC.

Would need to "clamp" the amplifier to make sure it doesn't jump above, say, 3V in the case of spike in the magnetic field though.

This is a prime concern, to avoid damaging the next device.

You probably know how to arrange diodes or zener diodes to clamp the signal.

You'll need to observe what comes out of the hall-effect device, and also what comes from your conditioning amplifier, re:

(1) whether signal V goes below zero.

(2) whether signal goes outside the useful range of your ADC. You must make sure whether your ADC will be damaged in this case, and if so then prevent it.

(3) whether signal exceeds supply rails to your op amp, or from your op amp to your ADC.

Spec sheets for op amps, etc., often warn you must prevent any of 1, 2, or 3 occuring, lest a device be damaged.
 
Last edited:

Thanks so much Brad. I'm still trying to get my head around the 'user-adjustable quiescent voltage' part and your email also highlighted me to the possibility that the sensor will swing both ways depending on the polarity of the magnetic field.

Since I know that the max field I will see is around 200 Gauss and that this approximates to around 280mV, my utopian scenario would be for the CPUs ADC to receive a signal that defaults to 1.5V for 0G, then goes to 3.0V for 200G and down to 0V for -200G.

My next step will be to understand the adjustable quiescent voltage part then design some amplification and/or clamping in between that ensures this. I dont have much experience with op-amps (I'm an embedded programmer after all!!), but maybe it would be a good learning experience for me to go and design something then report back at what I designed (and then hang my head in shame if the design isn't very good............).
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top