Go Down

Topic: Measuring Distances with Ultrasonic Sensors (Read 7723 times) previous topic - next topic



in retrospect, it would have helped if you had posted a good link to info on the US-100 sensor,
especially where to find the datasheet. All I've found so far are amazon and ebay ads for it,
which indicates it's yet another chinese knockoff, seling for about 1/4 the price of standard

Pretty soon, we'll be able to buy EVERYTHING from china at huge discounts, and they'll own
all in sight :-).

Good point. I am actually testing with that and also trying the Ping. I hear you on the China thing. I am trying to find an alternative to my iPhone that is made in the US but it seems like every one is made in China, specifically Foxconn. I just feel guilty knowing the conditions and pay those people endure. If anyone knows good sensors manufactured here I would be happy to pay the extra money;)
Here is the guide for the ping-
More than anything I was referencing this type of sensor. Also, if anyone knows of any cheap laser sensors that would be great. 2D is fine as this will be a single static point being measured;)


We all know where the Ping info can be had. The question is how to find the data
on an offbrand device made in China.

knows of any cheap laser sensors

I'm not sure 'cheap' belongs in a reference like this. Parallax does sell a laser device you
can check about.


Thanks, I do have a Parallax on order. As far as the US-100 it was more of a question on ultrasonic sensors being capable of measuring in mm;) I will be testing with all of these to see if any fit the bill. I really appreciate everyone's input!


Alright, I have this setup and working with the Ping sensor and 16x2 serial dispay. Currently I get a reading in mm showing the actual distance to an object and it seems fairly accurate so I want to move on to my next need.

I need to display the difference of an initail value minus the current value. Basically I would turn the unit on and point it at the object. I would like to capture that value and then use it to subtract the real time value from that initial reading. If the value is 200mm I would want to subtract that from all future readings so looking at the same distance it would read 0 (200-200=0 and print 0 to the LCD rather than 200) and as the object comes closer it would read the difference i.e. 200-150=50 and print 50 to the LCD. I figure if I could have a button to capture the intitial value then use it to produce results from there it would do what I am trying to accomplish. I am just not sure how to accomplish this. If anyone has any input on how to do this,code or command examples or a better way of looking at this I would greatly appreciate it;)



What you're looking for is called 'subtraction'. You need to store your reference value in a variable, and then 'subtract' the reference value from your measured value to get the display value. You need some way to tell the Arduino to store the reference value, for example using a button.


Thanks Peter, that makes sense. I did read up on variables and this makes sense! I will try setting this up later in the week. Thanks for your input!

Go Up