dc motors tutorial-1/3: continuous, h-bridge, gear
Home » Blog » dc motors tutorial-1/3: continuous, h-bridge, gear

dc motors tutorial-1/3: continuous, h-bridge, gear

Views: 0     Author: Site Editor     Publish Time: 2020-10-29      Origin: Site

Inquire

facebook sharing button
twitter sharing button
line sharing button
wechat sharing button
linkedin sharing button
pinterest sharing button
whatsapp sharing button
kakao sharing button
snapchat sharing button
telegram sharing button
sharethis sharing button

DC motors are everywhere.
They convert the electrical/magnetic energy generated by wires carrying current in the magnetic field into motion and appear in various electrical appliances and applications, E. G. g.
, They exist in small fans, ceiling fans, air purifiers, welding smoke traps, Square aircraft, small helicopters and other drones, manual
Hand-held rotary tools, round saws, drill bits, lathes, Sanders, cars, robots (
They can rotate tires or move robot arms, etc. )
Aquarium air pumps, manufacturer projects and many other areas.
The most popular motor usually has a circular shaft, or \"d \"-shaped (i. e.
, Flat on one side)
Flat on both sides, or gear (i. e.
, Make the gear cut directly into the shaft or install it on the shaft).
For examples of these popular axis styles, see photos.
Although the motor can run from DC, AC, in the case of running a General Motors from DC and AC, this tutorial only discusses the DC motor in detail.
Current and magnetic go hand in handin-
Hand, because it is impossible without another.
As can be seen from the photo, the current through the wire moves the compass needle, which is because the current through the wire creates a magnetic field around the wire.
Danish physicist Hans Christian Oster discovered this connection between electricity and magnetism in the year 00 s. [
Some interesting but unimportant information: \"O\" in the name shown here can be used in a capital Danish O (i. e. , Ø)
Sometimes people think of his name as ø rsted].
The magnetic properties generated by the current flowing through a wire are weak.
If this wire is wound in the online circle, the magnetic field will become stronger.
If this coil is wound around the ferrite body core, its magnetic field will become stronger.
If we recall the attraction to pole magnets and the abolition of similar poles, the theory of DC motors is not too difficult to understand.
The working principle of the DC Motor is to make the current flow through the poles of the rotor, thus creating a magnetic field, which is affected by another magnetic field that attracts the rotor magnetic field.
Interestingly, the opposite is true.
That is, when the motor rotates, the interaction of the magnetic field produces voltage.
This can be seen in the video above
Turn the voltage of the stepping motor and light the LED, I. e.
, Where the motor is used as a generator.
In this tutorial we will discuss several types of DC motors: continuous DC motor, gear motor, DC servo motor, Coreless DC motor, vibration motor and DC stepping motor, although there are many other types of motors, these are probably the most popular for Arduino users.
The motor is a device that can transmit motion. e.
Take action on our project
You can see two of my previous instructions: \"personal, portable, lightweight, air conditioning: a cheap and effective DIY project\", \"making hypnotized disks using Arduino and small DC motors \".
They provide examples of DC motors used in Arduino projects.
Some other Arduino projects using motors have BlackStar Vvek\'s \"Arduino-based humanoid robot using servo motors\", link2-thepast\'s \"Arduino K\'Nex Motors\", and so on.
In fact, many instructions for using Arduino and one or more motors can be found.
Fortunately, for the DC motor used by the manufacturer, we don\'t need to care too much about the voltage (
While we need to make sure the motor works under our existing voltage)or current (
Although we need to make sure that we have a switch to handle the current of the motor, since the current of the motor is usually more than the current availableg.
, From Arduino digital or analog pins).
Our main focus on the motor is speed and torque.
The speed of the motor is measured, the difference is that when we measure the speed of the car at an hourly mile or an hourly kilometer, the speed of rotation per minute (RPM)
Or radian/secondg.
, 3,000 RPM or 450 rad/second.
Note that this is just two examples of motor speed.
They do not mean that 3,000 RPM equals 450 rad/sec; it is not.
Fortunately, it\'s easy to hide from RPM to radian/sec or degrees/SEC or the opposite.
The speed is indicated by the Greek letter omega.
Sir Newton\'s second law of motion is that the force is equal to the mass multiplied by the acceleration, and the force and acceleration are in the direction, although the mass is not in the direction.
Torque is \"twisted/turned power \".
Newton is often used for force (N)
When we multiply the force by the length, we get the torque. g. , Newton-meters (N-m), Newton-centimeters (N-cm), or ounce-inches (oz-in).
In the motor, the torque is always tangent to the circle centered on the shaft, I . E. e.
It is at right angles to the diameter.
The symbol indicating the torque is the Greek letter tau, τ in lower case, and the frequency of the English capital letter T is lower
The data sheet of the DC motor usually provides the speed, Radian, or degree/second.
Torque is usually presented in multiple forms in the data sheet (e. g.
Such as peak torque and gear torque (
More will be introduced later)
Rated torque, etc.
The DC motor data sheet is usually very comprehensive and other motor parameters are also provided.
It should be noted that the motor can have the same power capability, but the speed and torque are different because the speed can be changed to torque (
For more information on this, see gear motor below).
The quality and weight are different.
Although often exchanged in informal conversations.
For example, on the moon, the mass of a motor is the same as on Earth, but its weight will be different.
There are four main parts for many continuous brush DC motors. The rotor (
Rotating part)or armature (
In engineering, the winding is an integral part of the Assembly of the main current coil that turns/turns and keeps generating a magnetic field)
Here, the rotor is the same as the stator. e.
They are all rotating parts of the center.
As the name implies, the stator is static, which provides a magnetic field around the rotor (
If the stator is made of a permanent magnet, it is usually divided into two parts).
If so, the stator magnet is the field magnet.
Magnetic field magnets are reliable because the magnetic fields remain at a constant level, although their magnetic fields may decrease over time.
Permanent magnets were found in many Brush Motors.
If the stator is made of a magnet, the coil used to produce such a magnetic field is called a field winding or field coil.
The remaining two parts of the typical Brush Motor are The Changer and the brush/contact.
A few decades ago, the DC motor used the actual copper \"brush\" that was supported by the spring and pressed on the converter to transfer the current to the coil and keep the motor turning.
Today, the contacts of the DC motor \"brush\" to the changer, but the real brush is not common.
Although actual brushes are not common, these devices are still called brushed motors.
Brush Motors are cheap and usually have a longer service life than the equipment they contain.
However, as mentioned earlier, the brushless motor can also be used today, and sparks may be generated as the brush/Contact wears off, and the motor appears to be on the rise.
As mentioned earlier, the manufacturing cost of the Brush Motor is low and is usually used for the manufacturer\'s project.
However, it is important to know whether their rotors rotate in the bushing or ball bearing, because the bushing has a shorter working life.
There will be more about brushless motors later in this tutorial.
In a simple DC motor, the winding is connected to the DC power supply to generate a magnetic field when the current flows.
However, when the winding moves to be orthogonal to the stator,e.
, At a right angle to the stator magnetic field, there is almost no torque.
The momentum of the rotor usually pushes it to continue to rotate.
In order to overcome this \"defect\", a second dynamic circle at right angles to the first is added, so that a part of the dynamic circle is always exposed to higher magnetic torque, I . E. e.
, When the rotor is in the strong part of the stator magnetic field, the receiving power.
In most working DC motors (
See attached photos)
There are several coils that offset each other.
Generally speaking, the more winding the coil, the higher the resistance, the greater the torque, but the slower the speed.
These coils ensure that the motor rotates smoothly and always generate high torque at all points of rotation.
The rotor is connected to the converter, which is a component that allows the rotor coil to rotate continuously as needed to change the polarity.
The diverter is usually just a simple cylinder with an insulation gap between contacts, allowing the \"brush\" conductive element to be connected in turn to the DC power supply (
See attached photos).
That is, it provides a simple switch to change the DC input.
The converter is connected to the DC power supply through the contact with the contact \"brush\" on the changer.
Many small DC motors use permanent magnet stator, an example can be seen in the attached photo.
In other small DC motors and many large DC motors, the stator is magnetized by the same power supply as the rotor.
This can happen in one of two ways: parallel (
Production of shunt motor)
Or continuous production of series motors.
The stator can be connected in series or in parallel with the DC power supply to the stator/rotor.
There is a space between the rotor and the stator so that the rotor can be turned easily.
This space is called the \"air gap\" between the two \".
Most motors are rotating, but there are Motors where the rotational motion is converted to linear motion.
These devices are called \"linear motors\" or \"linear actuators (
Although the actuator may get energy from sources other than DC)\".
Most of the motors used in the manufacturer\'s project are under-powered (FHP)
Because they have less than 1 horsepower.
See a picture of the disassembled small continuous DC motor here.
The two permanent magnets that make up the stator, rotor/stator and coil can easily be seen in additional photos of the motor.
Continuous DC motors typically require a better current than the maximum 40ma, 20ma provided using analog or digital Arduino pins.
This limitation is not a problem when using LED, but a problem when using a DC motor.
To overcome this limitation, 2N2222 transistors were used here, which cost less than $0. 20 each.
They work as switches, and in the project presented here, 2N2222 can easily turn on and off the required motor current.
The data table of this transistor can be in e. g.
, The data sheet notes that the maximum voltage between the emitter and the base should not exceed 6.
So be sure to keep your voltage below this maximum, otherwise you have the risk of damaging the transistor.
The attached picture is lower price in 2N2222-
92 packaging, not the original metal18 package.
In this configuration, 2N2222/2N2222A is also called P2N2222 or pn222222.
It is important to check the data sheet for a specific version of this transistor you are using to ensure maximum acceptable voltage and current from base to emitter, collector to emitter, no more.
Another option is the MOSFET.
We can also use mechanical devices such as relays, or if you don\'t need to drive a simple switch from the Arduino.
If you need to deal with more power then the 2N2222 can dissipate safely and the TIP120 transistor that Darlington complements will work.
It can handle temperatures up to 5A if properly heated.
For more amps, a-220 packaged N-
RFP30N06LE Channel (
P30NO6LE, P30N06)
When the drain flange of the MOSFET is properly connected to the metal radiator, the MOSFET can handle currents above 30 amps. This N-
The channel MOSFET can be driven from Arduino and is useful for large DC motors.
The higher current flows between the collector and transmitter pins of the 2n2222 and is controlled by the base and transmitter pins.
For this pnp transistor, when the base pin is set to turn on the transistor, as in this project, the transistor switch allows the current flowing between the collector and emitter pins of the 2N2222 to be greater than the flow between its base and emitter.
A 1N4001 diode is placed on the two pins of the motor, and the line on the diode is facing the positive voltage.
It is placed in the opposite direction of the normal current, so there is usually no current through it.
1N4001 is used as an anti-excitation diode to provide a path for the energy generated by the motor crash magnetic field when the power is off.
If you do not know the position of the diode, it is difficult to place it incorrectly, as if configuring it like this will divert the current to the motor and the motor will not rotate.
While this may only happen in a few microseconds, it can produce a fairly high voltage over a voltage range of 100 volts, enough to damage the transistor.
The way all DC motors work is basically similar.
So when using them with Arduino, transistor, BJP or MOSFET or relay etc.
, Need a switch that can handle the extra current required by the motor, and may be the user-
Anti-excitation diodes are added.
Fortunately, the 5 v pin of the Arduino can be supplied from the USB for about cucma, and if the bucket Jack is used, more can be provided, possibly up to cucma.
The 5 v pin and ground are used to power the continuous motor used in the next sketch.
In the early part of the sketch cycle function, the continuous DC motor is turned on for 5 seconds (
5000 MS).
A very high signal. e.
, 5 v, sent to the motor. [
The motor used here is smaller than the current provided by the Arduino 5 v power supply.
However, if you are using a larger motor current, you will need a power supply separate from the power available on the Arduino. ]
After 5 Seconds of motor operation, gradually slow down to full stop using digital pin 6, which can handle pulse width modulation (PWM)signals.
Here, the motor turns in one direction.
Use the PWM signal starting from 255 to slow down the speed of the motor and decrease in increments of 3 until it reaches 0.
The use of PWM enables us to simulate the voltage between 0 and 5 v.
At some point the analog voltage to the motor is too low to turn the motore.
, PWM duty cycle is too low to activate the motor.
For this example, the approximate point is when the duty cycle reaches 30.
At this point in the sketch, the LED is turned off as the motor is not rotated.
A propeller is attached here, not a twisted wire, because it allows us to easily see its action when balancing the motor\'s rotation, because it provides a better motor balance than an asymmetrical wire.
However, if you do not have a propeller, the twisted wire will produce the relevant results.
However, if you have only one wire that cannot be balanced on both sides of the shaft, you should probably read the second part of this tutorial, which contains the steps of the vibrating motor, the unbalanced load on the motor may cause the motor to vibrate. A red LED (
Visible in video)
With the speed of the motor, it is turned on and faded to full shut down.
This is done in 30 lines of code and can be seen here.
To view the sketch completely in writing, download the text file. ----------Sketch----------
/Run the motor at full speed and then continuously reduce the speed of the motor.
/Fade the LED according to the speed of the motor = 6;
Int led pin = 10;
Int delay2 = 5000;
Int delay3 = 50; void setup(){pinMode(
Output); pinMode(ledPin, OUTPUT); }void loop(){
/Digital write for delay2/1000 seconds (ledPin, HIGH); digitalWrite(
MotorInputPin, high); delay(delay2);
/Continuous deceleration motor (int i = 255; i >= 1; i = i -2){
analogWrite(
I);
analogWrite(ledPin, i);
/Delay between motor speed delay changes 3/1000 seconds (delay3); }
/Pause delay 2/1000 seconds (delay2); }
If the H-bridge is not mentioned, the introduction of the DC motor will not be complete.
The theory behind bridge H is simple and easy to understand.
It obtains its name from the configuration of its main components: 4 switching elements and a DC motor, which can be in capital letters \"h \"(
See above).
If S1 and S4 are off while S2 and S3 remain on, the current flows one-way from the motor to the ground, then its operation is simple.
If S2 and S3 are turned off when S1 and S4 are turned on, the current flows from the motor to the ground in the opposite direction. (
See attached photos).
The illustration here shows the switching element that acts as a constant on Switch. e.
Mechanical equipment.
Note that these switches need to be turned off in a specific way.
For example, if the switch is turned off at the same time to S1 and S3 or S2 and S4, this will provide a short circuit path between the positive voltage and the ground.
Turning off S1 and S2 does not have any effect when S3 and S4 remain on, because S1 and S2 are connected to the same positive voltage and therefore there is no current flow.
If we turn off S3 and S4 while keeping S1 and S2 open, the situation is similar, in which case both S3 and S4 are connected to the ground.
If the current is not turned off through the motor, such as the switch S1 and S2, the S3 and S4 are turned on and vice versa, the motor will stop.
The switching element can also be a relay, another mechanical element, or a solid state device, such as a bipolar junction transistor (BJTs)
, Or metal oxide semiconductor field effect transistor (MOSFETs).
In most modern H bridges, the switching element is a solid-state device, usually a mosfet.
Compared to the BJT, the advantage of the hexets is that they can switch the current to a large load, while only a small amount of current is needed to turn it on.
In practice, the diode is placed on each switching element, and the line on the diode is facing the positive voltage.
This is done when e. g.
After the motor is running, all switches are turned on, and the current generated by the motor has a path to go due to the magnetic field crash.
However, discrete components are not used, E. G. g.
Manufacturers of switches, relays, BJTs, mosfet, H bridging boards use integrated circuits (ICs)
, For example, a board based on the L298 IC shown above.
If you use the H-bridge module with your own Arduino sketch, it may be a good idea to turn on all switching elements before changing the direction, as this will ensure that no short circuit is generated even temporarily.
There are H bridges for power inverters, robots, motor controllers, etc.
They are often used to drive stepping motors. Most continuous DC motors typically operate at a speed of 1,000 rpm (RPMs).
Gear motors are usually used to reduce RPMs (speeds)
Less than 1,000 and it is easy to find the gear motor with a speed of less than 100.
As the name implies, they use the gear combination to slow down the gear train to get this slow down.
Generally speaking, the more you reduce, the slower you will be.
The speed, shape and size of the DC gear motor are varied.
It\'s hard for them not to enjoy.
A good example of the need for a gear motor is a watch, such as an analog watch.
The motor in the watch needs to provide rotation at low speed.
For example, the second one
The hand is rotated only at 1 RPM.
Another example is the tire in the robot car, which must also rotate at a relatively slow speed.
While the main motor in the gear motor can rotate at a speed of more than 1,000 RPM, the deceleration gear allows the rotation of the output to be much slower.
The gear motor can provide significant torque at low rpm.
In fact, the torque increases as the speed slows down.
Generally speaking, the higher the current, the higher the torque.
There are Gear Motors in cars, clocks, washing machines, electric drills, kitchen mixers and industrial equipment such as cranes, jacks, winches, conveyor belts.
They can change direction.
Just swap the lead to the motor)
Rotate at different speeds and stop quickly.
They are often found in robots. g. , robot cars.
Warning: efforts to run the motor above or below the voltage range may damage the motor.
The voltage may be too low if the motor does not turn, and if the touch feels hot, the voltage may be too high.
Gear Motors can usually be identified as their axis of rotation is usually not aligned with the center of the main motor, providing space for the gears, but not always (See photos).
As the voltage increases, the speed of the motor usually increases (
See attached video).
One of the videos shown here is the voltage range from 2-17 volts.
The higher the voltage, the faster the gear motor rotates.
The voltage goes from low to high first and then back to low.
The second video shows the low speed that may occur using a gear motor even if there are some minor changes in the input voltage.
The last video is that the 12 v gear motor runs in less than 12 v, so it runs slightly slower than it does when it\'s full 12 v.
If you are at this point, congratulate you.
You should now have a basic understanding of some of the key elements of the DC motor covered in this section.
I hope you find the first part of this manual interesting and valuable.
If you like this part of the tutorial, you may want to continue by reading the second part, which may be obvious, although this tutorial is divided into three parts, just \"scratched the surface of the DC Motor \".
Each motor covered here can have more of its own
Part of the tutorial, or maybe the whole textbook.
If you have any comments, suggestions or questions about this part of the tutorial, please add your comments below.
If you have any ideas or questions related to DC motors that are not covered in this tutorial or have any suggestions on how I can improve this tutorial or other parts of the tutorial, I am glad to hear from you.
You can contact me at transiintbox @ gmail. com. (
Please replace the second \"I\" with \"e\" to contact me. Thank you. )

HOPRIO group a professional manufacturer of controller and motors, was established in 2000. Group headquarters in Changzhou City, Jiangsu Province.

Quick Links

Contact Us

WhatsApp: +8618921090987 
Tel: +86-18921090987 
Add: No.19 Mahang South Road, Wujin High-tech District, Changzhou City, Jiangsu Province, China 213167
Leave a Message
CONTACT US
Copyright © 2024 ChangZhou Hoprio E-Commerce Co., Ltd. All Rights Reserved. Sitemap | Privacy Policy