Shop OBEX P1 Docs P2 Docs Learn Events
Creating terrain-following rc helicopter, how to measure height above the ground? — Parallax Forums

Creating terrain-following rc helicopter, how to measure height above the ground?

CuriousOneCuriousOne Posts: 931
edited 2013-03-28 18:59 in General Discussion
After my kids smashed another expensive RC helicopter, I thought, may be there is a way to use some circuit, which will measure distance to earth, and simply won't allow descend below say 5-3-2-1 meters and keeping defined height above the terrain (objects)?

(I know that there's another way - you previously enter height coordinates for given area, then use GPS to determine your coordinates and adjust height accordingly, but this is hard to do and expensive also. And it won't help against homemade obstacles)

I evaluated and bench tested some solutions:

1. IR/laser proximity sensors - Haven't tested them, but as I've read, they have strong interference from the sunlight, work differently on different surfaces and may not work properly. Anyways, I've ordered couple of them, let's see how it comes.

2. Capacitive proximity sensor - did some test of atmel products. The reliable detection distance (regardless of surface type) achieved was about 5cm, which was not enough. Also, due to static buildup (I think so), the sensor stopped working after being airborne in 15-20 seconds.

3. Inductive proximity sensor - a resonant LC circuit, frequency of which being altered by nearby metallic object (via magnetic forces, not capacitive), so can be used against metal objects. That worked relatively well against garage door, but not for general terrain.

4. Vector network analysis way. Helicopter has tuned antenna system. The R and jX being measured from launch height and used as reference. As height changes, both parameters change, knowing initial tune frequency and R & jX values, it is possible, by using special formulas, to calculate the height (distance) from object. Considering we can go microwave and have very tight beam, this may lead to great accuracy, but I don't think this is possible to do at DIY/hobby level. I did some tests with dummy "helicopter", which consisted of laptop, VNA and antenna attached to string and it was clearly possible to see how these parameters change across the different objects and heights on terrain. But that all was expensive and heavy.

5. RF doppler method. I know that this is most reliable and widely used method, but was not able to find any supplier of such modules. Why? prohibited by regulations or?

Comments

  • NWCCTVNWCCTV Posts: 3,629
    edited 2013-03-10 13:17
    What abot Ping sensors? I know they work great indoors. Not sure about outdoors but I think it might work
  • mindrobotsmindrobots Posts: 6,506
    edited 2013-03-10 13:39
    I don't think you could do ground following without some sophisticated and expensive equipment. Wouldn't you need to be looking forward far enough to see any ground level changes in order to react by changing altitude before you were over it?

    You could set a hard deck (see Top Gun) for the flight (say, 3 meters) for the majority of the flight time but whatever you used to measure that would also need to react quickly enough to negate any rate of descent you had in controlled flight. If responsive enough, then it could just take over and take the copter to a safe altitude and hover.

    You'd certainly have to try a Ping against ground and see how it reflected. Grass and such could really play havoc with the reflections. Maybe a pressure altimeter with 1 meter sensitivity and quick response?

    Sounds like a fun project. You might want to put your test bird in some sort of bungee harness until you work out all the kinks! :smile:
  • prof_brainoprof_braino Posts: 4,313
    edited 2013-03-10 14:13
    Don't they usually use a barometric sensor, and stay above the highest elevation of the area? I think I heard that the ultrasonic sensors are funky when they are moving and/or not perfectly perpendicular. I have ideas about automated terrain following. I was thinking of a 10DOF IMU

    http://www.ebay.com/itm/10DOF-axis-IMU-L3G4200D-ADXL345-HMC5883L-BMP085-sensor-module-3V-5V-compatible-/150996527069?pt=LH_DefaultDomain_0&hash=item23281827dd

    And spot check with ultrasonic/IR when I know I'm stable and perpendicular.

    The only radar I found that I could afford was http://spectrum.ieee.org/geek-life/hands-on/coffeecan-radar

    but I was not persistant on either system.

    All the methods have some latency in the measurements, and was advised to look into the "operator induced oscillation" effect.
  • Mike GMike G Posts: 2,702
    edited 2013-03-10 14:22
    What about an Altimeter Module MS5607?

    I tried to automate a helicopter once. It chased me around the park for a bit until it crashed.

    This is not an easy thing to do...
  • Peter KG6LSEPeter KG6LSE Posts: 1,383
    edited 2013-03-10 18:06
    The LRF for 100 ish USD is a quick fix IF you can get it to reflect .... Or Heck a RF X band device .

    Proff Braino! My Adviser at Oregon tech here is building that Exact synthetic aperture radar !
    Altimeter Module is not gonna give you any thing but non AGL readings ..... good for absolute, but not for "off the deck " readings .RADAR is SO easy !..... take a peek at how a radar gun works ..... in fact one hacked Is gonna do great ! , you only care if there is a change .... you approach a hill and the flight path is level you are gonna see a Increase on the MPH display .....


    As long as your PID loop will " attempt to keep a " 0 " MPH on the radar gun you will have it track ..

    a 0 MPH you will have a Negative hill or flat !.*( see note # 1) you can get From some places some coffee can Xband kits for 50 ish USD.

    Aside from RF laws on the bands you use . The Gear is Dead easy to do ,,


    The Key is how much do you like to play with wave guide ! and are you comfy with " plumbing" as its called the the industry



    its simple ..... you have a LO lets say 10 GHz .. with a Lets say increase in hill ( Loss of AGL) the SIg comming back will be higher then the LO . so you use a Mixer to Mix the 10 with the 10+1 and get 1 GHZ out and 11 GHz out .

    you can then do the same with the next stage till you get to the AF range and have it run a Read ADC in and Volla the more the Freq in that Read regester the Less you are off the deck ..


    Note 1 : some of the the off the rack Officer radar guns have a un-signed readouts . so Incoming or Out going the car is gonna read the same ....
    remember the Doppler shift can go UP and Down in Freq so they Treat the up and down the same as a absolute value .
    OTHERS dont count the up or down shift but only one ..
  • lanternfishlanternfish Posts: 366
    edited 2013-03-10 20:10
    Mike G wrote: »
    What about an Altimeter Module MS5607?

    I tried to automate a helicopter once. It chased me around the park for a bit until it crashed.

    This is not an easy thing to do...

    Got any video footage?
  • NWCCTVNWCCTV Posts: 3,629
    edited 2013-03-10 20:18

    @profbraino, These look rather interesting. What all could one do with one?
  • CuriousOneCuriousOne Posts: 931
    edited 2013-03-10 21:32
    The altimeter/barometer approach has a little problem - it will work well against terrain, but won't consider human made obstacles, such as patio table, parked car or whatsoever.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-03-10 22:12
    The HoverFly has a port to connect an ultrasound sensor.

    My little $100 quadcopter makes too much high frequency noise to use ultrasound but it might should work with a larger quadcopter or a helicopter.

    Barometric sensors are often used with UAVs. The barometric pressure of a location usually doesn't change very fast so it can be used as an altimeter. But as you note, it's not much use against man made objects.

    I've tried Parallax's Laser Range Finder outside with little success. I don't see if working from a helicopter.
  • SRLMSRLM Posts: 5,045
    edited 2013-03-10 22:19
    I would use a combination of sensors: where one sensor fails, another might work. Together, you might be able to make a very reliable measurement system.

    I would start with testing multiple sensors:
    A sharp IR sensor GP2Y0A700K0F
    An ultrasonic sensor such as the Ping or Maxbotics sensor
    The Parallax laser range finder (link)
    A barometer altimeter (to provide a base for the other sensors).

    You should be able to fuse these three sensors together, and likely get a reliable reading.

    Of course, that's the easy part. The hard part is controlling the helicopter. There's plenty of information out there on this subject, if you can make it through the math:
    http://www.comets-uavs.org/papers/CANTOS-WAC-2004.pdf
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2013-03-10 22:21
    I would love to build an M.I.T cantenna radar! This is acually the reson I started building a robot. My plan, when money permits, is to do one of these cantenna radars and use it it on a pan tilt to do 3D mapping. RF is waayyy over my head but these guys made it pretty easy using modules and pitting the whole coure on MIT open course ware. I really hope I get to do one of these some day!

    Radar systems are something that has always driven me twords electronics since I was young. Staring as a green screen with a sweeping line that shows whats goin on somewhere else feels so covert, like playing special agent.

    For now I have personally setteled on LIDAR, but im always hoping ill find a basic how to that shows the average person how to ping an object using radio waves, maybe even a basic CW system. Like I said im no RF guy but I would think bouncing a low frequency radio wave and calculating it's time of flight in within a 10 foot range or so would be doable with off the self stuff but I cant find anything out there!

    As far as using ultrasonic on a copter, there are a lot of issues as described above. But one not mentioned Duans seemed to find was that his copters noise acually interferes with a ping :/
  • SRLMSRLM Posts: 5,045
    edited 2013-03-10 22:36
    For now I have personally setteled on LIDAR, but im always hoping ill find a basic how to that shows the average person how to ping an object using radio waves, maybe even a basic CW system. Like I said im no RF guy but I would think bouncing a low frequency radio wave and calculating it's time of flight in within a 10 foot range or so would be doable with off the self stuff but I cant find anything out there!
    /

    I disagree. The following thread might be informative, especially the post where Beau calculated that, at best with a Propeller, you would be able to get 1.88 meter resolution (with perfect code). And that's only the start of the problems.

    http://forums.parallax.com/showthread.php/104629-Project-Laser-range-finder...-big-distance!
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2013-03-11 00:18
    Thank you SRLM, I will read through that, hopefully it will help me understand what the issues are as far as building a simple RF ping.

    In my head the biggest issue is definately speed. This is the issue with home brew time of flight LIDAR, measuring the speed of light isn't easy, and neither is measuring the speed of electricity through air! But there are consumer laser applications from 5k SLCK laser range finders to 50 dollar laser tape measures that do time of flight. It boggles me that there are no cheap consumer Radar gadgets to measure distance. RF seems a lot more versitile as far as what it can bounce off of than either laser or sound! Although RF is fast, if the prop could do 1.8 meters of res then something like an FPGA or beefy CPU seems like it may make a good canidate to do timing for RF time of flight.

    As I said I will read through that thread as I am sure there are more issues than speed. I still think something like the MIT Cantanea could be done with cheaper and simple parts. Look at those Ramsey doppler kits to measure speed of an object, I cant find much about them but they have been doing TOF in a 99 dollar kit since the 90s.
  • SRLMSRLM Posts: 5,045
    edited 2013-03-11 01:05
    Thank you SRLM, I will read through that, hopefully it will help me understand what the issues are as far as building a simple RF ping.

    In my head the biggest issue is definately speed. This is the issue with home brew time of flight LIDAR, measuring the speed of light isn't easy, and neither is measuring the speed of electricity through air! But there are consumer laser applications from 5k SLCK laser range finders to 50 dollar laser tape measures that do time of flight. It boggles me that there are no cheap consumer Radar gadgets to measure distance. RF seems a lot more versitile as far as what it can bounce off of than either laser or sound! Although RF is fast, if the prop could do 1.8 meters of res then something like an FPGA or beefy CPU seems like it may make a good canidate to do timing for RF time of flight.

    As I said I will read through that thread as I am sure there are more issues than speed. I still think something like the MIT Cantanea could be done with cheaper and simple parts. Look at those Ramsey doppler kits to measure speed of an object, I cant find much about them but they have been doing TOF in a 99 dollar kit since the 90s.

    I like the idea of using a tape measure. This thread didn't have much luck, but maybe a different or newer model would be better.

    The Ramsey Doppler radar kits use the Doppler effect, not time of flight, to measure speed. And of course, the Doppler effect doesn't tell you how far something is, only it's relative speed. With the RC helicopter application, you might be able to get position by integrating the velocity over time, but that's has long term error.
    http://en.wikipedia.org/wiki/Doppler_radar
  • ErlendErlend Posts: 612
    edited 2013-03-11 01:10
    I've been through the same challenge, but for subsea ROV's. Solved by placing 3 ultrasonic transponders on the ground - in a triangle. This way you could also decide the area your kids are allowed to fly within. By pinging the transponders, the transit time (=distance) can be determined, and the height measured. Each transponder would have its own frequency to ease the recognition. This is a very robust method. I would think the transponders could be made really cheap, too.

    Erlend

    EDIT
    If you can accept a slower system, a simpler way is for the copter to ping all transponders, and the first replies immediately, the next after 500mS, the third after 1000mS. Then you would avoid the complexity of receiving at three different frequencies, you would only need to 'listen' in the three time windows, and subtract 0, 500, or 1000mS from the transit time.
    Another way is for the copter to poll each transponder by using an address code for each, but that adds complexity again.

    Actually, using 3 transponders would give you accurate x y z positioning, if you want.
  • CuriousOneCuriousOne Posts: 931
    edited 2013-03-20 14:00
    I went a bit different way - Powerful IR led (Osram 1W) pulsed and reflection measured with IR phototransistor.

    The circuit is far from completion and perfection, but results are quite interesting - by observing the reflected signal level on scope, I can "distinguish" object sized 40x40cm at distances about 5 meters! It works equally fine for polished, brushed, painted and scrap metal, woods, plastics and human body. The measured reflected voltages, amplified by LM358, from plain ground are: 10mV @ 7 meters, 15mV @ 5 meters, 25mV @ 2 meters, 150mV @ 20cm. The delta stays the same, regardless the object type. The problem is that signal is quite noisy, so I'm going to try opamp with lower noise and also add a voltage-to-frequency circuit, so I can easily able to feed it into MCU.

    What is quite interesting, the results were best when I used the led without any reflector, it's emitting range is about 140 degrees. When I add the reflector, the detection range for shiny surfaces increased considerably (I can "see" the fridge door from 10 meters with 50mV signal), but it became completly blind against the non-polished (carton box) surfaces.
  • CircuitBurnerCircuitBurner Posts: 21
    edited 2013-03-28 04:49
    The whole subject and goal of automating a helicopter is more complex than it seems on the surface.
    Having some insider knowledge and experience on this topic, and currently shoulders-deep in this exact endeavor, let me bridge you guys forward a bit to where we are.
    Simply put, helicopters are one of the most complicated and difficult machines to operate, for many reasons.
    Now if you are working with multi-copters or tandem co-axial toy helicopters, theres a considerable easing of requirements on this.
    But Im talking a real helicopter by definition...single rotor, collective pitch heli's.... and they have quite a sizable performance advantage over the toy type birds. Consequently, they are much more to deal with when considering stability and trying to automate any aspect of piloting one.
    Now to cut to the chase here,..
    We have been building and flying Arduino powered autopilots to augment or help in the flying of single rotor traditional helicopter drones.
    This was exponentially more complex than getting the multi-rotor multicopters to fly autonomously. We aren't even quite finished either.
    But, good news is we now see light at the end of the tunnel, and have machines flying in various degrees of functionality now.
    Im talking pre-programming flight parameters, and basicly letting the thing take over after a simple 'hand-off' of command control to the APM.
    It can "loiter" or hang around a spot in the sky you leave it, or it can RTH 'return to home' on command or loss of radio contact. WE arent yet doing auto landing and take off yet, but thats right around the corner.
    The multicopters have been doing this all for a couple years almost...so this is an indicator of how complicated the dynamic variables are when dealing with traditional heli's. Stuff like Yaw pre-compensation and cyclic to collective pitch buffering have been uncharted territory that we have had to conquer, with no option to ignore.
    If you are serious about flying traditional heli's with command augmentation or complete auto pilot systems (drone) check out the Arducopter program at DIYdrones link - http://code.google.com/p/arducopter/wiki/ArduCopter_TradHeli
    Theres more than anyone could digest even partially in 6 months right there.
    I think that could definitely be some point of reference for any of you to look at and consider.
    It will certainly save you years of time and thousands and thousands of $$ if you want to do this sort of thing.
    A parallax MC would certainly be able to control this type of device, if an Arduino mega 2560 is already.
    The issue I see you just getting your feet muddy with here is this discussion of what sensors and what data would be pertinent to this effort.
    For the full auto pilot, ground proximity is sonar. Altimeter is used elsewhere during APM flight. 3axis accelerometers, 3axis gyros, barometric pressure sensor augments altitude determination, Magnetometer compass and GPS augment position and heading sensing inputs, and all these combine in the Arduino APM code to produce the automated piloting.
    Trust me, we've busted up many high dollar heli's in testing, repaired them and repeated the busting cycle until we got to where we are now.
    And im not talking about toy helicopters...full CCPM single rotor heli's of the competition grade. $600 is the bottom scale aircraft entry point.
    Most test platforms are $2000 - $4000 birds carrying FPV cameras and some pretty exotic flight gear.
    No reason you cant get a cheap toy and improve it with this tech, but the going rate for the current state of the art APM (entry level bare bones) is around 300 bucks, more than the toy cost by far, lol.
    But if this is what you really want, welcome aboard!
    https://www.youtube.com/watch?v=IbM-0PCvrVQ
    check out my bird here, and get a feel for what we are flying...if you fly toy grade choppers, your jaw will hang open. lol

    Heres a developers chopper flying itself in full waypoint programmed autopilot mode. At the termination of flight plan, it settles a meter off ground using sonar determination. Auto landings are still not completed, but apparently he has got his doing auto take-offs...and I was unaware of that little fact till now!
    http://www.youtube.com/watch?v=XPuwgAP5ZBc
  • CuriousOneCuriousOne Posts: 931
    edited 2013-03-28 11:15
    Thanks a lot, can you shed more light on sonar you've using for height determination?

    and by "helicopter" I meant anything that flies, but does not relies on jet engine principles. So wherever it will quadro, octo or whatever copter, any kind will be ok.

    I've improved my construction a bit, IR phototransistors with different beamwidths,slightly different aim discriminators are used, so accuracy is further increased. However, so far all my circuitry consumes about 3W - huge load for toy level copter battery, not mentioning the weight.
  • CircuitBurnerCircuitBurner Posts: 21
    edited 2013-03-28 18:59
    Well, the type of platform really matters as the requisite equipment and setup difficulty is a widely varying thing.
    I guess by just presenting the type of aircraft we fly (traditional helicopters) everything else will be an easier endeavor.
    The sensing apparatus I see members of our group using seem to have some variety between a few of us.
    Ive seen several flavors of sonar used successfully for the ground proximity segment of the APM set.
    Im opting for the parallax item, as I also use the Parallax L3G4200D 3 axis gyros and altimeter unit sold here as well.
    Oh, yea, I guess my loyalty to parallax beelds to the surface profusely, lol...my GPS module is also a parallax model.
    Im using Arduino MCs now only because the DIYdrones Ardupilot and Arducopter APM code is written in C++ and in the Arduino variety...the software is free open source stuff, and I wanted to do some C, so there. But Im an old skool parallax basic stamp fan, having made some pretty interesting stuff 10-12 years ago with the SIP packaged BS-1 and BS-2 units...and like the ease of the Pbasic language to write the code with. Im intrigued with the new generation Parallax MCs like the propeller, cause it takes me back to my roots a little, but mainly for its multi-threading multi-tasking Im reading about. Apparently this is another league compared to Arduino MC offerings, as I know that there are no multi tasking goodies that Ive seen yet.
    Nonetheless, the Arduino based Adupilot custom APM they sell at DIYdrones is a really capable, proven and reliable foundation for their software. The software is three families, A Rover (ground based), fixed wing (Arduplane), and copters, multi and traditional (Arducopter), with all 3 sharing a fantastic ground control (base) station software package for use on the host PC. Support for FPV video and telemetry/OSD, full instrumentation, and mapping/waypoints programming makes you feel like you are in a real cockpit. Its a rapidly evolving thing, building velocity too, now that stuff is starting to work.
    Anyhoo, got off target a bit, but its important to disclose that stuff at this point, as its a shortcut for anyone wanting to dive into this dynamic new field.
    Back on the component integration thing where I left off, as I said, you can use a decent variety of devices as long as the Arduino APM code recognizes it and the ground station software will support its data. So parallax parts seem to fit right in from what Ive seen...at least what Im using. Ive opened a can of worms...or maybe untied a huge bag of cats...so I will taper off here for now, cause I would have to freekin write pages to make anything about this well rounded.
    Leave yas with some ground station pics to whet the appetite!
    (softwares free and worth a look even if you have no aircraft yet.)

    http://code.google.com/p/ardupilot-mega/wiki/Mission ground station software

    http://code.google.com/p/arducopter/wiki/ArduCopter 'copter version onboard software
    http://diydrones.com/profiles/blogs/ardupilot-mega-home-page fixedwing plane version software
    http://code.google.com/p/ardurover/wiki/Overview?tm=6 'Rover/buggy/robot version software

    APM25encl.JPG
    the Arduino based custom APM -latest version. pretty packed with all the sensors you need almost. except GPS option or sonar. You add those yourself.
    They have a killer community there too, and support is feverish...theyre really into this bigtime.
    old_SGPhome_flight_cockpit.png
    Ground control
    300 x 213 - 13K
    1024 x 768 - 1M
Sign In or Register to comment.