Based on the feedback from my previous experiment[1], I wrote an in-depth article about the accelerometer unit I built. In this article, I describe how I built it, how it works, and how you can build your own for under $50! The project is open-sourced and it uses off-the-shelf components. Data analysis was done using Python, Pandas, and Plotly.
I hope that this content is high quality enough to justify the time you spend reading it, and how much time it took me to create it!
I’d love to hear your feedback and answer any questions!
You could try making it wireless rather than put the logging on the gun. Something like an Esp8266 might do it if you buffer the measurements. Also look at the Particle Photon which will do TCP out of the box. Squirt the data to a pi and do the logging on there.
Your problem is that you need to find some asynchronous storage or transmission method. For example in barebones avr, writing to the spi data register initiates a transfer, but you can do other things while you wait ~8 clocks for it to send. Interleaving like this can go quite a long way on 8 bit hardware.
In Arduino, there may be a lot of safety checking and blocking going on. Other chips (eg ARM) can do things like DMA where you can route data from eg a serial port straight into something else.
Thanks for the feedback!
The Feather board I'm using actually has Bluetooth, but I have not explored using it yet. If it's faster to send data over BLE to an app, then that would make this project even more affordable and smaller because the SD card and RTC are no longer required.
I believe the Feather M0 board I'm using is also capable of running CircuitPython (fork of MicroPython). For this project, I wanted to keep it simple, so I opted for Arduino, though I am more familiar with Python.
You need to rig this up to an actuator. There are lots of things you could do with that.
You could detect when a machine pistol is getting uncontrollable muzzle rise, then stop it until the trigger is released and reapplied.
You could hold off firing until the gun is stable. When the trigger is pulled, look for smooth movement. (no angular acceleration, and the regular acceleration has a stable magnitude equal to gravitational acceleration) The motion for leading a duck is fine, but the motion of stumbling and getting snagged on bushes is not.
You could disable the gun if acceleration goes to zero, for example by being dropped. After half a second of stable gravitational acceleration, reenable the gun.
Hi! I see a lot of "you could" in your reply, but I'd like to point out that I released this as an open-source DIY project so that anyone could do whatever tests they wanted. I encourage you to build your own -- I'd love to see what you can make and learn with it!
I’ve played with the adafruit 9DOF sensor on a handgun. It was fun, but trigger pull wasn’t my problem, so I went on to other things.
However, I’ve always idly wondered about mounting a cheap keychain cam to a flashlight mount, then exploiting the rolling shutter effect to extract high frequency rotation information.
Nice! I have that board as well, but only played with it briefly. Do you have any data from your use of it on the pistol that you'd like to share? I've love to see how it turned out.
I hope that this content is high quality enough to justify the time you spend reading it, and how much time it took me to create it!
I’d love to hear your feedback and answer any questions!
[1] https://news.ycombinator.com/item?id=18731322