Imagine a machine that [Anderson Silva] could throw a punch at, that would locate his fist in real time and move a punching pad to meet his moving fist. How would you do it? Kinect? Super huge sensor array? Sticking charm? What if we told you it could be done with two electret microphones, an Arduino, and a Gumstix? Yeah, that’s right. You might want to turn your phone off and sit down for this one.

[Benjamin] and his fellow students developed this brilliant proof of concept design that blocks incoming punches for their final project. We’ve seen boxing robots here before, but this one takes the cake. The details are sparse, but we’ve dug into what was made available to us and have a relatively good idea on how they pulled off this awesome piece of electrical engineering.

Consider two microphones fixed to both ends of an axis. Then consider a tone generator that could move back and forth on the same axis. The amplitude of the waveform coming off of each microphone would be inversely proportional to the square of the distance between the microphones and the tone generator. Put more simply – the amplitudes would follow the inverse square law. These value’s, multiplied by a constant, can be used to represent the radius (r) of a circle, from which a circle equation (x^{2} + y^{2} = r^{2}) can be derived. Because there are two microphones, there are two circles. Or more specifically, two values of (r), which we will call (r1) and (r2).

[Benjamin’s] mission was to pinpoint the exact location of the tone generator source (which is attached to the punching glove) and move a target to intercept it. After amplification, the signals from each microphone are fed into an Arduino, where they are averaged. He then sends the peak data to a Gumstix via I2C. One could probably get a rough idea of where the tone generator was from this data alone. But [Benjamin] and his team wanted an exact location, and used what is known as the Circle-Circle Intersection equation that runs as a algorithm in the Gumstix. This gives him the precise location on the axis where the two circles meet, and thus the location of the tone generator source. From this point, it’s relatively simple to move the guard (part that blocks the punch) to the location. An IR sensor is used to determine the current location of the guard, and the Gumstix moves it to the punch location via PWM and an H bridge. Brilliant!

We’ve stepped through the math to demonstrate exactly how the Circle-Circle Intersection algorithm is solving the location. You can count the squares to represent data. The answer of 2.6 is the distance from the center of the smaller circle to the intersection point. You can get the distance from the larger circle to the intersection point simply by swapping (r) and (R) in the equation. Try it!

This technique of determining the location of a moving object along a single axis is bound to come in handy for other hacks.

So… it can stop awfully slow punches, then?

Slow punches are the most dangerous.

building a robot that blocks punches is not an appropriate response to being punched all the time.

#DontBeALowHangingFruit