Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

hall-effect sensor scaling and offsetting, and interfacing to current sink.

Status
Not open for further replies.

eyAyXGhF

Member
Hey all,

I'm using a ratiometric hall-effect sensor to measure the motion of a lever, but I need to scale and offset the output as well as do a few other things. I've tried for several days now, but it's definitely way beyond me. It's a bit complicated, so I'll explain below.

I have a lever with a magnet attached, and as the lever is pushed down, the magnet approaches a hall-effect sensor. Currently with the hall-effect sensor powered by 8V, it's output is approx 4.2V resting, and 1.2V with the lever fully-pushed in.

The output I want for the motion of travel is 0 to +5V. I also want to have a small dead-zone at the start of the motion, that I can trim to ensure that the output is never above 0V while the lever is in it's resting position.

The second part of this problem is that I also want this 0 to +5V sensor output to interface with the amp bias input pin of an LM13700 OTA. I'm using a +/- 15V power supply and I've measured this bias input pin to be at -14.2V. When the lever is resting (output 0V), this bias input pin shouldn't be sinking any current (in fact, it can be sourcing some current). But as the lever is depressed fully (and the offset and scaled sensor voltage is outputting +5V), this bias input pin should be sinking approximately .8mA - 1mA.

I hope this all makes sense. If anything needs clarification, I can try to explain better.


Like I said above, I currently have the hall-effect sensor running off +8V (just a voltage divider off the +15 supply), and the magnet oriented to reduce the sensor's output voltage as the magnet approaches as the lever is pushed down. But, if changing any of this around can make things easier, it can all change; hall-effect sensor power supply, magnet orientation, etc. If it helps, the hall-effect sensor has a maximum supply voltage of 10V.


Attached is my attempt...

It might need explaining, since I'm a bit of a hack :)

- The hall-effect sensor's output is just simplified as a switch between it's min and max output @ 8V supply.
- the first op-amp scales, inverts and offsets the hall-effect sensor's output.
- the diode and resistor to ground stops the negative output from the opamp reaching the second stage, allowing the first little bit of negative voltage to essentially be a "dead zone" in the lever's travel that I can trim.
- (the 100k resistor to nowhere is the 0-5V output)
- the second op-amp is just a buffer
- the third op-amp is a non-inverting summer, with the voltage divider at the bottom providing an offset so that the output voltage of this stage is slightly below -14.2V when the previous stage is at 0V.
- the 6.8k is a current limiting resistor going into the -14.2V to represent the bias input pin of the OTA.

whew, okay.. hope that all makes sense. I'm guessing there are easier, more logical ways to do this.

- Mike
 

Attachments

  • Screenshot-1.png
    Screenshot-1.png
    8 KB · Views: 171
Welcome to the forum.

What you are doing with the LM13700 seems to be very odd. Also, I don't know what your other op-amps are but they may well not be able to drive voltages as close to the negative rail as you are going.

The overall scheme seems OK. The diode may cause problems as its voltage drop will change depending on current and temperature. You won't get a sharp limit at 0 V. The upper resistor connected to the output of the second op-amp doesn't seem to do anything.

Can you tell us what voltages you are getting at each point in the circuit, for each of the lever positions?
 
How I might do the 0-5 part of your sensor interfacing.

I'd create a window comparitor for say -1.1 V and 1.2 V and make the output zero between =1.2 and -1.1. In this case, the -1.1 is the deadband.

Then I would add a -1.1V offset or whatever it is.

Now you have a 3 to 0 signal.

Invert

Now have a -3 to 0 signal.

Add 3 to both sides.

Now have a 0 to 3 V signal.

Multiply so you get a 0-5 V signal.

Maybe some steps could be eliminated.
 
Diver300> When you say what I'm doing with the LM13700 is odd, what do you mean? I'm wondering if there's better ways to get the LM13700 to sink current than to connect it directly to an op-amp?

I didn't think about the voltage drop at the diode changing with temperature, in fact I never even knew diodes changed according to temperature. Maybe I'll try something else with an op-amp based precision-rectifier in place?


KeepItSimpleStupid> Thanks, I'll give your suggestions a try.
 
KeepItSimpleStupid> Oh yeah, I forgot to say that using a window-comparitor won't make any sense for this application. I do not want a digital output, I want a 0-5V ratiometric output based on the lever's position.
 
The window comparitor just would be used to create your deadband, nothing else.

It also means that you don't get any discontinuities.

Example (not yours)

From 0-10 mV, the output is zero
and from 10 mV to 5.10 V and it's linear.

Then if you subtract 10 mV, you have a linear 0-5 V signal with a little hysteresis (o exists for some amount of motion) and then it starts being linear.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top