Make sure you finish section 3’s practice section before starting! And also make sure you've watched this video before starting on this section!
As you may know, for this project you will be creating your own PCB for a motor controller using KiCAD. Here are the project requirements:
- Different ways to power and control LEDs (the schematic you made from the previous section)
- A potentiometer that can control the speed of a motor through a 555 timer and PWM
- Your board will be powered off an external 12V supply with a connector.
However, there are a few concepts you should understand first.
PWM (Pulse Width Modulation) is a technique used to control the power delivered to electronic devices. It works by switching a signal between high (on) and low (off) states at a fast rate, allowing us to average the power. The duty cycle (the percentage of time the signal is high) determines the effective average power. For example, PWM could be used to control the brightness of an LED, lamp, or the speed of a motor.
How it works:
- A higher duty cycle (e.g., 75% high, 25% low) delivers more power.
- A lower duty cycle (e.g., 25% high, 75% low) delivers less power.
- This is efficient because the switching circuit dissipates very little power, as it is either fully on or fully off.
In this schematic, the RV4 Potentiometer sets the duty cycle of the square wave output from the 555 timer's pin "Q".
The 555 timer is a versatile integrated circuit used for timing, pulse generation, and oscillator applications. For example, 555 timers can be used for generating clock pulses for circuits. The key skill to use here is abstraction from section 2! You can check out the datasheet if you are interested.
How to use it:
- Internally, it uses voltage comparators, a flip-flop, and a discharge transistor.
- By configuring external resistors and capacitors, you set the timing intervals.
In this circuit, the 555 Timer outputs a voltage that is fed to the MOSFET gate and control whether current flows through the motor.
An RC circuit is a circuit consisting of a resistor (R) and a capacitor (C). It can be used for filtering and timing. In our case, we use it as a timer. How it works:
- The capacitor charges and discharges through the resistor, with the rate determined by the time constant.
- In a low-pass filter, it allows low frequencies to pass and blocks high frequencies.
- In a high-pass filter, it allows high frequencies to pass and blocks low frequencies.
Decoupling capacitors are filters used to stabilize voltage in electronic circuits. For example, decoupling capacitors are used to reduce high-frequency noise in microcontroller circuits.
How it works:
- They are placed near integrated circuits (ICs) to filter out noise and provide instantaneous current during transient demands.
- When the supply voltage fluctuates, the capacitor absorbs or supplies charge, maintaining a stable voltage.
A MOSFET (Metal-Oxide-Semiconductor Field-Effect Transistor) is a type of transistor used as a switch or amplifier in electronic circuits. For example, MOSFETs are used for switching power to a motor or amplifying audio signals. In our case we use it as a switch for the motor or light bulb we are powering to create our on and off PWM signal.
How it works:
- The MOSFET has three terminals: Gate, Drain, and Source
- Applying voltage to the Gate creates an electric field, controlling the flow of current between the Drain and the Source. Think of this as a "key" or a "password". The gate voltage must hit a certain threshold to allow the flow of current from Drain to Source.
There are two main types:
- N-channel: Current flows when the gate voltage is positive
- P-channel: Current flows when the gate voltage is negative
MOSFET gate resistors are used for:
- A gate resistor is used to limit the current into the MOSFET’s gate when switching.
- This helps prevent Damage to the MOSFET from high inrush current and excessive ringing caused by fast switching and parasitic inductance
- They lead to smoother operation in PWM-controlled circuits.
A flyback diode is a diode attached over the negative terminal of some inductive load (feel free to look up what this means) to help protect a board. A motor (which I would heavily encourage you look up exactly how it works) is an inductive load, so we will use a flyback diode for this.
What does it do?
- When an inductor charges up, you can imagine it is full of current. After it is disconnected, the current will discharge rapidly into the circuit
- We don't want the current to flow into our ICs or other delicate components, so we want to add a better path to dissipate through
- Since a diode only allows current flow in one direction, it allows only an easier path when discharging
- It's called flyback because the current flies back through the diode and through the motor to protect your circuit! This is complicated, but please look it up if you are confused, it is important
- In the same file that you made the 3 Led circuits, you will be building your PWM driver (motor controller) circuit.
- You will be building the same functional circuit as the image below (doesn't have to be a carbon copy)!
- Make sure to run the ERC checker (top toolbar) to make sure KiCad is happy about your schematic!
- You will also need to do a write up about your schematic to reinforce understanding! Write Up Instructions Here
- Full spec of deliverables put in slack onboarding stuff
- Ask for help if you need it! Also be ready to explain anything on your schematic. Lab Staff to reach out to are listed on Section 1.
(Please note in the image below, the led circuit on the left should be the led circuits you made from section 3). Try to pick your own resistor values as practice! Hint: Ours may not be correct :)
- Please try to get these in ASAP as this is the easier half of the onboarding process.
- Remember, this is something that is MUCH easier with our help. Please try to get it done in the first week. After the first week we won't give ANY extra help
