Q. In my lessons, the op amps are shown with both a positive and a negative power supply. What do you do if you only have a single power supply available, such as a single battery?
A. There are serveral ways aound this problem. The simplest is to use a power supply "splitter". Thhis consists of two equal-value resistors which are connected in series across the power supply.
The resistors form a voltage divider, so that half the supply voltage is dropped across each resistor. The common "ground" for the signal is the point where the two resistors are connected together. This works only if the current is relatively low.
For higher currents, a transistor can be used. Its base is conected to the output of an op amp. The inverting input of this op amp is connected to the emitter of the transistor. The non-inverting input is connected to a resistor "splitter". The transistor acts as a current amplifier.
A third way to solve the problem is to use an oscillator, and then rectify and filter its output to provide a separate negative supply.
There are op amps that are designed to operate on a single power supply. The LM324 is an example of this. The IC has four independent op-amps in a single package. We use this IC in our microprocessor lab lessons on Digital-to-Analog converters.