Disclaimer: Don't expect to plug this into an arduino and control motors. this device is purely for learning purposes.
Disclaimer: (Last one)I neither am responsible for nor can guarantee any effects from this instructable- good or bad.
Step 1: Parts
1) Breadboard and jumper cables
2) 2 AA batteries and holder
3) 4 pushbutton switches
4) 2 leds- ideally different colors
Step 2: Put the Buttons In
1) Place the buttons (as described above) in a square formation. The formation isn't that important, but it looks nice:)
Step 3: Place the Jumper Cables
1) Connect the 2 inner pins of two adjacent switches
2) Repeat with the switches accross from them.
3) Connect the 2 outer pins, one from each of the pairs you just connected, so this jumper is perpendicular with the ones from steps 1 and 2. This will be where you connect the positive wire from the batteries.
4) Repeat with the switches accross. This will be where you plug in the negative wire from the batteries.
Step 4: Place the LEDs
2) Place the second led, the exact same way, but on the other side, in the opposite polarity of the first one
If you are already comfortable with electronics, you will realize that, since those parts of the pins are connected by jumpers, the leds are in parallel. Therefore, depending on which way you allow the electricity to pass through, only one of the leds will light up at a time.
Step 5: Plug the Battery In
1) Plug the black wire next to the ground jumper
2)Plug the red wire next to the positive jumper
Step 6: Play With It
2) Do not press press any adjacent pins, this can lead to a short
3) Press the other two diagonal switches and see what happens
For a demonstration, watch: [Play Video]
Each pair of switches will light a different led; since they are diodes and wired parallel in opposite polarities, only one of them will light at a time. This will be more apparent if you choose different color leds. This is how an H bridge works. The controller (often an arduino) decides which of the two switches (mosfet transistors) are closed to control the direction of current across the load.
Well that's it, I hope you know know how an H-Bridge works and one have to play with. If you have any questions, don't hesitate to leave a comment.