User Tools

Site Tools


rc:3s-quadcopter

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
rc:3s-quadcopter [15.11.2011 00:25]
vergo [Software setup]
rc:3s-quadcopter [01.03.2015 20:39] (current)
vergo
Line 1: Line 1:
 +~~NOTOC~~
 +
 +<note important>This quadcopter was dismantled on 1.3.2015 after 76 flights having served me well as a learning platform for both LoS and FPV flight. The last flight can be viewed [[https://www.youtube.com/watch?v=VpSk6reU2yQ|here]].</note>
 +
 ====== 3S Quadcopter ====== ====== 3S Quadcopter ======
  
Line 108: Line 112:
  
 ===== The brain ===== ===== The brain =====
 +
 +<note tip>Note: the flight controller part below was written in late 2011, now in 2013 a all-in-one flight controller is a better option. The software has also been updated several times and using a several year old release isn't suggested.</note>
  
 ==== Assembly ==== ==== Assembly ====
Line 140: Line 146:
   - get and install Arduino 0022 (or later) from [[http://arduino.cc|arduino.cc]] (the file is named arduino-0022.zip)   - get and install Arduino 0022 (or later) from [[http://arduino.cc|arduino.cc]] (the file is named arduino-0022.zip)
     * note that you'll need to have also Java installed     * note that you'll need to have also Java installed
 +    * Arduino 1.0 has been released and seems to contain changes that might break compatibility so it might not hurt to use version 0022 or 0023 instead
   - check that your FTDI<>USB adapter is detected by the operating system but don't connect it yet to the Arduino   - check that your FTDI<>USB adapter is detected by the operating system but don't connect it yet to the Arduino
     * I'm using [[http://www.watterott.com/en/FTDI-Breakout-Reloaded-V11|FTDI Breakout Reloaded]] from Watterott     * I'm using [[http://www.watterott.com/en/FTDI-Breakout-Reloaded-V11|FTDI Breakout Reloaded]] from Watterott
Line 146: Line 153:
   - extract the "MultiWii_1_8_patch2" directory to the installed Arduino Sketches directory   - extract the "MultiWii_1_8_patch2" directory to the installed Arduino Sketches directory
   - after starting the Arduino SDK, MultiWii should be visible in the load sketches menu   - after starting the Arduino SDK, MultiWii should be visible in the load sketches menu
-  - open the config.h and configure it based on your needs +  - open the config.h and configure it based on your needs (changes compared to 1.8p2 defaults for FreeIMU v0.3.5_BMP and my setup) 
-    * this step will be written in more details +    * #define MINTHROTTLE 1180 
-  - run Verify to check for error+    * %%//#define INTERNAL_I2C_PULLUPS%% 
 +    * %%//#define FAILSAFE%% 
 +    * #define FREEIMUv035_BMP 
 +    * #define ITG3200_LPF_98HZ 
 +    * #define SERIAL_SUM_PPM ... %%// Futaba%% 
 +    * %%//#define VBAT%% 
 +  - run Verify to check for errors
   - select the correct Arduino board: Tools -> Board -> Arduino Pro Mini (5V, 16 MHz) w/ ATmega 328   - select the correct Arduino board: Tools -> Board -> Arduino Pro Mini (5V, 16 MHz) w/ ATmega 328
   - connect the FTDI adapter and select the correct serial port   - connect the FTDI adapter and select the correct serial port
Line 158: Line 171:
  
   - power up the IMU with a 5V power source   - power up the IMU with a 5V power source
 +    * also the receiver needs to be connected in order to get all features visible
 +    * 5V power source <-> receiver with ppm <-> MWC shield throttle channel
 +      * if ppm isn't available then all channels need to be connected separately
   - locate the MultiWiiConf directory ("MultiWiiConf_1_8_patch2") that came with package from code.google.com and start the configuration program   - locate the MultiWiiConf directory ("MultiWiiConf_1_8_patch2") that came with package from code.google.com and start the configuration program
     * 32 bit Java needs to be installed for the configuration program to run correctly in Linux     * 32 bit Java needs to be installed for the configuration program to run correctly in Linux
Line 175: Line 191:
   * check that the sensors react correctly to tiltin the shield   * check that the sensors react correctly to tiltin the shield
  
-==== Controller setup ====+==== Transmitter setup ====
  
 +A Futaba 8FG is used in this example but the same or similar settings should be available in most other transmitters.
 +
 +**Channel setup**
 +
 +  * with the help of MultiWii conf, check that all connected channels are visible and move to the correct direction
 +    * I needed to reverse throttle AND ele (pitch)
 +  * set the travel limits for all channels to 120% (Futaba)
 +    * the goal is to have all channels send values as close a possible to the 1000 - 2000 range (low - high)
 +  * check that the middle point for all channels is 1500
 +    * for Futaba it's 1518 by default for some reason, fix it by setting a sub-trim of -29 to all channels
 +
 +Now all channels should show 1500 when the stick is in the middle position, 1000 in low and 2000 in high. There could be a variations of 1-5 but that shouldn't matter. Notice how moving the stick to the center from a different direction can result in a slightly different value, i.e. 1497 or 1501 instead of the previous 1500. That doesn't matter in flight.
 +
 +**Optional mode switch setup for 8FG**
 +
 +The MultiWii software supports using two channels (aux1 and aux2) for controlling modes (see the picture from the previous section). I wanted to use once channel (aux2) for arming the motors in order to have an arming switch instead of "left stick to lower right arms". However, I also wanted to have a separate switch for enabling and disabling the magnetometer.
 +
 +This would result in the following setup:
 +
 +  * switch SA arms motors only in high position
 +  * switch SF turns mag on/off
 +  * switch SE is the flight mode switch
 +    * low: acrobatic mode (=gyro only)
 +    * mid: stable mode (=gyro+acc)
 +    * high: stable mode with barometer
 +
 +In MultiWii conf:
 +
 +  * aux1 low: all off
 +  * aux1 mid: level on
 +  * aux1 high: level on, baro on
 +  * aux2 low: all off
 +  * aux2 mid: arm on
 +  * aux2 high: arm on, mag on
 +
 +Channel mixing will result in aux2 being high only when switch SA is high, no matter the position of other switches:
 +
 +  * Mix 1: SF -> Aux2, act on, link off
 +    * -80 - -50
 +    * offset: x: +50 y: -100
 +  * Mix 2: SF -> Aux2, act on SA (only high position), link off
 +    * -100 - +100
 +    * offset: x: +0 y: -25
 ===== The frame ===== ===== The frame =====
  
 ==== Assembly ==== ==== Assembly ====
 +
 +Building the frame starts with cutting four 20 cm pieces of 1 x 1 cm square aluminium tube. Round the sharp edges once cut. The 20 cm length is calculated for a 8" propeller but up to 10" will fit. Accuracy is important while working with the motor arms. Any deviation may result in arms that aren't straight which in turn places the motor in asymmetrical position. This will cause correction need during software tuning and may some times even result in a quadcopter that isn't possible to tune into flying well in all conditions. However, don't worry if the lenghts of the arms don't come exactly identical. Getting the lengths withing few millimeters is enought. It's more important that the holes have equal distances in each arm and are correctly aligned.
  
 {{:files:mwc:frame1.jpg?direct&300|Baseplate with aluminium arms}} {{:files:mwc:frame1.jpg?direct&300|Baseplate with aluminium arms}}
 {{:files:mwc:frame2.jpg?direct&300|Testing propeller space requirement}} {{:files:mwc:frame2.jpg?direct&300|Testing propeller space requirement}}
 +
 +The table below shows the distances for the 3 mm mounting holes that are needed for attaching the baseplates (first 3) and the motors (last 2). All measurements are made from the beginning of the arm so slight deviations in arm lenghts will not matter as long as all arms are at least 20 cm in lenght. One 6-8 mm hole may need to be drilled between the two motor mount holes if the motor shaft doesn't end at the bottom of the motor. At least the Keda motors required this additional hole since I didn't want to cut the shaft. 
 +
 +^ 3 mm mounting hole distances ^^^^^^
 +| 10,8 mm | 21 mm | 40,5 mm | --- | 160 mm | 192.7 mm |
 +
 +Note that I'm using the cross shaped mounting piece for the motors. The reason is that the mounting holes in that piece are symmetrical resulting in free orientation of the motor. The other mounting holes that are directly in the motor aren't in a symmetrical pattern and the orientation seems to be random. Because I want to have the motor wiring point to a specific direction (=away from the front), using the direct mounting holes isn't an option. The cross shaped mounting piece appears to be somewhat standard since my other motors also have exactly the same spacing. Additional, it may provide a little bit of extra protection for the motor bell. Any hits from the sides will first make contact with the mount instead of the motor.
 +
 {{:files:mwc:quad1.jpg?direct&300|Assembly test without ESCs or wires}} {{:files:mwc:quad1.jpg?direct&300|Assembly test without ESCs or wires}}
 +
 +^ Screw and nut list ^^^
 +|  4  | 20 mm M3 metal screw| inner baseplate |
 +|  4  | 40 mm M3 metal screw| outer baseplate, landing gear, something 15-20 mm longer can also be used |
 +|  8  | 18 mm M3 metal screw| motor mount |
 +|  4  | M3 metal washer | for the landing gear screws |
 +|  16  | M3 metal nut | replace with locknuts during final assembly |
 +|  28  | M3 nylon nut | use with nylon parts, replace with metal nuts if not available |
 +|  4  | 30 mm M3 nylon screw| MWC shield mount |
 +|  4  | 20 mm nylon standoff | optional, for the cover plate |
 +
 +Now is a good time to do a test fit. Connect the arms to the baseplate with two M3 screws (first and third mounting hole) for each arm. Use normals M3 nuts instead of locknuts in order to ease the eventual disassembly. Attach the MWC shield with M3 nylon screws using few layers of nylon nuts to rise the shield slightly from the baseplate. Connect the cover plate with polyamid stands or something similar. Before attaching the motors, check that the frame doesn't flex in any direction. Once the motors are attached, there still shouldn't be any noticable flexibility even if the frame is handled from the tip of the arm instead of the base. Obviously, propellers shouldn't be able to make contact with each other if the given measurements were used.
 +
 +==== Power distribution ====
 +
 +The baseplates sold by [[http://flyduino.com/|Flyduino]] aren't identical. One in the set contains connections that can be used for power distribution but is also slightly heavier while the other is a plane board. Both contain the "www.flyduino.com" and "warthox" texts. I opted to use the power distribution possibility since that makes the build cleaner and simpler (=less wires). It's possible to use the power distribution enabled plate as either lower or upper plate in the frame. However, I figured that having the power distribution as far as possible from the IMU would be the best option and that's why the power distribution enable plate ended up being the lower one. The connection side if pointing up while the upper plate has the text side pointing down.
 +
 +Disassemble the frame and take the power distribution plate in view. Notice the layout of the connection pads. From the motor arm point of view, the positive and negative pads aren't always on the same sides. As a result, in order to connect the ESCs correctly, 2 ESCs will have the wires crossing each other while 2 ESCs will have wires going straight to the pads. Shortening the wire may not be necessary. It's better to have the wires doing an S shaped figure instead of going straight to the pads without flexibility. Solder the ESCs in place and also add power wires for the battery starting from the bigger pads in the center of the plate. Orientate the power wires going for the battery towards the back and use two zip ties crossing each other to connect the power wires to the outer rim of the baseplate. That way, pulling the wires will pull the frame instead of the solders.
 +
 +Using one motor arm with the motor attached as a template, figure out how much the three ESC wires going to the motor need to be cut shorter. With the Hobbywing 10A ESCs, I had to shorten the ESC wires by 7 cm each. I did a test about using the bullet connectors that came with the motors but found that those connectors are some loose and somewhat overkill considering the size of the wires. I ended up using much smaller [[http://www.hobbyking.com/hobbyking/store/%5F%5F15424%5F%5F6pin%5FMicro%5FPlug%5F10pairs%5Fbag%5F.html|micro plugs]] from HobbyKing instead. Shrink tube was used over the connector pair once the correct orientation was found. Notice that the Keda motors can have the motor wires in totally random order. That's why it can't be assumed that using the original order will result in the motor spinning in the same direction every time. Make sure to double check that the direction is correct since half of the motors need to be spinning clockwise (front left and back right) and the other half counter clockwise (front right and back left).
 +
 +The ESCs should now be connected to the baseplate and connections to motors ready.  Now is a good time to calibrate and configure the ESCs and check motor spin directions before connecting anything to the Arduino. Power up the ESCs using the baseplate with the ESCs connected to a motor without a propeller. One ESC at time should be connected to the receiver channel 3 or a programming card if such is available. Note that the travel range can't be set with a programming card so the transmitter and receiver need to be connected for each ESC at least once. The transmitter should be already calibrated to output the correct value range as explained in the transmitter setup section. Depending on ESC & motor combination, high timing may be needed. With the Hobbywing ESCs and Keda motors I didn't notice any difference between middle and high timings with a bench test.
 +
 +^ ESC setup ^^
 +| Brake |  OFF  |
 +| Battery Type |  Li-xx  |
 +| Cut Off Type |  Soft-Cut  |
 +| Cut Off Voltage |  Low  |
 +| Start Mode |  Normal  |
 +| Timing Mode |  Middle  |
 +| Music |  OFF  |
 +| Governor Mode |  OFF  |
 +
 +While playing with the motors (without propellers!), take note if any motor feels or sounds like it would have a different vibration profile that the others. In a optimal situation, all motors would be identical but that's not how things end up being in real life. I found that the propeller mounts aren't all 100% balanced but luckily it's possible to mount the propeller mount in four different ways. If the motor seems to be vibrating much, rotate the propeller mount mounting and try again. Repeat until the orientation causing the least amount of vibration is found and use it.
 +
 +Balancing any rotating parts is one key element in getting a well flying quadcopter. Remember to also balance the propellers. So far I haven't found propellers that would be directly in perfect balance.
  
 ==== Let there be light! ==== ==== Let there be light! ====
 +
 +This is an optional step. Lights help keeping track of the orientation of the quadcopter especially when flying high or in poor visibility.
  
 {{:files:mwc:blue-hotorange.jpg?direct&200|Led test: blue / hot orange}} {{:files:mwc:blue-hotorange.jpg?direct&200|Led test: blue / hot orange}}
Line 195: Line 302:
 {{:files:mwc:quad3.jpg?direct&300|Power on}} {{:files:mwc:quad3.jpg?direct&300|Power on}}
  
 +====== Afterthoughts ======
 +
 +The final weight ended up being a little bit heavier than the estimate of 553 grams. With the battery (Dualsky XP22003GT) attached, the weight is 617 grams and 440 grams without. I assume that I've underestimated the weight of wires and screws because everything else should match and is listed on the part list. However, I don't see this weight difference as a problem since the quad doesn't feel heavy in flight.
 +
 +Flight time estimates very actually pretty close to reality. Hovering and calm flight (=me walking behind the quad) takes on average around 120 mA per minute based on two test flights with different batteries. As a result, it's possible to hover or do calm flying for up to 15 minutes with a 2200 mAh battery, which is within the estimated 14-18 minutes range. The difference can be explained with the fact that the estimate was done for a slightly lighter quad and without taking the LED lights into account. In case someone is wondering, I've set the transmitter timer to 10 minutes and actived with the arm switch.
 +
 +Having bright lights under the quad proved to look even better than what I had expected. Going with an orange/blue color scheme instead of the more popular red/blue also looks good and actually better since the front propellers are also orange. The reason for using orange instead of red was originally only due to red being out of stock. Adding a switch for the lights caused some extra work but proved to be a good feature for table testing since it's nice to be able to turn the bright lights off when needed. Using a separate channel for controlling the switch could also be doable later.
 +
 +Overall, I was surprised how well the quad flies even with default PID settings. Acrobatic mode is more stable than what I'm used when flying the helicopter. Stable mode still requires some more testing and probably slight PID tuning because with the default settings the quad seems to have a habit of wandering a little bit. That could also be due to the drift issue known to exist in MultiWii 1.8p2. Currently (15.11.2011) the MultiWii 1.9 zip release is still getting updated almost daily so I'm not going to test it until the release has really been frozen. Tracking different versions of the same version just feels stupid. Wonder why it isn't being release with the same patchX naming as 1.8...
rc/3s-quadcopter.1321309552.txt.gz · Last modified: 15.11.2011 00:25 by vergo