First Quad Build -- KL EX90

mincher

New member
Hello,

This is an intro asking for some basic help.

My son (12) and I are trying to build our first quad. I'm a low-level firmware engineer / ham radio enthusiast and my son is in the 7th grade and a basketball and volleyball player (currently with a broken leg). I've used STM32F parts in a number of projects / products and am interested to eventually dig into their use in flight controllers.

We bought all the pieces for what is essentially a KL EX90 including a FrSKY 9XD taranis plus transmitter and a am using a Flycolor RAPTOR S-Tower FC/ESC and FrSky XM 16 Ch Micro SBUS Receiver. Motors are Dragonfly MC1105 7500kv Micro Class Racing Motors.

It powers up, we've managed to bind the tx/rx and can connect it to betaflight. The instructions for the KL EX90 show some basic information for setting up the PID controllers which we've done.

The first thing I was going to do was to make sure the motors were wired in the correct direction. Going to the motors page on betaflight, turning off the safety, and raising the throttles for each motor causes them to turn. However, I see that each time I engage the sliders for the motors they seem to turn in different directions. i.e. each motor, turns clockwise and counter clockwise seemingly randomly each time I bring up the throttle. I was not expecting that -- would expect them to be consistently correct or wrong and then would swap two of the wires on the wrong turning motors. Any idea what's wrong?

Secondly, what do we need to configure on the 9XD to make sure that it's sending valid ranges of data to the FC? From betaflight I can see that moving the sticks does cause changes to the channels in the FC, but the data is not valid and shows the quad spinning out of control.

Thank you to everyone in advance,

Dick & Patrick Mincher
 

PsyBorg

Wake up! Time to fly!
Welcome to Flite Test Mincher and son. I am in between doing some things as well as making dinner but I started a write up to do the basic set up for quads a while ago. I will paste it in there for you to try (you can be the guinea pigs). This should keep you active for a few hours between doing the set up and learning the terms. I will be able to peek in here on occasion so I will check your progress and see if you get stuck at any part of it. Happy New year and good luck I hope this helps you guys.



This will be a walk thru of setting up a quad copter. It is not a build walk thru even though parts of the build process are mentioned .It will be a generic process as the tech is moving to fast to be specific about various makes of flight controllers, esc's, and motors. More then likely there will be issues along the way in the set up process and at some point if this is received well I will do a trouble shooting article at a later date. If you are reading this for trouble shooting purposes I suggest you disconnect any thing other then the pdb, the flight controller, the esc's and the motors until you confirm the core all works as it should.

First thing to do is to read and follow the flight controllers requirements for drivers and connect the flight controller to the computer. Doing this before the build will make sure that the controller does in fact work and communicate but also lets you upgrade it and have it ready to go when the rest of the setup up is done. ALWAYS flash the controller to the latest stable firmware.

From this point you can either build the rest of the electronics off of the processor on the bench like is the easiest way to work with the new Gremlin sized micros or for larger kits build it right to the frame where it will be easier to custom fit parts and wires. Connecting the esc's is next so pay close attention to polarities and where signal wires are attached to the flight controller.

Once the esc's have been added next will come the motors. For my builds I make sure the wires come straight off the motors and do not cross. It makes a neater build and will be less likely to get tangled and stress the wires. Most motor rotation is controlled by a jumper pad on the esc or straight thru the esc software so crossing wires is no longer a necessity.

Now it is time to power up the drive train to check motor rotation and flash esc's to current firmware. NEVER apply power from a battery for the first time with out using a smoke stopper! At this point you may have to select the protocol for the esc's to what they are flashed to from the factory in the gui.

Once you have powered the drive train and found no problems its time to do a few quick checks. You can remove the smoke stopper from the set up. Start by connecting the flight controller back up to the computer with the usb cable. Open what ever gui you are using and connect to the flight controller. The first thing we
will check is the motor directions and ensure that each motor reacts to its proper place according to the flight controller. Make sure your PROPELLERS are not on your motors. Plug the battery in to the drive train and let the flight controller boot up. Pay attention to the tones the esc's make when you do this as they can give information to their status at this time.

Once things are powered up go to the motors tab and check the box that allows you to control the motors from the gui. Take a piece of paper for this step and write down the numbers we get from this part of the set up. Starting with motor number one slider raise it up to about a quarter throttle to make sure it spins up. You will also check to make sure that it is turning the proper direction at this point by either lightly touching the case with a finger or by the tape on the shaft method. Write down if it is correct or needs to be reversed. Repeat this process for the other three motors. Again make sure that the correct motor turns with each of the sliders.

Now comes time to flash the esc's to current firmware and make any changes to motor rotation needed. Some older esc's may not be able to be flashed thru the flight controller and I will assume you have ones that can be. This step can be skipped providing you are sure all four esc's are using the same firmware AND revision. If you have ones that can be follow the on screen directions in your gui for flashing the esc's and again use the latest firmware that matches your specific esc's.

After they are flashed and the drive train reboots go back and check to make sure each motor turns. The next step is to calibrate the esc's providing you are not using Dshot protocols as this is not necessary with them. To do this you connect to the gui un powered by a battery. Go to the motors tab and check the box. Again NO props! Slide the main motor slider all the way to the top. Now you can connect the battery and listen for the esc's to play a tune. As soon as they do slide the main motor slider back to zero throttle. At this point your esc's will reboot and should be calibrated. use the main slider and check to make sure all four motors start at the same time. If they do not go back and repeat the process.

Next we will find the minimum throttle for each motor by using the slider. I find it easier to highlight the slider and use the up arrow key to move it in small increments so I am more accurate. Use the up arrow key until the motor spins smooth and not jerky or twitchy in any way. Write that number down. repeat that with the other three motors. Now that you have that number take the highest one of the four and add 10 points to it to account for weight of the props. This will be entered on the configuration page as the minimum throttle.

Now that all that works its time to connect a receiver and get that all lined out. Depending on your receiver will depend on how to connect to the flight controller so look in the flight controllers pdf manual for specifics on how to set yours up. some are simple some require you to select a different uart in the gui to make them talk. So far I think it is only Spectrum that has to use different uart to communicate and from what I have read it is usually on uart three. Again read the pdf to determine how to connect yours up.

Once you have your receiver connected plug in the usb and go to the configuration page in the gui and select the proper protocol from the pull down menu on the upper left side of the page. SAVE that THEN go to the receiver tab. I go back and check to make sure it did save and then continue back on the receiver tab. On the receiver page you will be able to select the channel mapping for the receiver. I always set my gear to TAER when I get it so its all the same. Just make sure that what ever you select matches what you have set in your radio. Next turn on your radio and wiggle the sticks to make sure things are talking and that throttle is throttle yaw is yaw and so forth.
If they are not it more then likely is that you do not have the same channel mapping set between them.

The next step is to set centers and end points between the radio and the flight controller. To do this you will use the sub trims in your radio to get each channel as close to 1500 as possible. I do this for my switches on the aux channels I use as well. Not a necessity but will ensure no issues further in the process. Now you will notice in most cases you can not get things exactly to 1500 and that the numbers bounce a bit. This is due to analog electronics not being as precise as digital and more susceptible to wear. Do not worry over it as long as you are within a point or two of 1500. After this we will use travel adjustments or end points on some radios to set the minimums for each channel to 1000 and the maximums to 2000. Some radios will be as high as 1100 and as low as 1900 to start so quite an adjustment will be needed. Some radios you may have to use what is called extended trims to reach the proper 1000 and 2000 end points. Just make sure you get these set properly or you will have other issues later in the set up. In EVERY case remember to NEVER use the manual trims on the radio by your sticks once these are set. If your radio has the capability like the Taranis go ahead and disable them altogether to prevent accidentally changes later on.

Now that you have your channel assignments and proper settings done we can move on to switches. Usually quad copters use receivers with six channels or more so we can use switches to do things with. Some of you may only have four channels but you can still fly with just four it will just mean you do not have certain abilities to turn things on and off. I set Aux 1 which will be channel five to be my arm switch. This is the first one and is a must if you have the channels to use. Stick arming can actually disarm the quad doing certain maneuvers while in the air. I have a Taranis so I mapped mine to a three position switch and set it to arm high. I use the switch right above the pitch stick so Its a mere flick of the finger to disarm as fast as possible since I use the pinch method to fly. I use a 3 position as it adds a little safety net in case I accidentally bump the arm switch. Next I set up a flight mode switch where the low position will be horizon mode (with out air mode) as an emergency mode or early learning for fpv take off and landing. The mid position will be acro mode (nothing set to the mid position). The high position will be acro mode as well but I also map air mode to the same switch in the high position so I have acro with air mode. This allows me to do tricks and stuff with the high position but allows for a no bounce landing while still in acro mode in the mid position.

Finally we set up fail safe. Each receiver handles things differently. For a race / free style quad you want the quad to stop moving as fast as possible. This means probably damaging the quad but that is far better then it zooming around trying to do something else. Make sure you set it so when the link between your radio and the quad is broken the quad immediately shuts off. Test this several times with the props off by spinning the motors with radio control and then shutting the radio off. If it does anything but shut off the quad you need to go back and check settings until you can get this to work before ever trying to fly.
 

mincher

New member
Hi PsyBorg.

Thanks for the fire hose of information. Thanks to your write up we're pretty close.

I have all of the sticks centered at 1500 +/- a count or two with min and max very near the 1000 and 2000 endpoints.

I assigned one of the switches on the 9xd to be the ARM and that appears to function.

The problem I have is that when I ARM, the motors spin even though the throttle is all the way in the down position. This corresponds to a value of around 987 when looking at betaflight. The min stick, center stick, and max stick values are what they appeared to default to of 1100, 1500, and 1900.

I did check each of the motors without props and got minimum values of 1018, 1016, 1016, 1016 for constant rotation (not stuttering).

What did I fail to read or do?

Huge thanks for getting us this far.

-Dick
 

ElectriSean

Eternal Student
Mentor
By default the motors spin at min_throttle when armed. This can be changed by enabling MOTOR_STOP on the configuration tab, but be aware that if you do drop the throttle to zero when flying, you lose all control. Not a huge deal if you're just putting around, but once you get into more advanced flying, you will want that control as many moves require zero throttle.
 

mincher

New member
Thanks. It makes sense to keep the blades turning when armed.

I'm seeing a few settings here. In ESC/Motor features I have:
MOTOR_STOP (which sounds like it should be off).
Disarm motors regardless of throttle value (which should be on since I'm using an AUX channel for ARM).
Motor Idle Throttle Value [percent]. Currently set to 4.5. Is this a value that makes sense?

Also, on the receiver page I see 'stick low' threshold (1100), stick center (1500) and stick high threshold (1900). Do these need to be changed? Do they apply to all channels?

It's not clear if the receiver page min needs to be changed to the value of 1018+10 or if that 4.5% for the ESC is the value that potentially needs changing. I"m guessing that everything is okay as long as that 4.5% throttle doesn't provide any lift.

Thanks again.
Dick
 

ElectriSean

Eternal Student
Mentor
The motor idle throttle percent should be as low as possible, while allowing the motors to all start and run without stuttering with props on. The default is probably fine, but can possibly be lowered. If you have your channel endpoints set up correctly in your transmitter, your thresholds can be set to 1005 and 1995, leave center at 1500.
 

PsyBorg

Wake up! Time to fly!
Hello Gents. Happy New Year!

Glad to see you are progressing. Sean is correct in what he has added. I will venture to say that since you talk of min throttle at 4.5 that you are dunning Dshot. I am not familiar with the Omnibus as I only have used the Femto on a quad this size. I assume once again that being a micro and only an F3 that it is only capable of the Dshot 300 protocol like the Femto. This is fine however I would be very wary of how much processor use is happening specially with running an osd and other things from this board. For this fact I run my Gremlin on the Multi shot protocol which is faster then the Dshot 300 protcol. Betaflight does monitor this and it is along the bottom of the gui as CPU load. If your settings are idling above 34% you are in that grey area for controlled and accurate flight.

Also I agree with Sean that you "Should" keep your min throttle as low as possible except on these tiny micros. The reason being is the props are so small and the motors run at super high KV low throttle settings like this will result in extremely poor low level and low speed control. For example...my motors will spin at 1028 base + 10 for prop weight adjustments to get min throttle of 1038 settings. Which works out fine for free flight ripping around out in the open when you are always moving forward at a good pace. For controlled slower and lower flights however it becomes problematic keeping the quad at a stable altitude specifically when you are in ground effect ( the point where the thrust coming off the blades is bouncing off the ground and getting back to the blades fighting the lift capabilities) with these micros. This is also at times problematic after a flip or a roll when you need more precise control to catch the quad without bouncing off the ground (Commonly referred to by Stefan as a "Butt Bomb") or having to get hard enough on the throttle that you do not stay at the same altitude.
Thus my min throttle so far has been raised to 1060. Your happy place will vary for this determined by the over all weight of your build so be aware of this when trying to do more controlled flights and not just cruising around normally.

The last flight I was able to do with mine outside on a semi breezy day I was able to run gates where the grass was tall enough to cover the bottom 1/3 of available space to fly thru them and was not having too much a problem. I will probably bump it up a bit more when the weather clears and I get back to flying.

My All up weight for this video was at 147 g.

 

mincher

New member
Thanks again to both of you. Yes, it is DSHOT300. It looks like the CPU load on betaflight is 7%. Does this vary? Seems pretty solid.

We did manage to at least raise it above the ground. It was unstable but we were close to the ground and did experience the "butt bombing" as described. It also seemed to drift; we did sit it level and run the accelerometer calibration. Being in silicon valley our yards aren't near as big as yours in the video so I didn't have much runway. We'll try taking it somewhere a bit more open. I did verify that the ARM switch is working so I don't feel too out of control.

I am still not clear where to set the minimum speed. Is the control the one for the ESC (the 4.5% I referenced) or does it plug in somewhere else? Weight is about 120gm with a 2S 550mAh battery.

Thank you,
Dick and Patrick
 

PsyBorg

Wake up! Time to fly!
TY Bricks.

I am working on adding more stuff to cover other options and maybe make a printable check off list to use so people who build can keep that on hand and mark off each step so they don't lose track. I was thinking about doing a video as well but cant afford to be building a new quad probably until end of summer at the earliest if I wanna try and get to Flite Fest East 2018.

@Mincher.

I maidened mine in my living room hallway in this tiny apartment. They do drift a lot when untuned.



Sounds like you are on the right path so far. Remember this is not tuned yet so even with auto level you will still have to actually fly the quad. The tiny ones like a tiny whoop or a toy drone are usually set so high with I gains and D gains you actually have to fight the controls to get them to move. As for the throttle setup I am not sure as I use Multishot as its faster protocol so I have to use min throttle. I believe it is still changed there and the 4.5 number is the digital equivalent in throttle % It might even work by changing either. It is not even an option on my setup. either use like 1050 as min throttle to start or try maybe 5.5 to 6% just stand back when arming in case that is enough to actually lift the quad when the arm switch is activated.

Also being new I can guarantee you are heavy fingered and nervous and some of the fighting is you against yourself. I will post a screen shot of my current Gremlin settings. Pay no attention to the pids. Instead just use the rates and super rates I have as well as the Horizon and angle limit and sensitivity settings further down the page. Do NOT use angle mode at all and only use Horizon mode or acro mode with these settings. Angle mode is useless and to cumbersome.

You will find the quad has settled down into a much more gentle flyer if you are soft on the sticks. Keep in mind if you go all the way to the ends it will do several flips a second still and the controls get much faster the further out you go.

Grempid112617.jpg
 
Last edited: