Compare commits
7 Commits
1b608469fb
...
190f84a93b
Author | SHA1 | Date | |
---|---|---|---|
190f84a93b | |||
9e1fd7c18c | |||
8d3714b258 | |||
3000842988 | |||
54162ae667 | |||
235784f87e | |||
01c591e96e |
@@ -53,6 +53,7 @@ When searching online and on older fab academy projects I found that people ever
|
|||||||
After searching for a while I found [this](https://www.instructables.com/How-to-Make-Simple-Amplifier-Circuit-Without-IC/) on Instructables
|
After searching for a while I found [this](https://www.instructables.com/How-to-Make-Simple-Amplifier-Circuit-Without-IC/) on Instructables
|
||||||

|

|
||||||
|
|
||||||
|
##### Understanding resistors
|
||||||
The only step I needed to figure out is why it work like this and why doesn't the speaker blow up when connected because there is 9 volt on the circuit and the speaker is rated for 1 volt. I still have a lot of trouble wrapping my head around how voltage drops because of a resistor.
|
The only step I needed to figure out is why it work like this and why doesn't the speaker blow up when connected because there is 9 volt on the circuit and the speaker is rated for 1 volt. I still have a lot of trouble wrapping my head around how voltage drops because of a resistor.
|
||||||
|
|
||||||
Voltage can be seen as the speed of water traveling through a tube. A resistor makes the tube smaller for a small part so the water slows down. So the voltage drops.
|
Voltage can be seen as the speed of water traveling through a tube. A resistor makes the tube smaller for a small part so the water slows down. So the voltage drops.
|
||||||
@@ -62,4 +63,103 @@ Resistors always cause a voltage drop. How big the drop is depends on the amount
|
|||||||
```math
|
```math
|
||||||
V = I * R
|
V = I * R
|
||||||
```
|
```
|
||||||
This is Ohms law. So to keep a constant voltage you need to make sure your current is also constant and not changing constantly. In that way you can keep a constant voltage.
|
This is Ohms law. So to keep a constant voltage you need to make sure your current is also constant and not changing constantly. In that way you can keep a constant voltage.
|
||||||
|
|
||||||
|
#### Back to the speaker
|
||||||
|
I watched [this](https://www.youtube.com/watch?v=U0FIG2J6Zls) video and now understand the fundementals of a amplifier. The only thing necessary is something that can make an small signal big. For that I can use a MOSFET. I also need to make sure the MOSFET doesn't over current the speaker so that's why it needs a resistor before the gate pin. And I need some sort of buffer for the speaker once it needs a lot of power.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
When I was looking for MOSFET's through the Fab library I found 2 type of MOSFET's P channel and N channel. I quickly searched what it does.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
So for my use case I will need a N channel MOSFET that can work output a linear voltage based on what is supplied on the gate.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
I first had this setup. But then I asked AI for feedback and it told me I used the wrong transistor because it could only be on or off and not anything in between.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
After a while I realized it's way easier to use an IC for this use case. So that's what im going to do.
|
||||||
|
|
||||||
|
I am going to use the `OPAMP_AD8615` as my amplifier. According to its data sheet it has a input voltage from 0 to 5 volts and an output from 7.5 mV to 5 volts. After some time researching on how to use it I decided to use the `LM4871M` because I couldn't find any good examples using the `AD8615`.
|
||||||
|
|
||||||
|

|
||||||
|
This was my last result using the `AD8615`.
|
||||||
|
|
||||||
|
I think this is correctly connected but I still need to add a bypass.
|
||||||
|
|
||||||
|

|
||||||
|
A bypass is to filter the noise from the power supply. To filter noise a capacitor is used.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
In the documentation of the IC I found how to connect the bypass. I needed to connect the pin to the ground with a capacitor between it.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
It is also recommended to add a input capacitor in the event the chips requires a lot of power and it can't be deliverd from the source.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
So I added a 10 μF capacitor at the VDD. So my circuit now looks like this.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
I still need to make sure there isn't too much power going to the pcb. According to these graphs if you change the input power you can make sure it doesn't output too much. So according to the graph I need 2 volt Supply voltage. Because my speaker has a 8 Ohm impedance and the rated watt is 0,25 mW.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
After a while of struggling with all the connections I asked Henk and he said I was thinking too complicated. I don't need a amplifier at all I just need to send signals through the speaker using the MCU like this.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Because the speaker is such low wattage it can easily be driven by the mcu. Then after it's connected you can use the buzzer music library to play notes on the speaker. Or if I wanna go more advanced I can send wav files to the mcu to play on the speaker.
|
||||||
|
|
||||||
|
|
||||||
|
#### Connecting a button
|
||||||
|
I'm going to connect a button directly to the MCU to use as a input button. For this I will need a pulldown Resistor. I followed [this youtube guide](https://www.youtube.com/watch?v=aPVMKyZpaPA) to connect the button.
|
||||||
|
|
||||||
|

|
||||||
|
Now its connected like this as a pulldown resistor as described in the tutorial. I also swapped out all the resistors from the basic symbol library to the Fab symbol library because they have a pre-assigned footprint.
|
||||||
|
|
||||||
|
#### Layout and making traces
|
||||||
|
Now I can finally make the layout of the board and draw traces. Now im in the PCB editor and I can press this button to import everything from the schematic.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
This is how it looked when I imported it. Now I will organize everything and everything that belongs together will go near each other.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
In the drawing I'm having a problem that the 3v3 isn't properly defined on the XIAO board. I can't power anything on the pcb from it.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
I may have forgotten to add the 3v3 tag to the xiao board so that's why it didn't draw the small lines to it.
|
||||||
|
|
||||||
|
I first started out with placing all components that belong together next to each other.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Then I started drawing traces.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
It could be prettier if I used 2 layered board. I learned using the KiCad manual when drawing traces if you press `V` you can add a via on the trace to make it go under other traces.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Like this!
|
||||||
|
The blue trace is going under the red one using a via.
|
||||||
|
## Sources
|
||||||
|
* [Datasheet LM4871M](https://www.ti.com/lit/ds/symlink/lm4871.pdf?HQS=dis-dk-null-digikeymode-dsf-pf-null-wwe&ts=1741005529535&ref_url=https%253A%252F%252Fwww.ti.com%252Fgeneral%252Fdocs%252Fsuppproductinfo.tsp%253FdistId%253D10%2526gotoUrl%253Dhttps%253A%252F%252Fwww.ti.com%252Flit%252Fgpn%252Flm4871)
|
||||||
|
* [Arduino speaker](https://www.build-electronic-circuits.com/arduino-speaker/)
|
BIN
docs/Assignments/week_6_electronic_design/image-17.jpg
Normal file
After Width: | Height: | Size: 54 KiB |
BIN
docs/Assignments/week_6_electronic_design/image-18.jpg
Normal file
After Width: | Height: | Size: 82 KiB |
BIN
docs/Assignments/week_6_electronic_design/image-19.jpg
Normal file
After Width: | Height: | Size: 164 KiB |
BIN
docs/Assignments/week_6_electronic_design/image-20.jpg
Normal file
After Width: | Height: | Size: 86 KiB |
BIN
docs/Assignments/week_6_electronic_design/image-21.jpg
Normal file
After Width: | Height: | Size: 79 KiB |
BIN
docs/Assignments/week_6_electronic_design/image-22.jpg
Normal file
After Width: | Height: | Size: 90 KiB |
BIN
docs/Assignments/week_6_electronic_design/image-23.jpg
Normal file
After Width: | Height: | Size: 117 KiB |
BIN
docs/Assignments/week_6_electronic_design/image-24.jpg
Normal file
After Width: | Height: | Size: 165 KiB |
BIN
docs/Assignments/week_6_electronic_design/image-25.jpg
Normal file
After Width: | Height: | Size: 254 KiB |
BIN
docs/Assignments/week_6_electronic_design/image-26.jpg
Normal file
After Width: | Height: | Size: 195 KiB |
BIN
docs/Assignments/week_6_electronic_design/image-27.jpg
Normal file
After Width: | Height: | Size: 67 KiB |
BIN
docs/Assignments/week_6_electronic_design/image-28.jpg
Normal file
After Width: | Height: | Size: 233 KiB |
BIN
docs/Assignments/week_6_electronic_design/image-29.jpg
Normal file
After Width: | Height: | Size: 74 KiB |
BIN
docs/Assignments/week_6_electronic_design/image-30.jpg
Normal file
After Width: | Height: | Size: 174 KiB |
BIN
docs/Assignments/week_6_electronic_design/image-31.jpg
Normal file
After Width: | Height: | Size: 296 KiB |
BIN
docs/Assignments/week_6_electronic_design/image-32.jpg
Normal file
After Width: | Height: | Size: 77 KiB |
BIN
docs/Assignments/week_6_electronic_design/image-33.jpg
Normal file
After Width: | Height: | Size: 345 KiB |
BIN
docs/Assignments/week_6_electronic_design/image-34.jpg
Normal file
After Width: | Height: | Size: 100 KiB |
BIN
docs/Assignments/week_6_electronic_design/image-35.jpg
Normal file
After Width: | Height: | Size: 314 KiB |
BIN
docs/Assignments/week_6_electronic_design/image-36.jpg
Normal file
After Width: | Height: | Size: 320 KiB |
BIN
docs/Assignments/week_6_electronic_design/image-37.jpg
Normal file
After Width: | Height: | Size: 415 KiB |
@@ -32,4 +32,5 @@ markdown_extensions:
|
|||||||
- admonition
|
- admonition
|
||||||
- pymdownx.details
|
- pymdownx.details
|
||||||
- pymdownx.tasklist:
|
- pymdownx.tasklist:
|
||||||
custom_checkbox: true
|
custom_checkbox: true
|
||||||
|
|
||||||
|