Last Sunday I had a possibility to try something new: indoor FPV flying with a 250 class quadcopter. I am not a FPV expert, I can not do all those awesome stunts, but I feel pretty confident in air. It does not scares me anymore, and I’m not affraid to make a longer flights with my Reptile 500 multirotor. But indoor is something different, it takes FPV to a completly different level comparing to outdoor. And here are my thoughts about the experience.
No matter how big indoor is, it is never as big as a meadow. We had about 3400 square meters at our disposal and the last thought was: I have a lot of space to make this turn. 3400 square meters is a lot, but it does not look so spacious through camera,
Comparing to outdoor, indoor FPV is 5 times harder? Why? Outdoor you have only one enemy: ground. Indoor you have floor, roof, 4 walls and most probably additional obstacles. Hitting any of those results in crash,
Outdoor when you are lost you can always go up. After all, noone ever crashed into a sky. Indoor it is not an option. Roof is a sneaky bastars. It sits there quietly and waits for your patiently. I was so used to avoiding the ground, that I was flying too high. Roof was there of course. And hitting a roof is a combo. First you hit the roof, and a second leter you hit a floor,
Everything is hard. Roof is hard, walls are hard, floor is hard. In most cases made from concrete. And thust me on that, in all the cases, concrete wins. It wins with propellers, motor bells, motor shafts, carbon fiber. It just wins. Period. 30 minutes in the air costed me: unknown number of props, one ZMR250 carbon fiber arm, one Multistar v2 2206 2150KV “Baby Beast” motor. And condidion of a second motor is iffy. It does need immediate replacement, but it will not survive another beating like that,
It is weather independent! Rain, snow, wind, night, does not matter. You are indoor. Keep flying,
If electricity is there, so you should be able to recharge LiPos,
Adrenaline is high and it is fun.
Will I try it again? Yeap, only after rebuild my ZMR250 quad. Replacement motors are on the way…
Looks like there will be a new release of Cleanflight flight controller software before Christmas 2015. Version 1.11.0-RC1 has been tagged 10 days ago. So, maybe even this week if there will be no bugs. What’s new in 1.11? No, no Betaflight yet, and no iNav (Navigation Rewrite). Some improvements, new supported hardware (Naze32 Rev6 and RMRC DoDo), some bugs fixed. But with 1.11 some features will be removed as well.
First of all, number of PID controllers has been cut in half. PID Controller 0 (MultiWii), 4 (MultiWii 2.3 Hybrid) and 5 (Harakiri) has been removed and will be no longer available. Why? They were not very popular (maybe besides default PID 0) and they were using precious space in flash memory. This is the most important signal that lifetime of STM32 F1 based flight controllers is coming to an end. Naze32, Flip32 and others does not have enough flash memory to fit all functions.
Second, Autotune has been replaced with G-Tune. I did not tried G-Tune yet, so I have nothing to say about it. I’ve tried Autotune few times as was not very happy with results. Not only it did not supported PID controller I prefer (LuxFloat), but I also noticed that tuned P value was too high for my needs. So, bye bye Autotune, I will not miss you…
When you want to fix a problem that does not need fixing you get yourself into trouble. Like me, trying to tune perfectly fine elevator. Few seconds after take off plane dives and crashes into the ground. Wing and all the gear survived. Fuselage broke in half. Time to manufacture a new one.
FrSky sells 2 small Taranis compatible receivers: X4R and X4RSB. By default, they offer only PWM signal. 4 channels on X4R and 3 channels plus S.Bus (16 channels over S.Bus) on X4RSB. And that is problematic. Many flight controllers does not support S.Bus very well (no inverters) or just does not offer enough UART ports. When speaking of small multirotors, PPM signal is often the best choice. That made X4R almost useless. For X4RSB additional S.Bus-PPM conversion cable had to be used.
Luckily, this has changed, since FrSky started offering custom X4R/X4RSB firmware that allows 8 channel PPM signal on receivers port 1. The only thing you have to do is to flash you receiver. And those are the steps to do it:
Download CPPM firmware from this site. Remember that you need proper EU/non-EU version. It all depends if your Taranis and it’s built in XJT module has EU or non-EU firmware. How to determine EU/non-EU Taranis? If you are living outside EU you probably have non-EU firmware. If you are living in EU but bought from non-EU country (China probably) you have non-EU. Also, if in menu you can select D8 or LR12 internal radio mode, you have non-EU firmware. EU firmware allows only D16 mode,
Follow those steps to flash X4R/X4RSB using Taranis built in port,
Put a jumper on signal pins 2 and 3,
Bind receiver with Taranis,
From now on, pin 1 outputs PPM channels 1-8, pin 2 outputs PWM CH9, pin 3 outputs PWM CH 10, and pin 4 outputs either PWM CH11 in X4R or S.Bus on X4RSB. If you want to go back to non-PPM mode, bind receiver again, without jumper on pins 2 and 3.
FrSky X9D Plus Taranis or cheaper FrSky Taranis Q X7 or even more expensive X10S Horus, are incredible radios. But also can be intimidation when migrating from simpler radios. A great example is mixing multiple switches into 1 channel to pass flight mode to the flight controller. Yes, you can do it, but it can be a pain in the ass on a Mixer level. I've lost a lot of time trying to understand the logic behind mixer weight and offset only to discover possibility to replace channel value, not add. And everything was simple again. So, here what I wanted, and what I did.
What I wanted
When I fly bigger FPV quadcopter, I want to use 7 different flight modes:
Angle without Altitude Hold (no BARO),
Horizon without Altitude Hold (no BARO),
Acro/Rate without Altitude Hold,
Angle with Altitude Hold (BARO),
Horizon with Altitude Hold (BARO),
Position Hold with Altitude Hold (BARO),
Return To Home with Altitude Hold (BARO)
And I've figured out, that 3 switches should be used to enable all the flight modes: SC, SD, and SG. SC toggles Angle/Horizon/Acro. SD switches PosHold and RTH (as well as BARO and overrides SC and SG). SG enables Altitude Hold but only when SC is in up or middle position. 3 switches, 7 modes. I could do it with 3 radio channels, but that would have few flaws: would use 3 channels instead of one, and would allow for mistakes like no BARO with POSHOLD. So, advanced mixes and logical switches that is. Continue reading Multiple flight modes for Cleanflight with Taranis
Multicopter is an unstable machine. It requires constant corrections to keep is stable in the air. This is done with PID control loop. When quadcopter does not fly like you hoped, you will hear: “Tune your PIDs“. Nice. But what exactly is PID? If you did not studied control theory, and you do not want to start, you read internet. And internet tries to explain PID in various ways. Some are better, some are worse, and there is always room for a new one. So here we go.
Officially, PID goes for Proportional, Integral, Derivative. Wikipedia provides enough of long and boring theory. If it’s TL;DR, here is a short summary:
PID controller measures error of current output and desired output,
This error is processed separately by P, I and D modules,
Then, output of each module is multiplied by it’s coefficient (Kp, Ki, Kd) and added all together as an controllers output,
Controller can be tuned by changing Kp, Ki and Kd values,
In a multicopter, there is separate controller for each axis (roll, pitch, yaw) working based on rotation speed provided by gyros. This is called and “inner loop”.
Some flight modes adds “outer loop” with separate PID controller that is translating user input into values used by “inner loop”. Outer loop is much less important than inner loop and usually there is not need to tune it,
Flight modes like Attitude, Angle, Horizon (all with self leveling) are using both outer and inner loop,
Flight modes like Rate, Acro and using only inner loop,
When speaking on PID tuning, in 99% of cases we will be talking about tuning the “inner loop”,
Inner loop tuning should be done only in Rate/Acro flight modes (no self leveling) and avoid complex outer-inner loop interactions.
With all the possibilities, Raspberry Pi requires additional hardware to turn on and off any additional hardware. GPIOs built in power limit is low: 3.3V, 16mA per GPIO, but not more that 50mA total). And while it might be enough to light a small LED, it is not enough for anything else. Forget about motors, strong LEDs, relays. Anything that uses more that 16mA on input will destroy Raspberry Pi.
Luckily, there are things called MOSFET. To keep things short: they are special kind of transistors that can be used to turn on and off devices with high power requirements. Unfortunately, most MOSFETs require more that 3.3V Raspberry Pi GPIO provides. So you either have to use 3.3V logic compatible MOSFETs or add few other elements and use more common 5V compatible MOSFET like 30N06. And 30N06 MOSFET transistor can handle a lot of thing: up to 30A and 60V. So it’s more that enough to handle most 12V motors, relays, lights, LEDs, etc.
NPN BC547 (or compatible) transistor,
PNP BC640 (or compatible) transistor,
30N06 MOSFET transistor,
3x 10kOhm resistors,
1N4001 (or similar) diode
If it was Arduino with 5V logic, transistors would not be required. But with Raspberry Pi’s 3.3V logic they are required to bump voltage from 3.3V GPIO port provides to 5V MOSFET needs. Additionally, if we would be powering any coil device (motor, relay), flyback diode would be required to secure MOSFET from voltage spikes. Even if there is no coil, flyback diode still can be used. Just to be safe.
Few months ago I’ve wrote about my first handmade Depron airplane. It was cool design. Super simple, with KFm-2 airfoil, durable and easy to fly. But it had few serious flaws:
motor mounted in front of fuselage is great for flight characteristics, but propellers breaks all the time. Even with prop savers,
big fuselage is not the same as fuselage with a lot of space inside.
That’s why, I have build a second Depron airplane. This time with pusher propeller mounted on a tower behind wing. Wing is almost the same design as in my first airplane. It is still an KFm-2 (Kline-Folgeman, modified) airfoil, 150mm chord, 12mm thick. But is a little shorter: 1200mm instead of 1250mm. The main difference is inside wing. Instead of carbon fiber spars I’ve used two carbon fiber 6mm pipes. That gives plenty of stiffness. Wing almost does not bend in flight, even during hard maneuvers. And generates more than enough lift to give nice, slow flying experience without danger of heavy stall. You really have to want to stall it. And event when it stalls, it recovers nicely: drops a nose, dives for a second or two, and you have lift again. No need to work with rudder, just let it dive and gain speed and then level. Continue reading RedCruiser – DIY Depron airplane for FPV
After few test flights I have to admit, that PID values for Reptile 500 quadcopter frame I posted here are too aggressive. Way too aggressive. Specially D coefficient was too big and was main source of high frequency vibrations visible as camera jello. Reducing P and D, and slight increase of I improved quadcopter behavior. Current settings:
FlySky FS-i6 (or branded Turnigy TGY-i6) is a very decent 6 channel entry level RC radio system. But support for PPM (CPPM) standard is somehow not clear. I have no idea why manufacturer keeps PPM support data so well hidden. Anyway, here it is: how can I enable PPM on i6 radio system?
It is not possible to enable PPM signal on FS-iA6 receiver. So if you have simpler one, you would have to buy iA6B. Also, PPM signal is not enabled by default. To turn it on, you have to change radio settings:
Open Menu and select “System setup”
Enter “RX Setup”
Navigate to “PPM output”
And change it to “On”
This is all. From now on, FS-iA6B will output PPM 6 channel signal on port 1 labeled “PPM/CH1”.