Skin Resistance
schemeit-skin-adc.png
$ADC_{in} = ADC_{gpio}{R_{skin} \over R_{ref}+R_{skin}}$

let $M = ADC_{gpio}$
let $R = R_{ref}$
let $x = ADC_{in}$
let $y = R_{skin}$

$\Rightarrow x = M{y \over R+y}$
$\Rightarrow y = {Rx \over M-x}$

M: GPIO 輸出 High 時的電壓,對應的 ADC 值($ADC_{gpio}$
R: 參考電阻($R_{ref}$
x: ADC 讀到的值($ADC_{in}$
y: 皮膚量到的電阻($R_{skin}$

(1)
\begin{align} \left\{\begin{matrix} \\ y = {Rx \over M-x} \\ R = 1000 \\ M = 4095 \end{matrix}\right. \end{align}
(2)
\begin{align} \Rightarrow y = {1000x \over 4095-x} \end{align}

對應到 Implementation of Ohmmeter Using ZKit-51 的電路
voltage-divider.png
$R_k = R$
$R_u = y$
$V_i = V_{ref}^{adc} {M \over 4095}$
$V_u = V_{ref}^{adc} {x \over 4095}$

Reference

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License