Compare commits
2 Commits
8dcf97332f
...
45f670dbe0
Author | SHA1 | Date | |
---|---|---|---|
45f670dbe0 | |||
e29f9364de |
3
.gitignore
vendored
3
.gitignore
vendored
@ -2,3 +2,6 @@ doc/*/*.*
|
||||
!doc/*/*.tex
|
||||
!doc/*/*.bib
|
||||
*.cpython-311.pyc
|
||||
doc/pcb/img/kicad/*.pdf
|
||||
sim/*
|
||||
!sim/*.ms14
|
@ -73,7 +73,7 @@
|
||||
\subsection{Equipment}
|
||||
The following equipment and settings will be used during the experiment:
|
||||
\begin{itemize}[beginpenalty=10000]
|
||||
\item Rigol DG 2041A Function/Arbritrary Waveform Generator
|
||||
\item Rigol DG 2041A Function/Arbitrary Waveform Generator
|
||||
\begin{itemize}
|
||||
\item Setup according to the method described in the lab manual and the determined frequency:
|
||||
\begin{itemize}
|
||||
@ -304,7 +304,7 @@
|
||||
\end{aligned}
|
||||
\end{equation}
|
||||
|
||||
Losing the dependance of the unknown variables $L_l$ and $C_l$ makes it possible to crosscheck this equation against one of the results. Figure \ref{fig:graph_char_230_near} gives the values: $U_g = 2.04\ V$, $\omega = 20 \cdot 10^6\ Hz$ and $Z_0 = 220\ \Omega$
|
||||
Losing the dependence of the unknown variables $L_l$ and $C_l$ makes it possible to crosscheck this equation against one of the results. Figure \ref{fig:graph_char_230_near} gives the values: $U_g = 2.04\ V$, $\omega = 20 \cdot 10^6\ Hz$ and $Z_0 = 220\ \Omega$
|
||||
|
||||
\begin{equation}
|
||||
\begin{aligned}
|
||||
@ -314,7 +314,7 @@
|
||||
\end{aligned}
|
||||
\end{equation}
|
||||
|
||||
$0.13\ V$ is equal to the amplitude measured in Figure \ref{fig:graph_char_230_near}, concluding that $230 \Omega$ is the characterstic termination.
|
||||
$0.13\ V$ is equal to the amplitude measured in Figure \ref{fig:graph_char_230_near}, concluding that $230 \Omega$ is the characteristic termination.
|
||||
|
||||
\section{Conclusion}
|
||||
During this experiment, we were successfully measure and analyse the crosstalk between two conductors. Furthermore we were able to determine the mutual self-inductance and coupling capacitance of the setup and validate those results through simulation. Lastly, we were able to determine and validate the correct characteristic impedance of the setup.
|
||||
|
BIN
doc/pcb/img/bode.png
Normal file
BIN
doc/pcb/img/bode.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.4 KiB |
BIN
doc/pcb/img/kicad/e-smog.png
Normal file
BIN
doc/pcb/img/kicad/e-smog.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 156 KiB |
BIN
doc/pcb/img/ms_circuit.png
Normal file
BIN
doc/pcb/img/ms_circuit.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 106 KiB |
BIN
doc/pcb/img/ms_filter.png
Normal file
BIN
doc/pcb/img/ms_filter.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
BIN
doc/pcb/img/silk_closeup.png
Normal file
BIN
doc/pcb/img/silk_closeup.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 489 KiB |
@ -24,11 +24,25 @@
|
||||
url = {https://www.st.com/resource/en/datasheet/stm32l071v8.pdf}
|
||||
}
|
||||
|
||||
@article{latchcircuit,
|
||||
author = {Andrew Levido},
|
||||
journal = {Circuit Cellar},
|
||||
title = {Soft latching power circuits},
|
||||
month = {September},
|
||||
year = {2021},
|
||||
url = {https://circuitcellar.com/resources/quickbits/soft-latching-power-circuits/},
|
||||
@article{digikey,
|
||||
title = {PCB Trace Width Calculator},
|
||||
year = {2024},
|
||||
author = {{DigiKey}},
|
||||
url = {https://www.digikey.com/en/resources/conversion-calculators/conversion-calculator-pcb-trace-width}
|
||||
}
|
||||
|
||||
@article{okawa,
|
||||
title = {RLC Low-Pass Filter Design Tool},
|
||||
year = {2024},
|
||||
author = {{Okawa Electronic Design}},
|
||||
url = {http://sim.okawa-denshi.jp/en/RLClowkeisan.htm}
|
||||
}
|
||||
|
||||
@article{latchcircuit,
|
||||
author = {Andrew Levido},
|
||||
journal = {Circuit Cellar},
|
||||
title = {Soft latching power circuits},
|
||||
month = {September},
|
||||
year = {2021},
|
||||
url = {https://circuitcellar.com/resources/quickbits/soft-latching-power-circuits/}
|
||||
}
|
176
doc/pcb/main.tex
176
doc/pcb/main.tex
@ -23,12 +23,18 @@
|
||||
\begin{document}
|
||||
\maketitle
|
||||
|
||||
\begin{center}
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=0.5\textwidth]{./img/kicad/e-smog.png}
|
||||
\end{figure}
|
||||
\end{center}
|
||||
|
||||
\begin{abstract}
|
||||
This document will describe the design process of a noise detection circuit (E-Smog) and data logger using an STM32 Microcontroller
|
||||
\end{abstract}
|
||||
|
||||
% Several choices have been made directly based on the AN4467 Application note by STMicroelectronics \cite{AN4467}
|
||||
% Datasheet \cite{stm32l071}
|
||||
\newpage
|
||||
|
||||
\begin{multicols}{2}
|
||||
\section{Introduction}
|
||||
@ -51,9 +57,14 @@ This document will describe the design process of a noise detection circuit (E-S
|
||||
\subsubsection{Voltage regulators}
|
||||
The circuit requires two voltages; 1,5 volts for the amplifier circuit and 3,3 volts for the STM32. The input voltage will be roughly between 3.0 and 3.6 volts based on three NiMH rechargeable batteries in series.
|
||||
|
||||
The amplifier circuit is rated to work at 1,5 volts, however, 1,5 volt low dropout regulators are not common. 1,8 volts is a lot more common, therefore the circuit has been simulated with 1,8 volts instead
|
||||
The amplifier circuit is rated to work at 1,5 volts, however, 1,5 volt low dropout regulators are not common. 1,8 volts is a lot more common, therefore the circuit has been simulated with 1,8 volts instead. The simulation of the circuit has been performed in NI Multisim 14.2, the circuit in question will be included in the appendix.
|
||||
|
||||
The output voltage of the simulated circuit is offset slightly higher at 1.8 Volts compared to 1.5 Volts, as measured at C4 in Figure \ref{fig:ogcircuit} the voltage offset is 669 millivolts instead of 639 millivolts. This is a difference of 30 millivolts, which is acceptable for the purpose of the circuit.
|
||||
|
||||
The increased current flow is also negligible, increasing from 1.04 milliamps to 1.37 milliamps.
|
||||
|
||||
\subsubsection{Soft power-on circuit}
|
||||
\label{sec:spoc}
|
||||
To turn the device on, a soft power-on circuit has been implemented. The circuit is based on the design by A. Levido and consists of a set of P- and N-channel MOSFETs, a push button and two schottky diodes. \cite{latchcircuit} In the schematic, the IRF7319 package is used, which contains both the P- and N-channel MOSFETs.
|
||||
|
||||
\begin{figure}[H]
|
||||
@ -84,14 +95,16 @@ This document will describe the design process of a noise detection circuit (E-S
|
||||
\begin{figure}[H]
|
||||
\includegraphics[width=\linewidth]{./img/circuit.png}
|
||||
\caption{Original Circuit}
|
||||
\label{fig:man}
|
||||
\label{fig:ogcircuit}
|
||||
\end{figure}
|
||||
|
||||
\subsubsection{Base circuit}
|
||||
The base receiving circuit is identical to the one found in the original Elektor Magazine
|
||||
The base receiving circuit is functionally identical to the one found in the original Elektor Magazine. The required transistors have been replaced with SMD equivalents.
|
||||
|
||||
The antenna uses a Hirose U.FL connector, this connector is a small SMD component, commonly used in customer radio equipment such as access points and routers; This connector has primarily been chosen for this reason as it allows salvaging a simple wire antenna from such a device. It also allows for a smaller footprint compared to the RCA connector used on the original design.
|
||||
|
||||
\subsubsection{Amplifier}
|
||||
|
||||
The amplifier circuit is required to bring the signal from the E-Smog circuit to a level that is measurable by the STM32 ADC. The amplifier is a simple inverting op-amp circuit with a gain of 3 and an offset of 1.5 volts to get it around the middle of the ADC range. The LM321 has been used as the op-amp, this is a low power op-amp that can run on a single supply voltage. It is also fast enough for the desired purpose. The resulting simulated output to the ADC is offset at 1.5 volts and has a signal $V_{p-p}$ of 740 millivolts.
|
||||
|
||||
\subsubsection{Anti-aliasing filter}
|
||||
For the ADC input, we want to attenuate the input signal above the Nyquist frequency to less than half LSB to prevent any aliasing.
|
||||
@ -129,12 +142,82 @@ This document will describe the design process of a noise detection circuit (E-S
|
||||
&= 12595.33 & [Hz]\\
|
||||
\end{align*}
|
||||
|
||||
The required filter has been implemented using a LRC filter. The required parameters have been determined using the \textit{RLC Low-Pass Filter Design Tool} by OKAWA Electric Design. \cite{okawa} A capacitor of $6.8 \mu F$ and a inductor with a value of $22 \mu H$ and an internal resistance of $3.6 \Omega$ have been selected. The CWCI0603F-220KT package from Ceaiya has been selected as the inductor and resistor, a regular 0402 SMD capacitor completes the filter.
|
||||
|
||||
The resulting filter has been simulated and generates the following Bode plot:
|
||||
\begin{figure}[H]
|
||||
\includegraphics[width=\linewidth]{./img/bode.png}
|
||||
\caption{Bode plot filter}
|
||||
\label{fig:bpfilter}
|
||||
\end{figure}
|
||||
|
||||
The bode plot shows the -66dB attenuation is roughly at the desired 570kHz and the cutoff frequency is at around 9kHz. This is not ideal but acceptable.
|
||||
|
||||
\subsection{Microcontroller}
|
||||
\textit{The following parts can be found in the KiCad schematic sub-sheet 'stm'.}
|
||||
|
||||
\subsubsection{Choice of microcontroller}
|
||||
The assignment requires
|
||||
The assignment requires the use of a STM32L series microcontroller; This is the low power series of the STM32 line. The entire series is relatively easy to implement and most if not all design choices in the following section are based directly on the AN4467 Application note by STMicroelectronics \cite{AN4467}
|
||||
|
||||
The STM32L071RBT has been selected with the help of the STM32 MCU product selector. The STM32L071RBT is available in a small but workable LQFP64 package and can be powered by a single 3.3 Volt supply. It has plenty of GPIO pins and a 12-bit ADC. All STM32L series microcontrollers use the ARM Cortex-M0+ core, so the selection was mostly based on the availability of the part itself. The STM32L071RBT is available as a Basic part on JLCPCB.
|
||||
|
||||
\subsubsection{Peripheral connections}
|
||||
The STM32 has the following peripheral connections:
|
||||
\begin{itemize}
|
||||
\item Programming and debugging header present, connected to SWD. The pinout of this header has been determined by the application note \cite{AN4467}
|
||||
\item I2C and UART are broken out to marked header pins
|
||||
\begin{itemize}
|
||||
\item I2C has unpopulated pads for pull-up resistors if these are not provided by the slave device(s).
|
||||
\end{itemize}
|
||||
\item NRST and BOOT0 are connected to buttons in accordance to the application note \cite{AN4467}
|
||||
\item All VCC pins have a decoupling capacitor nearby in accordance to the application note \cite{AN4467}
|
||||
\item An external crystal is used for the HSE, connection as described in the data sheet \cite{stm32l071}
|
||||
\item Two LEDs are connected to GPIO pins via a MOSFET driver
|
||||
\begin{itemize}
|
||||
\item The power LED is connected to the same pin used as the power button override as described in section \ref{sec:spoc}, this allows the user to see when the STM has powered up.
|
||||
\end{itemize}
|
||||
\item All other IO has been broken out to headers J5 and J6
|
||||
\end{itemize}
|
||||
|
||||
% Datasheet \cite{stm32l071}
|
||||
|
||||
\section{Printed Circuit Board design}
|
||||
Similarly to the schematic, the PCB components have been placed in groups. Analog and digital switching components have been separated as much as possible. The PCB has been routed using the maze-method, X, Y-routing has been considered but ultimately not used. The resulting PCB would have been much more complex then necessary, since there are no high-speed signals that would benefit from X, Y-routing. Routing below the analog components has been kept to a minimum to prevent interference.
|
||||
|
||||
\subsection{Routing IO}
|
||||
Breaking out all remaining MCU pins to the side of the PCB may not have been the greatest idea of all time and required some compromises. The STM32 microcontroller has been placed on a 45 degree angle to simplify the routing of all IO pins, however it still required long paths between the MCU and the headers. Additionally, the paths to the headers are placed quite close to each other which may cause interference, making the bus unusable for very high speed signals; This is not a problem for the intended use of the circuit.
|
||||
|
||||
\begin{figure}[H]
|
||||
\includegraphics[width=\linewidth]{./img/silk_closeup.png}
|
||||
\caption{Reference blocks in the silkscreen}
|
||||
\label{fig:refblock}
|
||||
\end{figure}
|
||||
|
||||
To route the IO, all other SMD parts have been packed closely together, which does not necessarily impact performance, but does make the PCB harder to assemble and required the use of reference blocks in the silkscreen to identify the components. An example of this can be seen in Figure \ref{fig:refblock}, take for example R5. Placing the silkscreen next to a component, such can be seen at C18, would have been preferable.
|
||||
|
||||
\subsection{DRC check}
|
||||
The PCB has been checked using the default rules for DRC in KiCAD in addition to design rules set by the manufacturer JLCPCB, the end product does not contain any DRC errors.
|
||||
|
||||
\section{Peer reviewed corrections}
|
||||
The following corrections have been made based on the peer review checklists in the appendix. Tom Selier noted the following issues from his checklist:
|
||||
\begin{itemize}
|
||||
\item Ground planes were not well connected
|
||||
\item Decoupling capacitors did not have a fast path to ground
|
||||
\item PCB dimensions were not present
|
||||
\item Some components did not have proper thermal isolation from the ground plane
|
||||
\item Voltage rails do not use thicker traces
|
||||
\end{itemize}
|
||||
|
||||
Most of these issues have been resolved, the ground planes have been enlarged where possible and more via's were used to connect them. Decoupling capacitors have been checked and the ground connection has been improved wherever possible. The PCB dimensions, although not strictly required, were added to the bottom silkscreen of the board. Lastly, some components have been moved in order to improve thermal isolation from the ground plane and other components.
|
||||
|
||||
An issue that was not fixed was the use of thicker traces for the voltage rails, this could not be fixed without redesigning significant portions of the design; Which could not be done given the time constraints of the assignment. However, to ensure the current design would not cause a house fire, the current specifications of the traces have been checked using the \textit{PCB Trance Width Calculator} by DigiKey \cite{digikey}.
|
||||
|
||||
The current design uses three AAA batteries as a source of power, these batteries have a (very short) maximum current output of around 1 Ampere, this value is between 750 and 900 mA for NiMH cells. If the PCB is at JLCPCB, the top trace thickness would be $70\mu m$
|
||||
|
||||
Using these parameters in the calculator and assuming the worst case scenario of 1 A, the minimum trace width would be 0,065 mm. The current design uses a trace width of 0,25 mm, which is well in the safe zone.
|
||||
|
||||
\section{Conclusion}
|
||||
Although there is room for improvement, the current design is functional and meets the requirements set by the assignment. The design has been checked using Multisim and the ERC and DRC checks in KiCad. The design has been peer-reviewed and the resulting corrections have been implemented. If the design were to be produced, the design is likely to work as intended.
|
||||
|
||||
\end{multicols}
|
||||
|
||||
@ -143,4 +226,83 @@ This document will describe the design process of a noise detection circuit (E-S
|
||||
\bibliographystyle{IEEEtran}
|
||||
\bibliography{main}
|
||||
|
||||
\newpage
|
||||
|
||||
\section{Appendix}
|
||||
\subsection{Peer review checklists}
|
||||
\subsubsection{Peer checklist (Dutch, Tom Selier)}
|
||||
\begin{enumerate}
|
||||
\item DRC van een PCB boer zijn geïmporteerd
|
||||
\item DRC geeft geen bijzondere meldingen
|
||||
\item Trace width presets zijn logisch en correct gebruikt
|
||||
\item Geen losse kopervlakken
|
||||
\item Grondvlakken zijn goed verbonden met elkaar
|
||||
\item Ontkoppeling heeft een snel en logisch pad naar grond
|
||||
\item Maatmarkeringen zijn aanwezig
|
||||
\item Thermische scheiding is in acht genomen
|
||||
\item Capillaire kracht is in acht genomen (tombstoning e.d.)
|
||||
\item Alle componenten hebben een footprint en zijn aanwezig
|
||||
\item Beschikbare ruimte is benut
|
||||
\item Componenten zijn gegroepeerd op functie
|
||||
\item Digitaal en analoog zijn zoveel mogelijk gescheiden
|
||||
\item "Peelables" zijn z.v.m. voorkomen
|
||||
\item Naam en functie staan op silkscreen
|
||||
\end{enumerate}
|
||||
\subsubsection{Own checklist}
|
||||
\begin{enumerate}
|
||||
\item ERC and DRC checks have been performed
|
||||
\item Component placement is logical when cross-referenced with the schematic
|
||||
\item Analog and digital circuits are separated
|
||||
\item The PCB has been filled with ground planes
|
||||
\item All filled areas are well connected
|
||||
\item Via's between filled ares are not on the very edge of the filled area
|
||||
\item Components connected to the filled area are connected by more than one spoke
|
||||
\item The PCB only has components on one side
|
||||
\item Digital interface requirements have been met (e.g. I2C pullups)
|
||||
\item Switches and buttons are usable when the PCB is assembled
|
||||
\item Decoupling capacitors are placed near the power pins of the IC
|
||||
\item Most of the MCU pins used or broken out to headers
|
||||
\item Headers other than the GPIO have been marked with their purpose
|
||||
\item Silkscreen references are either next to the component or in a collection
|
||||
\item Silkscreen references are visible after PCB assembly
|
||||
\item The silkscreen features the name of the designer
|
||||
\end{enumerate}
|
||||
|
||||
\newpage
|
||||
|
||||
\subsection{Multisim simulation}
|
||||
\subsubsection{Analog circuit}
|
||||
\begin{figure}[H]
|
||||
\includegraphics[width=\linewidth]{./img/ms_circuit.png}
|
||||
\caption{Multisim simulation of the analog circuit}
|
||||
\label{fig:ms_circuit}
|
||||
\end{figure}
|
||||
|
||||
\subsubsection{Filter circuit}
|
||||
\begin{figure}[H]
|
||||
\includegraphics{./img/ms_filter.png}
|
||||
\caption{Multisim simulation of the filter circuit}
|
||||
\label{fig:ms_circuit}
|
||||
\end{figure}
|
||||
|
||||
\newpage
|
||||
|
||||
\subsection{KiCad Export}
|
||||
The following exports will be appended to the document in the following order:
|
||||
\begin{enumerate}
|
||||
\item Schematic
|
||||
\begin{itemize}
|
||||
\item Sub-sheet 'power'
|
||||
\item Sub-sheet 'smog'
|
||||
\item Sub-sheet 'stm'
|
||||
\end{itemize}
|
||||
\item PCB
|
||||
\begin{itemize}
|
||||
\item Top layer
|
||||
\item Bottom layer
|
||||
\item Silkscreen top
|
||||
\item Silkscreen bottom
|
||||
\item Combination of all layers
|
||||
\end{itemize}
|
||||
\end{enumerate}
|
||||
\end{document}
|
@ -54,7 +54,7 @@
|
||||
\section{Methodology}\label{sec:Methodology}
|
||||
The experiment requires a pulse to be generated on the line and a way to measure any reflections, the equipment and settings used are as follows:
|
||||
\begin{itemize}[beginpenalty=10000]
|
||||
\item Rigol DG 2041A Function/Arbritrary Waveform Generator
|
||||
\item Rigol DG 2041A Function/Arbitrary Waveform Generator
|
||||
\begin{itemize}
|
||||
\item Setup according to the method described in the lab manual:
|
||||
\begin{itemize}
|
||||
@ -208,9 +208,9 @@
|
||||
\caption{Result for unknown cable}
|
||||
\label{fig:unknown_cable}
|
||||
\end{figure}
|
||||
The cable with an unknown length is a 75 Ohm cable made by Belden. It has partnumber 9248 printed on the sheath of the cable. According to the datasheet of the cable, the propagation delay is 82 \%\footnote{Belden, "Part Number: 9248", 9248 datasheet, 2019}.
|
||||
The cable with an unknown length is a 75 Ohm cable made by Belden. It has part number 9248 printed on the sheath of the cable. According to the data sheet of the cable, the propagation delay is 82 \%\footnote{Belden, "Part Number: 9248", 9248 data sheet, 2019}.
|
||||
|
||||
Furthermore, the initial pulse shown in figure \ref{fig:unknown_cable} is 3.5 V instead of 2.5 V. This is because the cable is a 75 Ohm cable, and thus creats a different voltage division. However, this does not affect the results of the experiment, since the pulse does not change position with respect to time.
|
||||
Furthermore, the initial pulse shown in figure \ref{fig:unknown_cable} is 3.5 V instead of 2.5 V. This is because the cable is a 75 Ohm cable, and thus creates a different voltage division. However, this does not affect the results of the experiment, since the pulse does not change position with respect to time.
|
||||
|
||||
Using the same equations as in section \ref{sec:cable length determination}, the length of the cable can be calculated.
|
||||
|
||||
@ -228,7 +228,7 @@
|
||||
\end{align*}
|
||||
|
||||
\section{Conclusion}
|
||||
Reflections can be used to measure distance in case of a faulty cable. However, an accurate propagation delay of the cable should be known. Otherwise, depending on the length of the cable, the measurement could be off by several meters to kilometers.
|
||||
Reflections can be used to measure distance in case of a faulty cable. However, an accurate propagation delay of the cable should be known. Otherwise, depending on the length of the cable, the measurement could be off by several meters to kilometres.
|
||||
|
||||
In conclusion, a reflection in a transmission line can be manipulated by its termination. A matched impedance will result in no reflections, whilst a mismatched reflection will cause reflections, either positive or negative.
|
||||
|
||||
|
BIN
sim/esmog.ms14
BIN
sim/esmog.ms14
Binary file not shown.
BIN
sim/filter.ms14
BIN
sim/filter.ms14
Binary file not shown.
Loading…
Reference in New Issue
Block a user