PDA

View Full Version : Raspberry Pi and reloading



HP9MM
01-27-2021, 04:58 PM
Has anyone found a use for a Raspberry Pi in reloading?
I am thinking about getting one to play with and wondered if there is a use for it in reloading.

ryanmattes
01-27-2021, 06:04 PM
I'm in software, so I do tons of side projects with raspberry pi and arduino. None that have anything to do with reloading so far, though. I also haven't found a good use in reloading.

I did, however, make an arcade console, just haven't built the cabinet yet. I have about 60 classic arcade games on it, and I custom built the controllers with RGB LEDs in each button, so I can light up the buttons needed for each game in the original game button color.

https://uploads.tapatalk-cdn.com/20210127/98219d9d6cb5b6199c2e19c497223529.jpghttps://uploads.tapatalk-cdn.com/20210127/1d21c1aa788f464ab6a31318cba639d3.jpghttps://uploads.tapatalk-cdn.com/20210127/052f2fe4a41dd524151357a9c1fd70fe.jpg

Sent from my Pixel 3a using Tapatalk

BamaNapper
01-27-2021, 06:13 PM
I have found that learning to program the little buggers leads to more required therapy at the reloading bench. So you might say that a rPi is invaluable to ensuring you have enough loaded ammo on hand.

Seriously, you could use one as a PID to control your lead melter. You could even use it as a PID for multiple melters as well as your toaster oven when you powder coat. Or to communicate with your chronograph, enabling you to offload/store/plot your loads. If you're really good, I understand you can tie a camera to the Pi. Then you could use use image recognition to monitor for double charges. Maybe pick up one of the super sensitive pressure transducers to weigh your boolits and a little automation would let you sort or reject them based on weight as you're casting. And it's obvious that it could be used to keep a log file of your loads, although most folks prefer pencil and paper. But I think my top purpose would be streaming some music when I'm at the bench. I've spent my career in tech, reloading is my therapy away from it.

jmorris
01-27-2021, 06:31 PM
There is a fellow in special projects forum below that made a press monitor using one. I am working on a optical brass sorter, to sort by headstamp using one as well.

onelight
01-27-2021, 09:04 PM
There is a fellow in special projects forum below that made a press monitor using one. I am working on a optical brass sorter, to sort by headstamp using one as well.
That is black magic you know . Do you hunch over and cackle when you make that stuff :)

ryanmattes
01-27-2021, 11:28 PM
There is a fellow in special projects forum below that made a press monitor using one. I am working on a optical brass sorter, to sort by headstamp using one as well.Nice! You going to try to compare to known sample images, or use something like OCR to try to match text? Speed might be an issue with python on a pi.

Years ago I made an android app chrono for airsoft players. Used video to track the the bb in frame and calculate the speed. Real boolits are too fast, and aren't convenient white spheres, of course.

Sent from my Pixel 3a using Tapatalk

Rcmaveric
01-28-2021, 12:51 AM
https://github.com/Rcmaveric/Reloading-Press-Monitor

Have a look. It uses 2 USB webcams to watch powder and primer. It stores your pet loads and then counts your rounds reloaded and once done it can log it to your reloading log or you can copy and paste into your own reloading log.

Still working on the powder level sensor and LCD. I wanted to be able to use the GUI or an LCD. It has low primer warning. Controls my case and bullet feeder. Low bullet warning.

If I choose to go automated. I will add a jam sensor. The possibilities are endless.

I am not a programmer. But I am an electrician by trade. My PCBs should be here ina few days.

Sent from my SM-N970U using Tapatalk

ryanmattes
01-28-2021, 05:25 AM
I am not a programmer. But I am an electrician by trade. My PCBs should be here ina few days.


That's pretty effin cool. And a lot of time you've obviously put into it. You can say you're not a programmer, but your work says otherwise.

I am a programmer, so my struggle is always with the electronics. I ended up having someone lay out the boards for me after I breadboarded my stuff and had it working. I can piece together off the shelf parts and wire them together, but deeper than that is out of my depth.

Sent from my Pixel 3a using Tapatalk

Rcmaveric
01-28-2021, 06:18 AM
I am not familiar with micro miniature aspect of my feild but I understand the concepts. I dont know if I deigned a good board. I did my research first though.. The Gerber files are posted on the Github. In a few days when I get the boards and assemble them we shall see if its good or not.

The code I wrote was just Googled and extrapolated until it worked. Lol

Just another project to pass the time. I need to get the LCD and Powder Level sensor working. Thats really all that's left.

I am trying to talk my wife into letting me get a Dillion so I can automate it. Then use Bluetooth power strip to turn it off an on with RPI. She saw the price and not so politely told me what I could do with myself. Wonder if I can automate Lee Loadmaster. But automation wasn't the goal of this project.

Sent from my SM-N970U using Tapatalk

Three44s
01-28-2021, 06:21 AM
That's pretty effin cool. And a lot of time you've obviously put into it. You can say you're not a programmer, but your work says otherwise.

I am a programmer, so my struggle is always with the electronics. I ended up having someone lay out the boards for me after I breadboarded my stuff and had it working. I can piece together off the shelf parts and wire them together, but deeper than that is out of my depth.

Sent from my Pixel 3a using Tapatalk

As you point out:

“I am a programmer ......... I am not an electrician .........”

Gets at the essence of the problem. Each of us brings “something to the table”. But a situation like automating or monitoring a press is not generally solved with one person because each of us only has their own set of skills to employ in solving a particular problem.

Addressing a something multidimensional such as this requires a programmer, an electrician, a fabricator and yes a visionary of sorts. In this, the process is like a chain. If one link breaks, the process stops.

My problem is not related to the reloading process but instead with elk raiding my farm in large numbers:

http://castboolits.gunloads.com/showthread.php?411928-I-need-advice-with-Logic-automation-programing

So in my case I am not a programmer, though I am not an electrician I can wire and solder things that I have a schematic to, I am not a pyrotechnics expert but I have people who are readily available that are.

I can fabricate but in crude modes that do serve my project (launch tubes etc.) but mostly I have a problem and reach out to folks with skills I do not have but with a desire to help. So I guess that puts a “facilitator” hat on me.

After I saw what a microprocessor or microprocessor could do, my mind did wander into the reloading arena at times, wondering what and how that technology could do to help.

So my Thanks goes out to the OP for opening up this subject and Rcmaveric for his work and I will be following the subsequent discussion here.

Three44s

jmorris
01-28-2021, 10:17 AM
Nice! You going to try to compare to known sample images, or use something like OCR to try to match text? Speed might be an issue with python on a pi.


Am more of a mechanical/machine guy than a code fellow but I am aiming for something not unlike this.

https://coral.ai/projects/teachable-machine/

But utilized more like this.


https://www.youtube.com/watch?v=1V_Hm3oqlO4

^that one is by weight but make it so instead of red, green, blue bulb lighting up, they are dropped into different containers as the next case is moved above the camera.

Speed doesn’t matter much to me, if would just be collator fed and left to do its work.

jmorris
01-28-2021, 10:20 AM
Being more mechanically inclined I tend to make mechanical solutions like this one for different diameter primer pockets.


https://www.youtube.com/watch?v=xJgU3-OXuUU

jmorris
01-28-2021, 10:21 AM
But I have dabbled with PLC’s and such too, when they fit the project better.


https://www.youtube.com/watch?v=MrFhnDQ-eUU

Rcmaveric
01-28-2021, 10:35 AM
Those are nifty. Mechanical isn't my cup of tea. Righty tighty, lefty loosy; saves me quite often.

I have been looking up how to fashion a make shift auto drive to my Load master. All I can find is the severely over priced Marks 7 and and automated dillions. I dont even know where to begin

I played with OpenCV image recognition but it angered me. More from lack of understanding. From my under standing you have to make a library.

Using image recognition to tell if a primer is there or not. Or a bullet is there or not. Would make an impressive addition. I lack the understanding of that though.

Sent from my SM-N970U using Tapatalk

jmorris
01-28-2021, 02:58 PM
I have been looking up how to fashion a make shift auto drive to my Load master. All I can find is the severely over priced Marks 7 and and automated dillions. I dont even know where to begin


I didn’t automate my loadmaster, was happy enough getting it running well but I did automate my Lee breechlock. Might give you an idea.


https://www.youtube.com/watch?v=01zbImsdkbg

Dimner
01-28-2021, 05:27 PM
I made this for my Lee APP using an arduino mini type micro processor. I learned a ton.

As mentioned a raspberry pi isn't what you would want for automation type projects. They can work foe sure, but they are overkill. It's basically as powerful as a smartphone (to keep explanations easy). An Arduino type chip would be much less expensive and easier to use. I go mine on ebay for I think 7 bucks for a 2 pack.

276274

Dimner
01-28-2021, 05:32 PM
Here is another project I made.

An automated powder trickler that uses a balance beam scale for measurement. I know some will question why I'm using a balance beam scale, but for my intended usage, a balance beam scale was required.

276275

Dimner
01-28-2021, 05:42 PM
A note about micro processors, or at least the way I'm using them.

All of the features in my project could be done with discrete components (resistors, capacitors, transistors, etc). My projects are pretty simple in logic. However, when I tried to make a circuit using components I found that I was pretty dang bad at circuit design and the concepts in general for determining the math I would need to apply to get my result. I'm not bad at math persay, I just was bad at Appling the right formulas to get the logic circuits to work with discrete components.

With the microcontroller, the logic is done using very basic programming code (mostly that I copied and pasted from code available online.) So, for me it was easier to visualize and code for something like :

If sensor detects a voltage above X and/ or below Y, keep motor spinning until voltage is greater than Y. Also given the fact that my balance beam scale is analog, I needed to be able to tweak my values of X and Y. It's alot easier to do in code than replacing transistors in a soldered circuit

jessdigs
01-28-2021, 07:36 PM
More gunsmithing than reloading but The defense distributed ghost gunner uses an arduino board, and I have heard of people using raspberry pi to run the CNC mill


Sent from my iPhone using Tapatalk Pro

jmorris
01-29-2021, 09:47 AM
All of the features in my project could be done with discrete components (resistors, capacitors, transistors, etc). My projects are pretty simple in logic.


What all did you add to your powered trickler? I too used beam scales but mine uses no processor.


https://www.youtube.com/watch?v=UxPenA7c0hE

jmorris
01-29-2021, 09:48 AM
Works like this.


https://www.youtube.com/watch?v=6GYWgAdKzHs&t=78s

Rcmaveric
01-30-2021, 01:44 PM
Thinking outloud, is it possible interface a Rasberry PI and an Arduino and use them in the same project?

Micro controllers are best for real time response and analog component monitoring with out the need of fancy math/processing or electronic sorcery. RPI excell at processing and cant read analogies sensors without fancy processing sorcery. My though was to offload the tracking and response to sensors to an arduino for real time and quick response and use the RPI in a spilt screen. Once screen for my press monitoring with webcams and display of the status of the warnings. The other screen can have my notes and electronic manuals up (who am I kidding It will probably be YouTube real crime documentaries). Basicly the arduino will actively track and respond to alerts. The RPI will just process and display webcams and current status of the alerts.

As of right now my RPI monitoring program idols at 35% cpu usage and peaks at 85% when there is an alarm. It was a lot higher before I tweaked the code. Normal usage of just the OS just idling is 15%. There is a slight delay (barely noticeably .5 second delay) from when a condition is set to trip the alert is made and when the alert is latched and sounded. Same for the webcams (i had to do a .2 second delay) and sound of the alarm. Software PWM (pulse width modulation) is stupid cpu intensive as well as active monitoring. I made that buzzer sound great but it took 275% of the CPU to do it. The program is written to passively monitor.

On another note. I did a buy in on the Crowd Funding of the Hackboard 2 and its supposed to be significant upgrade over the RPI and its X86 so I will get my Dropbox back. I should get that in April. I wanted the RDXA Rock Pi x. But when comparing it to the RPI. The PI actually beats it in performance. Glad I didn't buy it. Down side is the Hack Board 2 doesn't have the cores and threads like the RPI.

I think my program uses 8 threads. Each alert and webcam is its own thread separate from the main loop.. RPI is a quad core.... 12 thread I think... shooting from the hip here. The hack board 2 is a dual core, 8 or 6 thread process. So not sure how this is going to affect things.

Sent from my SM-N970U using Tapatalk

ryanmattes
01-30-2021, 02:23 PM
Thinking outloud, is it possible interface a Rasberry PI and an Arduino and use them in the same project?


Yes, you can. You'll have to approach the project in a more modular way, and break out responsibilities to the arduinos. Give an arduino a more limited set of things to watch and report back to the Pi, and the Pi is the coordinator.

You can actually go even lower level than that, and use just a chip as an I/O controller. For example, on the joystick controller I needed to light 10 RGB LEDs in different configurations for different game button layouts, which means 30 outputs (each color has to be powered separately, so 3 lines per LED), which neither the Pi or an arduino has. So I wired up 2 MCP23017 chips in parallel, over I2C, and could send a single command to that set of chips that would, in turn, tell each LED which channels should be on or off, in order to light each one with appropriate colors. I didn't measure the delay, because it was too small for the equipment I have to measure.

You could do that the other way around and monitor 15 different inputs through a single chip, and have it send that state info to your pi in a single bundle, so that you can respond to them all at once. Of course, the chips won't do conditional logic, you need a circuit of some sort on the other side of the chip to do that.

So depending on what you're trying to do, you could almost certainly break out subsystems to monitor and respond to each piece of the puzzle, or maybe a few related pieces together, and just have it report what is happening back to the Pi for display.
https://uploads.tapatalk-cdn.com/20210130/017075d507ee397b52cb00c1c2642cbd.jpg

Sent from my Pixel 3a using Tapatalk

Rcmaveric
01-30-2021, 02:50 PM
Lol you lost me at chips. I will have to look those up. I understand logic gates though. Good to know its possible. Once I get a working protype I will pursue other ideas latter. Because I can build the arduino or chip portion into the PCB.

I barely under stand what I2C is. Only reason I know what is because interface my LCD with it.

Lol nice organized bread board. Mine looks like a bird nest exploded. Why I cant wait for my PCB to get here.

Sent from my SM-N970U using Tapatalk

ryanmattes
01-30-2021, 03:10 PM
Think of I2C like USB (it's a serial bus). You can daisy chain a bunch of devices together on a pair of pins on the arduino or pi, and talk to them all through those two pins. You just have to give them each an address, like an unpronounceable nickname, so you know which one you're talking to.

Sent from my Pixel 3a using Tapatalk

Rcmaveric
01-30-2021, 03:19 PM
Think of I2C like USB (it's a serial bus). You can daisy chain a bunch of devices together on a pair of pins on the arduino or pi, and talk to them all through those two pins. You just have to give them each an address, like an unpronounceable nickname, so you know which one you're talking to.

Sent from my Pixel 3a using TapatalkI was actually curious about that if it was single device bus or multiple. Thanks for that.

Sent from my SM-N970U using Tapatalk

ryanmattes
01-30-2021, 03:30 PM
It does add latency, which gets worse as you add more devices. Theoretically it could do up to 128 slave devices on a single bus, but in the real world latency gets noticeable at 5 or 6 devices, and you probably don't want to do more than 8. Hardware addressable I2C daughter boards usually limit it to 8.

But very useful when you run out of I/O pins.

Sent from my Pixel 3a using Tapatalk