# DC otor & H Bridge 1.

## Presentation on theme: "DC otor & H Bridge 1."— Presentation transcript:

DC otor & H Bridge 1

Outline DC Motor H Bridge Principle Speed Control Control Power 2
Figure 1. Real DC Motors 2

Principle Recap 3 Figure 2. Lorentz Force Direction
Figure 2. Lorentz Force Direction Figure 3. Loop Current Diagram 3

Rotational Speed + - + - Assume it is a 6V motor 6V 6V 4
Figure 5. Macro View + - 6V Figure 4. Voltage and Full Speed Rotation commons.wikimedia.org  4

Rotational Speed - + - + Assume it is a 6V motor 6V 6V 5
Figure 5. Macro View - + 6V Figure 4. Reverse Voltage and Rotation commons.wikimedia.org  5

Rotational Speed - + - + Assume it is a 6V motor 4V 4V 6
Figure 5. Macro View - + 4V Figure 4. Small Voltage and Slow Rotation commons.wikimedia.org  6

Speed Control PWM % Duty Cycle ↓↓ % AVG Voltage % Speed 7
Figure 6. PWM Timing Diagram PWM % Duty Cycle ↓↓ % AVG Voltage % Speed 7

But… Drive? VCC: ~3.3V Current: ~10mA Backwards? 8
Table 1. Specification of DC Gear Motor 8

H Bridge 9 Figure 7. H Bridge Diagram
(http://en.wikipedia.org/wiki/H_bridge) Table 2. H Bridge Functions (http://en.wikipedia.org/wiki/H_bridge) 9

H Bridge Figure 7. An H Bridge Diagram Table 2. H Bridge Functions 10

H Bridge Figure 7. An H Bridge Diagram Table 2. H Bridge Functions 11

H Bridge Figure 7. An H Bridge Diagram Table 2. H Bridge Functions 12

H Bridge Figure 7. An H Bridge Diagram Table 2. H Bridge Functions 13

H Bridge Figure 7. An H Bridge Diagram Table 2. H Bridge Functions 14

H Bridge Figure 7. An H Bridge Diagram Table 2. H Bridge Functions 15

H Bridge Figure 7. An H Bridge Diagram Table 2. H Bridge Functions 16

H Bridge Figure 7. An H Bridge Diagram Table 2. H Bridge Functions 17

L298N Block Diagram Figure 8. L298N Block Diagram (L298N Datasheet) 18

L298N Block Diagram (Left Half)
Figure 9. L298N Block Diagram (Left Half) (L298N Datasheet) 19

Four Switches in H Bridge
Figure 9. L298N Block Diagram (Left Half) (L298N Datasheet) 20

Figure 7. H Bridge Diagram
H Bridge’s Shape Figure 7. H Bridge Diagram (http://en.wikipedia.org/wiki/H_bridge) Figure 9. L298N Block Diagram (Left Half) (L298N Datasheet) 21

Figure 7. H Bridge Diagram
Power Supply Figure 7. H Bridge Diagram (http://en.wikipedia.org/wiki/H_bridge) Figure 9. L298N Block Diagram (Left Half) (L298N Datasheet) 22

Figure 7. H Bridge Diagram
Logic Power Supply Figure 7. H Bridge Diagram (http://en.wikipedia.org/wiki/H_bridge) Figure 9. L298N Block Diagram (Left Half) (L298N Datasheet) 23

Figure 7. H Bridge Diagram
Inputs and Enable Figure 7. H Bridge Diagram (http://en.wikipedia.org/wiki/H_bridge) Figure 9. L298N Block Diagram (Left Half) (L298N Datasheet) 24

Figure 7. H Bridge Diagram
Outputs Figure 7. H Bridge Diagram (http://en.wikipedia.org/wiki/H_bridge) Figure 9. L298N Block Diagram (Left Half) (L298N Datasheet) 25

Table 2. H Bridge Functions
M S1 S3 1 S2 S4 1 Figure 9. L298N Block Diagram (Left Half) (L298N Datasheet) Table 2. H Bridge Functions (http://en.wikipedia.org/wiki/H_bridge) 26

Table 2. H Bridge Functions
M S1 S3 S2 S4 1 1 Figure 9. L298N Block Diagram (Left Half) (L298N Datasheet) Table 2. H Bridge Functions (http://en.wikipedia.org/wiki/H_bridge) 27

Table 2. H Bridge Functions
v M S1 S3 X S2 S4 X Figure 9. L298N Block Diagram (Left Half) (L298N Datasheet) Table 2. H Bridge Functions (http://en.wikipedia.org/wiki/H_bridge) 28

Table 2. H Bridge Functions
M S1 S3 S2 S4 1 Figure 9. L298N Block Diagram (Left Half) (L298N Datasheet) Table 2. H Bridge Functions (http://en.wikipedia.org/wiki/H_bridge) 29

Table 2. H Bridge Functions
M S1 S3 1 S2 S4 1 1 Figure 9. L298N Block Diagram (Left Half) (L298N Datasheet) Table 2. H Bridge Functions (http://en.wikipedia.org/wiki/H_bridge) 30

Table 2. H Bridge Functions
M S1 S3 S2 S4 Figure 9. L298N Block Diagram (Left Half) (L298N Datasheet) Table 2. H Bridge Functions (http://en.wikipedia.org/wiki/H_bridge) 31

Table 2. H Bridge Functions
M S1 S3 S2 S4 Figure 9. L298N Block Diagram (Left Half) (L298N Datasheet) Table 2. H Bridge Functions (http://en.wikipedia.org/wiki/H_bridge) 32

Table 2. H Bridge Functions
M S1 S3 S2 S4 Figure 9. L298N Block Diagram (Left Half) (L298N Datasheet) Table 2. H Bridge Functions (http://en.wikipedia.org/wiki/H_bridge) 33

An example 40V GND 34 Figure 10. 30mm DC Motor from Maxon
Figure mm DC Motor from Maxon Figure 11. SN Pin Connections (SN Datasheet) Figure 12. SmartFusion FPGA GND 34

What if we want to use a large-powered motor?
50V Figure mm DC motor from maxon Figure 13. L298N Pin Connections (L298N Datasheet) It will likely burn the H-bridge! 35

Voltage Constraint (L298N)
https://www.sparkfun.com/datasheets/Robotics/L298_H_Bridge.pdf Power Supply can’t be higher than DC motor Logic Supply Voltage can’t be lower than FPGA output Table 3. Voltage Constraint for L298N DC voltage cannot exceed H-bridge voltage constraint 36

Power Constraint (SN754410) Table 4. Voltage Constraint for SN754410 37

What if we want to use that large-power DC motor?
Build an H-bridge with 4 switches! 38

Which switch shall we use?
BJT (Bipolar Junction Transistor) Easier to build, use less circuitary Good for low current operation VS MOSFET (Metal–Oxide–Semiconductor Field-Effect Transistor) Good for high current operation When H-bridge Motor cannot meet your power requirement You don’t trust your integrated H-bridge You need to build an H-bridge on your own! Two options: BJT and MOSFET BJT: Bipolar Junction Transistor MOSFET: Metal–Oxide–Semiconductor Field-Effect Transistor this-h-brigde-is-working XrSeSVAb819HfhysOtYMdwDg3CTKXi6B Figure 14. H-bridge with BJT Figure 15. H-bridge with MOSFET 39

What is BJT? What is MOSFET? Don’t need to know
Ignore the mechanism (band diagram, Quantum Mechanics, Energy momentum diagram, semiconductor dopping) Ref Two diode. Two ways to connect them PNP – active low NPN – active high (Explain) Base, Collector, and Emitter. Small current can induce large current First why? BJT is resistive when on. It will generate heat, which will break them. [What is MOSFET?] Ignore the mechanism (even more complex than BJT) BJT with a shell NMOS – active high PMOS – active low (Explain) PMOS to Vdd, NMOS to Gnd Second why? It will reach saturation voltage, turn MOSFET into a big resistor, and consume large power and burn the gate. PNP – active low NPN – active high NMOS – active high PMOS – active low Choose voltage/current wisely on gate/base 40

How to use BJT? 41 C B E Figure 16. BJT Model
junction-transistor-beginner-tutorial/ this-h-brigde-is-working Figure 16. BJT Model Figure 17. H-bridge with BJT 41

How to use MOSFET? Connect PMOS to Vcc, NMOS to ground 42 PMOS NMOS
Fo1f4&list=PLXrSeSVAb819HfhysOtYMdwD g3CTKXi6B Figure 18. MOSFET Model Figure 19. H-bridge with MOSFET Connect PMOS to Vcc, NMOS to ground 42

Reference 43 DC Motor: Basic Principle:
Speed Control with PWM: Shaft Encoder https://www.anaheimautomation.com/ manuals/forms/magnetic-encoder-guide.php H Bridge L298N Datasheet: https://www.sparkfun.com/datasheets/Components/General/L298N.pdf SN Datasheet: 43