In conformity with the Regulation (EU) 2016/679 of the European Parliament and of the Council of 27 April 2016 on the protection of natural persons with regard to the processing of personal data and on the free movement of such data and (General Data Protection Regulation) we offer the possibility of accepting or not accepting the use of cookies while navigating through our website. You can find more information in our website. Cookies policy information.
0 products0,00 €
Ksix blog Accessories and gadgets for smartphones
Difference between analog and digital sensors
Publicado en Ksix mobile tech el 29 May 2017

A sensor is an electronic device that is constantly measuring a physic variable. For example: temperature, distance, humidity, light, etc. And then transforms the physic variable in an electric signal.

An actuator is an electronic device that transforms an electric signal in a physic variable (light, sound, etc.)

They are two kinds of sensors: digital and analog.

A digital sensor only detects two possible status: if it is working at 100% or at 0%.

An analog sensor measures continuously the variable and detects any proportional value between 100% and 0%. For this reason, the measure provided by the analog sensor is more precise than the one provided by the digital sensor.

Example: A temperature sensor that measures between 0°C and 100°C.

A digital sensor can only measure if it is working over 50°C (displaying 1) or under 50°C (displaying 0).

An analog sensor can measure short intervals at high resolution (approximately 0.1°C of variation).

The resolution of the Build&Code UNO analog inputs is 10 bits, this means that it can detect up to 210=1024 values between 0 and 5V.

The analog sensors included in the Build & Code Kits are:

The digital sensors included in the Build & Code Kits are:

The digital actuators included in the Build & Code kits are:

Build & Code Sensors:

Light sensor


A light sensor is an analog sensor, it can detect slight light variations.


The light sensor operation is very simple: it has an inner resistance that change its value depending on the light received. If you put the sensor in the dark its value will be close to 0; if you put the sensor under a light bulb its value will be close to 1023.


You can make many different projects with a light sensor:


Light-follower Robot: with two light sensors, one on each side, the robot can identify the direction from where the light comes from and you can program it to follow the light.


Domotic: Depending on the light quantity, program your smarthouse to recognize if it is day or night, and if it is the night, the house can automatically close the windows.


Temperature sensor


You can use the TMP36 Temperature sensor, which is an analog sensor that measures the temperature, you can develop different projects based on this information.


The temperature sensor operation is quite basic, it has an inner resistance that changes its value depending on the temperature. So if you put this sensor in a cold place, it will receive less electricity and the Arduino board will detect a value close to 0; but if you put it warm place, the Arduino board will detect a value close to 1023.


With the temperature sensor you can develop different projects:


Thermometer: You can make a digital thermometer to measure temperature at different rooms, or even for people.


Domotic: You can use the sensor to turn on the air conditioner automatically when the room’s temperature is too hot.

Continue learning about Build & Code