16 578
правок
(не показано 13 промежуточных версий 2 участников) | |||
Строка 2: | Строка 2: | ||
The LRADC channel of the processor that the Wiren Board uses to operate the ADC has an integrated current source. This allows to measure the resistance of the load connected to the outputs of the ADC, i.e., to read values of resistive sensors. | The LRADC channel of the processor that the Wiren Board uses to operate the ADC has an integrated current source. This allows to measure the resistance of the load connected to the outputs of the ADC, i.e., to read values of resistive sensors. | ||
See also the description in the documentation | See also the description in the processor documentation, p. 1334 -[http://www.freescale.com/files/dsp/doc/ref_manual/IMX23RM.pdf Reference Manual] | ||
Resistance measurement is implemented in the wb-homa-adc driver, see [[ADC/en |ADC]]. | Resistance measurement is implemented in the wb-homa-adc driver, see [[ADC/en |ADC]]. | ||
Строка 10: | Строка 10: | ||
== The measuring procedure in the manual mode == | == The measuring procedure in the manual mode == | ||
Make sure the wb-homa-adc daemon is | Make sure the wb-homa-adc daemon is not running | ||
=== Disable output === | === Disable output === | ||
(only for Wiren Board rev. 2.8) | (only for Wiren Board rev. 2.8) | ||
* For terminals 2-7: close the transistor. See [[Список GPIO/en| | * For terminals 2-7: close the transistor. See [[Список GPIO/en|List of GPIOs]], [[Управление низковольтной нагрузкой/en|Low voltage load management]]. | ||
* For terminal strip 9: set GPIO 2 to input mode ([[Работа с GPIO/en|Managing GPIO]]) | * For terminal strip 9: set GPIO 2 to input mode ([[Работа с GPIO/en|Managing GPIO]]) | ||
Строка 71: | Строка 71: | ||
=== | === Calculating the results === | ||
The resistance is calculated by the formula: | |||
<pre> | <pre> | ||
Строка 79: | Строка 79: | ||
</pre> | </pre> | ||
<b>r</b> | <b>r</b> is the measured resistance, <b>R2</b> is the series resistance of the channel | ||
<b>R1</b> | <b>R1</b> is parallel resistance (divider arm/leakage currents). | ||
<b> V </b> | <b> V </b> is input voltage LRADC measured by the processor: | ||
<pre> | <pre> | ||
Строка 89: | Строка 89: | ||
</pre> | </pre> | ||
where N is the raw LRADC readings, I is the output current. | |||
For different versions: | |||
* Wiren Board 5 ( | * Wiren Board 5 (terminals R1-R2): <b>R2 = 3150 Ohm, R1 = 1000kOhm</b>. | ||
* Wiren Board 4 ( | * Wiren Board 4 (terminals R1-R2): <b>R2 = 3570 Ohm, R1 = 120kOhm</b>. | ||
* Wiren Board Smart Home rev. 3.5 ( | * Wiren Board Smart Home rev. 3.5 (terminals R1-R4): <b>R2 = 600 Ohm, R1 = 93kOhm</b>. | ||
* Wiren Board rev. 2.8. <b>R2 = 12kOhm, R1 = 33.0 kOhm</b>. | * Wiren Board rev. 2.8. <b>R2 = 12kOhm, R1 = 33.0 kOhm</b>. |