LM358 amplifier on a scope
An LM358 non-inverting amplifier with a gain of 3.2 on one 5 V supply: a 0.2 to 1.0 V sine in, 0.64 to 3.20 V out, and a clip at 3.5 V to find. There is no microcontroller in it: the simulator solves the 5 parts as a circuit, so it runs the moment you press Run, and nothing needs compiling.
Teaching? Assign it to your class in one click.
Intermediate Runs in your browser. Free, and no account needed.
The parts retail for about $5.35. On Mokxi they're free.
How it works
There is no microcontroller in this one, so nothing is compiled: the simulator solves the circuit itself. The file in the editor is the notes that come with it.
// An LM358 non-inverting amplifier on one 5 V supply, on a scope.
//
// The LM358 is two op-amps in an 8-pin chip. Amplifier 1 is wired as a
// non-inverting amplifier: the signal into 1IN+ (pin 3), 22 k from the output
// (pin 1) back to 1IN- (pin 2), and 10 k from 1IN- to ground. Its gain is
//
// 1 + Rf / Rg = 1 + 22 k / 10 k = 3.2
//
// The generator makes a 100 Hz sine from 0.2 V to 1.0 V (0.4 V peak about
// 0.6 V). The scope shows it on channel 1 and the output on channel 2:
// 0.64 V to 3.20 V, the same shape 3.2 times taller and not upside down.
//
// Amplifier 2 is not used. It is wired as a follower of ground (2IN+ to
// ground, 2OUT to 2IN-) so it sits still, which is what you do on a real
// board too.
//
// Things to try:
// - Turn the generator's amplitude up to 0.6 V and the offset to 0.7 V. The
// output wants to reach 4.16 V and stops at 3.49 V: an LM358 cannot get
// closer than 1.5 V to its supply. The bottom still reaches 0.32 V,
// because an LM358's output goes all the way down to ground.
// - Change Rf to 47 k: the gain becomes 5.7 and the top clips much sooner.
// - Open "741 vs LM358 on 5 V" to see why a 741 would not do this job on
// a 5 V supply.
Parts list
5 parts, plus the jumper wires and 2 bench instruments. The parts retail for about $5.35; on Mokxi they're free, and so are the instruments.
- 1 × Full-size breadboard
- 1 × Power, 5 V
- 1 × Function generator
- 1 × LM358 dual op-amp
- 1 × Resistor, 22k Ω
- 1 × Resistor, 10k Ω
- 1 × Oscilloscope
How it is wired
6 connections, pin by pin, read from the circuit itself. Each line is one set of pins joined together, by a jumper wire or a breadboard strip.
- 5 V: LM358 dual op-amp pin VCC
- Ground: Function generator pin GND; LM358 dual op-amp pin GND; LM358 dual op-amp pin 2IN+; Resistor, 10k Ω pin 2; Oscilloscope pin GND
- Function generator pin OUT; LM358 dual op-amp pin 1IN+; Oscilloscope pin CH1
- LM358 dual op-amp pin 1OUT; Resistor, 22k Ω pin 1; Oscilloscope pin CH2
- LM358 dual op-amp pin 1IN-; Resistor, 22k Ω pin 2; Resistor, 10k Ω pin 1
- LM358 dual op-amp pin 2IN-; LM358 dual op-amp pin 2OUT
Change it and keep it
Open it in the editor, change the circuit or the code, and keep your version in a free account.