Analog Inputs (ADC) (MX-4)
Overview⚓︎
The ADC conversions are managed by the co-processor and the values are exposed as sysfiles.
- C61
- input_voltage
- analog_1
- analog_2
- Start signals
- More information see IIOs
- CT and CT GL
- input_voltage
- input_battery
- analog_1 (start signal, analog in 1A&B)
- analog_2 (4-20mA)
- analog_3 (0-32V)
- analog_4 (0-32V)
- Start signals
- T20, T30 and T30 FR
- input_voltage
- input_battery
- analog_1
- Start signals
# ls /opt/hm/pic_attributes/ | grep -i analog
analog_1_calibration_u
analog_1_uA
analog_2_calibration_u
analog_2_uA
analog_3_calibration_u
analog_3
analog_4_calibration_u
analog_4
root@mx4-gtt:~# ls /opt/hm/pic_attributes/ | grep -i input
input_battery_calibration_u
input_battery
input_battery_threshold_high
input_battery_threshold_low
input_temperature_calibration_u
input_temperature_mC
input_voltage_calibration_u
input_voltage
input_voltage_threshold_high
input_voltage_threshold_low
Calibration files are not be used by end users.
Example reading input voltage⚓︎
Example of when Vref (ADC reference voltage) is turned off.⚓︎
Vref should normally be always on but it is turned off when entering sleep (go_to_sleep.sh). If you poll ADC values while entering sleep you will get some errors after Vref has been turned off. Note: Coprocesssor firmware 2.8.2 and later (CT and T30/T30 FR) vref and other power are turned off after main processor by the coprocessor so it should not be any errors even in late state of go_to_sleep.sh.