Skip to content

Grammar fixed and improvements to style opamp.md #2240

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ In this article, you will learn:

- [Arduino UNO R4 WiFi](https://store.arduino.cc/uno-r4-wifi)
- resistors
- Jumper wires
- jumper wires


## Operational Amplifier (OPAMP)
Expand Down Expand Up @@ -55,33 +55,33 @@ A voltage amplifier, as the name suggests, amplifies the voltage. A simple 2x am

***The amplified output signal should not go above ~4.7 V, otherwise clipping will appear and you can damage the board***

Below is a capture of an oscilloscope in which an approx. 2 V square wave (green, channel 2) is amplified to a 4 V square wave (yellow, channel 1) with the circuit shown below. The input signal was generated by a function generation (and shared GND was connected).
Below is a capture of an oscilloscope in which an approx. 2 V square wave (green, channel 2) is amplified to a 4 V square wave (yellow, channel 1) with the circuit shown below. The input signal was generated by a function generator (and shared GND was connected).

![Oscilloscope measurements](./assets/amp_screenshot.png)

But let's say you want to amplify the voltage signal 4x instead of 2x. The amplification of an OPAMP mainly depends on the chosen resistor values. Take a look at the formula below:

![Calculate resistor value](./assets/calc.png)

**Av** = Amplified Voltage (V)
**Av** = Amplified voltage (V)

**R1** = Resistor connected to Ground (Ω)
**R1** = Resistor connected to GND (Ω)

**R2** = Feedback resistor (Ω)

We know we want to amplify the voltage times four so:

**Av** = 4 V

Now, we need to figure out what resistors to choose. Because we only can solve for one unknown value we choose a predefined value for one of the resistors, e.g. 10k Ω for R1.
Now, we need to figure out what resistors to choose. Because we can only solve for one unknown value, we choose a predefined value for one of the resistors, e.g. 10k Ω for R1.

**R1** = 10k Ω

Your formula should now look like this:

![Add values to the formula](./assets/numCalc.png)

That leaves R2 as the only unknown variable. Now, Subtract one from both sides and multiply by ten, which leaves us with:
That leaves R2 as the only unknown variable. Now, subtract one from both sides. Next, multiply both sides by ten thousand (10k), which leaves us with:

**R2 = 30k Ω**

Expand All @@ -93,7 +93,7 @@ Your formula should now look like this:

## Code

To start up the opamp, simply include the library and call `OPAMP.begin(speed)`. As the optional `speed` argument to this function, can choose either `OPAMP_SPEED_LOWSPEED` as the low-speed (lower power) mode or `OPAMP_SPEED_HIGHSPEED` as the high-speed, high-power mode.
To start up the opamp, simply include the library and call `OPAMP.begin(speed)`. As the optional `speed` argument to this function can choose either `OPAMP_SPEED_LOWSPEED` as the low-speed (lower power) mode or `OPAMP_SPEED_HIGHSPEED` as the high-speed, high-power mode.

```arduino
#include <OPAMP.h>
Expand All @@ -104,4 +104,4 @@ void setup () {
void loop() {}
```
```