This input is available on OSD board. It is on black socket marked USER AI, and pin marked A2.
(TODO: picture)
This input can support many sensors like temperature, pressure, current, rangefinder and others.
Additionally to numeric value OSD allows to show measure units.
Each sensor has its characteristics and requires calibration.
System allows to use 3 general types of sensors:
Linear sensors
Linear sensors (like temperature or current) has analog output voltage proportional to measured value. This output voltage should be in range between 0V and 3.3V. if sensor’s output exceeds 3.3V it should be connected using voltage divider. For this type of sensors use formula:
(*) x = scale * (ADC + offset)
where:
x – it is a result shown on OSD screen
scale – it is a scaling factor to convert measured input voltage
offset – compensation for sensor’s zero offset
ADC it is a value measured on A2 input
NOTE1 values shown on OSD screen for USER A2 input are integral numbers without decimal point and fraction.
NOTE2 temperature sensor sold by Pitlab has output connected to USER A1 slot on the connector. To use it with USER A2 input you need to change output wire from A1 to A2 slot on the connector.
To calculate proper values for offset and scale you need to follow these steps:
- connect sensor to OSD input,
- Connect OSD to USB port
- Run FPV_manager
- Open page OSD->Layout
- Read layout from OSD
- Enable field USER A2
- Write layout back to OSD
- Open page OSD->settings
- in USER A2 frame set scale = 1 and offset = 0 then press button [save]
- Apply first known measured value to the sensor (e.g. low temperature – Low_in ) and write down value shown on OSD screen for USER A2 field (Low_osd)
- Apply second known measured value to the sensor (e.g. high temperature – Hi_in) and write down value shown on OSD screen (Hi_osd)
- Calculate scale using this formula:
scale = (Hi_in – Lo-in) / (Hi_osd – Lo_osd)
offset = (Lo_in / scale) – Lo_osd - Set calculated values into scale and offset fields, set units for measured value and then press button [save].
Example:
Applied low temperature (Low_in): 4 degrees
Value shown on OSD (Low_Osd): 3450
Applied high temperature (Hi_in): 93 degrees
Value shown on OSD (Hi_OSD): 4095
Values to be applied in FPV_manager configuration fields:
scale = (93 – 4) / (4095 – 3450) = 0.138
offset = (4 /0.138)-3450 = -3421
Non-linear sensors
Sensor with non-linear characteristics (like airspeed pressure sensors) has output voltage proportional to 2-nd power of measured value. This output voltage should be in range between 0V and 3.3V. if sensor’s output exceeds 3.3V it should be connected using voltage divider. For this type of sensors use formula with square roots:
(*) x = scale * sqrt(ADC – offset)
where:
x – it is result shown on OSD screen
scale – it is a scaling factor to convert measured input voltage
offset – it is sensor zero offset
ADC it is a value measured on A2 input
To calculate proper values for offset and scale you need to follow these steps:
(TODO: steps and formula calculation)
Sensors with PWM
(pulse width modulation)
(TODO: whole description )