This project was truly insightful, to say the least, about designing a fully manufacturable electronics project. Originally, as described in my previous blog, this project was accomplished with an Arduino, radio module, and IMU. However, due to the costs of the Arduino and lots of parts not being in the supply chain, I decided to make a version 2 of Mailbox Sensor project using an STM-32. I had experience in designing PCBs with the STM-32 as I used to it create the Control Board for GTXR. However, I had a few technical gaps in my knowledge as to reading the datasheets for the STM-32 and determining what oscillator frequencies, resistances, and capacitances to use for the microcontroller’s peripherals. Furthermore, after doing this project, I learned that I did not know a lot of Altium Designer’s capabilities, the major one being hierarchical schematic design.
The first step I took was to figure out the power electronics. On the right, there is a female Micro USB connector, which serves the purpose of giving raw unfiltered power, as shown by the VBUS net. The USB connector also provides two USB data transfer pins, which are differential pairs that are matched at 90 Ohms impedance. These pins are connected to the microcontroller (MCU) directly and give the capability for data to be passed between another USB device and this PCB project.
The reason one cannot simply use the VBUS as power is that it is very noisy as shown by this article from Andy’s workshop, where a USB connector is shown to have noise. The article proposed a filtering circuit that uses some capacitors tied to ground and a ferrite bead, which is reactive at certain frequencies, but also resistive at higher frequencies, so it is ideal for filtering out USB noise. I am not too familiar with ferrite beads, so it is something I have to delve deeper in the future. The output is much smoother +5 Volts, and then fed into a Texas Instrument LDO voltage regulator, which steps down the voltage to +3.3 Volts, and that will be the voltage to power the other components in the PCB.
As specified by the LDO’s datasheet, there is a simple formula to set the output voltage using feedback resistors, which I used to figure out the values to be 1 M and 1.75 M Ohm resistors. The 1.75 M ohm value is seperated by two resistors because that value is not found on the market, but the smaller values are, so putting them in series creates the same value, as resistors in series add their effective resistance.