Potentiometer switching circuit questions

Thread Starter

syntax_x

Joined Oct 13, 2018
8
I have a small project where im trying to get an analog joystick to interact with various common ground switching devices.
Its a flightstick that uses 2x10k pots.

My plan is to use a comparator IC and feed that into a transistor IC.
If I put a pot on the supply voltage to the joystick I should be able to control deadzone/activation point also.

My question, is there a better/easier way to do this?

Ive mocked up a small example of what I think the circuit driving the comparator should look like. (only showing 1 axis of the joystick)

http://tinyurl.com/y94lpcpr

MOD:
Clipped your image, easier to view.
AA1 13-Oct-18 16.37.gif
 
Last edited by a moderator:

Thread Starter

syntax_x

Joined Oct 13, 2018
8
I was using the transistor IC to isolate the grounding of the parent controllers.
They have inputs held high that i need to ground when the comparator fires.

Ive edited the circuit somemore to allow for more headroom when tuning the deadzone. Seems to work nicely.
I worry about the values used and current draw/if it could be more efficient.
http://tinyurl.com/y9pnttpf

PS Thanks for embedding my first post MOD :)


MOD:
you can post your images here.
 
Last edited by a moderator:

crutschow

Joined Mar 14, 2008
34,285
I was using the transistor IC to isolate the grounding of the parent controllers.
They have inputs held high that i need to ground when the comparator fires.
Comparators such as the LM339 have an open collector output that can pull a high input low, so you don't need an added transistor.
Just connect the input polarities so that the comparator output goes low when the comparator reference voltage is reached (which appears to be the way the circuit in post #2 is connected).
 
Last edited:

Thread Starter

syntax_x

Joined Oct 13, 2018
8
I built a small test unit with LEDs as a visual output.
It was pretty apparent how uncentered the pots are on the joystick im using, so I had to find the highest resistance value of the 4 directions and match the other 3 with random resistors. Ill use trim pots for this later to get it perfect but doing this fixed the issue.

The other thing I hadn't thought of is the fact that the pots don't have full travel. What felt correct in the simulator on the sliders in fact didnt work out at all for me in practice.

The values I settled on have very nice headroom though, I can turn the 10k pot all the way down and just before it bottoms out all 4 LED turn on. Likewise I can hold the joystick hard in one direction, turn the 10k pot up and just before it hits max voltage the LED will turn off :)
http://tinyurl.com/yarkao9n


Does the LM339 have resistors on its inputs? I only ask because I couldn't check readings in circuit.

Thanks again crutschow!
 

Thread Starter

syntax_x

Joined Oct 13, 2018
8
I normally would build in spice but that web based builder is quick and easy too use for something like this.

The power supply for the comparators is going to be a usb charger, but for now its a regulator i use for testing.
 
Top