Digital Sensors
Digital sensors provide an output on demand that is a digital approximation of the measured quantity. The output is now proportional to the quantity measured, but in a digital format that requires a communication interface to deliver to the microcontroller.
Digital Sensors are also available, which can be referred to as a "composite" sensor. A sensor that can return different types of values.
Digital sensors are supplied in several form factors, from types that look similar to transistors to plastic-type enclosures. The packaging is dependent on the value being measured, but can often be much smaller than an analog equivalent.
In most cases the format for a sensor is the following:
- Input Voltage
- Ground
- Communications interface
- Signal Reference
The power supply is often a DC voltage and varies according to application and type. Ensure to consult the datasheet for specific details.
The communications interface available may depend on the device design on the device variant. Some devices have different options depending on the variant for example I2C, and SPI which are standard interfaces. Other digital devices have proprietary interfaces which may require specialized or custom libraries when writing the code to interface with the device.