Rifle-Mounted Sensor Shows What Happens During Shot

People unfamiliar with shooting sports sometimes fail to realize the physicality of getting a bullet to go where you want it to. In the brief but finite amount of time that the bullet is accelerating down the barrel, the tiniest movement of the gun can produce enormous changes in its trajectory, and the farther away your target is, the bigger the potential error introduced by anticipating recoil or jerking the trigger.

Like many problems this one is much easier to fix with what you can quantify, which is where this DIY rifle accelerometer can come in handy. There are commercial units designed to do the same thing that [Eric Higgins]’ device does but most are priced pretty dearly, so with 3-axis accelerometer boards going for $3, rolling his own was a good investment. Version 1, using an Arduino Uno and an accelerometer board for data capture with a Raspberry Pi for analysis, proved too unwieldy to be practical. The next version had a much-reduced footprint, with a Feather and the sensor mounted in a 3D-printed tray for mounting solidly on the rifle. The sensor captures data at about 140 Hz, which is enough to visualize any unintended movements imparted on the rifle while taking a shot. [Eric] was able to use the data to find at least one instance where he appeared to flinch.

We like real-world data logging applications like this, whether it’s grabbing ODB-II data from an autocross car or logging what happens to a football. We’ll be watching [Eric]’s planned improvements to this build, which should make it even more useful.

81 thoughts on “Rifle-Mounted Sensor Shows What Happens During Shot

      1. I was thinking of offering you some suggestions and then I saw that you were planning on setting up a business around this.

        And yeah, I read your post: “Contribute Ammolytics is a community-supported project to keep it free of ads and paid-promotions. Making purchases using the affiliate links on this site helps to fund future projects and experiments. Patreon support is coming soon!”

        Translation: “I am starting a business that will be funded by Patreon and labeling it as a ‘community supported project.'”

        1. Hey there!

          I’d like to clarify that I am not making a business around the sensor featured in this article. I have no interest in productizing or selling this as a unit. I spend my own time and resources conducting these experiments and writing these articles which I do not, and will not, charge anyone to read. Patreon simply provides an easy way for readers who wish to support my work on Ammolytics to do so.

          I hope this helps to clear up any misunderstanding!

  1. It’s odd to me that there’s no discussion of the sensor’s max force range. I’m pretty sure the actual recoil is far, far stronger than the accelerometer can measure, and might be in the “this might damage the sensor” territory. MEMS sensors tend to be pretty durable compared to their historical counterparts, but it’s at least something I’d like to see called out and treated.

    1. You can get off the shelf an inexpensive accelerometers capable of withstanding 60g of force. Lot of them would be rated for 2g, 8g, 16g etc but the most that will happen is they’ll peak not break at forces beyond those ratings.

    2. Clearly part of the forces imparted on the ascellerometer depend on not only the grain of the shells and mass of the bullets, but also how properly the shooter is holding the rifle and therefore how the momentum of the rifle *and the person holding it* is conserved (and momentum changes buffered). I am somewhat concerned about vibration, but outside of the chamber I don’t see it being that much. However, I’m no mechanical engineer.

      1. I have not seen the spec sheet but I suspect the chip based accelerators can take a lot of g’s. This is based on my watching a lot of drones either fall out of the sky and hit the pavement or slam into an immovable object. I would guess the resulting impacts in both cases were much higher than what you would see discharging a rifle. On the drones generally all they needed was some plastic pieces repaired or replaced.

        On another point, what are you trying to see with this? You know there is recoil. And if your scope is properly sighted in if you don’t out the bullet where you wanted it, you can be pretty sure you moved.

      2. It’s really not so much about the dynamics of the shot, itself. The two main variables that are at play for purposes of gathering this data would be the weight and length of the firearm.

    3. I was similarly suspicious. After running some numbers, the sensor will survive just fine but will be totally unable to observe the dynamics of recoil. Since the goal seems to be measuring the shooter’s movement before firing, it’s perfectly up to the task.

      The peak acceleration possible is roughly the peak chamber pressure times the bore area divided by the rifle’s mass (the compressibility of the shooter’s shoulder renders it irrelevant to the very early recoil dynamics). Taking .308 Winchester as a representative example, that peak pressure is specified to be 62000 PSI or lower. The bore area is (.300 inch)^2*pi/4 (plus a tiny bit for the grooves, but I don’t care about that many significant figures). Guessing a typical rifle mass of about 4 kg, you get around 4900 m/s^2, or 500 g. This persists for a small fraction of a millisecond, and the average recoil acceleration is significantly lower. I’m ignoring the fact that the powder/gas is accelerating and that the chamber is not in hydrostatic equilibrium, but we’re back to the question of how many decimal places you care about.

      The LIS3DH shown in the picture has a maximum readout range of 16 g, and a shock survival range of 3000 g for 0.5 ms or 10000 g for 0.2 ms. That’s a comfortable factor of safety for survival. It may shake that micro SD card out of its socket or fatigue the wires at the solder joints, though.

    4. In reality, you use these primarily while dryfiring.
      Since you dryfire a *lot* more than live fire (think 10:1 or higher ratios), the commercial systems are mainly aimed at dryfiring (also, the commercial systems are optical and if you hit the frame of emitters around the target, you could do some serious damage).

      1. Yup. Nothing like walking into a conversation pre-butthurt. The meta comments whining/predicting incivility are usually more common and annoying than the comments they supposedly predict.

  2. Is it really so hard to cut wires to length? They’ve gone to all the effort of designing/printing a 3d mount, but spoil it all by having too-long wires that need a nasty glob of hot glue to keep them under some semblance of control.

    1. Author here: I soldered the wires before I installed it into the 3D-printed mount, so I wasn’t quite sure how long they needed to be. Also, I was (and still am) considering using SPI instead of I2C and wanted to have enough length to move wires around if needed.

  3. Hm… I think i could use the basics and only adapt is slightly to fit perfectly for my own field of Sports: Competitive olympic Archery. Movements (or lack thereof in vcertain axis) are a key. And the Recoils and “hits” on the MEMS are far less than the gun. But the movments pre-shoot are much larger and more visible in the data i think…
    I think i have to de-dust my soldering iron and get to work! :)

      1. I had meant they used a spring loaded mass to dampen recoil and delay the blowback of the round, not really the active system you described but sort of on the same lines.

        Sorry, hit post before I was ready.

    1. I shared your work on an air rifle site as well. Some of the spring-powered airguns have strange recoil and this device will provide hard data to dispel/confirm some theories.

  4. What really needs to be done is to eliminate the fireing pin all together. We need new bullets. They need to re-design the primers by making it electrical instead of impact. The shell case can be one contact point and the pin the other. A small coiled wire inside the primer would set off the charge. This way a current could be employed to the bullet’s primer to set it off. Much like a dynamite blasting cap works for dynamite. Then there would be no issues with how to squeeze the trigger, just press the button.

    1. I think the ammo for the Gatling type guns used on Cobra helicopters and the A-10 are electrically primed.
      I recall reading a warning for handlers/loaders to not wear metal such as rings while handling the ammo.

    2. What good would getting rid of the firing pi do? Do you actually shoot? The other day I had the opportunity to shoot my friends new 45 caliber rifle. It has no firing pin. The bullet is accelerated with roughly 3500 pounds of air pressure. After a couple “getting used to it” shots I was able to put a round into roughly a 4″ diameter sapling 160 yards away. Said projectile lodged deep enough into the tree to split the back of it, but not exit. It had a bit less kick than my 30.06 rifle that I shoot regularly, but that with the standard round I use would have went through the tree and kept on going a ways. I would not want to get shot by either of them.

      I can see this project being useful to quantify the recoil but to do that, you need some kind of a standard mass for it to act against. Perhaps a pneumatic trigger release on a lead sled or something. And truthfully I don’t think it would tell you as much as shooting the rifle a couple of times.

    3. Remington did that nearly 20 years ago with their EtronX system.

      It worked well, but not *that* much better than conventional mechanical/percussive ignition.

      The shooter is always a much bigger factor in accuracy than the rifle. Even with a trigger as light as a mouse click, it’s being operated by a big messy bag of biology that breathes, has a heartbeat, minuscule muscle tremors, and all kinds of other involuntary movements.

    4. A mechanical-chemical system is really close to ideal for most purposes as it’s safe, cheap and reliable. It’s not like nobody ever had the idea of electric firearm ignition, the most generally useful design is probably the Voere VEC91 (it’s a caseless design too, pretty cool) but that wasn’t a commercial success.
      Adding a coil to the primer is an additional manufacturing step that can fail and it adds expense. Having to have a battery is a reliability problem. And even a 100% electric ignition system wouldn’t remove the handling problem of the rifle and it wouldn’t remove all ignition latency but significantly reduce it of course by removing mechanical delays.

      Plasma ignition could perhaps be an alternative however I don’t know of anyone that have tried that for small arms systems, maybe an indication on the practicality of that approach? :)

      1. An issue with caseless ammunition is that It it doesn’t remove heat from from the weapon like ejected brass or steel casings have a tendency to do. The benefit to electrically initiated systems would be higher reliability from less moving parts, however, electrically primed rounds have to be stored in RF free or HERO safe containment areas and usually cost more.

    5. If you think you can revolutionize such an incredibly mature and refined technology as modern firearms, you should certainly try. Some designs have an optimal simplicity, and a bare-bones purely mechanical machine has a certain predictability and reliability that is hard to beat and impossible to give up. I’m pretty sure the guns in 2190 will be fairly similar to the guns in 2019. Some interesting improvements and tweaks, but fundamentally similar.

      1. ” I’m pretty sure the guns in 2190 will be fairly similar to the guns in 2019. Some interesting improvements and tweaks, but fundamentally similar.”

        Phasers. Double as grenades when overloaded.

      2. *points out that every olympic firearm in production today has at least one model in their line with an electronic trigger*

        We don’t do that because it’s a gimmick, we do it because it offers an advantage (namely, the trigger has the same response in dryfiring as it does livefiring).
        Firearms are a mature technology but if you think mature and unchanging mean the same thing, you’re awfully wrong.

    6. There was something like that described in the explanation to the 1.000.000 rounds/minute gun (youtube videos several years ago). That was/is multi barrel arrangement, about 30, in a square “figure 8” arrangement. Several bullets without cases are loaded into each barrel, one behind the other and electrically fired

    1. Author here: If you read my article, you’ll see that I do mention the MantisX, along with some other systems and why I didn’t choose them. Besides being more economical, there are other benefits to an open project like this.

      1) You can hack/tweak the design to your own needs and aren’t limited to what the manufacturer offers.
      2) If you no longer need it, you can use the components for other projects.
      3) It benefits from community contributions, which has already happened. If you check out the Github page for the project, you’ll see a thoughtful discussion which increased the speed by 6x!
      4) If the company behind the MantisX goes under or decides to deprecate the product, you’ll be stuck with a useless device.

  5. What I feel most of these comments missed. This is not to measure recoil. It is designed to see if the shooter is flinching, jerking the trigger, breathing, or moving in anyway during the shot. This information along with the impact data can build a better idea if the shooter, the rifle, the ammo, or the wind is to blame for a missed grouping etc.

    1. Author here: It’s not uncommon for folks to chime in before they’ve read the article, unfortunately. I’ve received a fair share of emails/comments were this was obvious, but I’m happy to report that most folks responded positively to my work!

    2. Yeah, I think the commenters fixated on recoil haven’t done much target shooting because if they had they’d have a better sense of what the submitter was after and why.
      If it were me I’d be tempted to look for an accelerometer with a faster sampling rate (and enough bandwidth to actually give a temporal resolution on the order of 1ms or less) so as to get a clearer idea of where in the firing process any flinching, etc. happens (within the window of a fraction of a second before the firing pin is struck until the projectile has left and is on its merry way towards the target).
      Definitely a cool idea and if I ever get back into shooting I may build a similar instrument.

  6. Nice project. I would have thought something closer to the crown(end of barrel) , further away from the pivot point might provide better indication of angular movement, but perhaps the barrel vibrations would swamp that. It might be some interesting data to look at though. I have seen expensive commercial training systems that seem to be IR camera with a couple of IR led’s on the target and then tracking/plotting the movement before, during and of course after a dry fire.

  7. The US army has an analog version for dry fire practice. You balance a coin such as a nickel on the barrel near the muzzle and pull the trigger. There are all sorts of life/ dummy round exercises too that help reduce jerk or other anticipation errors.
    It’d be interesting to gamify this electronic version though and see it used to train a group of people vs the analog method.

  8. How about having a buddy load your mag and include random dummy rounds? You will go through all the motions and muscle memory of a live shot and see only your movements. Compare to the live rounds. I have done this in the past with a laser pointer on the rifle or pistol and video of the spot on the target. The random dummies keep me honest. You device can isolate the movements. Then do a vector display to see actual direction of movement.

    I will try this with a blue pill type. The STM32… has 12 bit ADC’s up to 2MHz.

  9. Next step, barrel harmonics. An array of sensors on the barrel combined with a Pi doing analysis and controlling a linear actuator could help “autotune” a barrel to a specific round.

  10. I only just saw this after seeing the write up on the Auto Trickler.

    I built something similar to this about 8 years back for my F-Class rifle. I wasn’t looking to see if I was flinching or anything. I was looking to identify any problems with the front and rear rests and attempting to identify any non-linear recoil travel during barrel time.

    The final goal was to design a stock that minimised any “nastiness” during the recoil phase.

    For my own purposes I realised sample rate was the most critical aspect and set about putting together a high speed version but later parked it to work on my bullet concentricity checker.
    https://www.youtube.com/watch?v=HulpAzf1OP0

    I’ll revisit the accelerometer sometime again in the future and probably will build it into the next stock that I make and make it wireless.

Leave a Reply to DielectricCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.