Track My Order
Frequently Asked Questions
International Shipping Info
Mon-Fri, 9am to 12pm and
1pm to 5pm U.S. Mountain Time:
Chat With Us
March 2, 2012
Programming Languages: C, C++, Java, Linux shell scripts.
Web Site: www.miser-tech.com
News - Crowdsourcing Algorithms
about 2 months ago
Yea, that would be tuff to discard that bad hit, it seems to create more acceleration then some of the early on good hits. To do it you’d probably have to make the live feed a punch estimate and then after calculating all the meta data over the total punch workout, then go back a reprocess the data to try to filter out bad hits.
I’m thinking improving from the 28% error rate to around 1% is probably good enough for what’s trying to be accomplished with a low cost low hassle device.
3-77hits -> 77
4-81hits -> 81
5-93hits -> 94
6-79hits -> 79
Mystery1 -> 172
Mystery2 -> 158
It’s been a long road to get here, as I’ve reworked the algorithm 6 different times. I started out coding in Java so I could easily create a GUI and plot the data to understand how to process it. It seemed somewhat easy to make a Nate punch detector, but just wasn’t confident any of those could work for other boxers. This 6th generation seems to be on its way to working for most boxers so I’m going to submit it, I wanted to get a horse in the race with all the work I’ve put in so far. I implemented the algorithm first in java code that I wrote in a way the can be easily ported to C. Once I was ready I then quickly ported it to C/C++ in a Visual Studio 2015 project. Next I took the code from the VS 2015 project and ported it into Nate’s original Arduino project. All the code from all 3 phases is in the Git Hub repository. I’ve also included a PDF design document in the repository. The Java application can be run from a Linux or Windows command line by going to the project directory and typing:
“java -jar dist/SpeedBagAlg.jar <filename>”
You can view the Java source code in the src directory under Java folder with any editor or use netbeans to open the project.
If your interested in using this java technique to quickly workout algorithms and then port them to microcontroller code you can see some examples on my website, here is an example of parsing AT command input data from an ESP8266 module, I plan to continue demostrating this in some of my future posts. The link is to the ported C but it has a link to the original Java code.
Since this is to run on a micro controller I decided to not use any floating point or time consuming math functions. All math used by the algorithm is integer addition, subtraction, multiplication or division. I used a Front End processor to remove bias and condition the raw input signal. Then a detection processor to find the mins and maxs to count punch. I want to add a tracking processor to track the punches and be able to open and close both amplitude and frequency thresholds plus the possibility of lighting an LED when the rhythm is staying consistent.
Front End Processor:
Starts with a High Pass FIR filter to remove static bias, then decimating the signal to squelch more noise then taking the absolute value of the signal and followed by a small smoothing average to clean up the signal so it can be fed into the detection processor.
Decimates the signal squelching more values near the floor to zero and then taking the magnitude squared (Mag Square) of the signal. The mag square signal is then feed into a Low Pass FIR filter. The output of the FIR filter is feed into a medium size smoothing algorithm that also spits out a delayed signal that is right in the middle of the averaged signal so it is aligned in such a way to be used as a punch threshold template. The algorithm adjusts automatically to amplitude variations to keep from getting confused on the many resonant addition and subtraction phases that seem to occur. Right now punch frequency gate is fixed at 260 ms, but this may be a problem for the same algorithm working for amateurs and speed bag pros, which is why a Tracking processor would most likely be needed to be highly accurate across boxers and different speed bag platforms.
Not implemented yet, but will track the frequency of peak punch detections and be able to better regulate punch frequency gate to be able to increase accuracy for amateurs and speed bag pros.
I have a follow up question. In the 3-77 video you start out with two lefts and then switched to your right on the 3rd punch and you didn’t move your paw out of the way fast enough and the bag hit it and the bag did not continue for the other two impacts of the normal punch sequence, you then steadied the bag and restarted punching. My question is, did you count that as 3 hits or 2? In looking at the data its hard to tell the difference from the 2 good hits to the miss hit. My algorithm scores 77 hits and I’ve verified that I count that miss hit as a hit, so I wanted to know if you counted it as a hit. I have pulled that sequence to see if it was possible to tell its a miss hit, but it seems from the additional quick contact with your fist there is almost more acceleration events created than the good hits so it might be a tall order to detect miss hits.
News - Crowdsourcing Algorithms
about 3 months ago
A couple of questions on the data. Is the format:
timestamp, x, y, z
If so z seems to always be well into the negative numbers so does this mean the output is not 1g compensated on the z axis when at rest? If the bag is just hanging it does not read 0,0,0 (so z would have -1g worth of a 12 bit signed scale)? What is the range of the scale it seems like it might be +4 to -4 g’s?
Sorry for all the questions, just wanted to explore other options than applying a filter on peaks of a 3D vector.
I guess you can tell I would really like to have a trip out there to talk algs with you and the crew. :)
News - March Caption Contest
about 6 months ago
Enough talk, at this point it’s time to put your light where your mouth is.
Shhhhh! There it is, Nate’s awesome graphite 20x Magnifier LED Lamp, I’ve heard rumors, but I didn’t think it really existed.
News - October Caption Contest
about 11 months ago
I knew it man, a push/pull double signal whacker was hidden under the table. There was no Freakin' way my battle bot just layed down and died!
News - September Caption Contest
What’s this!!! A CRT, I thought I annihilated the last one years ago. Die you LEAD soaked Power Eater!
about a year ago
I’ve used the previous .5MB version and now this new 1MB version. I also added a review of this module spanning both versions. My first use of this module was with a 3.3v USB to serial connected directly to the module. As I mentioned in my review it was rock solid.
Next I moved on to controlling it with a PIC micro-controller, I wasn’t having much luck as they seemed to keep rebooting due to watch dog or crash with exception dumps. They would also get very hot and the Red LED would get very dim. I was getting very close to contacting Sparkfun tech support that these modules have an issue, however if I put them back connected directly to the USB to serial they worked fine. At that point I decided it must be something to do with the power and I hooked up the ESP8266 with its own 3.3v regulator and I am happy to report these modules are as solid as when hooked directly to the USB to serial interface. It doesn’t matter how much current your 5V source can supply to your regulator, this module seems to be either sensitive to noise and or it uses power in surges for the transmitter and if the voltage momentarily drops the board goes into some sort of latch up condition. If you see resets and the power LED going dim, try a dedicated regulator, you’ll be glad you did.
IMPORTANT: If you want to keep your sanity when working with these on a breadboard, supply power to them with their own 3.3v regulator, probably not a bad idea to do the same when making a PCB board either.
Also most people seem to use this module with TCP connections. I am using it with UDP sockets and there isn’t a lot of information out there. If you need information on using UDP sockets check out this series of articles I have published on a prototype I am creating using the ESP8266 with UDP. Also you can check out my Google+ collection on the ESP8266 prototype here.
News - July Caption Contest
about a year ago
What! My brother fell into a Pipe on the way over here!
No public wish lists :(
Forgot your password?
No account? Register one!