I have a circuit which utilizes a hall effect sensor and reads out an analog value. The range of the output is between 0.2V and Vcc, which in this case will be 5V. I want to scale that value so that it goes from 0V to 5V, so I am looking to shift it down 0.2V, and then scale up by ~1.04, math here was 5V/4.8V to account for the shift. My question is how would I implement such a shift using an opamp. I believe I would need to use -0.2V on the inverting terminal and have the source voltage be 5V. In that case, would I need to have a different opamp to invert my voltage?

Below is the circuit without the opamp in place.

enter image description here

This is what I think the opamp should look like.

enter image description here

  • 1
    \$\begingroup\$ Recall the classic voltage-divider negative feedback connection. What happens if the voltage divider is not between output and ground, but output and positive power rail? What if your divider has connections to both power rails? That is, a resistor between output and negative input, one between negative input and low rail (may be ground), and one between negative input and high rail. \$\endgroup\$
    – Ben Voigt
    Nov 18 at 22:18
  • 1
    \$\begingroup\$ You need to have that HOWTO with you for the long-run.I could not find any of good "OP amp for dummy" at free of charge. This book is taught at MIT. You can discuss many interesting aspects of OPAMP, once you have been through it. \$\endgroup\$
    – jay
    Nov 19 at 2:51
  • 3
    \$\begingroup\$ First you need an opamp with rail to rail output. A lm358 won’t cut it. With your schematic you’d want to include some filtering on the hall output - they are quite noisy. Because the hall device you’ve chosen is ratiometric, powering it via the logic gate will introduce scaling errors with the adc you’ve chosen. You might want to use an adc with external reference pins. Then choose a higher resolution adc and fix the offset and scaling in code rather than via an opamp. \$\endgroup\$
    – Kartman
    Nov 19 at 4:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.