lecture notes + docs about electrical design and resistors

This commit is contained in:
2025-03-02 21:03:20 +01:00
parent fb4b6b11cb
commit 1b608469fb
19 changed files with 76 additions and 11 deletions

View File

@@ -0,0 +1,65 @@
# Electronic design
For this week we are making a start at designing pcb's. Im excited for this week because I can finally make my own circuits instead of using unreliable breadboards. With designing I'm starting out with KiCad.
## No symbol table
When I first tried to start a project for kicad it asked for a symbol table.
![alt text](image.jpg)
Apparantly KiCad doesn't come with it on Linux systems (I don't know about windows). So I needed to install an extra package called `kicad-library`. After that I could use the standard symbol library. Later on I also found out I needed to install the 3D-models libary. Everything of KiCad on Linux comes separately.
## The assignment
For this weeks assignment henk wanted us to design a pcb with at least a led, a switch and then we had a choice between a speaker and a sensor. I wen't with a speaker because I could use that for my final project.
### KiCad
I'm going to do this in KiCad because it is the only software I know thanks to the lecture on thursday. I first started out dragging all the parts I needed onto the schematic editor.
![alt text](image-12.jpg)
Using the `A` key while in this screen you can open the component selector and search for the components needed.
![alt text](image-13.jpg)
After that I needed to think how I wanted to connect everything. I wanted to use the switch as a power switch and the led as some sort of status indicator. wiring up the speaker is going to be the hardest part.
I first started off with the easier parts. So I started with the LED. I accidentally found out when you hover click a part and press `D` you directly go to the data sheet of the part so that's a nice shortcut.
#### Connecting a LED
When reading the datasheet I found this graph. With a relation to voltage and mAh of the LED.
![alt text](image-14.jpg)
If I supply the LED with 20 mA it should run at 1.8V. The supply voltage is 3.3V so.
```math
R = V / I \\
R = 3.3 / 0.02 \\
R = 165 Ohm
```
So I will need a 165 Ohm resistor.
![alt text](image-15.jpg)
This is how I connected my LED. I chose to use the MCU as a ground because Henk once explained how it's better for the MCU and that it could handle more led's or other connections that way.
#### Connecting the speaker
Now I wanna drive the speaker. But to do that we need some sort of driver because I don't think the mcu's has enough power to drive the speaker.
When searching online and on older fab academy projects I found that people everywhere use IC's to drive them. I wanted to try to make one without an IC because I have seen my friend make one when he was doing electrical engineering. When looking around online all the circuits look super confusing. For example the one on [this forum](https://www.physicsforums.com/threads/amplifier-circuit-driving-an-8-ohm-speaker.967270/) doesn't have any ground symbols.
After searching for a while I found [this](https://www.instructables.com/How-to-Make-Simple-Amplifier-Circuit-Without-IC/) on Instructables
![alt text](image-16.jpg)
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.
Resistors always cause a voltage drop. How big the drop is depends on the amount of current going trough it and the resistance (Ohm)
```math
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.

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

View File

@@ -129,21 +129,21 @@ Create seperate schematics and connect them using labels.
Use labels to keep it clean.
![alt text](image-1.png)
![alt text](image-1.jpg)
If you press `A` you can see all components
![alt text](image-2.png)
![alt text](image-2.jpg)
Now we search resistor and select it.
![alt text](image-3.png)
![alt text](image-3.jpg)
Now there is a resistor!
Now we can also add a LED the same way.
![alt text](image-4.png)
![alt text](image-4.jpg)
| Key | What? |
| :-- | -------------------------------------------------------- |
@@ -155,30 +155,30 @@ Now we can also add a LED the same way.
| | |
![alt text](image-5.png)
![alt text](image-5.jpg)
Connector mounting pins
Make sure to add VCC and GND to your design even when you use pins to connect something
![alt text](image-6.png)
![alt text](image-6.jpg)
Now we can go and make the circuit board.
#### Pcb layout part
In here you will define the physical placement of the pcb.
You can do anything with pcb's and you can make them any shape you want.
##### Assigning footprints
![alt text](image-7.png)
![alt text](image-7.jpg)
When importing I got this error
This is because we didn't tell KiCad what type of components they are (SMD or through pins)
Tools -> assign footprints
![alt text](image-8.png)
![alt text](image-8.jpg)
After you've assigned it all it should look like this.
##### Custom shape
![alt text](image-9.png)
![alt text](image-9.jpg)
On the right you see a lot of layers.
Silkscreen - Text
@@ -193,14 +193,14 @@ Always should give traces some more spaces between each other because otherwise
File -> Board setup -> design rules
![alt text](image-10.png)
![alt text](image-10.jpg)
In here yo can set design rules for the print.
These settings are based on the machine it is produced on.
For high power circuits you need to set bigger traces otherwise you have a higher resistance and the traces will get hot.
![alt text](image-11.png)
![alt text](image-11.jpg)
Don't forget to change the settings in `Net Classes`
##### Exporting the board