Hello guest, if you read this it means you are not registered. Click here to register in a few simple steps, you will enjoy all features of our Forum.
This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Confusing quadcopter schematic
#16
And yes, if you are not using the BEC output from an ESC, you don't need to connect the red wire. You should still connect the black wire as it functions as a signal ground.
[-] The following 1 user Likes unseen's post:
  • pgengineer
Reply
Login to remove this ad | Register Here
#17
(07-May-2017, 10:46 PM)unseen Wrote: When thinking about the control inputs to a multirotor, it's best to drop fixed wing terms like elevator, aileron and rudder and use the terms that relate directly to the multirotor's flight dynamics.

The elevator is pitch and is controlling rotation around the Y axis.
The aileron is roll and controls rotation around the X axis.
Finally rudder is yaw and controls rotation around the Z axis.

If you push the pitch joystick all the way forwards, all you are doing is commanding that the craft should rotate clockwise around the Y axis as quickly as possible.
This doesn't actually mean anything until you combine it with the throttle input from the controller.

Take the example of the craft being on the ground and level with the throttle at idle. Nothing is happening. If you leave pitch, roll and yaw at neutral and raise the throttle to 50% then the flight controller would command 50% throttle from each motor and the craft would begin to ascend vertically. If you then commanded full forward pitch and held that command, the flight controller would command the two rear motors to spin at 100% throttle and the two forward motors to spin at 0% throttle.

Very shortly thereafter, your craft will encounter the ground! Big Grin

So, the throttle channel controls how much power the operator wants the craft to use and the pitch, roll and yaw channels control how fast (within the current power budget) the craft should rotate around each axis and if the rotation should be clockwise or counter-clockwise.

Hopefully this explanation makes things a little clearer!

To calibrate your ESCs from the Arduino, you need to implement a way of manually instructing the Arduino to output full throttle and then zero throttle. To calibrate, you would first power up the Arduino only and command it to output full throttle on all four channels. You would then apply power to the ESCs which would interpret the long duration PWM signal as the instruction to begin calibration, note the current PWM signal length as meaning maximum throttle and beep appropriately. Then you tell the Arduno to output zero throttle and the ESCs will see the change in the pulse length and measure the minimum PWM signal length and beep appropriately when that is done to signify 'calibration complete'.

The connections to the Arduino are four PWM inputs from your radio which represent the positions of the throttle, pitch, roll and yaw joysticks. Your flight control program on the Arduino translates these inputs into four PWM outputs, one for each ESC, that set the power level for each motor to make the craft move as commanded.

Unseen, this is phenomenally clarifying. I really appreciate the detail you kindly are sharing with me. I'm still shaky on two things in particular.

Firstly, what do you mean when you say "command it [the Arduino] to output full throttle on all four channels." You mean with the ESCs off (no battery power)..send high signal (full duty cycle) to the appropriate 4 digital output pins of the Arduino (the pins to which the signal wires of the ESCs are connected)..then turn on the ESCs' power supply and wait for the beep (as described in the my ESCs' manual). I'd then immediately send the opposite signal (low, 0% duty cycle), and the ESC's would then have a sense of full throttle and minimum throttle, correct?
What relationship do the transmitter (joysticks) and receiver have to this? How do I relate the joystick movement to varied PWM signals to the respective motors? This is all done in the code I presume...the relationships between the motors that produces pitch, yaw, and roll respectively based on the movement of the transmitter joysticks?

The signal ground should be grounded where precisely?
[-] The following 1 user Likes pgengineer's post:
  • unseen
Reply
#18
(07-May-2017, 11:11 PM)pgengineer Wrote: Unseen, this is phenomenally clarifying. I really appreciate the detail you kindly are sharing with me. I'm still shaky on two things in particular.

Firstly, what do you mean when you say "command it [the Arduino] to output full throttle on all four channels." You mean with the ESCs off (no battery power)..send high signal (full duty cycle) to the appropriate 4 digital output pins of the Arduino (the pins to which the signal wires of the ESCs are connected)..then turn on the ESCs' power supply and wait for the beep (as described in the my ESCs' manual). I'd then immediately send the opposite signal (low, 0% duty cycle), and the ESC's would then have a sense of full throttle and minimum throttle, correct?

Exactly so!

When the program on each ESC starts up, it examines the incoming PWM signal. If the duty cycle is above a certain threshold and remains there for longer than a certain time, the ESC interprets this as the start of the calibration procedure.

(07-May-2017, 11:11 PM)pgengineer Wrote: What relationship do the transmitter (joysticks) and receiver have to this? How do I relate the joystick movement to varied PWM signals to the respective motors? This is all done in the code I presume...the relationships between the motors that produces pitch, yaw, and roll respectively based on the movement of the transmitter joysticks?

What you are describing is exactly what a component in the flight control program that is normally referred to as the mixer must accomplish. Given four motors arranged at the ends of an X with each pair of motors that are on the same arm rotating in the same direction, and one pair rotating clockwise while the other pair rotate counter-clockwise there are a number of ways that the mixer can vary the relative thrust outputs of the motors to cause movement around any of the three axes.

The radio and receiver serve to transfer the positions of the joysticks to the flight controller. The joystick positions represent the pilot's instructions to the flight controller. The flight controller uses the mixer to translate 'roll left at 10 degrees per second' into the differential throttle settings that will achieve that.

The craft is a system. The inputs to the system are the joysticks, the output from the system is instructions to the mixer and the gyros are the sensors that are used to sense the state of the system.

The main loop of the flight controller uses (generally) a PID control algorithm to generate an output to the mixer.
Each time the loop is run, the program evaluates the difference between the desired and actual state of the system. The difference is the error that the PID controller must correct and the P, I and D weights are used to generate the response to the error and ultimately the new settings for the mixer that are intended to reduce the magnitude of the error.

(07-May-2017, 11:11 PM)pgengineer Wrote: The signal ground should be grounded where precisely?

To any free ground pin on the Arduino.

As the ESCs are devices that switch large amounts of AC current, their main power and ground leads that are connected to the battery enjoy large amounts of noise from the switching of the output FETs and the inductive properties of the motors they are driving. Having a separate signal ground gives the ESC a better reference for the input signal than the nearby power ground.
[-] The following 1 user Likes unseen's post:
  • pgengineer
Reply
#19
This is precisely what I am trying to explore with this project. I'm an engineering student, and have used PID to tune a cruise control system in before in a lab, but never applied it in any sort of proprietary sense..I'm really interested in control systems and enjoyed my signals and systems class, so wanted to explore drones. At the same time, I'm looking to improve my programming skills. The schematic I originally posted here fortunately comes with source code that I'm reading through and trying to understand.

Is there any good control systems literature or some resources you would recommend I study?

Back to the practical, how do I tune the transmitter to the receiver, so that when I do lift joysticks high or low/left or right the appropriate signal is sent to the receiver, to the Arduino inputs subsequently, to be interpreted by the code and the motors signaled as intended? Is the 'binding' process sufficient to interface the two, the transmitter and receiver, or is some other process required?

Also, as the Arduino Nano only has two dedicated ground pins, it's more than ok to share the ground between all the ESCs and even the power supply of the Arduino itself, correct?

I really thank you for all your insights. I have been reading for awhile online, but it's always helpful to hash things out with someone else, and you have really taught me a lot.
[-] The following 1 user Likes pgengineer's post:
  • unseen
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Discussion Flying in Cold weather, Quadcopter drifts beastmode92 6 1,712 22-Jan-2017, 02:12 AM
Last Post: Drone0fPrey
  Discussion Ways to suppress voltage spikes and noise in tight quadcopter builds OverDischarged 8 5,407 05-Jan-2017, 12:22 AM
Last Post: PhoenixFord
  Underwater Quadcopter twiereng 1 1,046 29-Nov-2016, 03:48 PM
Last Post: illushinz
  Discussion How to properly file carbon fibre for quadcopter frame parts SonicCopter 6 7,833 02-Oct-2016, 12:38 PM
Last Post: oyvinla
  Discussion Taking LiPo and Quadcopter on Air Plane Oscar 2 1,079 15-Jul-2016, 06:53 PM
Last Post: NimhBot


Login to remove this ad | Register Here