Monday, January 2, 2012

dc motor driver circuit h-bridge

A number of web sites talk about H-bridges, they are a topic of great discussion in robotics clubs and they are the bane of many robotics hobbyists. I periodically chime in on discussions about them, and while not an expert by a long shot I've built a few over the years. Further, they were one of my personal stumbling blocks when I was first getting into robotics. This section of the notebook is devoted to the theory and practice of building H-bridges for controlling brushed DC motors (the most common kind you will find in hobby robotics ...) I've got an image of one below with both as a unit and "expanded" in an exploded view.

Basic Theory

Let's start with the name, H-bridge. Sometimes called a "full bridge" the H-bridge is so named because it has four switching elements at the "corners" of the H and the motor forms the cross bar. The basic bridge is shown in the figure to the right.
Of course the letter H doesn't have the top and bottom joined together, but hopefully the picture is clear. This is also something of a theme of this tutorial where I will state something, and then tell you it isn't really true :-).
The key fact to note is that there are, in theory, four switching elements within the bridge. These four elements are often called, high side left, high side right, low side right, and low side left (when traversing in clockwise order).
The switches are turned on in pairs, either high left and lower right, or lower left and high right, but never both switches on the same "side" of the bridge. If both switches on one side of a bridge are turned on it creates a short circuit between the battery plus and battery minus terminals. This phenomena is called shoot through in the Switch-Mode Power Supply (SMPS) literature. If the bridge is sufficiently powerful it will absorb that load and your batteries will simply drain quickly. Usually however the switches in question melt.
To power the motor, you turn on two switches that are diagonally opposed. In the picture to the right, imagine that the high side left and low side right switches are turned on. The current flow is shown in green.
The current flows and the motor begins to turn in a "positive" direction. What happens if you turn on the high side right and low side left switches? You guessed it, current flows the other direction through the motor and the motor turns in the opposite direction.
Pretty simple stuff right? Actually it is just that simple, the tricky part comes in when you decide what to use for switches. Anything that can carry a current will work, from four SPST switches, one DPDT switch, relays, transistors, to enhancement mode power MOSFETs.
One more topic in the basic theory section, quadrants. If each switch can be controlled independently then you can do some interesting things with the bridge, some folks call such a bridge a "four quadrant device" (4QD get it?). If you built it out of a single DPDT relay, you can really only control forward or reverse. You can build a small truth table that tells you for each of the switch's states, what the bridge will do. As each switch has one of two states, and there are four switches, there are 16 possible states. However, since any state that turns both switches on one side on is "bad" (smoke issues forth),  there are in fact only four useful states (the four quadrants) where the transistors are turned on.

High Side
Left
High Side
Right
Lower
Left
Lower
Right
Quadrant Description

On Off Off On Motor goes Clockwise
Off On On Off Motor goes Counter-clockwise
On On Off Off Motor "brakes" and decelerates
Off Off On On Motor "brakes" and decelerates

The last two rows describe a maneuver where you "short circuit" the motor which causes the motors generator effect to work against itself. The turning motor generates a voltage which tries to force the motor to turn the opposite direction. This causes the motor to rapidly stop spinning and is called "braking" on a lot of H-bridge designs.
Of course there is also the state where all the transistors are turned off. In this case the motor coasts if it was spinning and does nothing if it was doing nothing

Monday, November 21, 2011

langtang trekking

Langtang is towards the north of Katmandu and just south of the Tibetan border. It is sandwiched between the main Himalayan range to the north and a slightly lower range of snowy peaks to the south. To the west of Langtang is Ganesh Himal with peaks between 6,000 to 7,000 meters. The name Langtang is originates from two different words ‘Lang’ and ‘Tang’. Lang means Yak and Tang means to follow.Having trek to Langtang and Helambu reflects you the unique possibility to watch Nepalese of west to east Himalaya. Langtang and its several peaks along with fresh water lakes of this region such as Gosai Kunda, Saraswati Kunda and many other small lakes situated at the height of more than 4300 mt will create manifold interest and enthusiasm toward nature.
Mythical stories of these lakes enriching our legends and Nepalese religions tradition. So, people from Hindu religions go to worship there to pray homage to Lord Shiva (the god of universal). So, it has multidimensional destination for tourist, religions people, romantic people etc. This region has variety of possibilities regarding trekking and tours. Due to variation of altitude you can follow your chosen trail for your comfort. You will be at the height of 5500 Mt for acclimatization along with easy rescue operation at that place. In this trek the Gosainkunda and Gyanjala passes are the most preferred passes for high altitude Trekkers. An Extended from a low altitude of 2000 Mt to high altitude of 7000 mt covering an area of 1710 sq km.

Langtang and Helambu regions is the second largest conserved National Park of Nepal enriched by 1000 species of flora and 150 different species of birds and many wild animals such as Tigers, beers, deer, Wild sheep.
This region is full of mountains: Langtang Lirung (7246m), Gang Chhenpo (6388m), Naya Kangri (5846m) and Dorje Lakpa (6966m).