EV5_HW_Ontwikkeling/Doc/main.tex

465 lines
19 KiB
TeX
Raw Normal View History

2024-02-01 14:39:34 +01:00
\documentclass[10pt]{article}
2024-01-31 20:07:33 +01:00
\usepackage[english]{babel}
2024-02-03 11:37:17 +01:00
% \usepackage[a4paper,top=2cm,bottom=2cm,left=2cm,right=2cm,marginparwidth=1.75cm]{geometry}
\usepackage[a4paper, total={7in, 10in}]{geometry}
2024-01-31 20:07:33 +01:00
\usepackage{multicol}
\usepackage{lipsum}
2024-02-03 13:12:57 +01:00
\usepackage{caption}
2024-02-01 14:39:34 +01:00
\usepackage{graphicx}
2024-02-03 13:12:57 +01:00
\usepackage{enumitem}
2024-02-03 16:33:20 +01:00
\usepackage{listings}
\usepackage{xcolor}
2024-02-03 13:12:57 +01:00
\newenvironment{Figure}
{\par\medskip\noindent\minipage{\linewidth}}
{\endminipage\par\medskip}
2024-02-01 14:39:34 +01:00
2024-02-03 16:33:20 +01:00
\definecolor{codegreen}{rgb}{0,0.6,0}
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
\definecolor{codepurple}{rgb}{0.58,0,0.82}
\definecolor{backcolour}{rgb}{0.97,0.97,0.95}
\lstdefinestyle{mystyle}{
backgroundcolor=\color{backcolour},
commentstyle=\color{codegreen},
keywordstyle=\color{magenta},
numberstyle=\tiny\color{codegray},
stringstyle=\color{codepurple},
basicstyle=\ttfamily\footnotesize,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=left,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2
}
\lstset{style=mystyle}
2024-02-01 14:39:34 +01:00
\graphicspath{{images/}}
\title{B00st converter}
\author{
van Iterson, Arne\\
Student Number: 1800000
\and
Selier, Tom\\
Student Number: 1808444
}
2024-01-23 14:48:33 +01:00
\begin{document}
2024-02-01 14:39:34 +01:00
\maketitle
2024-02-04 14:23:26 +01:00
\begin{abstract}
This report describes the design and testing of a student-built DC-DC Boost converter using BS170 MOSFETs.
\end{abstract}
2024-02-01 14:39:34 +01:00
\begin{multicols}{2}
2024-02-03 11:37:17 +01:00
\section{Introduction}
2024-02-04 14:23:26 +01:00
Students of the Electrical Engineering department of the University of applied Sciences Utrecht are to design a DC-DC Boost converter in the fifth semester during the Hardware Design course.
\\\\
The goal of the project is to design a DC-DC Boost converter on breadboard that can step up a voltage of around $3V$ to any voltage between $3.3V$ and $7.5V$. The converter should be able to deliver a current of $50mA$ at any given voltage. The entire system is to be controlled by a STM32F4 series microcontroller which should provide a way to control the output voltage through software.
An example circuit and a couple of components are provided and mandatory to use, such as the inductor, the capacitor and the MOSFETs. Apart from these components, the circuit can be altered and or extended to the student's liking to improve its function as long as the final circuit is able to deliver the required current and voltage.
2024-02-03 13:12:57 +01:00
2024-02-03 11:37:17 +01:00
\section{Circuit Description}
2024-02-04 14:46:47 +01:00
According to The Art of Electronics \cite{Horowitz_Hill_2022}, the simplest implementation of a step-up or boost converter consists of just four components; An inductor, a switch, a diode and a capacitor connected as follows:
2024-02-04 14:23:26 +01:00
\begin{Figure}
\centering
\includegraphics[scale=0.5]{AOE_BOOSTCONV.png}
\captionof{figure}{Basic boost converter}
\label{fig:boost_converter}
\end{Figure}
2024-02-04 14:46:47 +01:00
It describes the function of a boost converter as follows:
2024-02-04 14:23:26 +01:00
\begin{quote}
During switch conduction (...) the inductor current ramps up; when the switch is turned off, the voltage at point Y rises rapidly as the inductor attempts to maintain constant current. The diode turns on, and the inductor dumps current into the capacitor. The output voltage can be much larger than the input voltage.
\end{quote}
2024-02-04 14:46:47 +01:00
The image below shows the final circuit used. As shown, the circuit includes just a few modification to the example circuit provided.
2024-02-03 13:12:57 +01:00
\begin{Figure}
\centering
\includegraphics[scale=0.38]{SCHEMATIC_FULL.png}
\captionof{figure}{WIP}
\label{fig:schematic_full}
\end{Figure}
2024-02-03 11:37:17 +01:00
2024-02-04 14:23:26 +01:00
The circuit has been through several iteration throughout the project, however, the following key components have not been changed throughout:
\begin{list}{-}{}
\item The inductor, a $1 mH$ inductor
\item The diode, a $1N5817$
\item The capacitor, a $220\mu F$ capacitor
\item The MOSFETs, BS170 series
\end{list}
2024-02-04 14:46:47 +01:00
In the example circuit, there was only one MOSFET and it was directly controlled by the MCU. This circuit was able to reach a voltage of $7.5V$, but not at the required current. This is due to the fact that the BS170 series MOSFET has a fairly high $R_{DS(on)}$ of $1.2\Omega$ \cite{Onsemi_2022}. To increase the output current, a second MOSFET was added to the circuit. This way, the $R_{DS(on)}$ is halved, effectively doubling the current at which the inductor can be charged if we neglect the resistance of the inductor itself. The downside of adding a second MOSFET is that it also doubles its input capacitance, however, with an additional circuit modification this can be overcome.
2024-02-04 14:23:26 +01:00
A second addition to the circuit is the push-pull driver on the gate of the MOSFETs. The driver consists of two NPN transistors that are controlled by inverted signals from the MCU, this way the MOSFET gates are quickly switched between $0V$ and $3.3V$. The push-pull driver was chosen over a pull-down resistor because it would cause several issues; A low resistor value would quickly discharge the gate capacitance, but it would also decrease the driving current when turning the MOSFET on. A high resistor value would have little effect on the gate capacitance. The push-pull driver solves both of these issues by quickly discharging the gate capacitance by connecting them to ground while not effecting the driving current when turning the MOSFET on. This way, the MOSFETs are switched faster, increasing the efficiency of the circuit.
The final addition is a voltage divider of $15k\Omega$ and $10k\Omega$ on the output, this simply lowers the output voltage to a level that can be read using the ADC on the MCU and is used for control loop feedback.
\subsection{Control}
The system is controlled by the STM32F407 on the HU development board. The board provides the required PWN signals to control the MOSFETs and the ADC to read the output voltage. The program provides a small interface in which the user can view and control the duty cycle and frequency of the switching and read the current output voltage. The program also implements a simple PI control loop to control the output voltage, however it is not yet fully functional and requires more tuning.
\begin{Figure}
\centering
\includegraphics[scale=0.25]{FW_CONTROL_1.png}
\captionof{figure}{Display readout of PWM Control registers, frequency and duty cycle}
\label{fig:ui1}
\end{Figure}
\begin{Figure}
\centering
\includegraphics[scale=0.25]{FW_CONTROL_2.png}
\captionof{figure}{Display readout of ADC value and converted voltage}
\label{fig:ui2}
\end{Figure}
\begin{Figure}
\centering
\includegraphics[scale=0.25]{FW_CONTROL_3.png}
\captionof{figure}{Display readout of target and current output voltage}
\label{fig:ui3}
\end{Figure}
2024-02-03 13:12:57 +01:00
2024-02-03 15:27:40 +01:00
\section{Methodology} \label{section:methodology}
2024-02-03 13:12:57 +01:00
To characterize the system, several tests have been performed. The
characteristics of interest are the following:
\begin{enumerate}[nosep]
2024-02-03 11:37:17 +01:00
\item Efficiency
\item Noise
\item Ripple characteristics
2024-02-03 15:27:40 +01:00
\item Start up
2024-02-03 11:37:17 +01:00
\end{enumerate}
2024-02-03 13:12:57 +01:00
In this section a test or measurement will be described for each of the above
characteristics.
Each of the characteristics have been tested at two different output voltages
and various load currents. The different voltages are $7V$ and $3.3V$. The
chosen load currents are $10$, $20$, $30$, $40$ and $50 mA$. These values
2024-02-04 11:43:51 +01:00
were chosen to characterize the circuit over a broad range of conditions.
For all tests, the data was handled in a simular way. For test 2 through 4,
an oscilloscope was set up on the output voltage. The probe was set to
10x attenuation to minimize it's influence on the circuit. The oscilloscope's
settings are set to get the signal full screen, and the acquire settings were
adjusted so that it would store 20,000 points. Then, at each measurement
.csv (comma seperated values) was stored on a USB drive.
After the measurements were collected, they were processed using a python
script. The major functions are listed at each test.
2024-02-03 13:12:57 +01:00
2024-02-03 15:27:40 +01:00
\subsection{Efficiency} \label{section:efficiency}
2024-02-03 13:12:57 +01:00
\begin{Figure}
\centering
\includegraphics[scale=0.34]{SCHEMATIC_EFFICIENCY.png}
\captionof{figure}{WIP}
\label{fig:schematic_efficiency}
\end{Figure}
To measure the efficiency of the circuit, four measurements were taken.
2024-02-04 11:43:51 +01:00
A current and a voltage measurement were taken at the supply and load,
2024-02-03 13:12:57 +01:00
respectively. The measurements were taken as shown in figure
\ref{fig:schematic_efficiency}. The energy used by the supply and the load
2024-02-04 11:43:51 +01:00
can be calculated using equation \ref{eq:power}. Then, using equation
2024-02-03 13:12:57 +01:00
\ref{eq:efficiency}, efficiency can be calculated.
\begin{equation}
\label{eq:power}
P [W] = U[V] \cdot I[A]
\end{equation}
\begin{equation}
\label{eq:efficiency}
\eta[\%] = \frac{P_{load}[W]}{P_{supply}[W]} \cdot 100\%
\end{equation}
\subsection{Noise}
To measure the noice of the circuit an oscilloscope probe was placed on the
variable resistor in figure \ref{fig:schematic_full}. Over the period of 1
millisecond, 20,000 points were measured.
Noise has several metrics in which it can be quantized. Two metrics were
calculated, the standard devation (SD) and the peak to peak noise.
\subsubsection{Peak to peak}\label{section:peak_to_peak}
Peak to peak is the simplest way to look at noise. The signal has a stationary
2024-02-03 15:27:40 +01:00
mean over the period of 1 millisecond. Thus, the highest measured value can be
2024-02-03 13:12:57 +01:00
subtracted from the lowest measured value.
2024-02-03 16:33:20 +01:00
\begin{lstlisting}[language=Python, caption={Peak to peak function}]
def PK_PK(all_data, ch):
output_pk = []
for data in all_data:
maximum = max(data[ch + 1])
minimum = min(data[ch + 1])
pk_pk = maximum-minimum
output_pk.append(pk_pk)
return output_pk
\end{lstlisting}
2024-02-03 13:12:57 +01:00
2024-02-03 15:27:40 +01:00
\subsubsection{Standard Deviation}\label{section:standard_devation}
2024-02-03 16:33:20 +01:00
The second metric used to measure noise was the standard deviation (SD).
Unlike peak to peak, it gives a better impression of the average noise over
a longer period. SD can be calculated using equation \ref{eq:sd}.
2024-02-03 13:12:57 +01:00
\begin{equation}
\label{eq:sd}
\sigma = \sqrt{\frac{1}{N}\sum^{N-1}_{i=0}(x[i] - \mu)^2}
\end{equation}
2024-02-03 16:33:20 +01:00
\noindent Where $x[i]$ is each voltage measurement, $\mu$ is the mean of the
signal and $N$ is the total amount of samples.
\begin{lstlisting}[language=Python, caption={SD function}]
def SD(all_data, ch):
output_SD = []
for data in all_data:
N = len(data[ch + 1])
MU = sum(data[ch + 1])/N
x = 0
for val in data[ch + 1]:
x += (val-MU)**2
SD = sqrt((1/N) * x)
output_SD.append(SD)
return [output_load, output_SD]
\end{lstlisting}
2024-02-03 13:12:57 +01:00
2024-02-03 15:27:40 +01:00
2024-02-03 16:08:35 +01:00
\subsection{Ripple characteristics} \label{section:ripple}
2024-02-03 13:12:57 +01:00
\begin{Figure}
\centering
\includegraphics[scale=0.5]{RIPPLE.png}
\captionof{figure}{WIP}
\label{fig:ripple}
\end{Figure}
A significant source of the noise was caused by a specific ripple, shown in
figure \ref{fig:ripple}.
This ripple coincided with the MOSFETs opening or closing.
To further characterize this behaviour a close up measurement was taken.
The oscilloscope was set to AC-coupling and the settigns were adjusted
for the ripple to be full screen. Then, two additional characteristics can
be calculated. The ripple's peak to peak voltage and the ripple's (most prevalent)
frequency. The peak to peak value can be calculated using the method described in
section \ref{section:peak_to_peak}.
To measure the frequency of the signal using an FFT, it had to be pre-processed
2024-02-03 15:27:40 +01:00
first using a Hamming window, this eliminates sharp edges at the edge of the
2024-02-03 13:12:57 +01:00
measurement, causing unwanted frequencies to appear in the frequency domain.
\begin{equation}
\label{eq:hamming}
% 0.54 - 0.46 * cos(2*np.pi*(n/N))
w(i) = 0.54 - 0.46 \cdot cos \left(2 \pi \frac{i}{N} \right)
\end{equation}
Where $i$ is the current sample and $N$ is the total amount of samples. Each
sample in the signal can be multiplied by the corresponding value in the window,
preparing the signal for the FFT.
2024-02-03 16:33:20 +01:00
\begin{lstlisting}[language=python, caption={Hamming function}]
def window(y):
N = len(y)
hamming = []
for n in range(N):
hamming.append(
0.54 - 0.46 * cos(2*np.pi*(n/N)))
y = [hamming[i]*x for i, x in enumerate(y)]
return y
\end{lstlisting}
\begin{lstlisting}[language=python, caption={FFT function}]
def Freq(all_data, ch):
output_freq = []
for data in all_data:
# FFT
# using realfft,
# because the signal only has real parts
y = np.fft.rfft(data[ch + 1])
# Window
y = window(y)
# Calculate the bins
dt = data[1][1] - data[1][0]
x = np.fft.rfftfreq(len(data[ch+1]), dt)
# find maximum, max() and np.argmax()
# are not playing nice with
# imaginary numbers
maximum = 0
max_idx = 0
offset = 1 # Skip the first bin, DC offset
for idx, val in enumerate(y[offset:]):
mag = sqrt(val.real**2 + val.imag**2)
if mag > maximum:
maximum = mag
max_idx = idx + offset
# get the frequency of the maximum
output_freq.append(x[max_idx])
2024-02-04 11:43:51 +01:00
return output_freq
2024-02-03 16:33:20 +01:00
\end{lstlisting}
2024-02-03 15:27:40 +01:00
2024-02-03 16:08:35 +01:00
\subsection{Start up} \label{section:start_up}
2024-02-03 15:27:40 +01:00
The last characteristics is the start up, specifically the different rise times
under load. The voltage was measured at the output as the supply was turned on.
Different rise times can be defined. First off, $\tau$ and $2 \tau$ were
defined as $63\%$ and $95\%$ respectively. Further more, 'rise time' was defined
as $90\%$, a metric used often in control theory.
One problem that occured during the measurements, is that the aforementioned
ripples and noise would cause erroneous readings. As such, the signal was
filtered using a low pass filter, reducing the high frequencies from the
2024-02-04 11:43:51 +01:00
signal.
2024-02-03 15:27:40 +01:00
2024-02-03 16:33:20 +01:00
\begin{lstlisting}[language=python, caption={LPF snippet}]
initial = data[3][0]
dt = data[1][1] - data[1][0]
x_filter = [initial]
for i in range(1, len(data[3])):
x_dot_filter = \
(data[3][i] - x_filter[i-1])/0.0002
x_filter.append(
x_filter[i-1] + x_dot_filter*dt)
\end{lstlisting}
2024-02-03 11:37:17 +01:00
2024-02-03 13:12:57 +01:00
\section{Results}
2024-02-03 15:27:40 +01:00
In this section the results from section \ref{section:methodology} will be
discussed, as well as discuss some probable causes for unknown or unintended
results.
2024-02-03 16:08:35 +01:00
2024-02-03 15:27:40 +01:00
\subsection{Efficiency}
\begin{Figure}
\centering
\includegraphics[scale=0.5]{EFFICIENCY_PERCENTAGE.jpg}
\captionof{figure}{WIP}
\label{fig:efficiency}
\end{Figure}
\noindent The results for the efficiency measurements, as described in section
\ref{section:efficiency} are displayed in figure \ref{fig:efficiency}.
The $7V$ measurements follow a predictable curve, however, the $3.3V$ makes
an unexplained jump back to a higher percentage.
2024-02-03 16:08:35 +01:00
\subsection{Noise} \label{section:result_noise}
2024-02-03 15:27:40 +01:00
\begin{Figure}
\centering
\includegraphics[scale=0.5]{SNR_LOADVSPKPK.jpg}
\captionof{figure}{WIP}
\label{fig:noise_pkpk}
\end{Figure}
2024-02-03 16:08:35 +01:00
\noindent The results for the noise measurements, as described in section
2024-02-03 15:27:40 +01:00
\ref{section:peak_to_peak} are displayed in figure \ref{fig:noise_pkpk}.
The peak to peak voltage is a significant fraction of the output voltage,
with $3V$ peaking at $33\%$. It seems there is a relation between peak to
peak voltage and the output voltage as well, as $7V$ has more noise than
$3.3V$
\begin{Figure}
\centering
\includegraphics[scale=0.5]{SNR_LOADVSSD.jpg}
\captionof{figure}{WIP}
\label{fig:noise_sd}
\end{Figure}
2024-02-03 16:08:35 +01:00
\noindent The results for the noise measurements, as described in section
2024-02-03 15:27:40 +01:00
\ref{section:standard_devation} are displayed in figure \ref{fig:noise_sd}.
2024-02-03 16:08:35 +01:00
Although the voltage peaks are high, the standard deviation of the noise is
in the range of millivolts. The trend that a higher output voltage has more
noise is continued in this graph.
2024-02-03 11:37:17 +01:00
2024-02-03 15:27:40 +01:00
\subsection{Ripple}
2024-02-03 16:08:35 +01:00
\begin{Figure}
\centering
\includegraphics[scale=0.5]{RIPPLE_LOADVSPKPK.jpg}
\captionof{figure}{WIP}
\label{fig:ripple_pkpk}
\end{Figure}
\noindent The results for the ripple measurements, as described in section
\ref{section:ripple} are displayed in figure \ref{fig:ripple_pkpk}. The
voltage level in the graph seems to confirm that the peak to peak noise,
seen in section \ref{section:result_noise} is caused by the ripple.
\begin{Figure}
\centering
\includegraphics[scale=0.5]{RIPPLE_LOADVSFREQ.jpg}
\captionof{figure}{WIP}
\label{fig:ripple_freq}
\end{Figure}
\noindent The frequency of the ripple is roughly $38 MHz$ and independant of
the load. To figure out if this ripple is caused by the combination of the
inductor and the capactitor the following equation can be used.
\begin{equation}
f = \frac{1}{2 \pi \sqrt{LC}}
\end{equation}
Using the values from figure \ref{fig:schematic_full}, the resonating frequency
of the circuit should be around $27KHz$. Thus, this cannot be the cause of
the high frequency. As the frequency of the ripple is magnitudes higher
2024-02-03 16:33:20 +01:00
than the LC-circuit's resonant frequency, what is seen is most likely the
2024-02-03 16:08:35 +01:00
Self Resonating Frequency (SRF) of the inductor. Typically the SRF is
$>10 MHz$, so that could be a probable source of the high frequencies.
\subsection{Start Up}
\begin{Figure}
\centering
\includegraphics[scale=0.5]{TRANSIENT_RISE_10_MA.jpg}
\captionof{figure}{WIP}
\label{fig:start_10}
\end{Figure}
\begin{Figure}
\centering
\includegraphics[scale=0.5]{TRANSIENT_RISE_50_MA.jpg}
\captionof{figure}{WIP}
\label{fig:start_50}
\end{Figure}
\begin{center}
\captionof{table}{$10 mA$}
\label{table:start_10}
\begin{tabular}{llll}
Metric & $\tau$ & $2\tau$ & Rise time \\
Percentage [$\%$] & 63 & 95 & 90 \\
Time [$s$] & 0.031 & 0.075 & 0.053 \\
\end{tabular}
\end{center}
\begin{center}
\captionof{table}{$50 mA$}
\label{table:start_50}
\begin{tabular}{llll}
Metric & $\tau$ & $2\tau$ & Rise time \\
Percentage [$\%$] & 63 & 95 & 90 \\
Time [$s$] & 0.033 & 0.048 & 0.043 \\
\end{tabular}
\end{center}
\noindent The results for the start up measurements, as described in section
\ref{section:start_up} are displayed in figure \ref{fig:start_10} and
\ref{fig:start_50}, and table \ref{table:start_10} and \ref{table:start_50}.
Counterintuitively, the rise time is shorter with a higher load.
2024-02-03 11:37:17 +01:00
2024-02-03 13:12:57 +01:00
\section{Conclusion}
2024-02-04 15:19:09 +01:00
Breadboards suck lmaoooooooooo
\subsection{Recommendations}
The circuit can be improved in several ways. The most significant improvement would be to replace the breadboard in favour of a soldered PCB, this would significantly improve the stability of the system and reduce noise.
Usage of MOSFETs with a lower $R_{DS(on)}$ would also improve the efficiency of the circuit.
2024-02-01 14:39:34 +01:00
\end{multicols}
2024-02-04 14:46:47 +01:00
\bibliographystyle{IEEEtran}
\bibliography{main}
2024-02-01 14:39:34 +01:00
\end{document}