Repository navigation
Motors
Electrical machine that converts electrical energy into mechanical energy.Main mode of Actuation in robotics.Rotation of motors are controlled to make adequate thrust. Interaction between the motor's magnetic field and winding currents to generate force in the form of rotation.

Different types of motors include DC, BLDC , Stepper etc.

Output Characteristics of Interest - Angular Velocity ,Torque represented by kv and kt.
kv is a motor constant. It tells you how the generated back-emf in the motor relates to motor speed.
E(back emf)= kv*w ( w is the angular velocity)
But it doesn’t tell you how powerful the motor is or how much current it can handle or how efficient the motor is.
You can have a large motor and a small motor with the same Kv constant. The large motor will be more powerful than the small power. So there is no way to use Kv to tell you how powerful your motor is.
However, Kv is related to another important motor constant – Kt, the torque constant. Brushless Torque Constant, Kt
The motor torque constant for brushed DC motors and brushless motors tells you how current relates to torque.
T=Kt*I ( T is the torque, I is the current through motor )
Kt has units of Newton-meters per Amp.
K_t*K_v=1
Brushless DC motor - But it is AC in every sense. Just like any other electric motor, a BLDC motor also has a stator and a rotor. Permanent magnets are mounted on the rotor of a BLDC motor, and stator is wound with specific number of poles. This is the basic constructional difference between a brushless motor and a typical dc motor.
There can be two types of BLDC motor on the basis of construction : (i) inner rotor design & (ii) outer rotor design.
For UAVs we are using outrunners.
● 3 Phase input
● Closed loop Feedback
○ can be though 3rd wire , hall effect etc
● Commutation is entire electronic (Done by a ESC).As a result no physical contact between Rotor and Stator unlike DC Motors.
● Parameters of interest ○ KV = rpm required to create a back emf of 1V (no load) ○ Stator Dimension = Dimensions of the stator.
-
Power to weight ratio.
-
Efficiency
-
Response time
-
Longer life
-
Controllability
Stator windings of a BLDC motor are connected to a control circuit (an integrated switching circuit). The control circuit energizes proper winding at proper time, in a pattern which rotates around the stator. The rotor magnet tries to align with the energized electromagnet of the stator, and as soon as it aligns, the next electromagnet is energized. Thus the rotor keeps running.

WHY DO WE NEED AN FC?
Usually, when it comes to controlling a model boat or plane, the pilot has absolute, precise control over the motor. A nudge of the throttle translates to a proportional increase in RPM.
The distinction with multi-rotors is that no human is capable of controlling the rotational speeds of three or more motors simultaneously with enough precision to balance a craft in the air. This is where flight controllers come into play.
The flight controller (a.k.a FC) is the brain of the aircraft. It’s a circuit board with a range of sensors that detect movement of the drone, as well as user commands.
**FUNCTIONS OFfollower=open('erclean.txt','r') following=open('ingclean.txt','r') er_list=follower.readlines() ing_list=following.readlines()
b=len(er_list) a=len(ing_list)
notfollowback=[] for i in range(0,a): c=0; for j in range(0,b): if(er_list[j]==ing_list[i]): c=1; if(c==0): notfollowback.append(ing_list[i]); print(notfollowback) len(notfollowback) AN FC**
Its function is to direct the RPM of each motor in response to input. A command from the pilot for the multi-rotor to move forward is fed into the flight controller, which determines how to manipulate the motors accordingly. Most flight controllers employ basic sensors such as Gyro (Gyroscopes) and Acc (Accelerometer) to supplement their calculations. Some FC include more advanced sensors such as Barometer (barometric pressure sensors) and magnetometer (compass).
The FC is also a hub for other peripherals, such as GPS, LED, LIDAR,Sonar sensor etc.
The backbone of a FPV Drone Flight Controller is the PID control loop in the software used to maintain quadcopter stability during flight. PID stands for ‘proportional, integral and derivative’ which are calculus terms related to the magnitude, area, and gradient of a curve respectively. Tuning these three P, I, and D gains properly drastically increases the stability and responsiveness of a craft.
FIRMWARE
Firmware is a software program permanently etched into a hardware device such as a keyboards, hard drive, BIOS, or video cards. It is programmed to give permanent instructions to communicate with other devices and perform functions like basic input/output tasks. Firmware is typically stored in the flash ROM (read only memory) of a hardware device. It can be erased and rewritten.
Two popular choices for firmware for an FC are ArduPilot and PX4(for MAVLINK protocol).
The key differentiation is with the software license. PX4 uses BSD while ArduPilot uses GPL. This makes PX4 more attractive for commercial use since you dont need to make your modifications open source. With ardupilot, any changes need to be shared as open source.
The direction in which the rotors move is crucial for the copter’s stability. The direction
of rotation of individual rotors is accomplished by how it is wired to the ESC. Even though
they rotate in opposite directions,the blades are positioned such that all 4 rotors are designed
to generate lift.
How does a Quadcopter remain stationery whilst midair? Its obvious that when the rotors constantly and symmetrically push down the air the copter remains at a constant height. But how does it manage to maintain its position without spinning, or tilting? This is where the direction of rotation of rotors step in. A rotating rotor has angular momentum of its own. Since the copter as a whole is in equilibrium, the remaining copter must rotate in the opposite direction to balance the spinning effect. If all the 4 rotors were spinning in the same direction, the copter, though stationary; would be spinning in the opposite direction.
- Roll: Roll is like the sideways rocking of a boat in disturbed water. It can be achieved by increasing the speeds by equal amount of the 2 rightside rotors(refer Fig 1) for a leftward roll and the other 2 for a rightward roll.
- Pitch: Pitch is similar to the up and down rocking of a boat encountering turbulence. It can be achieved by equally increasing speeds of the 2 frontside rotors for a pitch up; and equally increasing speed of rearside rotors for a pitch down.(refer Fig 1)
- Yaw: Yawing motion does not involve tilting the drone. It is turning the drone in the same plane, as if we are moving our head sideways to look around. To achieve a CW roll, the speed of the 2 opposite anticlockwise spinning rotors should be increased, and vie-versa.