How to merge ATV with UDB4

297 views
Skip to first unread message

GliderUAV

unread,
Nov 1, 2012, 7:26:09 AM11/1/12
to uavde...@googlegroups.com

Hi guys,

I thought I'd let you know what I'm working on.

Well, I have this tic to have a glider centre in thermals automatically.

So I built a custom autopilot for an e-glider. Here is a link to my project op DiyDrones.
I recently replaced the IR sensors by using a UDB4 as an IMU.

So I fly with two autopilots on board, and I want the UDB to become the captain eventually, but it's currently in the co-pilot seat.
Here is a list of the functions I've built in the ATV autopilot:

Implemented functions:  (I hope this makes sense, I'm trying to be brief)
- motorcontrol on/off, low to high, no level flight
  - throttle
  - flaps setting (for best motorclimb)
  - airspeed (for best motorclimb)
- geofencing
  - random traverse
  - soft and strict geofences
- thermal centering
  - timers, logic
  - fixed bank turns (270 deg method)
  - maintain heading for 3sec
- Flaps and butterfly mixing
  - flaps participate in roll
  - adverse jaw
  - butterfly
  - camber
- airspeed affecting according to bank, sink, flaps, geofencing, max altitude and motor.
  - bank - allow slight increase
  - respond to sink - pulsate extra speed
  - flaps - follow natural airspeed at flapssetting
  - geofencing - increase speed outside box
  - max altitude - butterfly/speedup or speedup
  - motor - best motorclimb icw flaps
- wind handling
  - no thermalling upwind of, and close to, geofence

Of course, my autopilot has its downsides and lots of things need improving.
  - no PID's
  - crude wind estimation
  - no real airspeed control

Also, I would like to share some of my work so others may use it. That is why I would like to move most functions to the UavDevBoard.

I will probably keep my small Microcontroller (a PIC18F26K22) attached to the UDB as a "Mission chip", to hold the custom e-glider/thermalling functions.
I would like to control the servos and Esc by Udb4 using Flexifunction. I plan to convert my code written in Jal to Logo and MpLab C. My chip uses a DS30 bootloader.
I use telemetry from the UDB4 in manual mode (next is stabilize mode), and control it via PPM. I would like to connect my RC receiver to the UDB4 (no longer to my Pic).

Questions: Is it possible to combine PMM and PCM inputs?
Any thoughts, comments?
Regards,
 
Kees
(GliderUav)

Peter Hollands

unread,
Nov 1, 2012, 4:35:54 PM11/1/12
to uavde...@googlegroups.com
Hi Kees,

Welcome to the uavdevboard group.

Your project looks super as described on DIY Drones.

You may have seen some of the work by Matt Coleman who has been flying large gliders this last year with UAV DevBoard.
I believe Matt is still working on improving the control algorithms in MatrixPilot for gliders. He is developing a branch of MatrixPilot called MatrixPilot_fbw. (Fly by Wire).

Matt has also developed a system called flexifunctions so that Autopilot control channels can mix signals to multiple flight surfaces and channels within the glider. I believe that Matt is currently the only user of flexifunctions.

Because of the size and expense of Matt's gliders, he has taken extra care in impoving the way that a re-boot scenario can be handled. Certain variables (like trim) can be stored in the EEPROM, so that on reboot, the correct trim variables are used. The same is true of some of the ground initialisation of the IMU. Those settings can optionally be not re-initialised should the computer re-boot in flight. Re-boots do not seem to be happening in practice, but Matt has gone some length to protect his planes should that happen.

He has implemented a nice python based ground variometer with appropriate sounds to tell the pilot whether the plane is in climb or descent. The telemetry for that system is based on MAVlink. Matt has also extended my MAVlink code so that many autopilot flight variables (e.g. PIDs gains) can be stored in the EEPROM.

The LOGO flight plan language is already powerful and should be well suited to being extended for sophisticated thermalling in the future. Some initial work has already been done since Logo now supports "IF" conditional flight planning, which can make decisions based on climb or descent or altitude or a host of other variabels in the Autopilot.

If you have any questions regarding how the code is architected, then please do let me know. I generally recommend people to take a good look at this document describing the interrupt architecture.

Best wishes, Pete


--
--
 
 

crashmatt

unread,
Nov 1, 2012, 6:53:56 PM11/1/12
to uavde...@googlegroups.com
Kees,
Nice work. You have lots of the high end features nicely fixed.

My focus has been on the airspeed control so we can help each other there.

Pete, Thanks for the promotion on my little project..

/Matt

GliderUAV

unread,
Sep 13, 2013, 5:29:13 PM9/13/13
to uavde...@googlegroups.com
Hi,
I have just posted a video update on Diydrones:
    http://diydrones.com/forum/topics/atv-autonomous-thermalling?xg_source=activity
The goal of it is to be in the right place when a thermal floats by, and then centre the thermal.
I am gradually replacing my autopilot code by MatrixPilot. I try to use as little custom code as possible, but I'll have to add some to make it work.
I am working on a Logoprogram to do most of the work.
Next, I'll try to apply and finetune GLIDE_AIRSPEED_CONTROL, maybe by using a groundatation and Mavlink.
I also would like to control the bankangle via LOGO while thermalling (not planning a groundtrack, but drift freely downwind)
So, work in progress...
Please have a look and feel free to comment.
 
Cheers,
GliderUav
 

Peter Hollands

unread,
Sep 15, 2013, 1:10:07 PM9/15/13
to uavdevboard
Hi Kees,

Thanks very much for sharing your glider project. That is amazing.

Can you explain more about the interface between the main system components ? (I enclose a screenshot from your video).
I understand that the radio receiver talks your your ATV Pic chip and code. That chip, in turn talk to the MatrixPilot iMU which has all the servos connected to it ? That is a very unusual architecture. What is the nature of the interface between the ATV Pic chip, and the MatrixPilot board (both physically and from a protocol point of view).  Or if you prefer, please could you simply explain how the various functions are partitioned between MatrixPilot and you own pic chip.

I love the on screen display of the thermalling logic. (second screenshot).

Best wishes, Pete




--
--
---
You received this message because you are subscribed to the Google Groups "uavdevboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to uavdevboard...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Screen Shot 2013-09-15 at 17.56.02.png
Screen Shot 2013-09-15 at 18.00.07.png

GliderUAV

unread,
Sep 15, 2013, 2:15:54 PM9/15/13
to uavde...@googlegroups.com
Hi Pete,
 
I'm glad you like my video, thanks.
 
I have a Microcontroller (a PIC18F26K22) attached to the UDB as a "Mission chip", to hold the custom e-glider/thermalling functions.
Think of it as a smart PPM controller board.
I use SUE telemetry (with some modifications) from the UDB to feed data to the PIC-chip serially.
In turn, the PIC and the UDB write there own telemetry to the OpenLog and Xbee.
 
The UDB is used in stabilize mode, and controlled via PPM. I add "manual" input in the PPM servosignals if, say, I want to turn. I can however go transparant from the receiver, and tell UDB to goto into waypoint mode to run Logo, but I don't use that right now.
 
Hope this helps to explain things.
 
Cheers,
Kees
 
 
 

GliderUAV

unread,
Sep 18, 2013, 6:19:04 AM9/18/13
to uavde...@googlegroups.com

One thing I forgot to mention in response to your question about the partitioning of functions between the two board.
 
I mix serveral servochannels to the actual servooutputs in the UDB. Since this glider is "Full-house" Aileron, Flaps and Butterfly are mixed to every wing servo separately. The Udb performs this function, using modified ServoMix.c code. I wrote that for the Auav1, so I couldn't use FlexiFunctions (but I might in the future).
 
Regards,
Kees
 
 
Reply all
Reply to author
Forward
0 new messages