![]() The sensors are used to measure the physical quantities, such as pressure, temperature, sound, humidity, and light, etc.Īn example of sensors is Fire Alarm, a detector present on the fire alarm detects the smoke or heat. It can also combine electronics and sensing elements on the same substrate. It has superior mechanical stability, machinability, etc. ![]() It is considered as a widely used semiconductor material. The sensor is a device, which is made up of Single Crystal Silicon. The use of sensors is expanding with new technologies. ![]() For example, controlling the brightness of the lamp by touching its base, etc. Nowadays, Sensors are used in daily lives. The output signal is easily readable by humans. The sensors transfer those changes to the electronic devices in the form of a signal.Ī sensor and electronic devices always work together. The sensors are defined as a machine, module, or a device that detect changes in the environment. Before learning about the Arduino Sensors, lets first understand the sensors as a general term. The common pin is connected to the bulb and the NO pin is connected to the phase line from the plug.Next → ← prev What are the Arduino sensors?Īrduino is the open-source platform used for making custom electronics projects. And the phase line goes to another point bulb through the relay switch. ![]() Connect the neutral line directly to the bulb. Here you have to work with a high-volt AC line. On the output side, it has three pins – NC, COM, and NO. Connect the VCC to the Arduino 5v pin, the Ground pin to the Arduino ground pin, and the Input pin to the Arduino digital pin 3. The relay has three pins on the control side – VCC, Ground, and Input pin. Here you can see that the LDR is connected as it was connected before, but there are two new components in the circuit – a relay module and an electric bulb. I take no responsibility for any of your actions.įor this tutorial, you have to make a small circuit like below. So please take all necessary precautions and turn off all the power supplies before working on the circuit. Incorrect or improper use could result in serious injuries or death. You can add an LED to the Arduino using the below circuit or you can follow my detailed Arduino LED tutorial.īefore we continue with this tutorial, I will warn you that this project involves high voltages. So here I will turn on an LED if the LDR reading is less than 20 otherwise I will turn off the LED.įor this experiment, you need to add a LED to your existing circuit. Turn on an LED When it is Darkįrom the above section, you have found that in a dark environment the LDR sensor reading is near about 10 – 20 (can be different in your LDR). Then in the next line, I use serial.print() function to print the sensor data. In the loop section, I read the sensor value using analogRead() function and store that data in the variable ldrValue. Then in the setup section, I started a serial communication at a 9600 bud rate. Here you can see that I create a constant integer ldrPin to hold the Arduino pin number connected to the LDR and an integer ldrValue to hold the LDR sensor data. Check the sensor data in different light conditions (in light and dark environments). The below code will show the raw sensor data on Arduino serial monitor.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |