@@robojax Actually, I purchased the GP2Y0A21YK0F (10 to 80 cm) and have it running on a 5V Arduino at about 4.5V. I ran a basic distance program that includes the Sharp library (2.0) and I can't get any data input to the Arduino over 30cm. It the floats at 16mm in the Serial Monitor when no object is present. When an object is present, I only get readings between 9cm and 23cm reliably. I rarely get 30mm. I never see 80cm lol. I read the data sheet, and I see that the output signal is non-linear and its voltage will drop the further out an object is, but I expected to least see the 80cm once in a while. Any idea where you might start to help boost the performance of the 20cm-80cm range of this model? Things I've tried: 1. Different sensors of same model (same result) 2. 100 µF capacitor (seems to smooth output but does not increase performance) 3. Long object obstruction times (the 80cm never shows its face :) Happy holidays! And thanks for any tips! Narci
Sir, these sensor read cm but I searching mm and resolution should be 1 mm and the sensor should be repeatable. No fluctuation. What sensor I should choose ?
Can you please explain why I am getting 74 as continuous reading using GP2Y0A41SK0F, when I am putting it towards Ground. Distance between sensor and ground is around 10 cm.
perhaps that is the maximum range and Arduino is not reading anything and you get maximum. check wiring. use multimeter to read voltage that goes to Arduino.
Thanks for the tutorial. Very helpful. I am using a GP2Y0A60SZLF Sharp Distance Sensor 10-150cm which has GND VCC EN and OUT. The code provided mentions connecting the signal pin to A0. Is the signal pin EN or OUT? Should I only use one of those pins or both? Right now the code uploads but the serial monitor is only reading 0cm nothing else.
Unfortunately I have not tested it. why not test it and ten type your comment here so everyone know if it works or not. I have seen this question more than 20 times now. Thanks
perhaps after watching this video you've learned that we are simply measuring voltage which is representative of distance. I should have video using ESP32 on how to measure voltage or potentiometer voltage just search my channel. Here is how to find Specific RUclips Video in a channel bit.ly/findRUclipsVideo
There is a variable called "dis" which holds the distance, for example if distance is less than 50cm, you turn on something connected to pin 5 do it like this if(dis
Hi Sir, may I ask how do I get the distance in 2 decimal value ? I would like to get more accurate result such as 10.05cm or 10.54cm instead of 10cm. Could please help me , thank you very much.
Hi sir. I am controlling a DC motor with infineon motor control shield BTN8982. The sharp sensor output is connected to A8 because up to A5 shield is covered. But at A8 there is a error. Like 'A8' was not declared in this scope. Why...?
The speed is determined by the delay in the loop. Change (little by little) it and make it smaller (faster) and see at minimum delay you are able to read.
@Robojax hi, please guide me how to deploy the code on arduino as after i am not getting how to run sharp IR (CPP and H ) files and the file that you are showing is not in that folder that I have downloaded . kindly guide me
Hello, I am considering using either this, or a PIR motion sensor for my project. I have 3 main questions for you at the bottom of my comment. For my project I will be detecting my cat when she gets on my window sill to eat my plants. I want to trigger a buzzer to scare her off. The reason why I don't want to do a Motion sensor is because if the cat climes up on the window, she will move very slow and I worry that it will not trigger. I would rather be able to control the trigger in my code. If I do this distance sensor, I plan to keep a rolling average of the voltage so that it can trigger if there are quick sudden changes. I do not need a wide angle. preferably a very small angle of detection like 12 degrees and the distance will be less than 2 feet. I have good coding and Arduino skills but I haven't used either of these sensors before. 1) Does this sensor only detect a small field of view straight ahead? (I prefer if it does) 2) Does this sensor require a flat surface, and how large does it have to be? 3) Do you recommend choosing the Motion PIR or this distance sensor? Thank you very much for the video!
Hello Xavier, 1-This detects small field of view, 2- any surface. doesn't need to be flat(have not tested on glass) 3-For your application this would be better.
@@Javii96 Hello, I would like to ask whether it would be possible for you to give the code for my project because i have a similar project like yours and i don't know the code. Can you help me? Thankyou in advance!
@@williamparedes7155 Hello, I would've been happy to share my code, but I still haven't started this project. I've been too busy lately. Sorry, but this video actually shows some sample code and how to get started if you fast forward to about 5:10. What part of the project are you having trouble with?
Stupid question: how do I actually connect the sensor to the Arduino? Like, I have all the necessary hardwares, a sensor, a trio of cables that can extended it and an Arduino Mega 2560, which has a _lot_ of ports and I don't think I understand which cable goes on which port...
You are welcome. Very simple. the word "dis" is holding the distance. below this line int dis=SharpIR.distance(); and change it to int dis=SharpIR.distance() * 10; Now distance is multiplied by 10 to show in millimeter .
@@robojax I did it and I noticed that he only multiplied by 10 without taking into account the number he could have after. I use a digital sensor GP2Y0D805Z0F
I just added the link in the description on how to use 2 or more of this sensor. You could also just search my channel for the word "sharp" and you would see that I move than 4 videos on this .
This code is the simplest and unless you did incorrect wiring or changed the code, it should work. Try checking the wiring and do not change the code. Watch the video without escaping. It should work. You should get some kind of error. In the bottom window of arduino, scroll up and you will see error. Post the error under this video and I will check it for you.
@@robojax The code worked, it was a small issue. I wanted to ask you what would happen if I use the serial plotter for this? Is there any way I could get the voltage as the output?
it depends how fast the robot it moving. If it is slow enough and if you install is high enough and point it down on the front of robot, it should detect end of flat surface and program your robot to take action like stop or change the course of movement.
You are welcome. You haven't subscribed to my channel. The best thank you for me is to subscribe to my channel and thumb up the video. It is greatly appreciated. 🔔 😊
Writing to see if anyone has performed any tests with reflective adhesive tape for objects that are particularly troublesome for the Sharp IR Distance sensor. Thank You!
You are welcome. You are right. I just looked at library and it doesn't have it. I just placed order to get it and make tutorial on that. It needs to be tested and data to be created. Make sure to subscribe so when I post the video, you are notified.
Hi, I have recorded video for the 2-15cm sensor and It will be posted in 3 hours from now ruclips.net/video/rdNCIyL6OA8/видео.html more videos related to this module is coming.
Hi Robojax, I'm using this sensor to measure the displacement of an object and I want to record all the data so I can use them for analysis later. Could you please give me some method that I can record the data from this measurement ? Thanks a lot
Hi, You can do it in many ways. The simplest method would be to store the data using MicroSD card module. You store the data on microSD card and later read it with your computer. Here is MicroSD card www.amazon.ca/dp/B0793H4GPC
Oh, maybe you misunderstood :-). I mean that how to record all the data of the experiment so that I can use them for later process. One more thing, do you know how to measure with the accuracy of 1mm. Thank you very much.
When the sensor has slope more than 45° of its object, for example 50,60°, is it works well? , and how many degree maximum the slope angle of that sensor? i'm sory i ask you a lot of questions, cause the price is very expensive here, so i've to know more about it before i buy it. Thank You
No problem. I will do my best to reply. I don't have the circuit in hand to test it but it should work. I have provided the manufacturer website with the datasheet. Here www.sharp-world.com/products/device/lineup/data/pdf/datasheet/gp2y0a02yk_e.pdf it doesn't say anything about the angle and it should work.
the curve is not pure curve. it you open the library, they have equation of the line from curve. The library is made from experiment into excel sheet and then from excel equation of the line and that equation is inside library. Just open it in notepad or NotePad ++ and read it.
You have escaped the video. Have not installed the library. Please watch without escaping, follow exactly as I shown and it for sure will work. Good luck.
Hi, thanks for this tutorial! But when I set it with the same steps, the output distance is always not stable, there's approximately 5 cm discrepancy... what can I do for that? :O
It depends on the surface. I will reply to all Subscriber's 🔔 questions. So make sure to Subscribe.😊 Please like 👍 the video and type simple word in the comment. It helps me a lot.
Bu vdieoyu hazırladığınız için çok teşekkür ederim, emeklerinize sağlık..Sharp Gp2y0a710 mesafe sensörünün arduino bağlantısıya ilgili de video çekermisiniz.. Thank you so much for this tutorial video.. can you share a new video for about Sharp Gp2y0a710 ultrasonic sensor with arduino? Selam from turkey
Hi Robojax, the code you provided ran quite well. However I don't know why the distance is 1cm shorter than actual distance. And could you please show me more in detail how to implement it because I need it for my system identification with accuracy of 1mm. Thanks
if you see consistent 1cm difference, then subtract it . After this line int dis=SharpIR.distance(); dis -=1; this will correct it. But if you get various differences, then there is issue with the sensor.
Can I implement it in mm, what I mean is that when I move the object, the distance will change 1mm for the smallest scale because I want to improve the precision. 1cm change is too big for my system. Thanks a lot
Yes you can. this line gets the value in mm. int dis=SharpIR.distance(); change it to int dis= (SharpIR.distance())/10; 10mm is 1cm, I have divided by 10 (/10) and now you will get in mm. I don't know how accurate it would be in terms of mm.
Well, I met another problem with this sensor. I use Matlab Simulink together with Arduino to implement the experiment. However, I can only get the raw analog value from Arduino and the result is very fluctuate and has lots of noises, I can't read the result even the distance is a constant. Do you have any experience with this kind of problems. Sorry for asking too much. Thank you
No you can't because this can't be directed to a point. You need very accurate beam to be directed. VL530LX is laser based distance sensor but it doesn't have red light to tell you where it is hitting. Here are my videos on the laser distance sensor ruclips.net/user/robojaxTVsearch?query=VL53L0X
Take the screen shot of error and post it on this website onpaste.com/ and then you will have a new URL (address) and share the address here so I look at it.
porque 1 cm es 10 mm, simplemente divídalo entre 10. la variable des mantiene la distancia, así que haga esto debajo de esta línea int dis = SharpIR.distance (); Agrega esto des / = 10;
this sensor can't give you mm accuracy. so you get cm. The decimal point (.) depends on Data Type. See this video to learn Data Type ruclips.net/video/n0z6fjww8eA/видео.html and here is the better video on Sharp which is form my Arduino course ruclips.net/video/4f0UD8O768I/видео.html
@@robojax hello Sir I have another question do you have youtube video about ultrasonic sensors? im trying to find ultrasonic sensor for accurate mm units because i think its more cheaper
@@robojax In France, at school, we have to do a big project in informatic/programmation (for the levels) ^^ STI2D is the name of this procedure So, thank you so much for this video ! You help me so much !
I need to find someone to help me do this in code.. //Arduino uno //300mm precision sensors // distance sensor1 value 181 to 270 degrees //distance sensor2 value 179 to 90 degrees //1 stepper Nemo 17 or 23 //Stepper full rotation 0-359 steps (clock wise count 0 north) //Home 180 //if sensor1 value oscillates //set sensor1 to highvalue of oscillation //(when direction changes. Oscillation at 172-173-172 would set value at 173 // if sensor2 lowalue is = or =170 // run stepper to 190 // if sensor2 lowalue is = or =160 // run stepper to 200 // if sensor2 lowalue is or =150 // run stepper to 210 // if sensor2 lowalue is or =140 // run stepper to 220 // if sensor2 lowalue is or =130 // run stepper to 230 // if sensor2 lowalue is or =120 // run stepper to 240 // if sensor2 lowalue is or =110 // run stepper to 250 // if sensor2 lowalue is or =100 // run stepper to 260 // if sensor2 lowalue is 181, < or =190 // run stepper to 170 // if sensor1 highvalue is >191, < or =200 // run stepper to 160 // if sensor1 highvalue is >201, < or =210 // run stepper to 150 // if sensor1 highvalue is >211, < or =220 // run stepper to 140 // if sensor1 highvalue is >221, < or =230 // run stepper to 130 // if sensor1 highvalue is >231, < or =240 // run stepper to 120 // if sensor1 highvalue is >241, < or =250 // run stepper to 110 // if sensor1 highvalue is >251, < or =260 // run stepper to 100 // if sensor1 highvalue is >261 // run stepper to 90
Excellent..I liked how you described the code and the demo was very clear.
Thank you. I am glad you liked it.
Tu as sauvé notre projet de SI !
Could this be used with a buzzer for just object detection?
Thank you for the video. Clear, logical, concise and thorough!
You are welcome.
Hey uhmmm how about the connections? base on your code you didn't assigned any pin or analog pin for your signal in IR distance, why?
it uses A0. you can watch this video ruclips.net/video/rdNCIyL6OA8/видео.html
Hi what is the field of view that SHARP GP2Y0A710K0F can cover
Hi, the datasheet is provided in the resources page. Please have look.
Thanks. Nice breakdown of these IR sensors.
Glad it was helpful!
@@robojax Actually, I purchased the GP2Y0A21YK0F (10 to 80 cm) and have it running on a 5V Arduino at about 4.5V. I ran a basic distance program that includes the Sharp library (2.0) and I can't get any data input to the Arduino over 30cm. It the floats at 16mm in the Serial Monitor when no object is present. When an object is present, I only get readings between 9cm and 23cm reliably. I rarely get 30mm. I never see 80cm lol. I read the data sheet, and I see that the output signal is non-linear and its voltage will drop the further out an object is, but I expected to least see the 80cm once in a while.
Any idea where you might start to help boost the performance of the 20cm-80cm range of this model?
Things I've tried:
1. Different sensors of same model (same result)
2. 100 µF capacitor (seems to smooth output but does not increase performance)
3. Long object obstruction times (the 80cm never shows its face :)
Happy holidays! And thanks for any tips!
Narci
Thank you Robojax, this video was very helpful to me, excellent job.
You are welcome. Thank you for not skipping the ads and keep watching them. This will help me a lot.
Do you have an idea how directional these sensors are? And would using multiple sensors interfere?
SIR,This library is not working for 2-15cm ir sensor.
Search my channel. And I have it
Sir, these sensor read cm but I searching mm and resolution should be 1 mm and the sensor should be repeatable. No fluctuation. What sensor I should choose ?
Then use laser. ruclips.net/video/S2jaAQEv3Yo/видео.html
Excelent video! Thanks for show it, but i have a problem, idk if you know to solve that:
'class SharpIR' has no member named 'distance'
Thank you Sir for the Help
You are welcome
Hi,
when you plug in the numbers from the data sheet into xcel. what do you do with that equation?
Hi, this video is to get the value and take action. I did not understand why use excel.
Can you please explain why I am getting 74 as continuous reading using GP2Y0A41SK0F, when I am putting it towards Ground. Distance between sensor and ground is around 10 cm.
perhaps that is the maximum range and Arduino is not reading anything and you get maximum. check wiring. use multimeter to read voltage that goes to Arduino.
Thanks for the tutorial. Very helpful. I am using a GP2Y0A60SZLF Sharp Distance Sensor 10-150cm which has GND VCC EN and OUT. The code provided mentions connecting the signal pin to A0. Is the signal pin EN or OUT? Should I only use one of those pins or both? Right now the code uploads but the serial monitor is only reading 0cm nothing else.
You are welcome. I have left nothing out. You should find the answer in video. If your module has 3 wires, this is the video for you.
Do you think that sensor would work off water if tilted down? Basically to measure the level of a small water container.
I have not tested it. This module operates with infrared. it should reflect if water is still. not sure about it.
Do you know if it is possible to use this sensor with a software like opentrack to simulate head movement in 3D environment like Z axis?
Hi, I just discovered your comment without reply. This is new feature of RUclips for creators. Sorry.
It Error 'class SharpIR' has no member named 'distance'. What do I need to fix?
I have successfully installed the library.
It should work. Here is the latest video with wiring diagram ruclips.net/video/4f0UD8O768I/видео.html
@@robojax I tried and did it again but still stuck with this problem. I don't know how to solve this Error, I used the code from your video.
Can I use the sensor behind glass? Need to protect it. Want to measure level in black water tank. Thanks
Unfortunately I have not tested it. why not test it and ten type your comment here so everyone know if it works or not. I have seen this question more than 20 times now. Thanks
Can ı work this sensor with esp32 microcontroller? Esp32 3.3 v this sensor 5v
perhaps after watching this video you've learned that we are simply measuring voltage which is representative of distance. I should have video using ESP32 on how to measure voltage or potentiometer voltage just search my channel. Here is how to find Specific RUclips Video in a channel bit.ly/findRUclipsVideo
Sir, whenever there is any object detected, I want to make an Out Put ON. How to code for that.
There is a variable called "dis" which holds the distance, for example if distance is less than 50cm, you turn on something connected to pin 5 do it like this
if(dis
If connected sensors quantity is increased, variable values are decreasing. Is there any solution for this...?
I have combined the out put of 10 sensors, and connected it to A0.
And my application is a two direction moving vehicle. If the obstacles comes neer to sensors the speed of motor should be gradually decrease.
Can you make a sample program for motor speed control according to the Variable "dis" values....?
Hi Sir, may I ask how do I get the distance in 2 decimal value ? I would like to get more accurate result such as 10.05cm or 10.54cm instead of 10cm. Could please help me , thank you very much.
Hi, use this laser sensor with resolution of 2mm ruclips.net/video/0GxFoq_zPt4/видео.html but the sharp sensor can’t do what you want.
Hi sir. I am controlling a DC motor with infineon motor control shield BTN8982. The sharp sensor output is connected to A8 because up to A5 shield is covered. But at A8 there is a error. Like 'A8' was not declared in this scope. Why...?
Yes. I got it. I forget to change processor from ardiuno uno to mega. Coz uno don't have A8 pin.
Good to hear that Kiran. Don't forget to subscribe.
is it working fast ? I mean if I move it fast down and up would it send me distance chances during movements?
The speed is determined by the delay in the loop. Change (little by little) it and make it smaller (faster) and see at minimum delay you are able to read.
@Robojax hi, please guide me how to deploy the code on arduino as after i am not getting how to run sharp IR (CPP and H ) files and the file that you are showing is not in that folder that I have downloaded . kindly guide me
Hi, sorry just check it and library is there.
@Robojax Do you know what is the beaming angle of that IR?
The datasheet is provided in the resource page. Please have a look at that.
Hello, I am considering using either this, or a PIR motion sensor for my project.
I have 3 main questions for you at the bottom of my comment.
For my project I will be detecting my cat when she gets on my window sill to eat my plants. I want to trigger a buzzer to scare her off. The reason why I don't want to do a Motion sensor is because if the cat climes up on the window, she will move very slow and I worry that it will not trigger. I would rather be able to control the trigger in my code. If I do this distance sensor, I plan to keep a rolling average of the voltage so that it can trigger if there are quick sudden changes. I do not need a wide angle. preferably a very small angle of detection like 12 degrees and the distance will be less than 2 feet. I have good coding and Arduino skills but I haven't used either of these sensors before.
1) Does this sensor only detect a small field of view straight ahead? (I prefer if it does)
2) Does this sensor require a flat surface, and how large does it have to be?
3) Do you recommend choosing the Motion PIR or this distance sensor?
Thank you very much for the video!
Hello Xavier, 1-This detects small field of view, 2- any surface. doesn't need to be flat(have not tested on glass) 3-For your application this would be better.
@@robojax Thank you for taking the time to reply! I will try this out.
@@Javii96 Hello, I would like to ask whether it would be possible for you to give the code for my project because i have a similar project like yours and i don't know the code. Can you help me? Thankyou in advance!
@@Javii96 Can you send the code to this email?
@futureengineer17164@gmail.com
I would be grateful for your reply.
@@williamparedes7155 Hello, I would've been happy to share my code, but I still haven't started this project. I've been too busy lately. Sorry, but this video actually shows some sample code and how to get started if you fast forward to about 5:10. What part of the project are you having trouble with?
Stupid question: how do I actually connect the sensor to the Arduino? Like, I have all the necessary hardwares, a sensor, a trio of cables that can extended it and an Arduino Mega 2560, which has a _lot_ of ports and I don't think I understand which cable goes on which port...
no problem. I just watched the video and found that I have explained it at about 4:15 and in the code it is mentioned also as "signal pin"
Thank you very much for the tutorial. I would like to know if it is possible to have the values of the distance in mm
You are welcome. Very simple. the word "dis" is holding the distance. below this line int dis=SharpIR.distance(); and change it to
int dis=SharpIR.distance() * 10;
Now distance is multiplied by 10 to show in millimeter .
@@robojax I did it and I noticed that he only multiplied by 10 without taking into account the number he could have after. I use a digital sensor GP2Y0D805Z0F
very good job sir ! impressing !
thanks.
Is it possible to connect more then one sensors to a one ardiuno..?
I just added the link in the description on how to use 2 or more of this sensor. You could also just search my channel for the word "sharp" and you would see that I move than 4 videos on this .
@Robojax This code doesn't work for some reason. I don't have much experience with Arduino but I don't know why it's not working
This code is the simplest and unless you did incorrect wiring or changed the code, it should work. Try checking the wiring and do not change the code. Watch the video without escaping. It should work. You should get some kind of error. In the bottom window of arduino, scroll up and you will see error. Post the error under this video and I will check it for you.
@@robojax The code worked, it was a small issue. I wanted to ask you what would happen if I use the serial plotter for this? Is there any way I could get the voltage as the output?
can you use this sensor to prevent a robot from falling down the stairs?
it depends how fast the robot it moving. If it is slow enough and if you install is high enough and point it down on the front of robot, it should detect end of flat surface and program your robot to take action like stop or change the course of movement.
Ty very much for your quick response, I need that information for my project.
thank you :) worked for me
You are welcome. You haven't subscribed to my channel. The best thank you for me is to subscribe to my channel and thumb up the video. It is greatly appreciated. 🔔 😊
Writing to see if anyone has performed any tests with reflective adhesive tape for objects that are particularly troublesome for the Sharp IR Distance sensor. Thank You!
Sir, will this sensor operates normally when exposed to sunlight? Thank you
Have not tested it.
@@robojax thank you.
U r d bst!
Excellent, does this library use delay? I mean would SharpIR.distance() function cause a delay on the code?
I have not tested but you can use millis() to check it. I have a video on millis ruclips.net/user/robojaxTVsearch?query=millis
Thank you for this, however I think the 2-15cm sensor is missing. I have checked the library and it isn't defined there.
You are welcome. You are right. I just looked at library and it doesn't have it. I just placed order to get it and make tutorial on that. It needs to be tested and data to be created. Make sure to subscribe so when I post the video, you are notified.
Hi, I have recorded video for the 2-15cm sensor and It will be posted in 3 hours from now ruclips.net/video/rdNCIyL6OA8/видео.html more videos related to this module is coming.
Hi Robojax, I'm using this sensor to measure the displacement of an object and I want to record all the data so I can use them for analysis later. Could you please give me some method that I can record the data from this measurement ? Thanks a lot
Hi, You can do it in many ways. The simplest method would be to store the data using MicroSD card module. You store the data on microSD card and later read it with your computer. Here is MicroSD card www.amazon.ca/dp/B0793H4GPC
Oh, maybe you misunderstood :-). I mean that how to record all the data of the experiment so that I can use them for later process. One more thing, do you know how to measure with the accuracy of 1mm. Thank you very much.
Hi your video was excellent please could you tell me in words where each pin from the sharp sensor goes in the Arduino Uno Board
I just watched the video. Wow, the wiring portion is left out. Here is see it in this video ruclips.net/video/WQ3oFyF5qeY/видео.html
When the sensor has slope more than 45° of its object, for example 50,60°, is it works well? , and how many degree maximum the slope angle of that sensor?
i'm sory i ask you a lot of questions, cause the price is very expensive here, so i've to know more about it before i buy it.
Thank You
No problem. I will do my best to reply. I don't have the circuit in hand to test it but it should work. I have provided the manufacturer website with the datasheet. Here www.sharp-world.com/products/device/lineup/data/pdf/datasheet/gp2y0a02yk_e.pdf it doesn't say anything about the angle and it should work.
@@robojax Thank you
Could u tell me how can u insert the curve from the datasheet into excel?
the curve is not pure curve. it you open the library, they have equation of the line from curve. The library is made from experiment into excel sheet and then from excel equation of the line and that equation is inside library. Just open it in notepad or NotePad ++ and read it.
i see, thank you for the answer, i think i'm gonna make my own equation from my own experiment👍
you are welcome and good luck.
How do you wire it though?
Hi, please watch the latest video here ruclips.net/video/4f0UD8O768I/видео.html
class SharpIR' has no member named 'distance'; did you mean 'getDistance'?
Hey there I struk with the above error!!!!
You have escaped the video. Have not installed the library. Please watch without escaping, follow exactly as I shown and it for sure will work. Good luck.
@@robojaxsorry to say this I have installed the library as well
Does this sensor Work in Sunlight?
yes it should. I have not tested the affect of sunlight though.
Can someone share the code since it does not work from the link?
Thank you for letting me know. I just fixed it. you can visit it now.
@@robojax thank you.
Hi, thanks for this tutorial! But when I set it with the same steps, the output distance is always not stable, there's approximately 5 cm discrepancy... what can I do for that? :O
It depends on the surface. I will reply to all Subscriber's 🔔 questions. So make sure to Subscribe.😊
Please like 👍 the video and type simple word in the comment. It helps me a lot.
Bu vdieoyu hazırladığınız için çok teşekkür ederim, emeklerinize sağlık..Sharp Gp2y0a710 mesafe sensörünün arduino bağlantısıya ilgili de video çekermisiniz.. Thank you so much for this tutorial video.. can you share a new video for about Sharp Gp2y0a710 ultrasonic sensor with arduino? Selam from turkey
thank you i succeeded :)
I am glad you did. Walikum salam
Is there one that detects from 1 to 30 cm.
It has been explained and if you visit the page where the code is provided, I have list of specs and pdf of the datasheet.
Hi Robojax, the code you provided ran quite well. However I don't know why the distance is 1cm shorter than actual distance. And could you please show me more in detail how to implement it because I need it for my system identification with accuracy of 1mm. Thanks
if you see consistent 1cm difference, then subtract it . After this line int dis=SharpIR.distance();
dis -=1;
this will correct it.
But if you get various differences, then there is issue with the sensor.
Can I implement it in mm, what I mean is that when I move the object, the distance will change 1mm for the smallest scale because I want to improve the precision. 1cm change is too big for my system. Thanks a lot
Yes you can. this line gets the value in mm. int dis=SharpIR.distance();
change it to int dis= (SharpIR.distance())/10;
10mm is 1cm, I have divided by 10 (/10) and now you will get in mm. I don't know how accurate it would be in terms of mm.
OK, thank you very much
Well, I met another problem with this sensor. I use Matlab Simulink together with Arduino to implement the experiment. However, I can only get the raw analog value from Arduino and the result is very fluctuate and has lots of noises, I can't read the result even the distance is a constant. Do you have any experience with this kind of problems. Sorry for asking too much. Thank you
Can i use this sensor in 3d scanner????plz reply
No you can't because this can't be directed to a point. You need very accurate beam to be directed. VL530LX is laser based distance sensor but it doesn't have red light to tell you where it is hitting. Here are my videos on the laser distance sensor ruclips.net/user/robojaxTVsearch?query=VL53L0X
why can't it be used on wemos d1?
I would have to write library for this. The current library will not work.
@@robojax Sorry, I do not understand. What do you mean?
hi ,,,,,,,,,,,,,,,,dis=SharpIR.distance(); brings me an error
Take the screen shot of error and post it on this website onpaste.com/ and then you will have a new URL (address) and share the address here so I look at it.
Hola Buenos Días. Como hago para que el valor sea en centimetros y no en mili segundos? Gracias
porque 1 cm es 10 mm, simplemente divídalo entre 10. la variable des mantiene la distancia, así que haga esto debajo de esta línea
int dis = SharpIR.distance ();
Agrega esto
des / = 10;
@@robojax Ahhh buenisimo! Muchisimas Gracias! Saludos desde Argentina
De nada. Saludos desde Canadá. Mantenerse a salvo.
@@robojax Hola Perdón por la molestia de nuevo jaja... Me dice que tengo que definir la variable des... Como la defino? Gracias
Is it for cm only Sir?
yes and if you want it in mm then divide it by 10. if you want it in inch multiply it by 0.393701
@@robojax owww okokokok Sir thankyou. Can it have a value of (.) something or it just get whole numbers of cm units?
this sensor can't give you mm accuracy. so you get cm. The decimal point (.) depends on Data Type. See this video to learn Data Type ruclips.net/video/n0z6fjww8eA/видео.html and here is the better video on Sharp which is form my Arduino course ruclips.net/video/4f0UD8O768I/видео.html
@@robojax okokok thank you Sir
@@robojax hello Sir I have another question do you have youtube video about ultrasonic sensors? im trying to find ultrasonic sensor for accurate mm units because i think its more cheaper
Thank you Robojax, but I have a question, how can I have the results in centimeters?
If it is millilitres just divide it by 10. Arduino can do that easily
Des STI2D SIN en projet ?
Désolé je n'ai pas compris
@@robojax In France, at school, we have to do a big project in informatic/programmation (for the levels) ^^ STI2D is the name of this procedure
So, thank you so much for this video ! You help me so much !
too many words, too complex tutorial. this is a simple analog sensor. You no need any library to read it and calculate the distance.
wrong. I've made such videos. We have to explain everything. of course you are welcome to skip and get the code. Good luck.
I need to find someone to help me do this in code..
//Arduino uno
//300mm precision sensors
// distance sensor1 value 181 to 270 degrees
//distance sensor2 value 179 to 90 degrees
//1 stepper Nemo 17 or 23
//Stepper full rotation 0-359 steps (clock wise count 0 north)
//Home 180
//if sensor1 value oscillates
//set sensor1 to highvalue of oscillation
//(when direction changes.
Oscillation at 172-173-172 would set value at 173
// if sensor2 lowalue is = or =170
// run stepper to 190
// if sensor2 lowalue is = or =160
// run stepper to 200
// if sensor2 lowalue is or =150
// run stepper to 210
// if sensor2 lowalue is or =140
// run stepper to 220
// if sensor2 lowalue is or =130
// run stepper to 230
// if sensor2 lowalue is or =120
// run stepper to 240
// if sensor2 lowalue is or =110
// run stepper to 250
// if sensor2 lowalue is or =100
// run stepper to 260
// if sensor2 lowalue is 181, < or =190
// run stepper to 170
// if sensor1 highvalue is >191, < or =200
// run stepper to 160
// if sensor1 highvalue is >201, < or =210
// run stepper to 150
// if sensor1 highvalue is >211, < or =220
// run stepper to 140
// if sensor1 highvalue is >221, < or =230
// run stepper to 130
// if sensor1 highvalue is >231, < or =240
// run stepper to 120
// if sensor1 highvalue is >241, < or =250
// run stepper to 110
// if sensor1 highvalue is >251, < or =260
// run stepper to 100
// if sensor1 highvalue is >261
// run stepper to 90
Hi, I just discovered your comment without reply. This is new feature of RUclips for creators. Sorry.
he is speaking wakanda accent
LOL.
POORLY explained.
Thank you.
Please watch the latest video ruclips.net/video/rdNCIyL6OA8/видео.html