Skip to content
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

Update project tt_um_twin_tee_opamp_osc (mattvenn/tt07-twin-tee-opamp-osc) #46

Merged
merged 1 commit into from
May 14, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions projects/tt_um_twin_tee_opamp_osc/commit_id.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"app": "custom_gds action",
"repo": "https://github.com/mattvenn/tt07-twin-tee-opamp-osc",
"commit": "679f8d583d2104f1d07fd8ba8dfaaa82ca1fe039",
"workflow_url": "https://github.com/mattvenn/tt07-twin-tee-opamp-osc/actions/runs/9081112543",
"commit": "8b9cf6e482154dc52738359f92e437df6014e51c",
"workflow_url": "https://github.com/mattvenn/tt07-twin-tee-opamp-osc/actions/runs/9082788041",
"sort_id": 1715697493814,
"analog": true
}
30 changes: 27 additions & 3 deletions projects/tt_um_twin_tee_opamp_osc/docs/info.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,39 @@ You can also include images in this folder and reference them in the markdown. E

## How it works

https://www.youtube.com/watch?v=KFVVozlXoOk
The circuit uses a "Twin Tee" filter along with an opamp to generate a sine wave.

https://www.electronics-tutorials.ws/oscillator/twin-t-oscillator.html

f = 1 / 2 * pi * RC
f = 1 / 2 * pi * RC

### Notch filter AC analysis

![Notch filter AC analysis](notch_ac.png)

### Opamp AC analysis

![Opamp AC analysis](p3_opamp_ac.png)

### Transient analysis

This simulation was done with a "montecarlo mismatch corner" which aims to test how well the circuit will work
as the resistance and transistors change across process corners. Each run is shown in a different colour. If R6 resistor
in the Twin Tee filter is too high, the oscillations quickly die out, so it's deliberately undersized at the expense of
distortion in the sine wave.

![Twin Tee output transient analysis](twin_trans.png)

## Acknowledgements

* The [opamp design comes from Sai](https://github.com/argunda/tt06-tiny-opamp)
* The [opamp layout comes from Pat Deegan](https://github.com/psychogenic/tt06-analog-wowa)
* Inspired by this video by [Alan Wolke](https://www.youtube.com/watch?v=KFVVozlXoOk).

## How to test

After the project is enabled, you should see a sine wave at around 6.3MHz on analog output pin 0.

## External hardware

List external hardware used in your project (e.g. PMOD, LED display, etc), if any
Oscilloscope.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified projects/tt_um_twin_tee_opamp_osc/tt_um_twin_tee_opamp_osc.gds
Binary file not shown.
31 changes: 16 additions & 15 deletions projects/tt_um_twin_tee_opamp_osc/tt_um_twin_tee_opamp_osc.lef
Original file line number Diff line number Diff line change
Expand Up @@ -935,12 +935,13 @@ MACRO tt_um_twin_tee_opamp_osc
RECT 146.400 83.110 147.500 86.950 ;
RECT 146.370 82.010 147.530 83.110 ;
RECT 111.770 67.000 117.520 67.720 ;
RECT 144.460 49.500 145.240 49.750 ;
RECT 144.090 49.490 145.010 49.520 ;
RECT 104.780 48.655 117.005 49.410 ;
RECT 144.000 49.370 146.950 49.500 ;
RECT 142.840 49.370 145.010 49.490 ;
RECT 104.780 40.645 105.970 48.655 ;
RECT 139.690 48.590 146.950 49.370 ;
RECT 144.000 48.580 146.950 48.590 ;
RECT 139.690 48.590 145.010 49.370 ;
RECT 142.840 48.570 145.010 48.590 ;
RECT 144.090 48.540 145.010 48.570 ;
RECT 110.750 45.250 112.250 45.280 ;
RECT 124.400 45.250 148.650 45.900 ;
RECT 110.750 43.750 148.650 45.250 ;
Expand Down Expand Up @@ -1293,7 +1294,7 @@ MACRO tt_um_twin_tee_opamp_osc
RECT 111.075 68.045 112.265 69.235 ;
RECT 146.400 82.010 147.500 83.110 ;
RECT 111.800 67.000 112.520 67.720 ;
RECT 146.000 48.580 146.920 49.500 ;
RECT 144.090 48.570 145.010 49.490 ;
RECT 137.650 42.850 138.650 43.150 ;
RECT 129.200 40.850 130.050 41.200 ;
RECT 129.100 40.550 130.050 40.850 ;
Expand Down Expand Up @@ -1403,10 +1404,9 @@ MACRO tt_um_twin_tee_opamp_osc
RECT 107.070 67.000 112.520 67.720 ;
RECT 107.070 66.955 107.790 67.000 ;
RECT 111.800 66.970 112.520 67.000 ;
RECT 144.895 50.780 145.765 50.800 ;
RECT 144.870 49.860 146.920 50.780 ;
RECT 144.895 49.840 145.765 49.860 ;
RECT 146.000 48.550 146.920 49.860 ;
RECT 144.060 49.465 145.780 49.490 ;
RECT 144.060 48.595 145.800 49.465 ;
RECT 144.060 48.570 145.780 48.595 ;
RECT 66.775 45.250 68.225 45.270 ;
RECT 66.750 43.750 112.280 45.250 ;
RECT 66.775 43.730 68.225 43.750 ;
Expand Down Expand Up @@ -1558,7 +1558,7 @@ MACRO tt_um_twin_tee_opamp_osc
RECT 90.275 81.775 91.725 83.225 ;
RECT 146.425 78.545 147.475 79.595 ;
RECT 112.915 68.045 114.105 69.235 ;
RECT 144.895 49.885 145.765 50.755 ;
RECT 144.885 48.595 145.755 49.465 ;
RECT 66.775 43.775 68.225 45.225 ;
RECT 156.435 34.075 157.285 34.925 ;
RECT 134.300 29.350 135.750 30.150 ;
Expand Down Expand Up @@ -1590,9 +1590,9 @@ MACRO tt_um_twin_tee_opamp_osc
RECT 128.250 51.530 145.110 66.930 ;
RECT 146.375 66.895 147.525 67.985 ;
RECT 146.400 66.890 147.500 66.895 ;
RECT 144.105 50.780 145.015 50.805 ;
RECT 144.100 49.860 145.790 50.780 ;
RECT 144.105 49.835 145.015 49.860 ;
RECT 144.860 50.055 145.780 50.060 ;
RECT 144.835 49.145 145.805 50.055 ;
RECT 144.860 48.570 145.780 49.145 ;
RECT 134.200 30.165 141.150 30.200 ;
RECT 134.200 29.975 141.715 30.165 ;
RECT 134.200 29.525 141.750 29.975 ;
Expand Down Expand Up @@ -1624,7 +1624,7 @@ MACRO tt_um_twin_tee_opamp_osc
RECT 107.070 63.170 107.790 63.890 ;
RECT 125.730 51.470 126.050 66.590 ;
RECT 144.690 51.670 145.010 66.790 ;
RECT 144.105 49.865 145.015 50.775 ;
RECT 144.865 49.145 145.775 50.055 ;
RECT 156.415 7.755 157.305 8.645 ;
LAYER met4 ;
RECT 3.990 223.800 4.290 224.760 ;
Expand Down Expand Up @@ -1685,7 +1685,8 @@ MACRO tt_um_twin_tee_opamp_osc
RECT 126.690 50.780 127.610 61.400 ;
RECT 128.645 51.925 143.255 61.400 ;
RECT 144.610 51.590 145.090 62.050 ;
RECT 126.690 49.860 145.020 50.780 ;
RECT 126.690 49.860 145.780 50.780 ;
RECT 144.860 49.140 145.780 49.860 ;
RECT 2.500 43.750 29.750 45.250 ;
RECT 156.410 1.000 157.310 8.650 ;
END
Expand Down