# slide pot from hall effect switches

Discussion in 'The Projects Forum' started by dlatch, Sep 9, 2016.

1. ### dlatch Thread Starter Member

May 15, 2016
78
0
I am trying to create a potientiameter (like a slide pot) from a string of hall effect switches (open collector outputs). I have it fabricated as a series of resistors tapped into by the open collectors. So the ground point moves along the string of resistors. The equivelent circuit is a linear pot BUT the wiper is ground. You can reference either end of the string but thats it.

Using it as the bottom of a voltage divider does not yeild a linear result.

What sort of circuit (op amp or otherwise) will allow it to source linear voltage like a pot?

Donald
new to hobby electronics

2. ### Alec_t AAC Fanatic!

Sep 17, 2013
8,853
2,076
If each collector switched on a respective constant-current source then the sum of the currents, if all currents were equal and passed through a common resistor, would give a voltage across that resistor linear with respect to the number of currents.

Last edited: Sep 10, 2016
3. ### AlbertHall AAC Fanatic!

Jun 4, 2014
6,679
1,575
In what way is it non-linear? How does the resistance vary against how you expect it to vary?

4. ### Alec_t AAC Fanatic!

Sep 17, 2013
8,853
2,076
What is supposed to happen if two or more Hall switches are 'on' at the same time?

5. ### AlbertHall AAC Fanatic!

Jun 4, 2014
6,679
1,575
Or if they are all off in between hall devices?

6. ### Alec_t AAC Fanatic!

Sep 17, 2013
8,853
2,076
Here's one option to get linear steps (only 0-3 shown) :-

7. ### AlbertHall AAC Fanatic!

Jun 4, 2014
6,679
1,575
But that fails if none or more than one is active at any time. This will work as long as least one switch is closed (or none at the minimum end).

Nov 23, 2015
2,306
284

9. ### Alec_t AAC Fanatic!

Sep 17, 2013
8,853
2,076
Agreed. I included V0 and Q0 so that a bit of logic gating could be used to activate Q0 when none of Q1-Q3 is activated. However, the OP hasn't yet told us if more than one Hall sensor collector pulls low at any one time.
Where are you taking the output from in your circuit, Albert? Isn't this the circuit the OP has already tried and found non-linear?

Last edited: Sep 10, 2016
10. ### AlbertHall AAC Fanatic!

Jun 4, 2014
6,679
1,575
It is possibly the circuit he tried. The only way it would be non-linear is if the resistor values used are low compared to the on resistance of the switches. That's why I asked about the form of the non-linearity.

File size:
5.9 KB
Views:
6
11. ### hp1729 Well-Known Member

Nov 23, 2015
2,306
284

It sounds like it would be real noisy. As the magnet moves from one sensor to the next does the output drop back to zero? Or are more than one sensor activated at a time?
I suggest an analog hall effect device instead of hall effect switches. How much travel do you need?

Last edited: Sep 11, 2016
12. ### OBW0549 Distinguished Member

Mar 2, 2015
2,599
2,234
What do you intend to do with this simulated potentiometer? How are you going to use it? If we knew more about how you are going to be using this device, we could probably do a better job of giving you constructive suggestions.

13. ### dlatch Thread Starter Member

May 15, 2016
78
0
Thanks everyone. I will look close at each response and post again soon.

Constant current source: I have been trying to understand how to use that. more on that later.

There is always at least one switch on, generally two in sequence as you move the wiper. I doesn't have to be perfectly linear. I will post a picture and schematic as soon as I figure how to post images. (bear with me)

How is it not linear? As the bottom of a voltage divider with all the same resistors in the series, you achieve about 90% of the supplied voltage in half the travel. Then each step gets smaller. This is where I have been trying to apply a CCS. but the voltage from the CCS is still the first thing the OP amp sees so, (It feeds an op amp) the first step is whatever Voltage the CCS has behind it (yeah...like how to understand voltage in a CCS?) new to hobby electronics)

What is it? The thing will be a linear....gasp...high side motor controller. I have an inverted voltage follower that controls the power PFETs nicely. Works perfect fed by a pot. I just really want to control it with a hall effect no wear wiper pot.

Linear hall chips. Yes I suppose that would be a better start. The wiper need about 3/4 of travel I'm sure it could be done. just not by me. Plus I guess there are industrial no touch pots but they are not something for the hobby market.

Text is horrible...I'll get images up pretty soon.

14. ### AlbertHall AAC Fanatic!

Jun 4, 2014
6,679
1,575
The resistance should be linear and if it is, and you use it as the bottom of a voltage divider, then the output voltage will not be linear.
You can either choose resistors in the ladder to linearise the output (resistor values would increase as you move down the ladder) or replace the resistor at the top of the didvider with a constant current source.
Something like this would do the job:

15. ### dlatch Thread Starter Member

May 15, 2016
78
0
Good stuff...gentleman? I appreciate your patience as well as your knowledge. Image attached using the CCS AlbertHall suggested.

I put aside the Hall wiper for the moment and tried it with a VR to ground. It works. However, the CCS voltage is 5. It varies nicely from 0-5. I need the whole 12. (just gain the op amp?)

File size:
190.6 KB
Views:
16
16. ### AlbertHall AAC Fanatic!

Jun 4, 2014
6,679
1,575
First you have a divide by two at the input to the op-amp. You can double the output just by removing the 22k resistor to ground.
Second you can't get 12V from the ccs if the supply is only 12V - depending where you set the pot controlling that current the ccs will drop some voltage. If it set to 1mA as your picture shows you will lose 2.2V across the 2.2K emitter resistor.

The op-amp appears on your picture to have no feedback paths. That's not correct is it? As you surmised you can increase the effective voltage by using the op-amp to provide some gain.

17. ### dlatch Thread Starter Member

May 15, 2016
78
0
Everything I read on CCS never mentions the Voltage. Is it possible to "limit" current to 1mA from 12 Volts without a significant drop? I understand regulation requires some wiggle room.

(I was targeting 1mA for .47 volt steps with 470 ohms but the resistors are easily changed even ramped if get to that point...not wedded to 1mA)

But who cares if we can gain the op amp. Can we? Is this follower a bit unusual? attached below.

File size:
201.2 KB
Views:
7
18. ### AlbertHall AAC Fanatic!

Jun 4, 2014
6,679
1,575
No. The only thing that drops no voltage is a short-circuit.

Having the 22k to ground from the non-inverting input (inverting input as drawn) to ground loads the resistive divider and will introduce some non-linearity - some of that 1mA will flow through that resistor. Remove it. That should double your output.

Then to change the range of output voltages change the value of the 22k resistor between the MOSFET drain and the non-inverting input of the op-amp.

19. ### dlatch Thread Starter Member

May 15, 2016
78
0
The inputs are drawn correctly. The only other place I have seen a follower with that layout was on some forum and the deep discussion was about why it oscillates. It is an unusual layout. There is very little info available about using fets in linear region. And Pfets seem to be looked upon as only a last resort. The circuit comes to me from an engineer with an audio background.

I was afraid adding gain would be problematic because of the positive feedback layout even though it works very well as shown.

I know how to add gain. I will experiment. If it remains stable with some gain I will get back to making the Hall setup work. I will post a complete diagram of it so you guys can get specific.

Regarding the CCS: what is a reasonable minimum voltage drop to shoot for given a target of 1mA and 12 vcc?. The implementation above (post #15) drops a lot more than 2.2)

20. ### AlbertHall AAC Fanatic!

Jun 4, 2014
6,679
1,575
Sorry about that. That was before I realised that it was a PFET and therefore inverting.

Because it uses a PFET the feedback is negative, so this should be stable at low frequencies. You may need a capacitor across the feedback resistor to roll off the higher frequencies.