Shop OBEX P1 Docs P2 Docs Learn Events
Distance sensors — Parallax Forums

Distance sensors

heshoyheshoy Posts: 12
edited 2012-10-08 02:05 in Accessories
Hi guys, im a student at the electromechanical department in alexandria university, Egypt.
so this is my graduation year and we decided that our graduation project would be "Active Suspension", it detects road profiles and u know "holes and bumbs" and moves the suspension vertically in order to keep a high ride quality, so im in charge of the sensors and how to process the sensor's output, so im gonna need some help with what kind of sensors should i use for detecting the depth of the road? its gonna be mounted at the bottom of the vehicle and actively measures the distance between the vehicle and the road
after all the googling ive done i found that the best option is the ultrasound distance sensor but i have no experience at all with it, so pls guys help me with any recommendations and suggestions, sorry for making it long :)

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2012-09-23 07:01
    Parallax has a laser range finder and an ultrasonic distance sensor. You'll find documentation and code examples on the product pages for each of these products (click on the links given).
  • heshoyheshoy Posts: 12
    edited 2012-09-23 07:25
    Thanks a lot sir.
  • heshoyheshoy Posts: 12
    edited 2012-09-23 08:14
    So which do u think is better to be used in a model, indoor .. just ambient light not direct sunlight .. i want a sensor that is able to detect changes in the distance between the car body and the road and continously send outputs that are proportional to the distance measured, what is the sampling rate of these and would taking different samples continously affect the sensor (due to cross talk or presence of echo from previous sampling)?
  • ercoerco Posts: 20,256
    edited 2012-09-24 13:48
    @heshoy: Thanks for your PM, looks like Mike is way ahead of me in both IQ and speed of response. Interesting problem, you have several challenges. A few questions:

    1) this is for outdoor use in bright sunlight?
    2) paved highway or (more likely) offroad use (dirty/dusty/muddy)?
    3) how fast are you moving?

    Sounds like you anticipate bumpy roads and want to actively move each wheel up and down in order to keep the chassis level. WOW. Great idea, where to begin?

    A few thought starters. This isn't unlike a mars rover or the DARPA Grand Challenge robots, attempting to 3D map the terrain ahead of them to determine the best route through. You could search rovers and robots to see what has been done.

    I have been amazed by the claims of the David laser scanner, which uses a line laser and an offset camera to produce 3D profiles. You might look at that and see if there's anything you can use. You would need a lot of processing power to use that in real time on a moving vehicle.

    http://www.david-laserscanner.com/
  • heshoyheshoy Posts: 12
    edited 2012-09-24 14:10
    Thanks a lot erco im really happy for ur response, im gonna check these out and compare different options of sensors , i dont wanna go for something expensive coz we are a little low on budget, so probably laser scanners arent a good compromise, very efficient tho... what do u think of ultrasound sensors?
    and to answer ur questions.. 1)outdoor and indoor, 2)i guess its better for offroads with bumpy and poor paved roads. 3)lets say we are doing 40->80 km/hr.
    hope im not bothering u, regards.
  • W9GFOW9GFO Posts: 4,010
    edited 2012-09-24 14:18
    This is something that I have been thinking about for decades. Not very seriously of course, I have made no attempts at developing such a system. My thought is to first develop the system that will actually move the wheels, unloading and reloading the suspension in times measured in microseconds - this will be the really clever part.

    You could use a very low mass idler wheel which carries no weight a small distance ahead of the first wheel. It can sense all the variations of the road by way of an encoder.
  • ercoerco Posts: 20,256
    edited 2012-09-24 14:30
    Ouch. 40 km/h seems pretty unlikely. Getting accurate readings at that speed (much less actuators that move that fast) would be difficult. On your shoestring budget, I think getting decent results at 5-10 km/h would be impressive. Not sure how you would achieve 40-80.

    Another approach (for low speeds and high complexity & price :)) would be to have pressure sensors (think many discrete touch sensors, not tire pressure sensors) around each wheel which feel the road ahead and relay that info wirelessly to the controller. One of my many unfinished robots (!) has a continuous touch-sentive potentiometer around its perimeter as a smart bumper so that it which knows where the point of contact is. Something like that on each one of your wheels could detect bumps and potholes rolling in either direction (forward or reverse).

    http://www.youtube.com/watch?v=aVF6ETof3tE
  • ercoerco Posts: 20,256
    edited 2012-09-24 16:32
    The Big Dog walker has the ultimate in sensors and active suspension for rugged terrain, the legs themselves. It doesn't try keep the body level, but just negotiating a random pile of cinderblocks is a major achievement. http://www.youtube.com/watch?feature=player_detailpage&v=W1czBcnX1Ww#t=144s
  • heshoyheshoy Posts: 12
    edited 2012-09-25 04:18
    yea thats so clever! i had this idea in mind but i thought it wouldnt work , thanks alot! .. do u have any idea what kind of motor i should use for that? linear motor? servo? stepper? or rotary with some technique that converts rotational motion to linear motion? also what kind of control do i need here? speed control or position control?
  • heshoyheshoy Posts: 12
    edited 2012-09-25 04:22
    Thanks a lot erco ur the best, let me know if any other ideas hit ur mind :)
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-09-25 08:12
    Hesham,

    I don't have much to add to what others have said about ultrasonic sensors.

    While I do have some experience with ultrasonic sensors, I'm far from an expert.

    In your PM, you asked about sources for sensors. I've used several different sensors myself. I've used Parallax's Ping, a Maxbotix sensor and sensors erco pointed out from China.

    The Maxbotix sensor has some nice features like serial output and continuous operation but I wouldn't suggest getting it unless you need one of its features. The inexpensive sensors erco found work well and I don't see a reason for not using them.

    If you order the inexpensive sensors, make sure you order several. I've found only about 80% of them work. Or you can buy them form PropellerPower.com and get ones that has been tested.

    Another option is the Programable Acoustic Distance Sensor (PADS). I think with the PADS sensor you could modify the firmware for your own needs. All the sensors I've mentioned use the first echo to compute distance. Being able to monitor multiple echos might be a benefit to your project. I don't know how to go about monitoring multiple echos.

    I tried adding one of the inexpensive sensors to a small quadcopter but the noise from the motors(or speed controllers) interfered with sensor's ability to measure distance. I haven't tested to see if larger motors/speed controllers also interfere with ultrasound sensors.

    Smooth, flat surfaces don't return a strong echo when approached from a glancing angle. Some surfaces don't return an echo at any angle. My couch absorbs ultrasound which made it invisible to my ultrasound sensor unless the sensor was pressed against the padding of the couch (as seen in this project). If your road was very smooth and flat, you might not be able to measure distances in front of the car. I doubt this would be much of a problem since I'd think most roads would be rough enough to return an echo.

    I agree with others about speed being an issue when using ultrasonic sensors.

    Unless you could monitor for multiple echos, these sensors might not be able to "see" ruts since the first echo back to the sensor would be from the edge of the rut.

    Normally some delay is needed between measurements with an ultrasound sensor to allow echos from the previous measurement to subside.

    The Maxbotix sensor takes a measurement about 50 times a second when it is in continuous mode. I don't know what the fastest possible measurement rate of these sensors is.

    These ultrasound sensors can be used with just about any microcontroller. I've only used them with Propeller chips myself.

    The laser technique might be a better option, but I'm not sure how well this would work in bright daylight.

    While a computer would probably be needed to process the image, the Propeller can do some machine vision functions (not nearly as well as a computer). Post #4 of my index lists some of the Propeller machine vision projects I've seen on the forum.

    I've wondered about mapping a robot's surroundings using Hanno's video capture method to find a projected laser line. I doubt I'll get around to working on this any time soon (if ever).
  • xanaduxanadu Posts: 3,347
    edited 2012-09-25 09:56
    Does your device need to level the vehicle, or just adjust the dampening based on how bumpy the road is?

    Have you thought about using an accelerometer?
  • Ed TEd T Posts: 50
    edited 2012-09-25 09:59
    My 1.5 cents:
    - 40 km/hr is about 1111 cm/sec, even with 50 Hz sampling you will only get a data point every 22 cm of travel. This could miss a lot of holes or bumps.
    - With the variation in acoustic properties of the ground traveling underneath the sensor, the reflected sound signal may be very inconsistent. I think a laser spot on the ground that you measure the angle to would work better.
    - I would recommend trying a small/simple/slow solution first to better understand the issues.
    - For sizing your actuators note that you do not have to accelerate the car upward/downward you just have to keep it from falling down/being pushed up.
    - Build a test jig where you can simulate a road profile and see how your design performs.
    - Obviously understand the physics and control theory aspects of the problem.

    --Ed
  • ercoerco Posts: 20,256
    edited 2012-09-27 10:13
    @heshoy: Legs are very cool, but much slower and far more complex than wheels. I'm glad to see that you're open to alternate suggestions. Your problem is interesting and complex; you have already received replies from some very smart people. Consider all of their suggestions.

    I'm really at a loss to suggest any active steering that would work at the speeds of 5-10 km/hour. If you can live with low speeds, I think you have received some worthwhile suggestions using ultrasonic sensors and accelerometers. Those are affordable and there is lots of information available on them.

    Also, have you searched for information on DARPA's Grand Challenge? Expensive robot cars used every sensor imaginable to sense terrain and obstacles at reasonable speeds. SICK laser scanners were very popular: http://www.youtube.com/watch?v=tJEKkHbxwdk

    There was even a riderless motorcycle: http://www.youtube.com/watch?v=V1bkhviWgSg&feature=player_detailpage#t=76s
  • ercoerco Posts: 20,256
    edited 2012-09-27 21:11
    New idea. How big is your vehicle and what's your wheel diameter?

    I'm gonna suggest big bicycle wheels for a couple reasons. And each wheel needs an encoder.
  • ErlendErlend Posts: 612
    edited 2012-10-03 05:17
    There should be lots of space below the vehicle motor. You could mount a 1x2' metal plate there - on insulators - and treat the plate-ground as a capacitor. Add an oscillator circuit and you would have an ultrafast distance detector, where distance is a function of frequency. Of course to make this work you need also to have some connection to ground, but it could be really high impedance so should not be hard to fix.

    Erlend
  • heshoyheshoy Posts: 12
    edited 2012-10-06 15:40
    just for bumpy roads, and yea we will use both distance sensor and an accelerometer, a distance sensor is required to predict the shape of the road so that the motor response could be faster, rather than using an accelerometer to actuate the linear motor right when the car hits the bump which may result in a delayed response
  • heshoyheshoy Posts: 12
    edited 2012-10-06 15:43
    Erlend wrote: »
    There should be lots of space below the vehicle motor. You could mount a 1x2' metal plate there - on insulators - and treat the plate-ground as a capacitor. Add an oscillator circuit and you would have an ultrafast distance detector, where distance is a function of frequency. Of course to make this work you need also to have some connection to ground, but it could be really high impedance so should not be hard to fix.

    Erlend
    i really like ur idea since the road might be made from metal like aluminum coz its cheap, but i think its better to make a model of the general case which is asphalt roads, i just need to know if laser distance sensors can detect surfaces that arent straight and facing the sensor, what if the surface im measuring is angled with respect to the sensor's plane, what if the surface is cylindrical? could u help with that?
  • ErlendErlend Posts: 612
    edited 2012-10-08 00:59
    You don't need metal roads. Any ground surface will be conductive enough for such extremely low currents. The challenge is to make a circuit which is sensitive enough. The capacitance will be in the order of tens of pF, which means that the oscillator would need to be in the hundreds of MHz. What you need to do is to build an oscillator L C circuit where the C is the plate-ground capacitor, and a circuit similar to the auto-tuning circuit of an FM radio - which would output a voltage proportional to the change in frequency (=distance). Actually this should be fairly simple and straight forward, but you need to understand RF electronics.
    It does not matter that the ground is uneven, this method will measure the average under the plate. It is not accurate in terms of absolute distance, though.

    Much simpler and more robust than laser IMHO.

    Erlend
  • ercoerco Posts: 20,256
    edited 2012-10-08 02:05
    Sensors are only half of the problem. Since you are doing this on a budget, and the maximum speed question is up in the air, I suggest you take a look at the problem from the other direction first. You'll have four actuators, one moving each wheel. Those must be BIG, STRONG, FAST, EXPENSIVE actuators. Seriously. Do some math first to figure the actuator forces and speeds required even at 5-10 MPH over your range of travel. These would likely be either pneumatic or hydraulic actuators (plus the required pumps, valves, controllers, etc) but electric may not be strong or fast enough.

    IMO this is a great problem for Boston Dynamics in full scale. On your budget, you might need to scale this down to a tabletop demo at low speeds, which could still be very dramatic. You could use quarter scale servos and several Sharp IR sensors on each wheel. Do it right and BD may just hire you!
Sign In or Register to comment.