1
\$\begingroup\$

This is my first post here. I am facing the problem with level shifting circuit which is later the input for the ADC of the microcontroller. As far as the sine and triangle waves concern circuit is doing well within 100KHz thats what the project requirement but the square wave is causing the actual problem with output like a pid curve. The same problem is occuring both on the hardware and the simulation side. I also tried different opamps like tl081, lm358, lm324 and CA3130 but all of them give some sort of distortion.

Attached is the circuit diagram and output of square waveform. Any help would be appreciated.

Thanks in advance :)

enter image description here

\$\endgroup\$
  • \$\begingroup\$ I see the circuit, I see the waveform, I see that it would match my expectation of the circuit when fed with a square wave. I conclude it is behaving correctly. So, what were your expectations? Also, what is a "pid curve"? \$\endgroup\$ – Andy aka Oct 5 '15 at 14:30
  • \$\begingroup\$ What does the waveform look like when you reduce the input frequency to, say, 1kHz? Seeing more of the response waveform may give some clues. The sample rate on the oscilloscope does look extraordinarily low, like one sample per µs. You're bound to get aliasing at such a low sample rate, leading to the apparent waveform looking quite different from the real thing. Is there a way you can raise the sample rate? You also probably want to state the rise/fall time you're using on the input square wave. \$\endgroup\$ – scanny Oct 5 '15 at 21:20
  • \$\begingroup\$ Actually i am trying to build oscilloscope using STM32F3 microcontorller. So that is why i am in search of precise level shifter which can provide good response up to 100KHz. The output waveform for square wave never gives me the right result. Can you prescribe some better circuit for accurate level shifting or better single supply low noise opamp which can fulfill my requirments. Thanks in advance :) \$\endgroup\$ – Ameer Hamza Oct 10 '15 at 9:21
  • \$\begingroup\$ Looks like your scope is only seeing the lower harmonics of the square wave. I think this is probably due to the opamps slew rate and bandwith. Take a look at this article on slew rate. It might give you an idea of what's happening. \$\endgroup\$ – Gavin Barnett Jan 7 '16 at 7:46

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.