# Lecture notes

## Global

### Mosfet
Resistor between mosfet gate and drain to pull high or low to disable the transistor until the mcu is programmed/ready

## Local 
BJT - Bipolar junction transistor

Back of Diode - Anode
![alt text](image.png)


Front of Diode - Cathode
![alt text](image-1.png)




### Solenoid

Coil of copper wire that creates a magnetic field. Can be used as a switch or a actuator.

Example: Locking mechanism in doors.

When they are open they generate lot's of heat.

### Piezo
Crystalline wafer tat deforms when voltage is applied

Can also be used as a knock sensor. Will return voltage when vibrated

### Motors
Motors are unpolarized 
You can change the polarization to change the direction of the motion
The more voltage the higher the speed

#### Servo
DC motor + gearbox + sensor = position control

#### Stepper motor
Static magnet + varying electromagnets at all angles = precision motion (steps)
![alt text](image-2.png)

![alt text](image-3.png)
(Thanks Erwin for the slides)

Stepper motors have their own controllers. Mostly controlled via Serial.