After practicing a bit with my makiwara and having a mind of an engineer I wanted to know how hard I am actually hitting. Plus I wanted to see if I can hit as hard from short distance (so called 1 inch punch) as with full swing. So that made me go on a frenzy searching spree to see if there’s anything out there and even what number should I be looking for – is it arm speed or acceleration or board speed? There are actually several studies done on the topic and many good articles written explaining the physics behind it. From what I gathered, a hand hitting a board can cause 200g of acceleration in the matter of 10 milliseconds. This gave me the parameters to look for and also the realization that there’s nothing out there that I could afford to buy. In my searches I stumbled upon SparkFun store and from there the whole world of ICs, microprocessors and electronics. So I have decided to make it myself and couple of months later (yes, things go slow when you don’t know what you’re doing :)) I present you the working product (sorry for the grainy video – needed more light):
I will limit this post to the general system overview and will follow up with post dedicated to hardware and another one for software. All code and designs will be available for free download and you’re welcome to do with it whatever you like.
The device is built on the Arduino platform and for those who are not familiar with it, it’s a micro-controller board with power supply circuit, USB based serial interface, and a java based PC software for compilation and upload. This platform has become very popular recently due to the ease of use and availability of standard components (“shields”) that you can plug on top of it. The Punch Acceleration Sensor is also implemented as a “shield”.
The device functions by use of a single axis accelerometer on a chip which produces an analog voltage signal indicating amount of either positive or negative acceleration. This signal is then converted to digital by a fast a/d converter and is read by the micro-controller. Micro-controller computes greatest acceleration in g (gravity) and displays it on a multi-segment LED display. Because micro-controller does not have enough digital output pins, a shift register is used to drive most of the LED display.
- micro-controller: Atmel ATmega328 on an Arduino Duemilanove board
- accelerometer: Analog Devices ADXL193 single axis +/- 250 g analog output
- a/d converter: Analog Devices AD7680 16 bit, 100 kilosamples/sec
- LED display: low-cost 4 digit 7 segment display. Manufactured by China young Sun LED Technology, sold by SparkFun
- shift register: Texas Instruments SN74HC594
Choice of components and results:
The only number i had to go by when choosing accelerometer was the 200+g acceleration of the breaking board during a demonstration. I therefore chose the largest accelerometer SparkFun had. In the end it played out nice and the range of this accelerometer matched the actual acceleration experienced by my makiwara. However i realize now that the choice of accelerometer is highly specific to the mass of the target. A heavy punching bag certainly would probably accelerate with less than 10g, while leather pad will probably overshoot the +250g range. In order to convert analog output of accelerometer to g-force value, a following formula is used: g-force=(output – “zero-g voltage”) / sensitivity. The specs for ADXL193 (250g version) say that “zero-g voltage” is simply Vdd/2 (or 2.5V) while sensitivity is 8mV/g. So if you’re reading 3V on the output, it corresponds to (3-2.5)/0.008 = 62.5g of acceleration. Now this looks great so far, but the big “gotcha” that i fell for was the noise. The specs also state that the “zero-g voltage” can vary +/- 100mV and sensitivity can go +/- 0.4mV depending on temperature. So this means that the same reading of 3V now can indicate something from (3-2.6)/0.0084 = 47g to (3-2.4)/0.0076 = 79g or a range of 32g! In fact, here’s how the real readings look like when device is at rest:
So as you can see, the zero-g voltage is offset to about 1.7g but also noise is quite high and is about +/-1.5g (or 0.5 standard deviation if you’re into that). So this makes my sensor pretty useless for anything under good 10-20 g of acceleration. Likewise, should i choose the low range accelerometer it would be no good for high accelerations as it will simply run out of supply voltage range.
The a/d converter strictly is not needed as the ATmega328 has a built-in 8bit a/d converter. I chose to upgrade to an external a/d converter for two reasons: 1) i wanted to achieve better accuracy – and this was before i realized just how noisy output was – so i went with 16 bit vs 8 bit built-in and 2) i wanted higher sampling rate. I’ve run some tests on the Arduino board which has the microprocessor running at 16GHz:
- Simple n++; loop: 230 kHz (loops per second)
- Last 8 samples averaging: 114 kHz
- built-in a/d converter: 8.3 kHz
- external AD7680 converter: 40 kHz
So even if the extra resolution (16bit) was not all that necessary, the increase in sampling rate makes the AD7680 a well justified addition. So here’s how actual punch looks like sampled 40,000 times per second:
The first remarkable thing about these readings is that they don’t look noisy at all. The noise is still present of course, but compared to the swing due to the actual acceleration it is negligible. To clarify, the first negative swing that you see is an actual acceleration due to the punch. The positive “hill” after that is the board bouncing back. The software measures the maximum acceleration regardless of sign so in this case it will catch the correct first acceleration since it is larger. This particular punch took mere 3.5ms to rise to maximum acceleration of 187g and took 6ms to reach speed of 4.9 m/s (or 11 miles/hour). Although i would not trust the speed numbers too much as the acceleration noise errors integrated over time can become quite large. In fact because of this integration it’s almost impossible to measure speed using accelerometers.
Last point i would like to make is that to this date i do not know if acceleration is the right thing to measure when it comes to punch/kick performance. However i did not have many choices: i could not measure hand ending speed due to integration errors, plus the results would not be compatible from person to person due to different hand weights. Hand acceleration also didn’t sound right since it’s the end momentum ( speed * mass) that is indication of power behind punch. Measuring target speed and acceleration sounded like a better idea since at least it would make results compatible from person to person (but make it specific to a target). Finally, measuring target speed didn’t sound right since i could just gently push the target for several seconds and could make it go really fast without producing any damage, so that left only target acceleration. Plus, target acceleration felt right since from school physics i still remember that force = mass * acceleration, therefore the faster the board accelerates the more force it must be experiencing. Anyway, let me know if you have a good answer to this or have any other questions or comments.
Next: Part 2 – Hardware Design