Shown below is the L293D IC in standalone and breakout forms.Ĭonfiguration and working of the L293D IC While it is possible to construct your own H Bridge using individual transistors, in this blog we will be using the L293D (often mis-spelt as L239D) as it is compact, popular and comes in many different breakouts (as well as the IC alone). The current needed to control the transistors is very weak compared to the current that can flow through them and drive the load. ![]() This allows an external component, such as a microcontroller to control the H-Bridge and drive the motors.Īlternating pairs of transistors are connected together, just like the switches used before, which brings down the pins used to control the motors to two. A transistor acts like a switch (capable of connecting or disconnecting its two junctions), but unlike a regular switch that can be physically manipulated, a transistor depends on an external current to connect/disconnect their junctions. ![]() In the above diagrams, I have used physical switches, but these can be replaced with transistors. Shown below are the configurations required to provide current flow in either direction. This is how the H-Bridge is used to achieve bi-directional motor control. Alternating pairs of switches can be switched on and off to control the direction of current through the load. It contains four switches (S1-S4) and is connected to a load (motor – M) that should be driven. Shown below is a schematic describing it. The H-Bridge gets its name from its “H” shaped configuration. However, it is the microcontroller which (through a small current) controls the H-Bridge i.e. The H-Bridge supplies power to the motor using an independent power source. Driving a Motor directly from an Arduino (wrong method) Driving a Motor from an Arduino using an H-Bridge (correct method) You can visualize that the H-Bridge operates between the Microcontroller and the Motor, as shown below. Providing a PWM signal on this pin allows the speed of the motor to be controlled. When the enable pin is held low, the IC stops driving the motors. Some H-Bridges (Like the L293D) also provide enable pins to allow speed control. H-Bridges are circuits which allow bi-directional current amplification, allowing the microcontroller to drive the motor in both directions without providing the power to do so directly (and getting damaged). ![]() ![]() While the speed control can be done fairly easily by a microcontroller (using Pulse Width Modulation), DC motors usually require more current than most microcontrollers can provide directly from their pins. This is exactly how the speed and direction of a DC motor are controlled. If the power source is connected in reverse, the motor will spin in the opposite direction, but with the same speed as before. The greater the voltage, the faster it will spin. Simply put, a DC motor rotates when you connected to a DC power source (like a battery). The speed of the motor is proportional to the voltage while direction is dependent on the sign of the voltage (direction of flow of current current). Let’s get started! Role of H-Bridges in Driving MotorsĪ DC motor (Direct Current motor) is a motor which rotates when a voltage is applied across its terminals. I shall also be explaining H-Bridge circuits, which motor drivers like the L293D are based on, which can be very helpful in many electronics and robotics projects. In this blog, I will be explaining how to use the popular L293D motor driver IC (often misspelled as L239D) along with an Arduino to control the direction and speed of DC motors.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |