An electronic set of " trainer wheels " for your drone.

Hi

 I'm still pretty new to all this, so firstly, let me say thank you to all those that have helped me get my head around quads and setting up my X 525.

I have a quite frustrating problem..

I want to program what is effectively, " trainer wheels " for my drone in the form of an auto minimum altitude hold using  an Arduino board, and an Ultrasonic detector as a "sensor" that will work along with my KK board.

THEORY:

With the Ultrasonic facing downwards, and a sketch including at a pre-determined height ( above 4 feet for example ) there will be no ground detection.

The usual state will be a "low" and the Arduino would do nothing but loop through the sketch looking for this Ultrasonic trigger.

However, - when the ultrasonic DOES trigger, the Arduino should sense a "high state". - When this happens it should  ( fuzzy logic here  ok? ) be able to detect the CURRENT throttle setting via the radio receiver and prevent any throttle range below it. - ( and yes, this feature would be on a switch on the RC transmitter lol! ).

Obviously, if the Ultrasonic detection is not made, ( switched off ) then its full range as usual.

Where the Servo comes in, is that it will be my throttle servo currently linked to the KK board via the receiver.

Like I said, I'm new to Arduino programming, and I'm still getting my head around things like GOTO statements are not generally permitted.so I'm having a hard time figuring out the finer points of conditional statements, if then, gosub, ( etc )

If you have any ideas, please let me know.

I've only been learning Arduino programming foe a day so far but this is a little harder than making an LED blink.

P.S. - for the record, I DID manage to learn enough to make that LED blink S.O.S. in Morse. Code in a loop.

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Hi, I'm working on something close to this.

    Here my progresses http://blog.giuseppeurso.net/low-altitude-hold-auto-takeoff-autolan...

    cheers

  • Your sonar is going to give you a range measurement.  It's not going to toggle a pin as you need the uC to send the pings and also to read the response.  Most ultrasonic sonar is going to give you a reading from a few cm to about 4 meters (13 feet), so a lot of the time you'll be in sonar range.

    I'd check out the diydrones store, someone has probably already written a lot of the code.

    -Jake

This reply was deleted.

Activity

DIY Drones via Twitter
Review of the new Nivida Jetson NX for robocars https://t.co/bWjd3sH2o4
yesterday
DIY Robocars via Twitter
RT @chr1sa: My review of the new @NVIDIAEmbedded Jetson Xavier NX in robotics and @DIYRobocars applications https://t.co/O7TfJZhiF9 https:/…
yesterday
DIY Drones via Twitter
RT @chr1sa: Somehow I missed this, but last week @Nvidia released a new version of its Isaac robot development framework. Lots of new Lidar…
Monday
DIY Robocars via Twitter
RT @Smartphone89: DonkeyCar Racing League Korea #donkeycar @diyrobocars https://t.co/mDlHDR1d98
Friday
Jørn Ramnæs liked VIDEO LINK's profile
Friday
Mark Harrison left a comment on Moderators
"Wow, Ning2 looks really great on mobile. I had sort of drifted away as my browse-time went more on my phone, so this is great."
Friday
Hank Deucker left a comment on PIXHAWK
"I am sure most will say not again, Pixhawk telemetry. I do need help and all can be reassured that I have spent many hours scouring the net for useful information. I am not new at quadcopter flying, I started in 2012 and have progressed through many…"
Thursday
DIY Robocars via Twitter
https://t.co/rLmFr8M2UK
Thursday
Hank Deucker left a comment on PIXHAWK
"Tomorrow, I am thinking about the wording at the moment."
May 28
DIY Drones via Twitter
Welcome to the new DIY Drones design!. You may have noticed that DIY Drones looks a little different today. That's… https://t.co/cg2EmeDGMQ
May 27
DIY Drones via Twitter
New! Online Training on Drones for Disaster Response https://t.co/brqRuujjY2
May 26
DIY Robocars via Twitter
https://t.co/8EMCvYW6oz
May 25
DIY Robocars via Twitter
RT @OttawaAVGroup: We are going to try something new this week. We will be having a drop-in style meeting Wednesday @ 7-9pm EST. Pop in and…
May 25
DIY Robocars via Twitter
RT @tawnkramer: Thanks Everyone for another fun virtual race! Amazing Ai racers competing head-to-head, Virtual Makers Fair event. Catch us…
May 23
DIY Robocars via Twitter
RT @make: Find out the latest from @diyrobocars at 10am PT from @chr1sa of @3DRobotics on Virtually Make Faire! #makerfaire #maketogether #…
May 23
DIY Robocars via Twitter
RT @Heavy02011: Join us Saturday online: Virtual Race League: @DIYRobocars Race #2 - Parking Lot Nerds https://t.co/aJUu4sdutx #Meetup via…
May 22
More…