Sunday 11 September 2016

operational amplifier - How do I invert the output of this current sensor using the other side of the LM358?



Referencing a design that uses a more expensive OpAmp, I have put together (in simulation) this current sensing circuit that uses one half of an LM358. I would like to use the other half of the LM358 to invert the output of this circuit. That is, where right now the output is 0V when there is no current through the load increasing linearly to 5V when the maximum current is reached, I would like an output of 5V when there is no current decreasing to 0V when the threshold maximum current is reached.


I have made several attempts at adding an OpAmp inverter circuit (again referencing the basic diagrams found via Google), but I have not been able to hack the two circuits together properly. How can I wire the other side of the LM358 to accomplish this?


LM358 current sense circuit


Edit: After some more playing around with the simulator I realized that I was misunderstanding the inverting OpAmp concept, among other things. I am still curious to know if there's a relatively simple analog circuit that will accomplish my stated goal, but I (think I) understand now that it's not going to be a matter of just wiring up the second OpAmp with a few resistors.



Answer



Try this topology:


Inverted current sense amp


One thing to watch out for, and I don't have time to check on the LM358, is what you're asking for needs the op-amp to be a rail-to-rail type for both the inputs and outputs.


Edit: Here is the suggested circuit simulated:


Simulation



As you can see, the output ramps down from its high as soon as there is any current flowing. Substituting an ideal op-amp for the LM358 changes the voltages somewhat but not the behavior / curve.


Or have I done something incorrectly?


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...