# How to Design OPAMP circuit for this requirement

Discussion in 'The Projects Forum' started by Santhakumar, Mar 7, 2016.

1. ### Santhakumar Thread Starter Member

Mar 17, 2015
33
0
Hi all,
i've been looking for a circuit may be based on OP AMP solution.
My requirement is that i am feeding varying input voltage (0 to 24V) to an circuit (could be op amp) it's output would be 0 to 3.3V.
So thing is my output should be correlated with input that means
1. Say input is 0% (0V) my output shout be 0% (0V).
2. Say input is 50% (12V) output should be 50% (1.65V)
3. Say input is 100% (24V) output should be 100% (3.3V)

Do anyone have idea on how to have circuit for this.
Thanks,
-Santhakumar.

2. ### crutschow Expert

Mar 14, 2008
13,469
3,356
All you need is a two resistor voltage divider if the 3.3V load is a high impedance.
For such a load you could use a 1.62kΩ resistor to ground connected to a 10.2kΩ resistor going to the 0-24V source. The junction of the two resistors gives you 0-3.3V (nominally 0-3.29V).

What is the load?

3. ### Dodgydave AAC Fanatic!

Jun 22, 2012
5,134
767
Two resistors in a voltage divider across the 24v supply, 16K, 100K, will give you 1.65v @12v, 3.31v at 24v.

4. ### crutschow Expert

Mar 14, 2008
13,469
3,356
Did you read my post?
My resistor ratios give an output slightly closer to the desired.

Dodgydave likes this.
5. ### AnalogKid Distinguished Member

Aug 1, 2013
4,678
1,295
My resistor is better than your resistor-? Really?!?!? Are you running for president?

ak

Sinus23 and Dodgydave like this.
6. ### Kermit2 AAC Fanatic!

Feb 5, 2010
3,838
961
Those old resistors are losers.
We'll build a better resistor. You'll love it. It will be great!

Sinus23 and AnalogKid like this.
7. ### #12 Expert

Nov 30, 2010
16,657
7,301
1% resistors almost always arrive at a more accurate solution, but I have a 100K and a 16K in my parts bin. It's a matter of convenience vs accuracy. Pick one.

Dodgydave likes this.

Jan 6, 2004
2,663
783

9. ### ronv AAC Fanatic!

Nov 12, 2008
3,392
1,448
You can tell from the size of the capacitors.

cmartinez and #12 like this.
10. ### crutschow Expert

Mar 14, 2008
13,469
3,356
Hell no. How did politics get into this?

But for those interested nit pickers (and I assume you're not one), for an arbitrary resistor attenuation using 1% resistors there are generally many combinations of resistor values that give close to the desired value but some are closer than others. To determine the optimum combination I wrote a short visual basic program a number of years ago that looks at the combinations and lists them according to how close they are to the desired.
Here is a screen shot of the values to get the desired attenuation of 3.3/24 = .1375
The optimum is 1.62k and 10.2k.
Of course that delta doesn't include the effect of the 1% resistor tolerance.

11. ### ifixit Distinguished Member

Nov 20, 2008
639
110
How about: 24V to 18K+2.7K with 3.3K to gnd. The output (0 to 3.3000V) across the 3,3K can be buffered with a X1 op-amp if needed.

12. ### Santhakumar Thread Starter Member

Mar 17, 2015
33
0
Hi All,

Thanks for the Answers and i can use it in my circuit.
Is there any other ways we can make it without resistor divider. May be by using OPAMP comparator.

13. ### #12 Expert

Nov 30, 2010
16,657
7,301
No. A comparator is not a voltage divider.
Why do you want to avoid the cheapest, simplest, most accurate way to do this?
I think I can do this with an op-amp, but why add the extra parts?

Last edited: Mar 8, 2016
14. ### Santhakumar Thread Starter Member

Mar 17, 2015
33
0
Hi #12,

Any way i'm gonna use opamp in my circuit so that i just want to hear more suggestion on this to have other options.

-SK

15. ### Dodgydave AAC Fanatic!

Jun 22, 2012
5,134
767
Last edited: Mar 8, 2016
absf likes this.
16. ### #12 Expert

Nov 30, 2010
16,657
7,301
My circuit has more useless parts than your circuit.
and it requires a dual voltage power supply.

• ###### Gain of 0.1375.png
File size:
7 KB
Views:
14
absf and Dodgydave like this.
17. ### Dodgydave AAC Fanatic!

Jun 22, 2012
5,134
767
@#12,, me thinks he wants to make it more useless, may need a Bigger op amp like a TDA2040

18. ### #12 Expert

Nov 30, 2010
16,657
7,301
I think he's learning about op-amps and just has to see one in action.

19. ### Santhakumar Thread Starter Member

Mar 17, 2015
33
0
Hi #12,

Thanks for your circuit, really appreciate your opamp circuit.
I would use resistor divider rather using dual opamp and dual supply.

And this output of divider would goes to ADC.. I would like read consistent values from the divider and so ADC.
care can be taken at software level. but hardware level how effective i can accomplish it..

thanks.

20. ### #12 Expert

Nov 30, 2010
16,657
7,301
The consistent values start with your power supply. I don't know whether the ADC tracks the power supply voltage or not. I don't know whether to instruct you on generating a stable voltage reference or expect the ADC to adapt if it is connected to the same 5V line as the resistors. You just stepped outside my limitations.