Connect with us

Op Amp Troubles

Discussion in 'General Electronics Discussion' started by Braeden Hamson, Sep 8, 2018.

Scroll to continue with content
  1. Braeden Hamson

    Braeden Hamson

    224
    13
    Feb 18, 2016
    Hey guys, I'm working on my joystick. I have some hall effect sensors on it that provide the angle sensing, I forget their part number but they're not the focus here. The issue is the ~30º of movement the joystick has only creates ~-2.5V difference between the high and low output if the hall sensor. I can for example make the lowest value 1V and the upper limit 3.5V, 2V and 4.5V and so on. The arduino I'm using to take these voltages and talk to the computer likes a 5V difference between low and high. Because of this I have to adjust the calibration of the stick in the software in to treat the 2.5V difference as full range. This effectively cuts the resolution of the stick in half.

    I'm trying to wire up an op amp to amplify that voltage, Since this is all powered off of a single USB I don't have the luxury of VCC + and -. I found a helpful TI datasheet that gives the following schematic for a single supply op amp. (first image) They give a handy transfer function (second image) I don't want an offset, b, so I've made Vref 0 and I need a gain of 2 so I've made R1 0Ω and R2 to be 1KΩ Thus making that portion of the equation 1. Then RF and RG are two sides of a potentiometer. With one side of the pot wired to the output and the other to ground, the wiper then goes to the inverting input.

    The problem then arises when I build the damn thing. VCC is 5V supplied by the arduino, VCC- is ground. With input voltages from 2.5 to 1 everything works well. Below ~1V the opamp output goes to 4.5V and doesn't fluctuate. I'm using an RC4558P. I can tune my pot all day and nothing changes. Any help?
     

    Attached Files:

  2. Alec_t

    Alec_t

    2,950
    803
    Jul 7, 2015
    The supply voltage and common-mode input range make the RC4558P unsuitable for your application. Look for an opamp specified as rail-to-rail input and output and which will work well with only a 5V supply.
     
    Braeden Hamson likes this.
  3. AnalogKid

    AnalogKid

    2,498
    718
    Jun 10, 2015
    What you are seeing is a "personality quirk" of older bipolar opamp designs. If you overdrive the inputs below the negative rail, the output saturates against the positive rail. Beyond that whole saturated output thing, this is a very unwanted signal inversion that can have catastrophic consequences in things like servo systems for gun turrets.

    Almost everyone makes rail to rail opamps these days, as well as opamps designed *not* to invert when overdriven. The Texas Instruments TL0xx series are pretty popular. Since you don't need hardly any bandwidth, a CMOS opamp is another option.

    Some microcontroller A/D inputs have relatively low input impedances, and impedances that go very low during step changes in the input voltage (a consequence of a capacitor-based A/D design). Be sure to check the opamp output current conditions for the output voltage swing specification, and make sure that it is greater than the A/D input transient current spec.

    ak
     
    Braeden Hamson likes this.
  4. Braeden Hamson

    Braeden Hamson

    224
    13
    Feb 18, 2016
    You've had a bad experience I take it?
    I don't know, I can move my hand pretty fast when I'm flying :p

    I have an LM324 on hand which is a dual or single supply op amp. I noticed the RC4558 doesn't claim to be a single supply device. Would something that is single supply rated work for my application?

    Funnily enough I did just get back from Goodwill and Fry's with a 12V 2A power supply (aint no kill like overkill, magic smoke is better at 2 amps etc. etc.) But I don't fancy wasting a quad op amp on a 2 axis stick as well as I don't like the idea of having to plug my joystick in all the damn time. So looks like I'll be heading back to the store.

    Thanks for the info guys!
     
  5. Braeden Hamson

    Braeden Hamson

    224
    13
    Feb 18, 2016
    EDIT: Yes, the LM324 works a treat, I'll keep an eye out for swingers, I mean voltage swing
     
  6. AnalogKid

    AnalogKid

    2,498
    718
    Jun 10, 2015
    The 324, and it's dual version 358, are hugely popular because they were the first opamps with at least one "rail" capability - both the input stage and output stage can function near (output) or below(input) ground (or what ever the negative rail is). But the output cannot get closer than 1.5 V to the positive rail, still a significant percentage decrease of the possible range. It's in the datasheet.

    ak
     
  7. Braeden Hamson

    Braeden Hamson

    224
    13
    Feb 18, 2016
    Thanks again, I can't wait until I actually learn the finer points of opamps in school, we covered them a little but it was cursory.

    What I should really do is give the hall sensors 12V and get a high quality ADC and feed that to the arduino. But at the end of the day I'm just putting a bandaid on my Sim flying skills XD
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-