Thursday, January 24, 2013

The H-Bridge and Sounds!

Today, I had to move on to bi-directional motor control.
I was given a blank H-Bridge board and components, so I soldered it together. It has 4 diodes, transistors, and resistors.

 This is an H-Bridge.
H-bridges have 4 switches, and depending on how you attach the first two leads (transistor switches) to power or ground, the motor it controls will move either forward, backward, or stop.
Here's a video of me pulling pin 1 from ground to power, and pin 2 from power to ground.

You can hear my brother being completely unprofessional and ruining my video.

Finally, I move on to a sound device.  I've got to use it to create a short melody. Hopefully I can add sound effects to my hacked toy.
The piezo sounder is great for making annoying retro beep noises.

Our microcontrollers can easily control them with just two connections, and a program statement of "tone([pin#], [frequency], [tone duration]);"

Obviously, I've got a program that runs this statement several times with specified notes and durations. 

Next, I use a light sensor to control its pitch, kinda like a theremin. Simple analog input for an analog pitch output.

Yep, that's pretty freaking annoying.

No comments:

Post a Comment