|
|
Строка 1: |
Строка 1: |
| <languages/> | | <div lang="ru" dir="ltr" class="mw-content-ltr"> |
| | == Как получить напряжение с АЦП == |
| | </div> |
|
| |
|
| == How to get voltage from ADC == | | <div lang="ru" dir="ltr" class="mw-content-ltr"> |
| | #Напряжение должно быть в диапазоне допустимых значений. |
| | #Клеммники Ax выполняют две функции: АЦП и управление низковольтной нагрузкой. Перед измерением напряжение, поставьте соответствующий выход управления низковольтной нагрузкой в положение "выключено". Например, если вы подключаетесь к клемме A1, выключите в веб-интерфейсе A1_OUT (раздел Relays & FETs). |
| | #Подключите ваш источник к клемме. Значение напряжения сразу появится в [[Веб-интерфейс Wiren Board | веб-интерфейсе]], в устройстве ADCs. Также значение транслируется в систему сообщений [[Special:MyLanguage/MQTT|MQTT]]. |
| | </div> |
|
| |
|
| #Select the terminal to which your source can be connected based on the maximum allowable voltage (see table below).
| | <div lang="ru" dir="ltr" class="mw-content-ltr"> |
| #Most ADC terminals have two functions: ADC and low-voltage load control. Before measuring the voltage on the ADC, turn off the appropriate low-voltage load control output. For example, if you are connecting to terminal A1, turn off A1_OUT in the web interface (the Relays & FETs section).
| | Также значение можно получать в ручном режиме: [[Special:MyLanguage/Низкоуровневая работа с ADC|Низкоуровневая работа с ADC]]. |
| #:For details, see [[Мультиплексирование портов/en|Multiplexing ports]]
| | </div> |
| #Connect your source to the terminal. The voltage value will immediately appear in the [[Wiren Board 4:Веб-интерфейс | веб-интерфейсе]] in the ADCs device. The value is also translated to the MQTT message system[[MQTT|MQTT]].
| |
|
| |
|
| | <div lang="ru" dir="ltr" class="mw-content-ltr"> |
| | == Входное напряжение == |
| | </div> |
|
| |
|
| == Using values from external programs == | | <div lang="ru" dir="ltr" class="mw-content-ltr"> |
| | Демон wb-homa-adc транслирует значение в очередь сообщений MQTT в топик /devices/wb-adc/controls/Vin . |
| | Таким образом, значение отображается в веб-интерфейсе как канал Vin устройства ADCs |
| | </div> |
|
| |
|
| A special WB-homa-adc driver translates the value to the [[MQTT|MQTT]] system and can be obtained there.
| | <div lang="ru" dir="ltr" class="mw-content-ltr"> |
| | == Список АЦП для контроллера WB6 == |
| | </div> |
|
| |
|
| Also, the value can be obtained in manual mode:[[Низкоуровневая работа с ADC/en|Low-level work with ADC]].
| | <div lang="ru" dir="ltr" class="mw-content-ltr"> |
| | В Wiren Board 6 каналы АЦП процессора подключены к клеммникам A1-A4. Также на АЦП заведено входное напряжение (после входных диодов) и напряжение на клемме 5Vout. |
| | </div> |
|
| |
|
| | | <div lang="ru" dir="ltr" class="mw-content-ltr"> |
| == Resistance measurement == | | Смотрите также: |
| | | * [[Wiren Board 6.2: Peripherals#Каналы АЦП| Каналы АЦП в Wiren Board 6.2]] |
| Wiren Board 5.8 controllers '''and below''' were able to measure the resistance of resistors connected to the R1 and R2 inputs.
| | * [[ADC.OLD | Списки АЦП для старых версий контроллера]] |
| | | </div> |
| TODO: you should write here how to configure resistive inputs through the web interface.
| |
| | |
| See [[ADC:Измерение сопротивлений - технические детали/en|ADC: resistance measurement - technical details]]
| |
| | |
| | |
| == Input voltage ==
| |
| | |
| The wb-homa-adc daemon translates the value to the MQQT message queue in the /devices/wb-adc/controls/Vin topic. Therefore, the value is displayed in the web interface as the Vin channel of the ADCs device
| |
| | |
| | |
| == Battery voltage ==
| |
| | |
| The wb-homa-adc daemon translates the value to the MQTT message queue in the topic /devices/wb-adc/controls/BAT. Therefore, the value is displayed in the web interface as the BAT channel of the ADCs device
| |
| | |
| | |
| Manual mode: see [[Низкоуровневая работа с ADC| low-Level ADC operation]].
| |
| | |
| | |
| | |
| | |
| == Technical details on the implementation of the ADC ==
| |
| | |
| Wiren Board сontrollers versions 2.3 and 4 have 8 ADC channels that are multiplexed into one processor channel (LRADC1). Multiplexing channels are shown in the table [[Wiren Board 4:Список GPIO|Wiren Board 4:Список GPIO]].
| |
| | |
| The Wiren Board 5 uses 8 different ADC channels that are connected to separate processor channels. The 4V line is connected to the BAT channel (LRADC7), in addition to measuring the voltage at the 2 resistive inputs, 4 universal inputs A1-A4 and the input voltage (see table below).
| |
| | |
| The ADC channels serving the R1 and R2 inputs have a built-in independent current source that is used to measure the resistance connected to the channel. Current source accuracy: 5%. See [[Калибровка аналоговых входов| Calibration of analog inputs]].
| |
| | |
| In Wiren Board 6, the ADC channels of the processor are connected to terminals A1-A4. Also, the ADC has input voltage (after the input diodes) and voltage at the terminal 5Vout.
| |
| | |
| | |
| | |
| === The main channels ===
| |
| | |
| A part of the ADC channels is output to the terminals in parallel with the low-voltage load control transistors. '''Make sure''' you have closed the corresponding FET using GPIO before using the ADC. For details, see [[Мультиплексирование портов/en|Multiplexing ports]]
| |
| | |
| | |
| === A list of ADC for different devices ===
| |
| | |
| | |
| ==== Wiren Board 6 ====
| |
| | |
| See [[Wiren Board 6.2: Peripherals#Каналы АЦП|Wiren Board 6.2: Peripherals#Каналы АЦП]]
| |
| | |
| | |
| ==== Wiren Board 5 ====
| |
| | |
| {| border="1" class="wikitable" style="text-align:center"
| |
| ! terminal block || ADC Channel (LRADCxx) || Divider|| Final formula (without divider) || V max. measured || comments
| |
| |-
| |
| | |
| | A1 || 1
| |
| |rowspan="4"|88k7/12k || rowspan="4"| V = N * 3.80 mV || rowspan="4"| 31V || rowspan="4"|
| |
| |-
| |
| | A2 || 2
| |
| |-
| |
| | A3 || 3
| |
| |-
| |
| | A4 || 4
| |
| |-
| |
| | |
| | |
| | R1 || 6
| |
| |rowspan="2"| 1 || rowspan="2"| V = N * 0.4518 mV|| rowspan="2"| 3.1V || rowspan="2"| r2 = 3150 Ohm,
| |
| r1 = 1000 kOhm
| |
| |-
| |
| | R2 || 0
| |
| |-
| |
| | |
| | |
| | |
| | |
| | 4В/li_pol || 7 ||
| |
| | V = N * 1.807 mV || - || on the 4 В line
| |
| |-
| |
| | Vin || 5
| |
| |88k7/12k|| V = N * 3.80 mV || 31V || inpit voltage
| |
| |-
| |
| |}
| |
| | |
| | |
| ==== WB4 ====
| |
| | |
| {| border="1"
| |
| |
| |
| Terminal block || Divider || Formula to recalculate || Final formula (without divider) || V max. measured (with divider) || comments
| |
| |-
| |
| | |
| | A1-A3 || 100k/90.9k || N / 4095 * 1.85V * 2.100 || V = N * 0.949 mV || 7.4V ||
| |
| |-
| |
| | A4-A5 || 100k/11.86k || N / 4095 * 1.85V * 9.43 || V = N * 4.26 mV || 34.4V ||
| |
| |-
| |
| | R1-R2 || 3k15/1M || N / 4095 * 1.85V * 1.003 || V = N * 0.426 mV || 3.7V ||
| |
| |-
| |
| | li_pol || 100k/90.9k || N / 4095 * 1.85V * 2.100 || V = N * 0.949 mV || - || battery
| |
| |-
| |
| | |
| | Vin || 33k/4k51 ||N / 4095 * 1.85V * 8.32 || V = N * 3.76 mV || 30.6V || input voltage, iio channel 0
| |
| |-
| |
| | |
| |}
| |
| | |
| | |
| ==== WB3.5 ====
| |
| | |
| {| border="1"
| |
| | Terminal block || Divider|| Formula to recalculate || Final formula || V max || comments
| |
| |-
| |
| | |
| | A1-A4 || 220k/22k|| V = N / 4095 * 1.85V * 11 || V = N * 4.97 mV || ||
| |
| |-
| |
| | |
| | R1-R4 || - || V = N / 4095 * 1.85V ||V = N * 0.452 mV || ||
| |
| |-
| |
| | |
| | Vin || 33k/4k53 ||N / 4095 * 1.85V * 8.28 || V = N * 3.74 mV || 30V || input voltage, iio channel: 0
| |
| |-
| |
| | |
| |}
| |
| | |
| | |
| | |
| | |
| ==== WB NETMON-1 ====
| |
| | |
| {| border="1"
| |
| | Terminal block || Divider || Formula to recalculate || Final formula (without divider) || V max. measured (with divider) || comments
| |
| |-
| |
| | A1-A8 || 31k/4.68k || N / 4095 * 1.85V * 7.627 || V = N * 3.446 mV || 20V ||
| |
| |-
| |
| | Vin || 12k/1k ||N / 4095 * 1.85V * 13 || V = N * 5.873 mV || || input voltage
| |
| |-
| |
| |}
| |
| | |
| | |
| | |
| ==== WB2.8 ====
| |
| | |
| {| border="1"
| |
| | Terminal block || Divider|| Formula to recalculate || Final formula || comments
| |
| |-
| |
| | |
| | A1-A7 || 12K/33K|| V = N / 4095 * 1.85V * 1.364 || V = N * 0.616 mV ||
| |
| |-
| |
| | |
| |}
| |