Concept Help Needed

Hey everybody, I need help with a project I'm thinking about attempting. Basically what I want to do is make an arduino controlled round counter for an AR15. It would attatch to the side of my gun and have two pieces. The front most would house an Arduino Nano, a screen, and other components, the back most would have an rfid transmitter. It would scan the magazine as it was inserted and display how many rounds are left in it, subtracting 1 from its memory each time it senses the gun is fired. And that's the part I need help with.

What I think would work is to use a digital accelerometer. I could hold a button on the side for say 3 seconds putting it in calibration mode. Then I would fire a shot, then press the button again, exiting calibration mode. What I would want the Arduino to do in this case, is record the speed and intensity of the shock it would feel, and only register similar shocks, that way it would know when I fire the gun. but not falsely register shots from say walking with the gun in hand, inserting the magazine etc.

Anyone have any input? Anyone who has worked with digital accelerometers, is this a possible way of doing this? Any better ideas? Thanks in advance yall! Also, any advice on how to code this would be much appreciated as well. I'm a ME so I'm not super fluent in coding, but I can usually stumble my way through things like this.

Start with the first thing you wrote about and get it working. That is: "scan the magazine and count the rounds". Please expand your design for this. Then the other may be a bit easier to do.

Paul

Paul_KD7HB: Start with the first thing you wrote about and get it working. That is: "scan the magazine and count the rounds". Please expand your design for this. Then the other may be a bit easier to do.

Paul

That part I'm not so concerned about. Essentially what the main box will look like is a small housing holding the arduino and any other components inside of it. From the outside you will see a small screen, a single indication/status led, and a momentary switch to control functions. Like I said it will mount to the right side of the handguard on a picatinny rail. The enclosure will be 3d printed. I will route some wires through the handguard down to another small box on the bottom side of the handguard holding an RFID transmitter. Each magazine will have an RFID chip placed inside it on the floorplate (Magpul PMAGS).

Also the way the registration will work is simple. Initially I will have to register the RFID chip with the system, and can use the button to select which size of magazine it is (10, 30, or 40 rounds). Then once its registered I can load the magazine, tell the system to go into "reload mode", scan it, and enter the amount of rounds in it currently. It will start at the maximum amount, and I can press the button to subtract rounds to get the proper initial amount. After I've done that, I exit reload mode, and its good to go. I scan the magazine on the bottom before inserting it so it knows a magazine is being inserted, and the screen shows how many rounds are available. Then everytime it senses a round being fired it subtracts one from the previous amount.

That is the part I'm not sure how to do. Would a 3 axis accelerometers be able to be used, where the Arduino would be able to go into, like a said, a learning mode where it records a specific impulse it feels from the firing of the gun and then looks for a similar force to know to register a shot as being fired? Or would a Shock sensor work better? I just don't have any experience working with these components so I'm not sure if what I'm looking to do is to far out in left field or not.

Just spitballing.

A VL6180X LIDAR sensor on the floorplate takes a range reading to the bottom of the follower. The range will vary as rounds are expended/inserted.

A load cell measures the follower spring tension through a load cell. Reading indicates rounds remaining.

dougp: Just spitballing.

A VL6180X LIDAR sensor on the floorplate takes a range reading to the bottom of the follower. The range will vary as rounds are expended/inserted.

A load cell measures the follower spring tension through a load cell. Reading indicates rounds remaining.

I really like that idea, especially because it would theoretically count the number of rounds in a more direct way, which would eliminate a lot of the complications and drawbacks to my initial plan. However there are a few problems I see with it.

1) wouldn't that require a whole separate circuit in the magazine itself? Meaning a whole separate power supply inside of a mag? If so I'd have to take apart a magazine whenever a battery died. I'd probably have to modify the mag itself to be able to access the circuit and be able to turn it on or off. Also how can you relay this information back to the arduino wirelessly? Would bluetooth work?

2) without modification, I cant imagine the inside of a magazine would have much clearance when the spring is fully compressed.

3) any circuitry placed inside of a mag will have to withstand a tremendous amount of abuse. The mags get dropped, to load them properly you smack the crud out of the bottom of them, you bang the backside to align the rounds properly. Can a circuit withstand all those forces acting on it, WHILE being constrained to the confines of INSIDE a compressed magazine spring?

I appreciate your help. I'm not very experienced with wireless circuitry at all either. Essentially anything outside of RFID specifically I'm not very learned in.

goat632: That part I'm not so concerned about. Essentially what the main box will look like is a small housing holding the arduino and any other components inside of it. From the outside you will see a small screen, a single indication/status led, and a momentary switch to control functions. Like I said it will mount to the right side of the handguard on a picatinny rail. The enclosure will be 3d printed. I will route some wires through the handguard down to another small box on the bottom side of the handguard holding an RFID transmitter. Each magazine will have an RFID chip placed inside it on the floorplate (Magpul PMAGS).

Also the way the registration will work is simple. Initially I will have to register the RFID chip with the system, and can use the button to select which size of magazine it is (10, 30, or 40 rounds). Then once its registered I can load the magazine, tell the system to go into "reload mode", scan it, and enter the amount of rounds in it currently. It will start at the maximum amount, and I can press the button to subtract rounds to get the proper initial amount. After I've done that, I exit reload mode, and its good to go. I scan the magazine on the bottom before inserting it so it knows a magazine is being inserted, and the screen shows how many rounds are available. Then everytime it senses a round being fired it subtracts one from the previous amount.

That is the part I'm not sure how to do. Would a 3 axis accelerometers be able to be used, where the Arduino would be able to go into, like a said, a learning mode where it records a specific impulse it feels from the firing of the gun and then looks for a similar force to know to register a shot as being fired? Or would a Shock sensor work better? I just don't have any experience working with these components so I'm not sure if what I'm looking to do is to far out in left field or not.

You are overly complicating this. Study the example of the "knock sensor".

Paul

I'm not sure how you plan on recognizing the capacity of an inserted magazine.

But, whatever it was that was your idea to detect the firing of a round to keep track of shots is problematic, because.... What if you hand cycle a round? What if you shoot crap steel case surplus and you get a hard primer and have to drop mag and clear? Would your idea of a round counter get confused in all of that, thinking a fresh mag was inserted?

Keep it super simple. Keep your entire project limited to the magazine. At the very least, start there. All you need to do, is have a device that keeps track of how many rounds are in a magazine. That's it. It doesn't care why they leave the magazine, it doesn't care if the magazine isn't fully loaded, you're only designing something that is a digital version of a visible window that shows the follower and has the round count simply labelled along the magazine like witness holes on a pistol mag.

Consider the confines of a STANAG mag. I think what you can start with is a windowed poly mag, and consider how you might track the movement of the follower, because that is the quintessential component that reliably indicates how many rounds are in that magazine.