**Introduction to Signal Subtraction with OpAmps**

Operational Amplifiers (OpAmps) serve a pivotal role in signal processing, capable of performing complex operations such as signal subtraction. This functionality is especially evident in the differential amplifier configuration, where an OpAmp can accurately subtract one voltage from another, offering a wide range of applications from sensor signal conditioning to audio processing.

**Objective**

The objective of this experiment is to construct a differential amplifier using an OpAmp connected to a Red Pitaya, aiming to observe the subtraction of two different signal types: a sine wave and a square wave. This setup demonstrates the practical application of OpAmps in subtracting signals and highlights the precision with which differential amplifiers can operate.

**Materials and Setup**

- Red Pitaya or equivalent device for signal generation and measurement
- Operational Amplifier (OpAmp)
- Resistors: Four 1 kOhm resistors for the differential amplifier configuration
- Oscilloscope with at least one probe set to 10x mode for accurate signal measurement

**Circuit Assembly**

**Differential Amplifier Configuration:**Follow the schematic provided to assemble the differential amplifier circuit on a breadboard or equivalent setup. Use the Red Pitaya to generate two distinct signals (sine wave and square wave) and connect them as inputs to the amplifier.

**Conducting the Experiment**

**Signal Generation and Measurement:**Configure the Red Pitaya to output a sine wave on one channel and a square wave on the other. Connect these outputs to the differential amplifier's inputs and use the oscilloscope to measure the resulting output signal.

**Analysis and Observations**

The differential amplifier's output should theoretically represent the subtraction of the square wave signal from the sine wave signal. By analyzing the oscilloscope's readings, we can observe how effectively the differential amplifier isolates and subtracts these signals, showcasing the precision and utility of OpAmps in analog signal processing tasks.

Probe in 10x mode, one output is sine, the other square wave, all resistors are 1k, and this is the result:

**Necessary Equations**

The output voltage (*Vout*) of a differential amplifier is determined by the difference between its two input voltages (*V*1 and *V*2) and the resistance values (*R*1,*R*2,*R*3,*R*4). Assuming equal resistances for simplicity, the formula for the output voltage is:

In this experiment, with all resistors equal to 1 kOhm, the gain from the difference of *V*2 and *V*1 should theoretically be 1, meaning should directly represent the difference between the two input signals without amplification.

**Conclusion**

This differential amplifier experiment highlights the capability of OpAmps to perform precise signal subtraction, a fundamental operation in electronic signal processing. Through the practical application of constructing and observing a differential amplifier in action, participants gain a deeper understanding of the operational principles governing OpAmps and their critical role in modern electronics for tasks ranging from simple signal adjustments to complex data acquisition systems.