SMALL - espritmodel.com SMALL - Telemetry SMALL - Radio
Reply
Thread Tools
Old Jun 14, 2006, 08:34 AM
Registered User
Joined Jun 2006
25 Posts
Question
Interfacing radio

How do you guys generally interface your radio to your UAV? Do you use an extra channel to turn the auto pilot on and off? And when I say auto pilot I mean a controller of my own creation not off the shelf so there would be a lot of testing invloved. My first thought is to put the auto pilot between the receiver and the servos and when the auto pilot is off just pass the signals from the receiver to the servos unaltered. But then I thought about this again and this doesn't seem like the best solution in the case where the auto pilot doesn't behave as expected and there is no way to bring your plane down in a controlled manner. I would imagine some kind of system where the reciever commands could always override the auto pilot commands. If anyone has any hints on how this should be done I would appreciate it. Thanks!
chopsuey is offline Find More Posts by chopsuey
Reply With Quote
Sign up now
to remove ads between posts
Old Jun 15, 2006, 07:47 AM
Registered User
Athens, OH
Joined May 2006
8 Posts
I used a small PIC to decide to pass the the radio or the computer through to the servos. Basically a small program that looks at the pulse width coming from the receiver and decides if it has a valid (1ms+) width. If so, it means the transmitter is on and I go to "failsafe" mode. Otherwise the computer is passed through. The only down side is that I get a small amount of servo 'chatter' due to the loop speed of the PIC missing the rising edge by a few uSec now and then. I'm working on that problem now.

Chuck
UAVGeek is offline Find More Posts by UAVGeek
Reply With Quote
Old Jun 15, 2006, 02:27 PM
Registered User
Joined Jun 2006
25 Posts
Do you pass all 3 or 4 channels through the PIC? If anything were to happen to the PIC you could lose control of the plane right? I want to make sure I understand everything before I try to do it myself.
chopsuey is offline Find More Posts by chopsuey
Reply With Quote
Old Jun 15, 2006, 04:12 PM
Professor of Wood
kd7ost's Avatar
Nampa. Idaho
Joined Nov 2004
4,266 Posts
There's lots of really good info in this thread.

Dan

http://www.rcgroups.com/forums/showthread.php?t=360746
kd7ost is offline Find More Posts by kd7ost
Reply With Quote
Old Jun 15, 2006, 11:59 PM
Registered User
New Zealand
Joined Dec 2005
54 Posts
Download the thesis from here: http://uav.bravehost.com/Documents.html

IIRC, it includes circuits for switching based on pulse width, and they are discrete digital circuits (no microcontroller).

We used a microcontroller for this task for our UAV, similar to how the Paparazzi UAV project does (multiplexed signal direct from the RX is decoded and demultiplexed by the micro and a 4017. We had some problems with flakey unreliable switching
hugo_vincent is offline Find More Posts by hugo_vincent
Reply With Quote
Old Jun 16, 2006, 07:47 AM
Registered User
Athens, OH
Joined May 2006
8 Posts
Quote:
Originally Posted by chopsuey
Do you pass all 3 or 4 channels through the PIC? If anything were to happen to the PIC you could lose control of the plane right? I want to make sure I understand everything before I try to do it myself.
I pass 4 channels across. I measure the pulse width of channel 0 to decide if the radio is on or not. You are correct that if I loose the PIC, I loose control.

The PIC has a watchdog timer to handle lockup but a total failure would, indeed, be a disaster. The servo chatter I see is so small that you don't see the controls move but you do hear the servo. If I can't figure it out I might go to a discrete circuit next time around. That's why this is prototype #1

I've flown the plane in failsafe (depending on the PIC) mode a couple of time while gathering altimeter data. With any luck, the UAV will get to take control for a couple of flight tests, itself, this weekend. My poor little slo-stick is pretty darn heavy at the moment..

Chuck
UAVGeek is offline Find More Posts by UAVGeek
Reply With Quote
Old Jun 19, 2006, 12:45 PM
Registered User
Joined Jun 2006
25 Posts
UAVGeek: Did you have any luck with the servo chatter? How do you like the slo-stick as a test plane?

I am going to try the same thing with a 16F628 that I have sitting around and see if I have any luck.
chopsuey is offline Find More Posts by chopsuey
Reply With Quote
Old Jun 19, 2006, 11:51 PM
Registered User
5 miles from the geographical center of Pennsylvania
Joined Aug 2005
2,144 Posts
the xbow micronav uses one of the rc channels to switch between radio and computer control. It takes all of the channels in on one digital input.
Unterhausen is offline Find More Posts by Unterhausen
Reply With Quote
Old Jun 20, 2006, 08:22 AM
Registered User
Joined Jun 2006
25 Posts
All of the channels on one digital input? Maybe I am not understanding something correctly but how do they do that? Wouldn't you need an input for each channel?
chopsuey is offline Find More Posts by chopsuey
Reply With Quote
Old Jun 21, 2006, 07:35 AM
Registered User
Joined Nov 2005
65 Posts
If I'm not mistake it's the PPM output from the receiver, usually you have to hack the receiver. See the paparazzi project.

-doni-
wadiprawita is offline Find More Posts by wadiprawita
Reply With Quote
Old Jun 21, 2006, 08:21 AM
Registered User
Joined Jun 2006
25 Posts
Ahh that would make sense, thanks!
chopsuey is offline Find More Posts by chopsuey
Reply With Quote
Old Jun 22, 2006, 09:23 AM
Registered User
Athens, OH
Joined May 2006
8 Posts
Quote:
Originally Posted by chopsuey
UAVGeek: Did you have any luck with the servo chatter? How do you like the slo-stick as a test plane?

I am going to try the same thing with a 16F628 that I have sitting around and see if I have any luck.
If you want my code as a starting point (I use the 16F628 too) in ccs 'c' let me know. (bennettc@ohio.edu) I suspect that part of the problem is that I should have wired it to use the interrupt on bit change bit's on port 'b' as the inputs from the receiver instead of polling.. I didn't think of that when I wired the PIC and it's a PITA to change the wiring now. The chatter is acceptable to me until I get past my first compter controlled flight.


I love the simplictiy of the slo-stick. My initial test flight's using a brushless 400 would just barely fly with the flight package installed. I had to toss it rather than take off from the ground and be very carefull until I gained altitude. Since then I have reduced the weight quite a bit. The first computer controlled flights will take place this weeked (weather and wind permitting) Part of the problem is I'm using an old delorme tripmate as the GPS (sans battery pack) and it weighs quite a bit. I have a tiny GPS on order from Spark Fun that should help a lot.

I might try a motor glider for the second protype or a telemaster. http://www.hobby-lobby.com/telemaster6.htm

I know this is a hack, but in the mean time I took a couple of 300 class engines and made a tri-motor slo-stick.. Flys like the wind eats batteries alive. (it will 3D without the flight package!)

Since the slo-stick doesn't have ailerons, I'm using that channel for the booster engines then will cut them down to 10% for cruise and let the brushless keep me in the air.

I'm going to take pictures and video the intial computer flights, so I'll find a place to put them up on the web as soon as the flight happens.

Should be interesting.. The first three planned flights are:
"land" (climb to altitude under human control then computer decent to land)

"loiter then land" ( circle the center of the field for 5 mintues at 1000 ft radius.. Our waypoint sequencer does not use waypoints in the gps so we can do this.)

"box the land" (fly a 6 waypoint box. the last two are setups for landing..)

If we get that far and still have an airplane rather than pieces of one, we will go for the 1 mile cross country then start on prototype #2

Should be interesting.

=c=
UAVGeek is offline Find More Posts by UAVGeek
Reply With Quote
Old Jun 22, 2006, 09:44 AM
Registered User
Joined Jun 2006
25 Posts
Sounds great, thanks for the info. I would be very interested in seeing the video, I hope everything goes well for you this weekend.
chopsuey is offline Find More Posts by chopsuey
Reply With Quote
Old Jun 22, 2006, 12:20 PM
Registered User
Joined Jan 2005
33 Posts
I have implemented manual override with a PIC and have never had ANY problems with taking over. I used channel 6 on my receiver and set up a switch on my transmitter to coincide with channel 6. This way I can toggle between manual and autonomous mode with the flick of a switch.

The switch changes the PWM signal between 1ms or 2ms. All I do is measure the pulse with my PIC and determine if it's less than or greater than 1.5 ms. This leaves a lot of room for error. Furthermore, (for UAVgeek) if you feed in your PWM signal to a hardware interrupt pin on your PIC (i.e. CCP), then you shouldn't miss any pulses. PICs are very robust and I've never had them totally fail.

And in regards to the uNAV, that is correct - they use PPM to read in the pulses of all channels using just one pin. You have to "hack" a receiver to do so though as one person already mentioned.
weg22 is offline Find More Posts by weg22
Reply With Quote
Old Jun 22, 2006, 01:44 PM
Registered User
Joined Jun 2006
25 Posts
Yeah I really don't want to hack my receiver so I am just going to use the CCP module on the 16F628 to listen to a channel. I do have a 5 channel radio and I thought about using the extra channel to switch the autopilot on and off. Both techniques sound like they will work and I am not sure if either technique has any advantages over the other.
chopsuey is offline Find More Posts by chopsuey
Reply With Quote
Reply


Thread Tools