update 20180517 2100
This commit is contained in:
parent
ea922f4c99
commit
f4f5056f50
|
@ -0,0 +1 @@
|
|||
/remote_media/m03/home/pi/adccalib_48.csv
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,62 +1,64 @@
|
|||
#! /usr/bin/python3
|
||||
|
||||
import scipy.optimize as opt
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
lognum = 2
|
||||
|
||||
plt.ioff()
|
||||
plt.style.use('bmh')
|
||||
plt.figure(figsize=(11.88, 8.4))
|
||||
data = pd.read_csv("./log_poticalib_ana_{:02d}.csv".format(lognum))
|
||||
fig, axarr = plt.subplots(2,1, sharex='col',figsize=(11.88, 8.4))
|
||||
data = pd.read_csv("./adccalib_48.csv")
|
||||
|
||||
data['Dv'] = data['v_pit48/v'] - data['v_keith/v']
|
||||
print(data)
|
||||
|
||||
#plt.errorbar(
|
||||
# data['time'],
|
||||
# data['act_curr_ps'],
|
||||
# yerr=data['act_curr_ps']*.002,
|
||||
# label="Spannungsquelle Ausgang",
|
||||
# fmt='.'
|
||||
#)
|
||||
#plt.errorbar(
|
||||
# data['time'],
|
||||
# data['act_curr_el']-.125,
|
||||
# label="Elektronische Last Eingang",
|
||||
# fmt='.'
|
||||
#)#
|
||||
|
||||
data['val_poti'] = data['val_poti'].map(lambda x: int(x, base=16))
|
||||
data['r_bcu/kohm'] = 2*4.7+1/(1/data['r_restheo/kohm']+1/75)
|
||||
|
||||
data['v_bcutheo/v'] = 0.7+0.7*30.1/(data['r_bcu/kohm']+6.49)
|
||||
|
||||
plt.errorbar(
|
||||
data['r_bcu/kohm'],
|
||||
axarr[0].errorbar(
|
||||
data['v_keith/v'],
|
||||
yerr=data['dv_keith/v'],
|
||||
label="V$_{Keith,IV8A}$",
|
||||
data['v_pit48/v'],
|
||||
yerr=data['dv_pit48/v'],
|
||||
label="V$_{MONITOR\_48V}$",
|
||||
fmt='.'
|
||||
)
|
||||
plt.errorbar(
|
||||
data['r_bcu/kohm'],
|
||||
data['v_pit/v'],
|
||||
yerr=data['dv_pit/v)'],
|
||||
label="V$_{PIT,IV8A}$",
|
||||
axarr[0].errorbar(
|
||||
data['v_keith/v'],
|
||||
data['v_ps/v'],
|
||||
yerr=data['dv_ps/v'],
|
||||
label="V$_{PS}$",
|
||||
fmt='.'
|
||||
)
|
||||
plt.plot(
|
||||
data['r_bcu/kohm'],
|
||||
data['v_bcutheo/v'],
|
||||
label="V$_{BCU,O}$"
|
||||
)
|
||||
|
||||
plt.xlabel('$R_{BCU,Set}$/k$\Omega$')
|
||||
plt.ylabel('V$_{1V8A}$/V')
|
||||
plt.title("PowerIt Calibration: Analog Potentiometer")
|
||||
plt.legend()
|
||||
axarr[1].errorbar(
|
||||
data['v_keith/v'],
|
||||
data['Dv'],
|
||||
yerr=data['dv_pit48/v'],
|
||||
label=" absolute Error of ADC",
|
||||
fmt='.'
|
||||
)
|
||||
|
||||
# fit to abs dist
|
||||
linfnc = lambda x,m,c: x*m+c
|
||||
|
||||
pfinal, pcov = opt.curve_fit(
|
||||
linfnc,
|
||||
data['v_keith/v'],
|
||||
data['Dv'],
|
||||
p0=(.1,2.6),
|
||||
sigma=[.5 for e in range(data['Dv'].size)]
|
||||
)
|
||||
|
||||
print( pfinal )
|
||||
|
||||
axarr[1].plot(
|
||||
data['v_keith/v'],
|
||||
data['v_keith/v']*pfinal[0]+pfinal[1]
|
||||
)
|
||||
plt.xlabel('V$_{Keith}$/k$\Omega$')
|
||||
axarr[0].set_ylabel('V$_{IN}$/V')
|
||||
axarr[0].set_title("PowerIt ADC Calibration: 48V Input")
|
||||
axarr[1].set_ylabel('$\Delta$V$_{IN}$ / V')
|
||||
axarr[0].legend()
|
||||
#-plt.savefig("2kw_direct.png")
|
||||
|
||||
plt.tight_layout()
|
||||
plt.savefig("adccalib_{:02d}.eps".format(lognum), format='eps', dpi=1000)
|
||||
plt.savefig("adccalib_48.eps", format='eps', dpi=1000)
|
||||
|
|
|
@ -6,6 +6,10 @@
|
|||
\usepackage{xcolor}
|
||||
\usepackage{hyperref}
|
||||
\usepackage{tcolorbox}
|
||||
\usepackage{enumitem,amssymb}
|
||||
|
||||
\definecolor{myteal}{HTML}{228c9c}
|
||||
%\DeclareTColorBox{blockbox}{ O{width=\textwidth} }{boxrule=0mm, colframe=myteal, valign lower=bottom, on line, lower separated=false, height=.6\textheight, #1}
|
||||
|
||||
\newlist{todolist}{itemize}{2}
|
||||
\setlist[todolist]{label=$\square$}
|
||||
|
|
|
@ -2,30 +2,30 @@
|
|||
\begin{figure}
|
||||
\centering
|
||||
\begin{tabular}{l|l<{\ttfamily} l l l}
|
||||
addr & name & type & size & perm \\
|
||||
\bfseries{addr} & \bfseries{name} & \bfseries{type} & \bfseries{size} & \bfseries{perm} \\
|
||||
\hline
|
||||
0x00 & onmask & byte & 1 & rw\\
|
||||
0x01 & offmask & byte & 1 & rw\\
|
||||
0x02 & anapot & 9bit & 2 & rw\\
|
||||
0x04 & digipot & 9bit & 2 & rw\\
|
||||
0x00 & onmask & byte & 1 & rw\\
|
||||
0x01 & offmask & byte & 1 & rw\\
|
||||
0x02 & anapot & 9bit & 2 & rw\\
|
||||
0x04 & digipot & 9bit & 2 & rw\\
|
||||
\hline
|
||||
0x06 & TEMP\_SENSOR & float & 4 & r\\
|
||||
0x0a & EXT\_AIN & float & 4 & r\\
|
||||
0x0e & MONITOR\_48V & float & 4 & r\\
|
||||
0x12 & MONITOR\_48I & float & 4 & r\\
|
||||
0x16 & MONITOR\_8VBUS & float & 4 & r\\
|
||||
0x1a & MONITOR\_8IBUS & float & 4 & r\\
|
||||
0x1e & MONITOR\_8V\_0 & float & 4 & r\\
|
||||
0x22 & MONITOR\_8V\_1 & float & 4 & r\\
|
||||
0x26 & MONITOR\_8V\_2 & float & 4 & r\\
|
||||
0x2a & MONITOR\_8V\_3 & float & 4 & r\\
|
||||
0x2e & VDD\_1V8\_ANA & float & 4 & r\\
|
||||
0x32 & VDD\_1V8\_IOUT\_ANA & float & 4 & r\\
|
||||
0x36 & VDD\_1V8\_DIGI & float & 4 & r\\
|
||||
0x3a & VDD\_1V8\_IOUT\_DIGI & float & 4 & r\\
|
||||
0x06 & TEMP\_SENSOR & float & 4 & r\\
|
||||
0x0a & EXT\_AIN & float & 4 & r\\
|
||||
0x0e & MONITOR\_48V & float & 4 & r\\
|
||||
0x12 & MONITOR\_48I & float & 4 & r\\
|
||||
0x16 & MONITOR\_8VBUS & float & 4 & r\\
|
||||
0x1a & MONITOR\_8IBUS & float & 4 & r\\
|
||||
0x1e & MONITOR\_8V\_0 & float & 4 & r\\
|
||||
0x22 & MONITOR\_8V\_1 & float & 4 & r\\
|
||||
0x26 & MONITOR\_8V\_2 & float & 4 & r\\
|
||||
0x2a & MONITOR\_8V\_3 & float & 4 & r\\
|
||||
0x2e & VDD\_1V8\_ANA & float & 4 & r\\
|
||||
0x32 & VDD\_1V8\_IOUT\_ANA & float & 4 & r\\
|
||||
0x36 & VDD\_1V8\_DIGI & float & 4 & r\\
|
||||
0x3a & VDD\_1V8\_IOUT\_DIGI & float & 4 & r\\
|
||||
\hline
|
||||
0x3e & CommitHash & float & 4 & s\\
|
||||
0x42 & CommitDirtyFlag & byte & 1 & s\\
|
||||
0x43 & STM32UUID & 96bit & 12 & s\\
|
||||
0x3e & CommitHash & float & 4 & s\\
|
||||
0x42 & CommitDirtyFlag & byte & 1 & s\\
|
||||
0x43 & STM32UUID & 96bit & 12 & s\\
|
||||
\end{tabular}
|
||||
\end{figure}
|
||||
|
|
|
@ -1,22 +1,44 @@
|
|||
%! TEX root = ./thesis.tex
|
||||
\twocolumn
|
||||
\chapter{vorläufiger Inhalt}
|
||||
\begin{itemize}
|
||||
\item I2C stabil + (Chip ID == PowerIt ID) auslesbar
|
||||
\item I2C stabil
|
||||
\begin{itemize}
|
||||
\item I2C Umbau, was war, was wird nicht mehr, was bleibt, was wird neu?
|
||||
\item \href{https://techoverflow.net/2015/02/03/reading-the-stm32-unique-device-id-in-c/}{UID auslesen}
|
||||
\begin{todolist}
|
||||
\item[$\checkmark$] Umbau
|
||||
\item alt
|
||||
\item ballast
|
||||
\item reused
|
||||
\item neu
|
||||
\end{todolist}
|
||||
\item \href{https://techoverflow.net/2015/02/03/reading-the-stm32-unique-device-id-in-c/}{STM32UUID auslesen}
|
||||
\end{itemize}
|
||||
\item Messungen kalibrieren
|
||||
\begin{itemize}
|
||||
\item ADC vs Keithley (Spannugnen) bzw. vs EL (Strom)
|
||||
\begin{todolist}
|
||||
\item 48V
|
||||
\item 10V
|
||||
\item[\checkmark] 1.8V (Fig.\ref{fig::1V8vsR})
|
||||
|
||||
\item 48I
|
||||
\item 10I
|
||||
\item 1.8I
|
||||
\end{todolist}
|
||||
\item Kennlinien charakterisieren (woher kommen Fehler? Offset, Gain)
|
||||
\begin{itemize}
|
||||
\item erklaeren der consts im Quellcode der Firmware:
|
||||
\begin{itemize}
|
||||
\begin{todolist}
|
||||
\item Messschaltungen der Spannungen und Stroeme
|
||||
\begin{todolist}
|
||||
\item 48V
|
||||
\item 10V
|
||||
\item 1.8V
|
||||
\end{todolist}
|
||||
\item Berechnung von 8I
|
||||
\item Umrechnung des Temp sensors
|
||||
\end{itemize}
|
||||
\end{todolist}
|
||||
\item Langzeit-Stabilität (\textasciitilde 1 Monat)
|
||||
\item Powerit-zu-Powerit variation $\rightarrow$ woher kommen Kalibrationswerte? (kein ID chips)
|
||||
\begin{itemize}
|
||||
|
@ -38,6 +60,7 @@
|
|||
\item Stabilität!
|
||||
\end{itemize}
|
||||
\end{itemize}
|
||||
\onecolumn
|
||||
\begin{figure}[b]
|
||||
\centering
|
||||
%\includegraphics[height=.4\textheight]{data/m02_adccalib_48/i48_adccalib.eps}
|
||||
|
@ -48,5 +71,17 @@
|
|||
\centering
|
||||
\includegraphics[width=\textwidth]{data/m03_poticalib/adccalib_02.eps}
|
||||
\caption{ Kurve der 1.8V Ausgangsspannung in Abhaengigkeit des angelegeten Widerstandes}
|
||||
\label{}
|
||||
\label{fig::1V8vsR}
|
||||
\end{figure}
|
||||
\begin{figure}[b]
|
||||
\centering
|
||||
\includegraphics[height=.4\textheight]{tikz/mon48v.pdf}
|
||||
\caption{circuit for getting the input voltage}
|
||||
\label{fig::mon48v}
|
||||
\end{figure}
|
||||
\begin{figure}[b]
|
||||
\centering
|
||||
\includegraphics[height=.4\textheight]{tikz/mon48i.pdf}
|
||||
\caption{circuit for getting the input current}
|
||||
\label{fig::mon48i}
|
||||
\end{figure}
|
||||
|
|
12
thesis.tex
12
thesis.tex
|
@ -21,10 +21,10 @@
|
|||
\tableofcontents
|
||||
\include{./temp_content}
|
||||
\include{./tabs/registerbuffer}
|
||||
\include{parts/intro}
|
||||
\include{parts/tasks}
|
||||
\include{parts/theory}
|
||||
\include{parts/experiments}
|
||||
\include{parts/results}
|
||||
\include{parts/outlook}
|
||||
%\include{parts/intro}
|
||||
%\include{parts/tasks}
|
||||
%\include{parts/theory}
|
||||
%\include{parts/experiments}
|
||||
%\include{parts/results}
|
||||
%\include{parts/outlook}
|
||||
\end{document}
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
\documentclass[]{standalone}
|
||||
\input{./tikzpreamble}
|
||||
|
||||
\begin{document}
|
||||
\begin{circuitikz}[scale=2]
|
||||
\draw[color=black, thick]
|
||||
(1,0)
|
||||
to [R, text width=1cm, l={R 500$\mu$},f>^=I$_{IN}$, *-] (1,6)
|
||||
to [short, -o](0,6) node[left] {V$_{IN} = -48V$}
|
||||
|
||||
(1,5.1) node[draw=black, fill=white, regular polygon, regular polygon sides=4] {PowerIt}
|
||||
|
||||
(0,0) node[left]{GND$_{V_{IN}}$} to [short, o-] (1,0)
|
||||
|
||||
(2.1,3) node[fd op amp] (fdoa) {}
|
||||
(fdoa.+) to [short,-*] (1,2)
|
||||
(fdoa.-) to [short,-*] (1,4)
|
||||
(fdoa.down) to (2.06,0)
|
||||
(fdoa.down)+(-.2,-.1)
|
||||
to (1.86,0)
|
||||
to [short, -*](1,0)
|
||||
(fdoa.up)
|
||||
to (2.06,6)
|
||||
to [short,-o](6,6) node[right] {$V_{SS} = 3.3V$}
|
||||
(fdoa.up)+(-.2,.1)
|
||||
to (1.86,6)
|
||||
to [short, -*] (2.06,6)
|
||||
|
||||
(4,3) node[op amp] (oa) {}
|
||||
(fdoa.out -) to (oa.-)
|
||||
(fdoa.out +) to (oa.+)
|
||||
|
||||
(2.06,0) to [short,-o] (6,0) node[right]{GND}
|
||||
(5,0) node[ground]{} node[circ](4.5,0){}
|
||||
|
||||
(oa.out) to [short,-] (5.5,3) node[right,draw=black] {MONITOR\_48I}
|
||||
;
|
||||
\end{circuitikz}
|
||||
\end{document}
|
|
@ -4,12 +4,12 @@
|
|||
\begin{document}
|
||||
\begin{circuitikz}[scale=2]
|
||||
\draw[color=black, thick]
|
||||
(0,0) node[left]{$V_{SS}=-48V$}
|
||||
(-1,0) node[left]{$V_{IN}=-48V$}
|
||||
to [short,o-*] (1.5,0){} % Baseline for connection to ground
|
||||
(1,0)
|
||||
to [R, text width=1cm, l={R? 240k}, *-] (1,3)
|
||||
to [R, text width=1cm, l={R? 1k}, *-] (1,6)
|
||||
(0,6) to [short, o-] (1,6)
|
||||
(-1,6) node[left]{$GND_{V_{IN}}$} to [short, o-] (1,6)
|
||||
|
||||
(2.1,3) node[fd op amp] (fdoa) {}
|
||||
(fdoa.+) to (1,3)
|
||||
|
@ -21,7 +21,7 @@
|
|||
to [short, -*](.1,6)
|
||||
(fdoa.up)
|
||||
to (2.06,6)
|
||||
to (5,6)
|
||||
to [short,-o](6,6) node[right] {$V_{SS} = 3.3V$}
|
||||
(fdoa.up)+(-.2,.1)
|
||||
to +(-.2,1)
|
||||
to [short, -*] +(0,1)
|
||||
|
@ -32,12 +32,8 @@
|
|||
|
||||
(2.06,0) to [short,-o] (6,0) node[right]{GND}
|
||||
(5,0) node[ground]{} node[circ](4.5,0){}
|
||||
(5,0)
|
||||
to [R, text width=1cm, l=$R20$ 1k] (5,3)
|
||||
to [R, l=$R21$, *-*] (5,6)
|
||||
to [short, -o](6,6) node[right]{$V_{DD}=3.3 V$}
|
||||
|
||||
% Mosfet Transistors
|
||||
(oa.out) to [short,-] (6,3) node[right,draw=black] {MONITOR\_48V}
|
||||
;
|
||||
\end{circuitikz}
|
||||
\end{document}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
\usepackage{tikz}
|
||||
\usetikzlibrary{positioning, shapes, arrows}
|
||||
\usetikzlibrary{positioning, shapes, arrows, shapes.geometric}
|
||||
\usepackage[siunitx]{circuitikz}
|
||||
\usepackage[utf8]{inputenc}
|
||||
%\usepackage{cm}
|
||||
|
|
Loading…
Reference in New Issue