# ain: analog inputs

> Two analog input channels at a high rate, in millivolts, for external sensors wired to an Asense amplifier.

The `ain` table holds the two analog input channels of an Asense amplifier. External sensors, such as geophones or strain gauges, are wired to these inputs. The table stores the voltage on each channel in packets of evenly spaced samples.

## Fields

| Field | Type | Unit | Description |
| --- | --- | --- | --- |
| `ain_a`, `ain_b` | series | mV | Voltage on channel A and channel B, one point per sample. With `combined_tuple` or `combined_dict` these become one `ain` series with `a` and `b`. |
| `odr` | number | Hz | Output data rate. Only with `merge=false`. |
| `scale` | number | mV per count | Conversion factor the device reported. Only with `merge=false`. |
| `seq` | integer | | Packet counter from the device. Only with `merge=false`. |

To turn millivolts into the quantity your sensor measures, apply that sensor's own calibration factor.

Merging and timing work as for [`acc`](https://asense.semitronica.pt/docs/data-model/acc/).

Source page: https://asense.semitronica.pt/docs/data-model/ain/
