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

Gremsy liked Gremsy's profile
Mar 12
DIY Robocars via Twitter
RT @chr1sa: Donkeycar 4.4 released with tons of new features, including path learning (useful with GPS outdoors), better Web and Lidar supp…
Nov 27, 2022
DIY Robocars via Twitter
RT @NXP: We are already biting our nails in anticipation of the #NXPCupEMEA challenge! 😉 Did you know there are great cash prizes to be won…
Nov 24, 2022
DIY Robocars via Twitter
RT @gclue_akira: レースまであと3日。今回のコースは激ムズかも。あと一歩 #jetracer https://t.co/GKcEjImQ3t
Nov 24, 2022
DIY Robocars via Twitter
UC Berkeley's DIY robocar program https://roar.berkeley.edu/
Nov 24, 2022
DIY Robocars via Twitter
RT @chr1sa: The next @DIYRobocars autonomous car race at @circuitlaunch will be on Sat, Dec 10. Thrills, spills and a Brazilian BBQ. Fun…
Nov 24, 2022
DIY Robocars via Twitter
RT @arthiak_tc: Donkey car platform ... Still training uses behavioral cloning #TCXpo #diyrobocar @OttawaAVGroup https://t.co/PHBYwlFlnE
Nov 20, 2022
DIY Robocars via Twitter
RT @emurmur77: Points for style. @donkeycar racing in @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/Y2hMyj1…
Nov 20, 2022
DIY Robocars via Twitter
RT @SmallpixelCar: Going to @diyrobocars race at @UCSDJacobs https://t.co/Rrf9vDJ8TJ
Nov 8, 2022
DIY Robocars via Twitter
RT @SmallpixelCar: Race @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/kK686Hb9Ej
Nov 8, 2022
DIY Robocars via Twitter
RT @PiWarsRobotics: Presenting: the Hacky Racers Robotic Racing Series in collaboration with #PiWars. Find out more and register your inter…
Oct 23, 2022
DIY Robocars via Twitter
RT @Hacky_Racers: There will be three classes at this event: A4, A2, and Hacky Racer! A4 and A2 are based around UK paper sizing and existi…
Oct 23, 2022
DIY Robocars via Twitter
Oct 23, 2022
DIY Robocars via Twitter
Oct 19, 2022
DIY Robocars via Twitter
Oct 18, 2022
DIY Robocars via Twitter
RT @NeaveEng: Calling all UK based folks interested in @diyrobocars, @f1tenth, @donkey_car, and similar robot racing competitions! @hacky_r…
Oct 13, 2022
More…