• Content Count

  • Joined

  • Last visited

  • Days Won


Posts posted by Spitfire76

  1. 2 hours ago, Mashon said:

    my dad and I have been thinking of building our own quadcopter straight from scratch

    Firstly welcome to this forum. Its great that you and your Dad want to build your own quad but you don't have to write the software that controls the quad as there is some great open source software out there that you may want to consider. Personally the one that I use is 


    Their software now runs on a wide selection of hardware, has versions not only for multi rotors  but land vehicles, fixed wing aircraft, boats and even a submarine. It can also become a great development platform if its programing of the drone that your interested in by adding a companion computer. I am not familiar with microchip.com but its sounds similar to the raspberry pi which makes a great companion computer. You can even download the software and setup a test and development environment without any hardware (apart from a PC or Mac of course) which makes it a great way to become familiar with their ground control station (http://ardupilot.org/planner/) and how to program autonomous missions


  2. 17 hours ago, tom42100124 said:

    It is the V configuration. I double checked all of the esc that they were calibrated and connected to the correct motors When I am able to get it in the air a foot or two and semi stable it responds to the controller normally except when going up.


    • Are the props securely attached to the motors i.e not slipping ?.
    • How did you select the components of this build ?.
    • Do you know if a similar build works ?. (i.e motor/props generate enough lift)
    • Do you have the correct radio channels mapped ?

    Again I am not familiar with that controller but like most controllers its important to calibrate the following

    • ESC- Do this one by one without the flight controller using just an ESC connected directly to the receiver.
    • Accelerometer
    • Radio 
    • Compass

    and finally does the battery have the right rating for this build and if so have you tried another battery ? I've known batteries to fail and not produce sufficient current.

  3. 9 hours ago, erfan said:

    does this mean even if I set 1 meter it goes to 10 meter ?

    What parameter are you referring to when you say setting to 1 meter ?. If its TERRAIN_FOLLOW that value is not in meters its just a boolean i.e 0 or 1, off or on.

    My understanding of the behavior when in LAND mode is that the copter will initially descend at a relative fast rate which I believe is set by the parameter WPNAV_SPEED_DN and defaults to 150cm/sec and when it reaches the altitude set by LAND_ALT_LOW (default 10m) it reduces its descend speed to the value of LAND_SPEED (default 50cm/sec).

    Assume for the moment you don't have a rangefinder installed and TERRAIN_FOLLOW is default to 0

    The way ArduCopter knows its altitude is by using the barometer that uses atmospheric pressure to calculate it. When ARMED it say's "ok this must be the ground" and it uses that as 0 altitude for its whole mission. The issue is that the ground may not be entirely flat which means it could crash into higher ground like a hill or mountain. Say it has to land in LAND mode on higher ground than where it took off from and that ground is more than 10m higher it will never know to switch to a lower descend rate and so hit the ground at 150cm/sec!. 

    Now assume that you still don't have a rangefinder installed but TERRAIN_ENABLE and TERRAIN_FOLLOW are set to 1. These tell ArduPilot to get terrain data from the ground control station, in our case Mission Planner, which in turns gets it from the mapping source. In other words based on a given latitude and longitude the mapping source also provides the ground height above sea level. For example say you take off at where the ground is at 100 m above sea level (MSL) and fly  to an altitude of 100m (200m MSL). You then fly to an area that is 150m MSL. Without the terrain data you would now be only 50m above the ground (still at 200 MSL) but with the terrain data Ardupilot adjusts its altitude to maintain 100 m above the ground (goes to 250 MSL). So when you go to LAND mode it will know when its 10m above the ground and switch to the lower descent rate. 

    If you install a rangefinder it does not need to use the mapping data as it knows exactly its height above ground. It also has the advantage of detecting not just the ground but an object directly below it. Now the rangefinder is only used below its accuracy height which in your case is 3m (RNGFND_MAX_CM). This is below the 10m set by LAND_ATL_LOW so does the UAV descend at a rate of 150 cm/sec and when it starts to use the ranger finder at 3m reduce it to 50cm/sec.? I would hope so but I am not sure but will try to find out.

  4. 1 hour ago, tom42100124 said:

    I have built my custom drone with the naza v2 flight controller.

    I don't have any experience with that flight controller or software as I prefer using ardupilot but the first thing I would check is that the motor/prop directions are correct and that the motors/ESCs are wired to the appropriate ports on the flight controller. I see that you have a hex configuration. So is this configured for a rotor-i or rotor V ?. V is more common.


  5. 9 hours ago, erfan said:

    when checking the pricision landing with SITL I am not able to get the log when doing the following :

    I am not familiar with that type of logging, what is PL ?

    My understanding is that Ardupilot has 2 types of logging

    • DataFlash logs
    • Telemetry logs.

    The DataFlash logs reside on the flight controller and are stored on the SD card whereas the telemetry logs are stored on the PC running Mission Planner. In the case of SITL the DataFlash logs would reside in the ardupilot/ArduCopter/logs directory.

  6. 14 hours ago, erfan said:

    how does a Teraranger control the distance ?

    The Tera Ranger does not control the distance but simply measures the distance from it to an object which if mounted on a UAV and pointing down is usually the ground. ArduCopter uses this measurement to control the altitude of the UAV.


    14 hours ago, erfan said:

    how does it function actually?

    Its similar to LIDR but uses LED technology to measure distance with light.


    14 hours ago, erfan said:

    does it actually control the distance from the object underneath or only can show the height?

    As per the answer to the first question it measures the distance to the ground or an object underneath it. ArduCopter uses this distance in various flight modes to maintain altitude.

  7. 4 hours ago, erfan said:

    This enables terrain following for RTL and LAND flight modes.

    It looks like both TERRAIN_ENABLE and TERRAIN_FOLLOW must be set to 1 for it to be enabled in RTL and LAND modes. By default it looks like they are set to 1 and 0 respectively. 


    4 hours ago, erfan said:

    Does that mean Even if I am using  Teraranger evo 3 when landing it goes to 10 meter if setting waypoints using terrain ?

    Where do you get the 10 meter value from ?. Is that from the parameter LAND_ALT_LOW which defaults to 10m ?. This is of course used in autonomous landing and when reached will slow the decent to the value of LAND_SPEED. These are used to help provide a gentle landing.

    Its my understanding that without Terrain following enabled that 10 m would be 10 m above the home position. So say that the home position is 100 m above sea level (MSL) but you performed an autonomous landing on higher ground, at say 120m MSL, then the trigger to the slower decent speed would never be reached and maybe the UAV would bounce or even crash. With terrain following enabled this would be avoided as it would use the stored map data to know the height of the ground at that location although I understand that the data is not always that accurate which is why its better to have a rangefinder as that will know the true height above the ground or obstacle. 

    Now one thing that comes to mind is that since the rangefinder is not used above RNGFND_MAX_CM which in your case is only 300 what happens above this height without terrain following enabled. Would it slow the decent at 3m instead of 10 m ?. I will have to check with SITL.

  8. FYI.....


    Webinar schedule:

    June 19, 2019 2 P.M. ET                 Public Safety: How to Start a Drone Program       

    June 27, 2019 4 P.M. ET                 Recreational Flyers: Fly Safe. Have Fun. 

    July 18, 2019 4 P.M. ET                  What is the Low Altitude Authorization and Notification Capability?

    August 1, 2019 4 P.M. ET                How to Navigate UAS Facility Maps

    August 13, 2019 4 P.M. ET              How to use the FAA Drone Zone

    September 12, 2019 4 P.M. ET       How Public Safety Agencies can Fly Drones During Emergencies

  9. 3 hours ago, BenL said:

    Thanks that did help. Now for some reason I cant get Betaflight to work? Betaflight doesnt seem to recognize that theres any drone plugged in. 

    Did it work and then stop working or has it never worked ?.

    What OS version are you running it on ?.

  10. On 6/5/2019 at 9:51 AM, erfan said:

    ./waf --targets bin/arducopter --upload .
    AM I right with the procedures ?

    I am not so sure about the above. The way that I have been compiling for the HK32Pilot board is

    Once its compiled the binary file to install using MP is 



  11. @erfan - I tested version 3.6.9 of ArduCopter with SITL and it seems to work at least with the simulator. This time I set the RTL_ALT_MIN to 0 in config.h and recompiled so effectively it has no minimum altitude when flying back to the launch site and will just stay at its current height. I did need to set RTL_ALT to 0 in mission planner otherwise it will climb to that value which was set to 1500 cm so 150m.

  12. Just wanted to add to my previous post. I suspect that the Betaflight configuration has already been setup so you may not need to change much but you can check that the QX7 channels are mapped correctly by going to the "receiver" section of the configurator. Also you do need to "arm" the motors which could be the cause of your issue with them not doing anything when you move the throttle. You need to configure the QX7 with a switch mapped to say channel 5 to be used for arming.

    Of course remove the props before doing any bench testing.

  13. 1 hour ago, BenL said:

    Oh the LEDs on the reciver? They do the exact same thing as in the video.

    In that case a solid green on the receiver should mean that the QX7 and XM+ are bound. Is the FC running the betaflight software and if so have you checked its working with the betaflight configurator ?.

  14. 4 hours ago, erfan said:

    Today I tested the throttle failsafe .

    Before going into too many details as to the behavior of "low throttle" method is there a reason why you can't use the "no signal" method ?. I use the "no signal" method on my FrSky Taranis as that seems to be the preferred method but it does depend on the make of receiver.

  15. 11 minutes ago, BenL said:

    The LEDs on the drone to indeed come on when I connect the battery. When I apply throttle the motors don’t do anything.

    Ok, what color LEDs come on and are they flashing or on solid ? As explained in the video the receiver is bound when power is applied and the green LED comes on solid.

  16. 14 hours ago, BenL said:

    #1 the board gets piping hot #2

    That doesn't sound too good. I don't have one of these receivers but it looks like the wiring is quite simple. Those 3 connections should go directly to the flight controller.



    #2 when I press bind it comes up with “channel 1-8 no telem channel 1-8 telem channel 9-16 telem channel 9-16 no telem” all of these are options.

    This is for receivers that have PWM pins and since this just has an SBus output it really should not matter which one you select.


    And lastly nothing happens when I apply power

    Does that mean that the LEDs don't come on when you apply power ?


  17. 28 minutes ago, BenL said:

    Yes it does have a compatible receiver, I can send a pic if needed 

    Do you know what type of FrySky receiver?. Is it the XM+ ?. If it does this video that I found should help with the bind procedure. If it does't bind you may have to flash firmware on the receiver as mentioned in this video.


  18. 8 minutes ago, BenL said:

    I have a Tero Q215mm DIY drone and a Taranis QX7 (it’s my first DIY drone) how would I connect the two? Thanks!

    Can I assume that if you are going to use the Taranis QX7 transmitter that your Q215 has a compatible FrSky receiver ?. Only it looks like some versions come with a receiver and some don't. If it does the first thing we need to work out is how to "bind" your TX with the receiver but lets first check that it has one.

  19. 1 hour ago, erfan said:

    so I need to change rtl_alt_min=0  in config.h

    In the firmware that I complied for your earlier I changed it to from 200 to 100 figuring that you still want to have some minimum height during RTL but not as much as 200cm. That's what I used to test with SITL and noticed that if I was currently at 50cm triggering a RTL would make it climb to 100cm instead of 200cm. If its 0 I would expect it to maintain its current height but would prefer to test it.


    • Like 1

  20. 1 hour ago, RogerRog said:

    What are you going to deliver in that way?

    Welcome to this forum. Note that there is a quote button that allows you to either quote a whole post or selected section of the text as its not so obvious that you are replying to the last post. Also note the date of the previous posts. This thread is from 2016 so the industry has changed quote a bit in that time.

  21. 3 hours ago, erfan said:

    which says I should not change those values.

    That looks correct

    3 hours ago, erfan said:

    so When I use this teraranger it automatically adjusts the altitude in case of a obstacles from underneath?!

    Yes, the issue with the standard barometer is that it measures atmospheric pressure to calculate altitude so it has no idea if its above an object. As the Ardupilot wiki explains you can use use the GPS data if it contains ground elevation  information in order to follow the terrain but it still does not help with objects. A rangefinder is a distance sensor so its measuring the distance to the ground or what ever object is underneath it.

  22. @erfan - the parameter.cpp file is not what you need to look as those //@ are comments. The real code is in mode_rtl.cpp and look for RTL_ALT_MIN not RTL_ALT. RTL_ALT_MIN is used in the mode_rtl.cpp to maintain a minimum height in RTL. It is not exposed in the parameter list like RTL_ALT and is defined in config.h as 200 (cm). So even if RTL_ALT is set to 0 and the current height is below RTL_ALT_MIN the UAV will still climb to that height.