@@ -43,7 +43,7 @@ Design and connect all necessary components to the microcontroller (MCU
Start ”KiCad” and follow the instructions:
- Make a new project.
- Open the schematic. (double-click on the *.sch-file)
- Open the schematic. (double-click on the \*.sch-file)
- Click on Preferences/Manage symbols libraries.
- Check the library `MCU_ST_STM32F4` is active in your project.
- Click on the ”Place symbol”-button to the right and then click on the sheet where you want the component to be placed.
...
...
@@ -86,7 +86,7 @@ Later we will add a Reset Button, so that you can force reset even when the MCU
The microcontroller can boot in different modes, similar to how you can enter the BIOS when booting your PC by pressing the F2-key (or other F-key). This can save you in tricky situations, for example if you are playing with the main clock or with sleep modes and it crashes, making you unable to upload (flash) a new binary to the microcontroller. You can boot in "safe mode" by pulling this pin high (so it does not run you code on startup) allowing you to upload a new binary even if your code would otherwise brick your MCU.
- Add a 10k pull-down resistor to the BOOT0 pin.
- Add a 2-pin header (*HA, var hittar de dessa i kickad enklast*) to BOOT0 and +3.3v, so that you can easily boot into "safe mode" by shorting the header using a "jumper".
- Add a "jumper" between BOOT0 and +3.3v, so that you can easily boot into "safe mode" by shorting these two terminals. You could make this a 3-pin header and "no-connect" the third terminal in order to provide a place to store the jumper when not in use.
### 6) Crystal
...
...
@@ -116,7 +116,7 @@ One easy way to get power to your project is through USB. It can deliver up to 1
### 9) 3.3v Power Supply
The MCU needs a stable voltage. A common for digital components is 3.3v. To this end we will use a fixed LDO (low dropout) regulator, with a 5v input (powered from the USB connector) and 3.3v output. We will use the (*HA*)
The MCU needs a stable voltage. A common for digital components is 3.3v. To this end we will use a fixed LDO (low dropout) regulator, with a 5v input (powered from the USB connector) and 3.3v output. We will use the (_HA_)
Look in the datasheet for reference values for decoupling. Later we will design the power supply for the PWM3389 sensor, which is a bit trickier.
...
...
@@ -140,9 +140,9 @@ Hint. Never, never ever, change the grid settings when placing the pins in the s
As you see in the PWM3389DM-T3QU datasheet and reference schematics, the sensor requires a 1.9v power supply. This is much less common voltage (try finding one from Elfa or rs-online) and you will likely fail.
To that end, you can use an adjustable regulator (*HA*).
To that end, you can use an adjustable regulator (_HA_).
The equation for the output voltage can be found in the datasheet for (*HA*).Hint: A good rule of thump is one 100nF ceramic capacitor to each power-pin. Hint2: The smoothing capacitor should be an electrolytic capacitor, hence polarized.
The equation for the output voltage can be found in the datasheet for (_HA_).Hint: A good rule of thump is one 100nF ceramic capacitor to each power-pin. Hint2: The smoothing capacitor should be an electrolytic capacitor, hence polarized.
Once you have added the 1.9v power supply you can add a new power net, and connect that to your PMW3389 component.
...
...
@@ -152,7 +152,7 @@ Now add a reset button. Suitable value for capacitor is found in the MCU data sh
### 13) Power LEDs and probing pins
In order to see that your system is correctly powered, it is common to add both probing pins/pads and LEDs. You can use (*HA*) and a [led caluclator](https://ohmslawcalculator.com/led-resistor-calculator) to design suitable current limiter. Use values from the E12 series.
In order to see that your system is correctly powered, it is common to add both probing pins/pads and LEDs. You can use (_HA_) and a [led caluclator](https://ohmslawcalculator.com/led-resistor-calculator) to design suitable current limiter. Use values from the E12 series.
### 14) SPI
...
...
@@ -175,7 +175,7 @@ Decide on which pins you want to use, and connect the PMW3389 to your MCU. You c
Until now you have used the USB only to power the system, but you will need to add data lines +D/-D as well for communication. Check the data sheet for specifics.
You may also want to protect your system from ESD (Electrostatic discharge). To that end you may optionally add protection circuitry (*HA*).
You may also want to protect your system from ESD (Electrostatic discharge). To that end you may optionally add protection circuitry (_HA_).
### 16) Assign Footprint
...
...
@@ -198,10 +198,10 @@ It is very important that the pin numbering on your component is correct to the
ERC is a check that detects if you have any ”lose ends”, meaning that it will give you a warning if you have a net with only one connection. It will also give you a warning if you have drawn a net to a component but the net and the component haven’t connected. To get the ERC to work as intended, you have to mark all the unused pins with a Not-connected flag, found to the right.
- 4) Repeat point 1 until errors == 0 && warnings == 3. The GND net is not connected to a Power output, the 5 voltage neither and the capacitor connected to VCAP1 is not connected to a power output.
- 4. Repeat point 1 until errors == 0 && warnings == 3. The GND net is not connected to a Power output, the 5 voltage neither and the capacitor connected to VCAP1 is not connected to a power output.