Radio/AutoPilot Switching Difficulty

Hello All,

I am working on my first drone using a E-Flite UltraStick. I have built up my code for retrieving data from accelerometer/gyroscope, and have constructed PID loops to set the plane to the necessary attitude as determined by the GPS. However, I am having difficulty switching the plane from radio control to autopilot. 

Currently, I am using 4 5v SPDT relays to throw the signal from the receiver to the arduino PWMs. I connected the a signal wire from the radio receivers 5th channel (typically used as a landing gear toggle) and used the arduino board to monitor its change in states using the PulseIn () function. When the arduino reads that I have enabled the autopilot it using four output pins to throw the four relays. I am working on making a small amplifier so that I can throw all four relays with one output pin. 

Is there a better way to set this up??? I was trying to use a PNP transistor to connect the servo to the receiver and a NPN to connect it to the arduino board so that if the voltage drops the servo would automatically reconnect to the receiver. However, I have been unsuccessful in setting this up. What does the ArduPilot use for radio/autopilot switching??

Thanks for the help!

relay servo.jpg

transistor servo.jpg

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

Join diydrones

Email me when people reply –

Replies

  • The APM uses a rather odd method of encoding all the PWM channels into a PPM signal using an extra processor.  The main processor decodes this and sends a signal back.  There's also a mux chip involved.

    I guess I really don't have that good of knowledge of the setup, you really need to look it up in the schematics and/or code.

This reply was deleted.

Activity

DIY Robocars via Twitter
RT @Heavy02011: ⁦@diyrobocars⁩ : A Home-brew computer club* for Connected Autonomous Driving. talk at #piandmore ⁦@PiAndMore⁩ on Jan 23rd h…
21 hours ago
DIY Robocars via Twitter
RT @a1k0n: New blog post! Deep dive into my ceiling light based localization algorithm which runs in 1ms on a Raspberry Pi 3: https://t.co/…
22 hours ago
DIY Robocars via Twitter
Great new guide to using @donkey_car https://custom-build-robots.com/donkey-car-e-book-en
22 hours ago
DIY Robocars via Twitter
RT @chr1sa: The next @DIYRobocars virtual AI race is tomorrow morn at 9:00am PT. You can watch live on Twitch https://www.meetup.com/DIYRobocars/events/275268196/
yesterday
DIY Robocars via Twitter
New version of Intel OpenBot! This resolves many of the issues with the first version, including a much smoother tr… https://twitter.com/i/web/status/1352395636369313798
Thursday
DIY Drones via Twitter
Using ArduRover with an RTK GPS https://ift.tt/2N9I3RO
Tuesday
DIY Drones via Twitter
Monday
DIY Robocars via Twitter
Monday
DIY Robocars via Twitter
Jan 15
DIY Robocars via Twitter
Jan 15
DIY Drones via Twitter
Jan 14
DIY Robocars via Twitter
RT @Heavy02011: @diyrobocars : A Home-brew computer club* for Connected Autonomous Driving on Jan 23rd, 2021 https://www.meetup.com/Connected-Autonomous-Driving/events/275728684/ #Meetu…
Jan 14
DIY Robocars via Twitter
Jan 14
David Hori liked Isabella Domi's profile
Jan 12
DIY Robocars via Twitter
RT @Heavy02011: ⁦@diyrobocars⁩ Autonomous Driving Assembly at #rC3. join us at https://rc3.world/rc3/assembly/diyrobocars-f1tenth/ ⁦@f1tenth⁩ ⁦@DAVGtech⁩ ⁦@DWalmroth⁩…
Jan 11
DIY Robocars via Twitter
RT @chr1sa: New car designs coming for our next @DIYRobocars @donkey_car virtual race on the 23rd. Choose any one you want at race time Le…
Jan 11
More…