Electronics > Projects, Designs, and Technical Stuff

Finding remaining voltage from joystick potmeter and LM258

<< < (2/2)

fourfathom:
If you are only looking for relative potentiometer position and don't want to use positive-rail input opamps, you can put a resistor between +5V and the top of the potentiometer.  You can still measure the pot wiper voltage, and the top of the potentiometer to get your voltages.  If you are feeding A-D converters it might be easier to do the "remaining voltage" calculation in software rather than with an analog differential amp.

For that matter, if you are feeding A-D converter inputs, you may not need the opamps at all.

tru3533:
The circuit will be used in a test console.
The unit under test have 2 analog inputs and supply 5v to the joystick.
By trying to keep it simple I went for an game console joystick, a single spring loaded potmeter .

In center position the 2 analog inputs to the unit needs 2.5V each
When joystick is moved, the unit perform a calculation on the 2 analog inputs, the sum of the 2 analog channels must be 5V

Example: If potmeter output is 1.5V
OUT1 = 1.5V
OUT2 = 3.5V

If the 2 values calculated together, is not 5V, the unit gives an fault.

fourfathom:

--- Quote from: tru3533 on September 04, 2019, 11:30:49 pm ---If the 2 values calculated together, is not 5V, the unit gives an fault.
--- End quote ---

What precision do you need here?

I'm not recommending this (since rail-to-rail input/output opamps are common), but you could still use my "resistors above and below the pot" scheme, and change the gain on the amplifiers to give you 0-5V range at the outputs.

Zero999:

--- Quote from: fourfathom on September 05, 2019, 07:35:28 am ---
--- Quote from: tru3533 on September 04, 2019, 11:30:49 pm ---If the 2 values calculated together, is not 5V, the unit gives an fault.
--- End quote ---

What precision do you need here?

I'm not recommending this (since rail-to-rail input/output opamps are common), but you could still use my "resistors above and below the pot" scheme, and change the gain on the amplifiers to give you 0-5V range at the outputs.

--- End quote ---
That will only solve the lack of a rail-to-rail input. It will not solve the issue with the LM358 not having a rail-to-rail output, which will saturate at about 3.5V.

The easiest solution is to use an op-amp with rail-to-rail inputs and outputs. The MCP6002 springs to mind, simply because the part number is easy to remember.
https://ww1.microchip.com/downloads/en/DeviceDoc/21733j.pdf

tru3533:
Thank you Zero999, works perfectly now with your solution.

Navigation

[0] Message Index

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod