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
#1
I'm trying to build a quadcopter using the Arduino Nano. I have been using the attached schematic for guidance (published online). 

It depicts the signal wire of each of 4 ESCs connected to pins D7-10, and the various channels of the receiver connected to other digital pins. So it must be the case that in the code of the individual who made this schematic that the signal to the ESC is fed from the flight controller alone? In other words, the ESCs are not directly connected to the receiver?

Also how is the receiver powered? By a single BEC (5v) from any one of the ESCs? To where on the receiver is this plugged in?

And how is the Nano powered? Also by BEC?

I'd really appreciate everyone's thoughts, Thanks for the help`


Attached Files Thumbnail(s)
   
Reply
Login to remove this ad | Register Here
#2
ESCs should be connected to the flight controller (in your case the Nano) - this is the unit that is doing all the flight calculations.

Receiver should be powered by 5v, doesn't matter where it comes from - can be fed from the flight controller or ESC.

Nano needs 5v. The same case - doesn't matter where it comes from, can be the ESCs BEC or a dedicated 5v regulator.

Please tell us why are you building a quad based on the Nano? You have so many options on flight controllers these days, they will do a better job anyway. Is it the challenge?
Find me on Youtube and Instagram. I currently fly: DRC Aura, NOX5R, Minimalist 112 and drive a scrap RC car
[-] The following 2 users Like KonradS's post:
  • pgengineer, sloscotty
Reply
#3
(07-May-2017, 08:22 PM)KonradS Wrote: ESCs should be connected to the flight controller (in your case the Nano) - this is the unit that is doing all the flight calculations.

Receiver should be powered by 5v, doesn't matter where it comes from - can be fed from the flight controller or ESC.

Nano needs 5v. The same case - doesn't matter where it comes from, can be the ESCs BEC or a dedicated 5v regulator.

Please tell us why are you building a quad based on the Nano? You have so many options on flight controllers these days, they will do a better job anyway. Is it the challenge?

KonradS, thanks so much for your help. That's precisely it..specifically trying to learn how to code the Arduino through this project. It's definitely been a challenge, but very fun. I've really become enamored with drones through this project, very cool things, so am really happy I chose building a drone as a vehicle to learn coding control systems and motor control.

To clarify, the ESCs have no direct connection to the receiver? They are just calibrated via the receiver to the transmitter (to set the throttle max through min), and then otherwise just connected to the nano digital pins as depicted in the schematic? These connections are between the signal pins of the receiver channels and the nano, correct?
I assume the receiver should be fed power from one of the BECs of the ESCs through the BAT 'channel' of the receiver?

Whomever published this schematic also included his code..I've been going through it to understand..the wiring just has been somewhat unclear to me.

Thanks for your help
Reply
#4
For anyone considering helping with this, I found the source for this schematic.  It is posted in dropbox in a link from this video:


The video's creator built a distribution board to attach everything to, but doesn't give a schematic for that.  Although a distribution board is not absolutely necessary for this project, it would make things simpler if he had included that.  He also doesn't include enough instructions for someone without the technical electronics skills to build the quad.  I am guessing he assumes a certain level of expertise in his audience.
[-] The following 1 user Likes sloscotty's post:
  • pgengineer
Reply
#5
(07-May-2017, 08:59 PM)pgengineer Wrote: To clarify, the ESCs have no direct connection to the receiver? They are just calibrated via the receiver to the transmitter (to set the throttle max through min), and then otherwise just connected to the nano digital pins as depicted in the schematic? These connections are between the signal pins of the receiver channels and the nano, correct?
I assume the receiver should be fed power from one of the BECs of the ESCs through the BAT 'channel' of the receiver?

I'm not Konrad, but I can answer some of this.  You are correct about the ESCs signal wires having no direct connection to the receiver.  In a typical 1 motor setup (like for an RC airplane), the 3 pin connector from the ESC goes to the throttle channel.  This connector provides power and ground for the receiver (and servos) and a signal connection to control the ESC with the throttle channel.

So one way to power the receiver is to use one red and black wire from an esc and it can be connected to BAT or Throttle +/- (or any of the others for that matter, they are all connected internally).  The BAT connection is actually provided for RC plane flyers using fuel motors where a separate battery pack is used to power the receiver and servos.

One other major detail you will need to check (if you are not familiar with quads) is to verify motor rotation and proper propeller type (CW and CCW).  (Read up on it a little.)

EDIT: One more detail, the BECs on the ESCs supply +5 volts.
[-] The following 1 user Likes sloscotty's post:
  • pgengineer
Reply
#6
Thanks for your help sloscotty

So the white wire of the servo wire (BEC connector) should be removed when powering the receiver

Thanks for mentioning the directions of the motors and the types of propellers. I appreciate all the added details. Luckily, as an aerospace eng. I have some knowledge of flight dynamics so
Reply
#7
(07-May-2017, 09:32 PM)pgengineer Wrote: So the white wire of the servo wire (BEC connector) should be removed when powering the receiver

Yes - it will have to be connected into the correct aduino signal output pin.
Find me on Youtube and Instagram. I currently fly: DRC Aura, NOX5R, Minimalist 112 and drive a scrap RC car
[-] The following 1 user Likes KonradS's post:
  • pgengineer
Reply
#8
What do you mean signal output pin?

You mean the digital yes..according to how it is in the code? By the schematic meaning D7-10

For the 2 ESCs whose BECs I won't be using (1 will be used to power the nano, and the other of course receiver), I can just ignore the power wires (red and black), just connect the signal wire appropriately, correct?
Reply
#9
(07-May-2017, 09:32 PM)pgengineer Wrote: Thanks for your help sloscotty

So the white wire of the servo wire (BEC connector) should be removed when powering the receiver

Thanks for mentioning the directions of the motors and the types of propellers. I appreciate all the added details. Luckily, as an aerospace eng. I have some knowledge of flight dynamics so

If an ESC has a BEC (voltage regulator), the centre, red wire in the servo connector from the ESC carries the 5V generated by the regulator. The black wire is ground and the white wire is signal. Normally, the output of one regulator is used to power both the receiver and the flight controller.

In a multirotor, the control channels from your receiver are connected to the flight controller and the flight controller outputs a throttle level to each ESC via the ESC's signal input.

The reason it's done this way is that there are no control surfaces like a traditional fixed wing craft has. The flight controller translates pitch, roll and yaw into the appropriate changes in relative thrust between the motors and by observing the gyro can determine if more or less correction is needed to implement the commands coming from the receiver. Human beings can't accomplish this themselves, hence the need for a flight controller.
[-] The following 1 user Likes unseen's post:
  • pgengineer
Reply
#10
(07-May-2017, 09:58 PM)unseen Wrote: If an ESC has a BEC (voltage regulator), the centre, red wire in the servo connector from the ESC carries the 5V generated by the regulator. The black wire is ground and the white wire is signal. Normally, the output of one regulator is used to power both the receiver and the flight controller.

In a multirotor, the control channels from your receiver are connected to the flight controller and the flight controller outputs a throttle level to each ESC via the ESC's signal input.

The reason it's done this way is that there are no control surfaces like a traditional fixed wing craft has. The flight controller translates pitch, roll and yaw into the appropriate changes in relative thrust between the motors and by observing the gyro can determine if more or less correction is needed to implement the commands coming from the receiver. Human beings can't accomplish this themselves, hence the need for a flight controller.

Thanks unseen.  The receiver receives input from the transmitter joysticks, the inertial measurements inform the flight controller of where the drone is in space, and accordingly the flight controller sends the ESC the signal(s) necessary to react to the remote control input (joysticks) to change the drone's position as desired..naturally the rate of this feedback is much faster than we are
[-] The following 1 user Likes pgengineer's post:
  • unseen
Reply
#11
(07-May-2017, 08:59 PM)pgengineer Wrote: They are just calibrated via the receiver to the transmitter (to set the throttle max through min), and then otherwise just connected to the nano digital pins as depicted in the schematic?

About calibration...

The ESCs must be calibrated to the signal that will control them. As the receiver will not be what is controlling the ESCs, calibrating them to the receiver is incorrect. What you should do is calibrate them using the Arduino's output.

There is no guarantee that both your receiver and the Arduino generate a pulse that is exactly 1000 microseconds long at minimum throttle and exactly 2000 microseconds long at maximum throttle. Neither is it certain that even if the signal was 100% accurate that each ESC would observe the pulse length with the same accuracy. Therefore, you should always calibrate the ESCs using the device that will be generating the PWM control signal.
[-] The following 1 user Likes unseen's post:
  • pgengineer
Reply
#12
(07-May-2017, 10:12 PM)unseen Wrote: About calibration...

The ESCs must be calibrated to the signal that will control them. As the receiver will not be what is controlling the ESCs, calibrating them to the receiver is incorrect. What you should do is calibrate them using the Arduino's output.

There is no guarantee that both your receiver and the Arduino generate a pulse that is exactly 1000 microseconds long at minimum throttle and exactly 2000 microseconds long at maximum throttle. Neither is it certain that even if the signal was 100% accurate that each ESC would observe the pulse length with the same accuracy. Therefore, you should always calibrate the ESCs using the device that will be generating the PWM control signal.

I see. What I was thinking was the transmitter..so when you push all the way up on the elevator joystick for instance, the 4 motors all rotate at full speed (100% duty cycle). What you're saying makes a lot of sense..the Arduino will be generating the signal and thus the ESCs should be calibrated to it. How precisely is this done/what does it entail?
Reply
#13
(07-May-2017, 09:53 PM)pgengineer Wrote: What do you mean signal output pin?

You mean the digital yes..according to how it is in the code? By the schematic meaning D7-10

For the 2 ESCs whose BECs I won't be using (1 will be used to power the nano, and the other of course receiver), I can just ignore the power wires (red and black), just connect the signal wire appropriately, correct?

Could you also clarify this from above?
Reply
#14
(07-May-2017, 10:03 PM)pgengineer Wrote: Thanks unseen.  The receiver receives input from the transmitter joysticks, the inertial measurements inform the flight controller of where the drone is in space, and accordingly the flight controller sends the ESC the signal(s) necessary to react to the remote control input (joysticks) to change the drone's position as desired..naturally the rate of this feedback is much faster than we are

Broadly speaking, yes.

There are degrees of inertial measurement used in a multirotor though.

The simplest control uses only the data from the gyros and they only measure the rate of angular rotation for each axis. The flight controller has absolutely no idea of the craft's attitude with respect to the Earth's gravity or its overall position in space, just how it is moving in terms of angular rotation. This way of flying a multirotor is called 'rate mode' or 'acro mode'.

If you add accelerometer data into the mix and integrate acceleration in each axis, you can then have a measure of not only angular rotation but also attitude with respect to the Earth's gravitation. This can then be used to automatically return the craft to level flight when the pitch and roll inputs from the controller are at neutral. This is called 'level mode' or 'angle mode'.

More advanced systems will use an extended Kalman filter or other similar algorithm that combines the data from more sensors like a barometer, GPS receiver, magnetometer etc, to fuse all of these various sensors into a complete picture of attitude, speed, heading and position. Any flight mode is possible with this kind of detail and craft like larger photography or mapping drones use this kind of system to achieve a large degree of autonomy.
[-] The following 1 user Likes unseen's post:
  • pgengineer
Reply
#15
(07-May-2017, 10:18 PM)pgengineer Wrote: I see. What I was thinking was the transmitter..so when you push all the way up on the elevator joystick for instance, the 4 motors all rotate at full speed (100% duty cycle). What you're saying makes a lot of sense..the Arduino will be generating the signal and thus the ESCs should be calibrated to it. How precisely is this done/what does it entail?

(07-May-2017, 10:21 PM)pgengineer Wrote: Could you also clarify this from above?

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.
[-] The following 1 user Likes unseen's post:
  • pgengineer
Reply


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


Login to remove this ad | Register Here