Synerduino Plane8
Synerduino Plane8
Shield Stability
and Navigation
for Airplanes
SYNERDUINO
KWAD SHIELD KIT
Board Capabilities
Features / Flight Modes UNO 328 (SMD) Mega 2560 Mega 2560 + GPS
Heading hold X X X
Altitude Hold X X X
Headless / Course Lock X X X
Telemetry X X X
Payload Trigger X X
Camera Gimbal X X
RTH X
Position Hold X
Missions X
Synerduino shield
Arduino2560 MEGA / Uno 328
Hardware Fixwing (Airplane) Airframe
Brushed / Brushless Motor
Micro/ Mini Servos 2-4pcs Depending on aircraft design
Gearbox (if your motor set came with it)
Brush / Brushless ESC for Airplane
Ublox6 GPS
Bluetooth
Tools needed
Soldering Set
Screwdriver Cutter Knife
ESC is ESC is
GPS Voltage Jumper Solder on
Solder on RC PWM in
Top side Top side
only For improve performance IMU must be protected from the Environment only
IMU : L3G4200D Gyro / ADXL345 Accelerometer / BMP180 – 85 Baro / MMC5883 Mag
Synerduino Kwad Shield V1.1 GY91
ESC is
Solder on Note : surface mount your solder ESC wire make sure it doesn't penetrate to the bottom of the board
ESC is
Top side
Aux ADC in ESC / Servo PWM Out Serial Pins Solder on
only
Top side
only
GPS LED
ESC is ESC is
Solder on Solder on
Jumper Pads Selector Zone RC PWM in
Top side Top side
only For improve performance IMU must be protected from the Environment only
IMU : MPU-9250 & BMP280
Synerduino Kwad Shield Preparation
Ensure insulation from the Arduino board add tape on these areas
BETA GY801 & V1.1 GY91
Tape Tape
Area Area
Arduino Board Preparation
Ensure insulation from the Arduino board add tape on these areas
Tape Tape
Area Area
To use onboard battery monitoring with Aux in Set to 3s if your running 1s-3s battery / set to 4s if your
running 4s battery / Leave it open when using Aux in as External sensors or using 5s to 6s
Reg In – short the Pads for using regulator to power and build in power distributor the synerduino and
Arduino board
2nd GPS pin with voltage selector 5V for Regular GPS / 3V for external I2c sensor such as Magnetometer
Aux in- leave it open for utilizing the A0 Pins for External ADC sensors / Short the Pads to use build in
battery monitoring . Cell Selector must be set to 4s or 3s
SDA SLC - I2C input for external sensors such as GPS with build in Magnetometer
Default - A0 External ADC sensor , Require 5v UBEC applied to the 5V Serial pins & for OPTO ESC
+
- External Power Distribution board
ESCs OPTO
External ADC Sensor
+
- External Power Distribution board
AO
2s to 4s Lipo
Build in Power
-
distribution
+
2s to 4s Lipo
Build in Power
-
distribution
+
Note: check if your RC servo needs reversing on FC config or on your Transmitter to ensure out put of differential respond correctly
Some models of transmitter may need RC output reversing to operate correctly
Output.cpp
Main Mix table should you need to custom mix your plane (Define {Bi})
PWM INPUT Assignment
RX > Arduino / PWM in Futaba JR Format Walkera UNO 328 Mega 2560
Format Format Input Input
~+-
~+-
PWM RECEIVER
~+-
STANDARD FOR ALL DRONES TO USE SERIAL LINK AS TELEMETRY MAINLY ON YOUR TX RX SERIAL PORTS , NOTE: THE LOWER THE
FREQUENCY OF THE RADIO THE LOWER THE BAUD IS NEEDED
PROTOCOL IS MSP RAW OR MAVLINK
NOTE: USING 0 AT BAUD115200 APPLICABLE BOTH UNO AND
Bluetooth MEGA BOARDS REQUIRES THE BLUETOOTH ONLY TO BE PLUG IN
AFTER THE SKETCH/FIRMWARE HAS BE UPLOADED TO THE
BOARD . AND PAIRING USING THE BLUETOOTH CONNECTED COM
PORT IN DEVICE MANAGER
Bluetooth
ATTENTION:
VCC >> +
GET THE USB MODULE WITH GND >> G
BOOT AND RESET BUTTON
AS YOU MAY NEED TO RESET TX >> TX
THE XBEE WHEN UPDATING
FIRMWARE RX >>RX
ATTENTION:
GPS
YOU MAY NEED TO REARRANGE THE
HEADERS TO CONNECT THE GPS MODULE
TO THE SHIELD BOARD ACCORDINGLY
VCC >> +
GND >> G
TX >> RX
RX >>TX
SEE TO IT THE WIRES COLOR CODE
MATCHES THE MARKINGS
This samples show a BN880 GPS with a HMC5883 Mag build in compass required an I2C pin
connection this works of all other I2C sensors (pls ensure the address doesn’t conflict with the
IMU as found in Sensors.cpp) Note: other than the GPS build in sensors might require 3V you
may need to set jumper to 3V
Application Needed
https://www.arduino.cc/en/main/software
ARDUINO IDE
http://synerflight.com/flywiigui/
https://www.u-blox.com/en/product/u-center
https://www.digi.com/products/embedded-systems/digi-
xbee/digi-xbee-tools/xctu
1500
Idle Speed
MINTHROTTLE 1150 PWM Frequency MAXTHROTTLE 1850
Flaps (Flaperons)*
Select a channel to control your flaps with.
Endpoints is the preprogrammed positions for the
flaperons .
SENSORS IMU ORIENTATION IS IMPORTANT SEE TO IT THE ACC GYRO AND MAG ALL COMPLIMENT EACH OTHER
MIXING OUTPUT.CPP
MIXING OUTPUT.CPP
Airplane and Flying Wings section
Cases than none true for flying wings , or special base airplane that certain servo Mixing &
reversing is required due to the nature of Elevon, Ruddervator or Rudderon configuration
(-1 , 0 ,1 ,2) digits are use to determine Normal / Inactive / Reverse command
The GUI may have limitation to certain mixing for this it has to be config here.
PASSTHRU_MODE = this command when use Direct control from the RX without
augmentation from the Flight control board
SERIAL COM CONFIG.H
SERIAL BAUD RATE
WILL DEPEND ON WHAT BAUD
YOUR TELEMETRY MODULE ARE
SET INTO YOU CAN CHANGE IT TO
SUITE THE PORT YOUR DEVICE IS
CONNECTED TO.
HC-05 (Recommended)
AT+NAME=Change name
AT+PSWD=1234 (Version 2)
AT+PSWD=“1234” (Version 3)
AT+UART=115200,1,0
HC-05 (Recommended)
Bluetooth setup with the USB TTL and Arduino IDE
HC-05 (Recommended)
AT+NAME=Change name (Synerduino)
AT+PSWD=1234 (Version 2)
AT+PSWD=“1234” (Version 3) (Possibly Version 5)
AT+UART=115200,1,0 (115200 FOR BLUETOOTH )
HC-06
AT+NAME: Change name
AT+PIN: change pin, xxxx is the pin, again, no space.
AT+BAUDX, where X=1 to 9
1 set to 1200bps
2 set to 2400bps
3 set to 4800bps
4 set to 9600bps (Default)
5 set to 19200bps
6 set to 38400bps
7 set to 57600bps
8 set to 115200bps
HM-10 Bluetooth
First you will need to Query the native MAC address using AT Command AT+ADDR?
You will get something like this 20C38FF61DA1, each BLE has a unique MAC address.
Example
BLE A has Mac Address 11C11FF11DA1, I used AT+ADDR? to figure it out BLE B has Mac Address 22C22FF22DA2, I
used AT+ADDR? to figure it out
Send AT+CON22C22FF22DA2 to BLE A Send AT+CON11C11FF11DA1 to BLE B (Send the B address to A, A address
to B)
Send AT+ROLE0 to BLE ASend AT+ROLE1 to BLE B (Doesn't matter which one)
Now it's ready to use on you ATMEGA 328P, Arduino or Attiny. The red light will stay solid after the connection
has been made on both BLE. This should take less than a second.
HM-10 (Original) AT+BAUD
AT+TYPE 0 – 9600:
AT (Check if new configuration is working) 0:Not need PIN Code
AT+NAME (Query name) 1 – 19200
1:Auth not need PIN 2 – 38400
AT+ADDR (Query Mac address) 2:Auth with PIN
AT+BAUD (Query Baud) 3 – 57600 (Some BL its 4800)
3:Auth and bond 4 – 115200
AT+PASS (Query current Pincode)
AT+PIN (Query current Pincode on some BL module) 5 – 4800
AT+TYPE (Query authentication mode) 6 – 2400
AT+ROLE (Query Peripheral (Slave) or Central (Master) mode) 7 – 1200
8 – 230400 (Some BL its 115200)
AT+NAMEArduinoDrone
AT+BAUD4 set baud to 115200 (we want this for high speed) AT+ROLE
AT+BAUD8 set baud to 115200 (on some BL module) 0 = Slave or Peripheral
AT+PASS123456 Set password to 123456 1 = Master or Central.
AT+PIN123456 Set password to 123456 (on some BL module)
AT+TYPE2
AT+TYPE1 (on Some BL modules)
AT+ROLE0
Note : there are several clones of this type in the market that can be very difficult to setup
XBEE RADIO
GROUND STATION ROUTER AIRCRAFT COORDINATOR 38400
38400 8/N/1/N - AT 8/N/1/N - AT
GROUND STATION
GROUND STATION
AIRCRAFT
GPS
GPS CONFIGURING
U BLOX NEO 6
PLUG IN TO SERIAL TX 2 RX 2
BEITIAN UBLOX
PLUG IN TO SERIAL TX 2 RX 2
2. Open View /
Messages View
3. Select UBX-CFG-PRT.
Exit the
configuration
window this will
promp you to the
save parameters .
Hit “Yes”
U CENTER
1. Connect to the device.
2. Open View / Messages View
3.Select UBX-CFG-CFG.
4. Select “save current
configuration”
5. Send the message to the receiver
hit the Lock icon then send icon
in the bottom
Disconnect /
Reconnect to the GPS
again using the 57600
baud to see if the
parameters are save
GPS CONFIG.H
Flying next to a
building can distort
satellite signal
deteriorating accuracy
VOLTAGE DIVIDER
CONFIG.H
CONFIG.H
Arm/DisArm
http://synerflight.com/flywiigui/
FLIGHT DECK – IF THIS DOESN’T LOOK RIGHT CHECK YOUR SENSORS ORIENTATION AGAIN USING THE SENSOR GRAPH
COMPASS (MAG AND GYRO) PWM OUTPUT INDICATOR PWM INPUT INDICATOR
TELEMETRY CONNECTION SEE YOUR CHECK YOUR BLUETOOTH RADIO OR USB ON
WHERE IS THE VIRTUAL COM PORT IS SAVE CONFIG
FLIGHT & GPS LOGS
ALTITUDE (BARO)
Attitude
GPS
Serial Data
BATTERY MONITORING
Pass thru - Mode disables all gyro stabilization puts the aircraft
into manual flying
Acc Calibration
Place the plane on a stable surface.
Wings Level with nose in expected Attack angle for level flight.
Normally a few degrees up.
Memorize the planes attitude in flight this should be Level for Acc.
Passthru
Sends Rc commands direct to servos.
No influence from sensors.
Gyro Mode (Acro)
This is "Normal" mode when nothing else is selected.
The plane should compensate for movements. (Wind Gusts etc)
The plane feels stable and locked in but still able to loop & roll.
Stall speed is lower and it can be necessary to "Push" it down in landings.
Stable Modes
With the sticks centered the plane will self stabilize.
Returning to level flight from almost any situation.
Provided there's enough Altitude for recovery.
Horizon Mode Allows rolls and loops. Levels with centered sticks
This is a comfortable flight mode for FPV.
Angle Mode also limits how much the plane can tilt.
Gives a Stiff feeling and is only recommended for beginners.
Graphs and Sensors
Upload the sketch to the Arduino attach to the drone shield and open the FlywiiGUI sensor Graphs tab
and hit connect to the appropriate COM your drone is connected to
(0 degrees = North)
Alt up +no#
Example : if roll the drone to the right the Accelerometer and Gyroscope graphs would show positive numbers and to the Left Negative numbers
If Lift the drone up Vertically the accelerometer Z axis should shows positive numbers and altitude should show a climb in meters
Other Navigation Functions
WP Radius – the radius of the area the Pos PID with trigger it has reach the waypoint
Max Nav Speed – Maximum speed the drone travel between waypoints (too fast and
you likely over shoot your target) for first mission flight test Nav speed of 100cm/s
with (“Enable Slow Navigation “Active)
Min Nav Speed – the speed the drone travel when with in the WP Radius
RTH Altitude – Altitude the drone will climb to when its below the altitude in relation
to its home point when the RTH is trigger set this to 0 to RTH at current altitude
Max Nav Banking – the max allowable pitch and roll the drone will be set too while
traveling between waypoints (tune this along with Max Nav Speed to take account
with Environment conditions )
Safe WP Distance – max distance between waypoint before its null out
Fence Radius – Geo Fence to keep the drone with in the perimeter in relation to
home position
GPS Forward Prediction Filter – predicting the drones location and to compensate
for lag . (optional) – not necessary for most application
Don’t Reset Home position at Arm – this retains the home position where you
first plug power on your drone
Nav Controls Heading – this points the drone to its next waypoint Important to
fixwings
Turn take off heading at Home – when drone arrives at home position it
orientates to its heading right after arming
Wait to reach RTH - this works with RTH altitude command which the drone
would climb to the said altitude before initiating the flight to home position
Enable slow navigation – this works with keeping the drone to its Min Nav
speed
Ignore throttle and Take over Baro – as the name suggest disable throttle stick
command from the controller when the drone is on mission mode
The amount of force is proportional to a combination of the the deviation from initial position minus any command to
change direction from the controller input. A higher P value will create a stronger force to resist any attempts to
change it's position. If the P value is too high, on the return to initial position, it will overshoot and then opposite force
is needed to compensate. This creates an oscillating effect until stability is eventually reached or in severe cases
becomes completely destabilized.
I : this is the time period for which the angular change is sampled and averaged
The amount of force applied to return to initial position is increased by the I factor the longer the deviation exists
until a maximum force value is reached. A higher I will increase the angular hold capability.
D : this is the speed at which the Aircraft is returned to its original position
Increasing value for D: Improves the speed at which deviations are recovered
With fast recovery speed comes a higher probability of overshooting and oscillations
Will also increase the effect of P
P – proportional
P provides a proportional amount of corrective force based upon the angle of error from desired
position. The larger the deviation, the larger the corrective force.
A higher P value will create a stronger force to return to desired position. If the P value is too
high, on the return to initial position, it will overshoot and then opposite force is needed to
compensate. This creates an oscillating effect until stability is eventually reached or in severe
cases, the overshoot becomes amplified and the multi-rotor becomes completely destabilized.
Increasing value for P :It will become more solid/stable until P is too high where it starts to
oscillate and lose control. You will notice a very strong resistive force to any attempts to move
the Multi-Rotor
Decreasing value for P: It will start to drift in control until P is too low when it becomes very
unstable. Will be less resistive to any attempts to change orientation
“I” gain provides a variable amount of corrective force based upon the angle of error from
desired position.
The larger the deviation and / or the longer the deviation exists, the larger the corrective
force. It is limited to prevent becoming excessively high.
Increasing value for I: Increase the ability to hold overall position, reduce drift due to
unbalanced frames etc
Decreasing value for I:Will improve reaction to changes, but increase drift and reduce ability
to hold position
D- Divide / Derivative
This moderates the speed at which the Aircraft is returned to its original
position.
A lower D will mean the Multi-Rotor will snap back to its initial position very
quickly
4 - Try to lean the Aircraft down onto each motor axis. You should feel a reaction
against your pressure for each axis.
6 - Now try rocking the aircraft. Increase P until it starts to oscillate and then
reduce a touch.
7 - Repeat for Yaw Axis. Your settings should now be suitable for flight tuning.
You will have to accept a compromise of optimal settings for stable hover and
your typical mode of flying.
Other factors affecting PID Taking known good PID values from an identical
configuration will get you close, but bear in mind no two Aircraft will have the
same flying characteristics and the following items will have an impact on
actual PID values:
For Aerobatic flying: Increase value for P until oscillations start, then back of
slightly
Decrease value for D until recovery from dramatic control changes results in
unacceptable recovery oscillations, then increase D slightly Repeat above
steps
For stable flying (RC): Increase value for P until oscillations start, then back of
quite a bit
Decrease value for I until it feels too loose /unstable then increase slightly
Increase value for D
Click on Write settings after changes made in any of the parameters to save
PID : Level
This will influence the flight characteristic with an accelerometer : this is Level Mode
For smooth operation the sum of P axis + P level should stay near the default value : if you decrease P for
Roll and Pitch axis you can increase P Level
Click on Write settings after changes made in any of the
ALT Hold parameters to save
The Barometer sensor is used to detect the altitude of your aircraft and is used for
altitude hold mode. As the barometer sensor is not very precise and is quite noisy,
detection of small up and down movements is impossible.
P - Is how much the Aircraft should rely on the barometer sensor. The higher the value
is the stronger the multirotor relies on the Barometer reading.
I - Is used to compensate for drift caused by battery voltage drop during the flight. The
higher the value is more the multirotor will react to voltage drops ( or other varying
factors over time).
D - Is how strong the Aircraft should react to data from the accelerometer Z axis. It is
used to react to small up and down movements that the barometer cannot accurately
sense. The higher the value is the stronger the Aircraft will react to small altitude
changes.
1. So set the P and I to 0
2. Start to play with D value only. To high D may cause yoyo effect (up and down
oscillations). With to low D copter will be not able to react strong/fast enough to hold
altitude. Your goal here is to set D to the value when copter don';t oscillate up and down
and also holds altitude quite well for a not very long period of time. Aircraft will not hold
altitude perfectly at this point during long periods. It will slowly drift up or down, but
altitude should be quite stable in short periods.
3. Start to increase P to the point where Aircraft holds altitude over long time period. If
the value is to small the copter will drift slowly up and down. If the value is to high yoyo
effect may appear. Goal here is to set it to the point where copter holds altitude for quite
some time. Aircraft will still go slowly down due to battery voltage drop over time.
4. "I" is used to compensate the voltage drop. So start to increase the "I" value slowly until
you get a perfect position hold during a very long time.
Now your altitude hold should be good enough.
For Mega 2560 + GPS Pos Rate PID controller & Pos Rate PID Tuning
The Pos Rate PID controller takes the commanded speed output from the
Pos PI controller and commands an attitude in order to maintain the position
hold location. This PID controller should be tuned before adjusting the Pos PI
controller.
The Pos Rate PID settings control how the attitude of the Vehicle is
changed in order to move towards the desired hold location.
When the Aircraft is within the defined distance of the hold location or
waypoint (set by GPS_WP_RADIUS in config.h) the Pos Rate PID is used,
when further away from the location the Nav Rate PID is used to return to
within the defined waypoint radius.
For Mega 2560 + GPS Pos Rate PID controller & Pos Rate PID Tuning
The Pos Rate PID controller takes the commanded speed output from the Pos PI controller and
commands an attitude in order to maintain the position hold location. This PID controller should be tuned
before adjusting the Pos PI controller.
The Pos Rate PID settings control how the attitude of the Vehicle is changed in order to move towards
the desired hold location.
The speed of movement is controlled by the Pos PI controller, while the attitude of the Aircraft is
controlled by Pos Rate.
When the Aircraft is within the defined distance of the hold location or waypoint (set by
GPS_WP_RADIUS in config.h) the Pos Rate PID is used, when further away from the location the Nav
Rate PID is used to return to within the defined waypoint radius.
GPS_WP_RADIUS
To tune the Pos Rate PID, initially set P, I and D values to 0.
Gradually increase P until the multirotor begins to position hold with some drift.
Gradually increase D until the Aircraft responds more quickly to undesired changes in
attitude caused by the wind. If this value is set too high you will see oscillations or sudden
jerking in pitch and roll motion.
If needed, gradually increase I value to allow the PID controller to compensate for long
lasting error, ie if it is being blown by the wind.
RC Control Settings
Use Aux switch to setup flight modes and
Navigation functions
Stable Modes
With the sticks centered the plane will self stabilize.
Returning to level flight from almost any situation.
Provided there's enough Altitude for recovery.
Horizon Mode Allows rolls and loops. Levels with centered sticks
This is a comfortable flight mode for FPV.
Angle Mode also limits how much the plane can tilt.
Gives a Stiff feeling and is only recommended for beginners.
Missions
First Flight.
Take of in Passthru.
Switch mode on safe height.
Activate Assisted modes (Horizon /Angle) and feel the difference.
Missions
Puts the aircraft into waypoint mode set Aux switch to Mission & Horizon or Angle mode
GPS-Hold
Can only be enabled With AUX switch.
Check both Angle mode and GPS Hold in Gui.
When GPS-Hold is activated The position is saved in a 3D Waypoint.
The plane will Navigate and try to "hit" the WP continuously and maintaining altitude.
No pattern is programmed and the plane fly the shortest way back.
Often in a circle or figure eight.
RTH (Return to home)
Can be enabled With AUX switch or by Failsafe.
Check both Angle mode and RTH in Gui.
When RTH is activated the plane will start Climb to reach safe Altitude.
If RTH is enabled Higher than set altitude it will start navigation and keep that altitude.
If altitude is safe the plane will start to Navigate to home Position.
When the plane reaches SAFE_DECSCEND_ZONE the plane will begin descending to correct altitude.
The plane will keep flying in hold mode and continuously pass home.
If Failsafe is active at return The plane will Disarm motor and descend to a "Landing"
PID settings is made in Gui.
ALT & NavR.
To fly comfortably