-
-
Notifications
You must be signed in to change notification settings - Fork 440
[MKC-1351] OPAMP Docs #1596
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
[MKC-1351] OPAMP Docs #1596
Changes from 3 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
094f817
Add OPAMP documentation
Hannes7eicher 65e519c
add further readings and author
Hannes7eicher cc203dc
fix linter
Hannes7eicher 9957f3d
add feedback from review
Hannes7eicher 90acafe
update both files
Hannes7eicher ea3546c
Apply suggestions from review
Hannes7eicher d2653bf
Update content/hardware/02.hero/boards/uno-r4-minima/tutorials/opamp/…
jacobhylen 92a761e
Update content/hardware/02.hero/boards/uno-r4-wifi/tutorials/opamp/op…
jacobhylen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file added
BIN
+26.3 KB
...hardware/02.hero/boards/uno-r4-minima/tutorials/opamp/assets/amp_screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+64.2 KB
...rdware/02.hero/boards/uno-r4-minima/tutorials/opamp/assets/circuitAmplifier.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+41.1 KB
...ardware/02.hero/boards/uno-r4-minima/tutorials/opamp/assets/circuitFollower.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
77 changes: 77 additions & 0 deletions
77
content/hardware/02.hero/boards/uno-r4-minima/tutorials/opamp/opamp.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
--- | ||
title: 'Arduino UNO R4 Minima OPAMP' | ||
description: 'Learn how to use the built-in Operational Amplifier in the UNO R4 Minima' | ||
tags: | ||
- OPAMP | ||
author: 'Maximilian Gerhardt, Hannes Siebeneicher' | ||
hardware: | ||
- hardware/02.hero/boards/uno-r4-minima | ||
software: | ||
- web-editor | ||
- ide-v1 | ||
- ide-v2 | ||
--- | ||
|
||
In this tutorial, you will learn how to use the built-in operational amplifier (OPAMP) featured on the [Arduino UNO R4 Minima](https://store.arduino.cc/products/uno-r4-minima). Operational amplifiers are very versatile and can be used to e.g. mirror an electrical signal or amplify it. | ||
|
||
## Goals | ||
|
||
In this article, you will learn: | ||
- about the OPAMP feature onboard the UNO R4 Minima, | ||
- about the basics of the OPAMP library, | ||
- how to mirror a voltage signal, | ||
- how to amplify a voltage signal. | ||
|
||
## Hardware & Software Needed | ||
To follow along with this article, you will need the following hardware: | ||
|
||
- [Arduino UNO R4 Minima](https://store.arduino.cc/uno-r4-minima) | ||
- resistors | ||
- Jumper wires | ||
|
||
|
||
## Operational Amplifier (OPAMP) | ||
|
||
An OPAMP is a versatile and widely used electronic component that belongs to the class of analog integrated circuits. Its primary function is to amplify voltage signals but they are very versatile and can be used to: | ||
|
||
- mirror an input voltage to its output, | ||
- amplify a small analog voltage to its output pin, output voltage range from 0 to ~4.7 V, | ||
Hannes7eicher marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- compare two input voltages and give a binary "higher" or "lower" output, | ||
- integrate and differentiate signals. | ||
|
||
## Voltage Follower | ||
|
||
The most simple way of testing the OPAMP is to create a voltage follower, by connecting `A2` to `A3`. Then, any voltage applied to `A1` should be mirrored on `A3`. For example, if you connect `A1` to `GND`, the OPAMP output should be `GND`. Connect `A1` to `3.3 V`, the output should be `3.3 V`. | ||
|
||
## Circuit | ||
|
||
 | ||
|
||
## Voltage Amplifier | ||
|
||
A voltage amplifier, as the name suggests, amplifies the voltage. A simple 2x amplifier can be built using e.g. two `10k` resistors. Connect one resistor between "minus" and GND. Then use the second resistor to connect the output and "minus" together. Any signal input at "plus" will now appear with double the amplitude at the output pin. Of course, the input signal and the Arduino board should share the same `GND`. | ||
Hannes7eicher marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
***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). | ||
|
||
 | ||
|
||
## Circuit | ||
|
||
 | ||
|
||
## 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. | ||
|
||
```arduino | ||
#include <OPAMP.h> | ||
|
||
void setup () { | ||
OPAMP.begin(OPAMP_SPEED_HIGHSPEED); | ||
} | ||
|
||
void loop() {} | ||
|
||
``` |
Binary file added
BIN
+26.3 KB
...t/hardware/02.hero/boards/uno-r4-wifi/tutorials/opamp/assets/amp_screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+105 KB
...hardware/02.hero/boards/uno-r4-wifi/tutorials/opamp/assets/circuitAmplifier.png
Hannes7eicher marked this conversation as resolved.
Show resolved
Hide resolved
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+90.9 KB
.../hardware/02.hero/boards/uno-r4-wifi/tutorials/opamp/assets/circuitFollower.png
Hannes7eicher marked this conversation as resolved.
Show resolved
Hide resolved
Hannes7eicher marked this conversation as resolved.
Show resolved
Hide resolved
Hannes7eicher marked this conversation as resolved.
Show resolved
Hide resolved
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 79 additions & 0 deletions
79
content/hardware/02.hero/boards/uno-r4-wifi/tutorials/opamp/opamp.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
--- | ||
title: 'Arduino UNO R4 WiFi OPAMP' | ||
description: 'Learn how to use the built-in Operational Amplifier in the UNO R4 WiFi' | ||
tags: | ||
- OPAMP | ||
author: 'Maximilian Gerhardt, Hannes Siebeneicher' | ||
hardware: | ||
- hardware/02.hero/boards/uno-r4-wifi | ||
software: | ||
- web-editor | ||
- ide-v1 | ||
- ide-v2 | ||
--- | ||
|
||
In this tutorial, you will learn how to use the built-in operational amplifier (OPAMP) featured on the [Arduino UNO R4 WiFi](https://store.arduino.cc/products/uno-r4-wifi). Operational amplifiers are very versatile and can be used to e.g. mirror an electrical signal or amplify it. | ||
|
||
## Goals | ||
|
||
In this article, you will learn: | ||
- about the OPAMP feature onboard the UNO R4 WiFi, | ||
- about the basics of the OPAMP library, | ||
- how to mirror a voltage signal, | ||
- how to amplify a voltage signal. | ||
|
||
## Hardware & Software Needed | ||
To follow along with this article, you will need the following hardware: | ||
|
||
- [Arduino UNO R4 WiFi](https://store.arduino.cc/uno-r4-wifi) | ||
- resistors | ||
jacobhylen marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- Jumper wires | ||
|
||
|
||
## Operational Amplifier (OPAMP) | ||
|
||
An OPAMP is a versatile and widely used electronic component that belongs to the class of analog integrated circuits. Its primary function is to amplify voltage signals but they are very versatile and can be used to: | ||
|
||
- mirror an input voltage to its output, | ||
- amplify a small analog voltage to its output pin, output voltage range from 0 to ~4.7 V, | ||
Hannes7eicher marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- compare two input voltages and give a binary "higher" or "lower" output, | ||
- integrate and differentiate signals. | ||
|
||
## Voltage Follower | ||
|
||
The most simple way of testing the OPAMP is to create a voltage follower, by connecting `A2` to `A3`. Then, any voltage applied to `A1` should be mirrored on `A3`. For example, if you connect `A1` to `GND`, the OPAMP output should be `GND`. Connect `A1` to `3.3 V`, the output should be `3.3 V`. | ||
Hannes7eicher marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Circuit | ||
|
||
 | ||
|
||
## Voltage Amplifier | ||
|
||
A voltage amplifier, as the name suggests, amplifies the voltage. A simple 2x amplifier can be built using e.g. two `10k` resistors. Connect one resistor between "minus" and GND. Then use the second resistor to connect the output and "minus" together. Any signal input at "plus" will now appear with double the amplitude at the output pin. Of course, the input signal and the Arduino board should share the same `GND`. | ||
|
||
***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). | ||
|
||
 | ||
|
||
## Circuit | ||
|
||
 | ||
|
||
***Read more about an amplifier circuit [here](https://www.electronics-tutorials.ws/opamp/opamp_3.html).*** | ||
|
||
## 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. | ||
|
||
```arduino | ||
#include <OPAMP.h> | ||
|
||
void setup () { | ||
OPAMP.begin(OPAMP_SPEED_HIGHSPEED); | ||
} | ||
|
||
void loop() {} | ||
|
||
``` |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.