YTread Logo
YTread Logo

Sensors - which one to use

Jun 07, 2021
If you remember, a few weeks ago I made a video about the types of screens you could use in your project. Well, I like to do the same thing but with

sensors

that you could use with Arduino or other microcontrollers, obviously there are a lot of

sensors

. and I can get them all, but I would like to show you the sensors that I have in my workshop. Show them an example code for each and talk about the use of each of these sensors. We have a lot of sensors and some of these have a digital output or analog output or some type of I square C or SPI communication, this will be another basic video, but this way you could get an idea of ​​what projects you could start with an Arduino and some sensors .
sensors   which one to use
Hope this helps beginners or For those who are not beginners, check out a few more sensors we have on the market before we get started. Be sure to hit the subscribe button and notification bell to check out my future videos. Also thanks to all my sponsors for the support, so let's get started. Started this video is sponsored by gel CPCB who offers the cheapest prices for PCB services right now with only two dollars for ten four by ten centimeter PCB the finish of your PCB is very professional and high quality so just upload the Gerber files to GL CPC b.com select thickness, size, quantity, etc., and place your order at amazing prices.
sensors   which one to use

More Interesting Facts About,

sensors which one to use...

What's happening? My friends, welcome back. I have a bunch of sensors here, my table, a breadboard, my oscilloscope and an Arduino for testing. I won't do it. Let's go together, we know the code step by step, but below I share the outline for each example and the code with comments for each line, so make sure you read it before uploading the code. What could be a sensor? I mean even a push. The button could send something that could detect whether I press the button or not, that's pretty obvious, but we generally don't refer to a button as a sensor, but rather as a detector, so a detector is the result after the process of the sensor to tell if something is. or not, for example, this whole module is a so-called motion detector, if it detects motion, it gives a high output, if we have no motion, the output is low, so we couldn't call it a sensor, but inside this module we have a PIR sensor or a passive infrared radiation sensor, this will detect the amount of infrared radiation and will give that amount to an integrated chip, this one here,

which

will calculate the difference and say if there was movement or not, so the detection process you need a sensor.
sensors   which one to use
Device or module that could detect events or changes in the environment and then send that information. So let's make the difference between the sensor and a detector. Sensor is the device itself that provides information or data based on the environment or situation and the detector. It will be a device, say an Arduino for example, that will give the detection output. I tried separating my sensor into three packages. Here I have the ones that are light related sensors, then I have the magnetic, pressure, gyroscopic and acceleration sensors, and this final group, well it's just a general sensor for all kinds of purposes, let's start with this here first, we have a color sensor based on the TCS 3200 chip with turns of the photo dial for the colors red, green and blue, this module will apply white light and sense the frequency response of each color that is reflected, of course a red object will absorb all colors minus red etc. so you need to run this example

which

will print the response for each color and place a red, green and blue color in front of the sensor and look at the ranges of each color so you can then detect the colors For example, here I place the blue side of this Ruby cube and I can see that a blue response is decreasing.
sensors   which one to use
Write down the values ​​for each color that have the scheme, an example code and the full tutorial on this below, okay guys, next we have this heart pole sensor that combines a simple optical heart rate sensor with an amplification circuit and noise cancellation, making getting reliable pulse readings quick and easy. We need to install processing for this example. Make the connections and upload the Arduino code to the Arduino, then run the processing and get the serial data from the Arduino and we could print the heart pulses on the screen. This is pretty good. Okay guys, next we have.
The PIR sensor or a passive infrared radiation sensor detects changes in radiation and since our bodies radiate heat in the form of infrared radiation, we can detect movement by detecting these changes in infrared radiation, so make the connections to the Arduino and run the code sensor example. it will give a high output every time it detects motion in this example I turn on this LED every time I detect motion as you can see here I move my hand and turn on the LED this sensor could be used in many applications where it could turn on the lights set a motion activated alarm and so on.
The next light based sensor is this infrared distance sensor, as you can see, infrared light is used very often because we are usually already surrounded by visible light and that will result in a lot of noise, well, this module will send out an infrared beam, then It detects the bouncing light beam and, depending on where the light hits the sensor, it can detect the bouncing angle and, because of that, the distance to the object these sensors can be quite accurate. I have one that goes from 15 centimeters to 1 meter and another that goes from 1 centimeter to 10 centimeters.
It will give an analog output depending on the distance. Here I have it connected to my low sight and as you can see by moving an object in front of the sensor, the output value switch to. I have used this type of sensor in my 3D scanner project as it has decent accuracy when measuring small distances connected to an Arduino and plotting example code and could take the distance to the serial monitor or on the LCD screen, you will need the distance to voltage graph to learn how to map distance in Arduino code. Read the code for more information.
I also have this laser based distance sensor with the VL 53 L 0 chip. it is one of the smallest packages on the market for a laser based distance sensor, as you can see it is very small so you can place it anywhere PCB type and detect distances or gestures. Use good communication costs to send the data. and could measure up to 2 meters in perfect conditions measure the distance by detecting the reflected laser beam connect it to the Arduino install the necessary library which you can also find below and run the code which will print a distance in millimeters to the serial monitor or to the LCD screen if you have one , this module has a very good distance accuracy, so keep this chip in mind when preparing your project.
It's also pretty inexpensive, just a few dollars. Another lightweight sensor is this direct infrared sensor that this module has. an infrared LED that will send out an infrared light, then we have the phototransistor that will detect the light it reflects off an object in front of it. This type of sensor could also be used as a switch, like these little modules do where the emitter and the receivers are facing each other and could attack when there is something between them. I have used this sensor in many projects like coded DC motor for future applications or infrared remote control to send and receive data using infrared light like You can see the almost lost hope.
The more infrared light we get, the higher the output will be or if we have the module in digital mode, it will change to high when we are close enough to the sensor. This module has an amplifier and by setting the threshold with this potentiometer we could detect things for example fire, it emits a lot of infrared light so we could detect the fire if we want to download the example code and upload it to the Arduino and we could print the output analog on the serial monitor or on the LCD screen and then you could activate things, for example, turn on the LED when we detect fire, finally, the last light based sensor is this LDR or light dependent resistor, this resistor will change its value from depending on the amount of light it receives, so if I create a voltage divider and apply 5 volts to it, we could measure the voltage drop and see how it changes depending on the light.
We can connect this to an Arduino and detect visible light and maybe create a light falling robot or any other ideas you have. You have the schematic. and a simple example code below along with the full tutorial on my electronic communications web page. Well, guys, now we have this other group here. I have an IMU module and a magnetometer. We have seen this immune module in many previous tutorials. This is the APU. 6050 and I also have the 9265 APU module. It can detect gyroscopic forces and accelerations with these values. We could also calculate the angle below this video.
It has some examples. This module uses good Christi communication to send the data to the microcontroller thus connected. to the Arduino and you could, for example, print the orientation angle on the Shura monitor or on the LCD screen. You could also print the raw values ​​of accelerations or gyroscopic data. You could use this sensor with drones that must fly horizontally. You could also detect accidents by detecting accelerations well and when the peak is detected, it must be a quick change of acceleration, so it could be an accident, it could also detect if something moved, if it detects changes in turn or acceleration, that means that the object on which the module is placed moved. this is a very interesting module, well guys I also have this magnetometer, this module is the h MC 58 83 and it uses a nice and bold communication to send the data.
This measures the Earth's magnetic field so we can create a compass and attack where north is and so it orients us in space this could also be used with drones along with a GPS module so we can know the location of the drone it could also use this to make measurements of the earth's magnetic field connect the square I see pins like in the schematic below and upload the example code which will print the magnetic values ​​and that's it guys now I have this atmospheric pressure sensor which will measure the pressure for So that we can get the altitude, the higher we are in the air, the lower the pressure will be.
Since we have less air above us pushing us down, the module also has good Cristy communication, so connect it to the Arduino and then install the necessary libraries which you can also find below, run the code that will print the pressure and approximate altitude that can Use this module for a weather station project or for a drone so you can implement altitude hold settings for that drone. Check more details in the link below. Well guys, we finally have the last set of sensors that are pretty general. Let's start with this gas sensor. Now depending on the type of sensor you could detect specific types of gases such as flammable gases, air quality or detecting alcohol in the air that you detect, but in this case this sensor will detect changes in the percentage of gases in the normal air that it uses .
An amplifier could also have an analog signal or directly the sense signal which could be high or low which means that the normal air valves are not good or the air is clean, connect this module to the Arduino and upload the code that will print. the angular grid of the sensor and by setting the threshold values ​​it could detect the changes in air quality or any other gas using a specific gas sensor, as you can see when I release this lighter the analog output increases and that means we have a gas leak ok the next example is the common distance sensor which uses ultrasound pulses it sends a sound wave the text of the bounced wave and calculates the time it took to return and knowing the speed of sound , we can get the distance to the object in front of the sensor.
I've made a complete tutorial on how to make a sensor like this, so check out that video for more details. Plug in the module and upload a code and it will print a distance in centimeters on the serial monitor or LCD screen if you have one, read more about this on my website and read the lines in the example code for more information. Now I have a thermocouple voltage sensor. The thermocouple is a component that will create a small voltage drop across these connectors when heated. Knowing the relationship between temperature and voltage drop, we can measure temperatures since the voltage drop is very small.
We need this type of sensor that uses the Mac Sixty 675 amplifier, so connect a type K thermocouple to this module and make the connections to Then the Arduino loads the code, runs it and will print the temperature, as you can see. I heat the thermocouple and get the actual temperature value. This type of component is very useful when working with high temperatures, since it would withstand up to 700 degrees, well, now in the same way I have this thermistor which is a temperature-dependent resistor as in the example with the temperature-dependent resistor. light we could create a voltage divider and we will see that the output voltageit will vary depending on the temperature if Know that our answer from sir we can measure the temperature with the Arduino, as you can see when I heat up the thermistor, the resistance will change and as you can see in the oscilloscope, the output of the voltage divider will also change.
More information below, ok I also have this current sensor this module uses max 471 current sensor connect this module in parallel with the load and it will measure the current that the load uses. I make the connections and add a resistor as a load and use this power controller to vary the application. battery voltage after loading an example code it will print the current values ​​and as you can see I increase the voltage and the current also increases and that is printed on the screen. This is another very useful sensor for your projects. Now here we are.
I have a complete sensor, the small component could detect magnetic fields. I have used this type of sensor for my POV clock project and for the electronic speed controller sensors, this is the 49 hole sensor and this has a linear output if I make the connections. to 5 volts and ground as you canLook, when I place a magnet on this module, the output will increase or decrease. You could connect this analog output to an Arduino and by disabling the tech magnetic fields you could use this as a switch or encoder on the shaft of a motor or any other idea. which you have once you know how to measure the output you can use this for any project it is very easy to use you also have the digital type where the output is high or low and that means the magnet is close to the component or not Ok finally I have a 8 AD.
Now you could say this is not a sensor, but technically it sends the unlock value. You could use the Arduino's ADC, but that's just a 10-bit converter for precision. I have this 16 bit ABC. this will give me 65 thousand points for a range of 0 to 5 volts which is a resolution of only 75 micro volts it also uses good crazy communication and has four different analog inputs this is a great module if you want the procedure I make the connections and now As you can see it prints the analog value of this potentiometer on the screen or serial monitor with very high precision, so keep this module in mind when you want good precision for your analog readings, so that's it guys mine, these are More or less of the sensors that I have right now in my workshop, there are many more on the market so I hope this video has helped you get an idea of ​​the number of sensors and how to use each of them.
Consider supporting my project. on patreon if you liked this video make sure to subscribe and turn on your notification bell for future videos also click the like button like crazy and share this video with your friends and remember to help on patreon it means a lot to me and will continue This guy of videos go so thanks again and see you later guys.

If you have any copyright issue, please Contact