Knowledge Base
...
Basics: Working With Hardware
Sensors
Digital Sensors
3min
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 packages 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 power supply the power supply is often a dc voltage and varies according to application and type ensure to consult the datasheet for specific details communications interface 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