Numi v4: Autonomous AI Coin Sorting Robot, Rebuilt From Scratch
AlbumNerd
Posts: 277 ✭✭✭✭

I'm back at it again with an update on my AI Coin Sorting Robot. Version 4 is now complete, and I wanted to share some lessons learned and a breakdown for anyone interested in pursuing a similar project.
Last summer I brought Numi v3 to various coin seminars and programs to gather feedback from dealers and collectors. It worked, people loved it, and I came home with a notebook full of things that were wrong with it. These past twelve months have been spent fixing them, and in the process, throwing away almost everything v3 was built on.
Here is a video walkthrough of Numi v4 in action. You'll see the entire process, from dumping a handful of coins into the hopper all the way through AI analysis and automated sorting. You can find previous posts about Numi v1-3 at the end of this post.
To be upfront, v4 is not perfect. The real goal of this version was to find the gaps in my own knowledge and close them before version 5.
Numi v3 was a Raspberry Pi 5 running about 14,000 lines of Python, bolted to a chassis made from more than 500 LEGO Technic pieces, with two 16-megapixel Arducam cameras looking at the coin.

It was a wonderful proof of concept and a genuinely terrible machine. LEGO pieces flex under pressure. Every time the frame shifted a millimeter, the cameras lost focus, and the coin chute lost alignment. I spent more time re-squaring the build than improving it. So v4 got a full teardown. The LEGOS are gone, replaced with a 3D-printed frame I designed and printed myself. The Raspberry Pi is gone, replaced with a microcontroller about the size of a postage stamp.
The clearest way to explain v4 is to follow one coin through the machine.
1. The hopper drops a coin
Knowing when to stop feeding is harder than it sounds, so Numi uses a laser rangefinder. It's a small sensor that fires an invisible laser at the coin stack and measures how long the light takes to bounce back. When the stack reaches about 90mm away, the hopper stops. When it drops back past 108mm, the hopper starts again.
2. A pusher slides it under the camera
A second motor pushes the bottom coin out of the chute and onto a small lit stage. The pusher then retracts until it physically stalls against a wall, which is how it finds its home position again.

The stage is lit by a ring of 19 white LEDs. Numi photographs the coin at 5 megapixels.
3. It photographs both sides
Numi has one camera, so to see both faces of a coin, it has to physically turn the coin over. A flipper arm rotates the coin, and the camera takes a second photograph.
The flip completing

This works, but it also turned out to be one of my biggest mistakes.
4. The AI analyzes the coin
Both photographs are sent together to Google Gemini Flash (the same AI you can chat with in a web browser) along with a set of written instructions. Gemini sends back the coin's series, year, mint mark, a list of descriptive tags, and a decision about where it should go. All this info is sent to an easy to read dashboard.
The part that surprises people the most is that the sorting rules are not code. They are written in plain English, in a text file, and I can change them without touching the robot at all. An excerpt from the actual instructions Numi sends with every coin:
Save: Silver, Key Dates, or Semi-Key dates.
Inspect: ANY known US Variety Candidates. Use your numismatic training to cross-reference the Series, Year, and Mint Mark; if this combination is associated with a specific valuable variety (e.g., 1955 Lincoln Cent, 2004-D Wisconsin Quarter), tag as "Variety Candidate" and set Action to "Inspect".
Dump: Common face-value US coins, standard clad, and severely damaged coins.
Misc.: Foreign coins, casino chips, tokens, non-coin objects, etc.
Retry: Machine anomalies (Double-Feeds where images show different coins, overlapping coins, empty frames), or if BOTH Year and Mint Mark are unreadable.
If I want Numi to start pulling war nickels tomorrow, I add a sentence and go. That is a fundamentally different way to build a coin sorter than training a machine to recognize specific coins, and it is the single thing I am most convinced about after four versions.
5. Positioning the sorting carousel
Once the verdict comes back, the carousel spins the coin cup over the correct bin, and a dumper arm drops the coin in. 
Numi processes roughly 250 coins an hour at a cost of around $0.25 per thousand coins.

The speed didn't come easily. Numi v4 started at about 60 seconds per coin. Getting to 15 seconds took weeks, and most of the gain came from overlapping steps that used to happen one after another.
Lessons Learned
- A mechanical flipper will eventually jam. Any moving part that has to physically manipulate a coin is a part that will eventually fail.
- **Use two cameras, not one. **The flipper only exists because I dropped from v3's two cameras to v4's one. I saved a camera and paid for it with a moving part that touches every single coin. That was a bad trade.
- A funnel will eventually jam too. Another moving mechanical part that will eventually fail. Writing a function to un-jam your machine is a sign you designed the wrong machine.
- Lighting and camera angle are much harder than I expected. Coins land at slightly different distances from the LED ring, and by my own measurements the brightness of the subject swings by roughly ten times between the near and far cases. Too bright and the lettering blows out to white. Too dark and the date disappears.
- Bringing Numi to shops and shows is the best part. Nothing in the code is as valuable as watching a dealer's face when the machine pulls a silver quarter out of a junk bin, then hearing feedback on how to improve the machine to be useful for them.
Version 5 is already sketched out, and it's shaped entirely by these lessons.
I'd rather tell you what broke than pretend I got it right the first time. Four versions in, the goal hasn't changed: make AI genuinely useful and genuinely approachable for people in our hobby.
If you have ideas, I'd love to hear from you. And if you see me at a show, come say hello. The machine will be running. If you want to keep up to date about Numi's latest developments, [as well as Dansco research], feel free to check out my Instagram page.
Justin, aka Dansco Dude
Comments
Oh, you are SUCH a nerd.
And I say that with the utmost respect possible.
Collector since 1976. On the CU forums here since 2001.
Cool, stuff like this makes it great, i like 👍
My first thought... "Wait... are those... LEGOS?!?"
Collector since 1976. On the CU forums here since 2001.
Love this.
Your AI tokens are only $0.25 per 1000 coins (2000 photos)? Photos presumably are decently large files so I would have expected you to be paying more.
Successful transactions with: wondercoin, Tetromibi, PerryHall, PlatinumDuck, JohnMaben/Pegasus Coin & Jewelry, CoinFlip, coinlieutenant, bigjpst, and joebb21.
This is great 👍🏼
Mr_Spud
Looks like a fun project. Great work!
Great work! Any reason why you chose Gemini over another LLM?
Proud follower of Christ! I love the USA! Land of the Bright and Beautiful! 🇺🇸🇺🇸🇺🇸🇺🇸🇺🇸
it's mechanical. parts will fail and need maintenance. it is better to have moving parts to not be obstructed so they can be unjammed and replaced as needed
then there's edge lettering
can it sort wheats, steel, bronze and zincolns?
I want one of these. Have for a long time. Been waiting for one to be invented. Considered production?

“Land of the free because of the brave”
“Saved by grace alone, through faith alone, in Christ alone”
In Deo solo confidimus
ΙΧΘΥΣ
ΙϹ ΧϹ ΝΙΚΑ (ΙΗΣΟΥΣ ΧΡΙΣΤΟΣ ΝΙΚΑ)
Member since 2026
Successful BST transactions with: Ted 1, JWP, bigjpst, Vetter, nickelsciolist, ajaan,
have just one dumb question:
I am curious. Are you building this for marketing and selling, or just for fun spending your money?
What an entertaining read! Good luck. I imagine success is still a long way off, but keep hacking away at it
Dead Cat Waltz Exonumia
"Coin collecting for outcasts..."
Lego sorting machines are similar, but they have more output bins.
They have the same task of mechanically separating the items,
so that only one at a time is under the camera.
They do not have the task of flipping the item to see the other side (or using a second camera).
Here are the 2 best Lego sorters that I recall.
https://www.youtube.com/watch?v=GKkuERrLJS0
Both made their own local computer vision implementation, so they don't have to pay a commercial AI provider per photo.
1. Benjamin Clark. 545 output bins (12x12 + 20x20 + 1), and can be increased. About 5 seconds per piece. The software knows 1000 piece types. This guy ended up selling the machine/Lego business and taking a job as a programmer.
You probably know a Ryedale coin sorter can be used to separate silver from clad, and copper from zinc.
https://www.youtube.com/shorts/z1GXmy3blco
Justin, great job. Are you going to be able to handle Silver Dollar sized coins? The pictures made it look like Quarters were about as large as you can currently handle. You know shops take in a large amount of Morgan and Peace dollars and can spend a lot of time sorting through them. Your machine might help there.
Life member of ANA
and half dollars and small dollars
Keep it up, Justin! I enjoy watching your iterations pour forth.
My hobby website Groovycoins.com, new and improved!
Thanks for the kind words and encouragement everyone
Photos can get pretty large, especially if I send them in a raw format. But I've found a few ways to drastically lower costs.:
JPEG works well enough for my needs.
- Gemini optimizes how it intakes photos. It breaks photos down into 'tiles' at fixed input token rates.
- I set the media resolution parameter to medium instead of high
- I have my camera set up to zoom in and only send cropped images. So really each photo is around 250 tokens
- I based my numbers on Gemini Flash Lite to show how cheap it can get. It only costs $0.10 per million input tokens and $0.40 per million output tokens.
Here is a breakdown shown in an actual API call I made. Cost equals $0.128 per 1000 coins in this case

I expect costs to go up, though, as 2.5 Flash Lite is being deprecated in October and 3.1 Flash Lite is 3x more expensive.
I chose Gemini because:
- I've already been monitoring and testing Gemini's coin analysis capabilities for a while now and it works very well
- The flash models are super cheap
- It plugs in well to Google's other services like Google Cloud Storage
Only if it makes sense by inferring from the year and mint mark listed on the coin. Otherwise no.
No. By the nature of dumping the coins in bulk into a holding bin, the coins will get dinged up. I would not put proofs into my machine.
It cannot handle that, but it can sort by year and mintmark. So any years/mintmarks with known variety can be pulled out for further manual inspection.
Yes, easily!
I've definitely considered it, but I've been saving that exploration for later. I want to first finish a working prototype that can handle a few thousand coins without stopping, then validate that it actually brings value to collectors/dealers/companies. If I am actually solving a problem, then I'll consider wider production.
I started Numi as a way to bring awareness of AI and its massive impact on our industry. Over time, I've become convinced of its potential business viability. Even if it doesn't take off, it's been a great way to build out my tech and hardware skills. We shall see!
Here's another automated Lego sorting project I've been following closely. Their video shows how they separate out bulk pieces into individual pieces. I was able to get connected with their team on Discord and use a variation of their carousel for Numi
I'm optimizing for pennies and quarters, but Numi can easily be adapted to handle all sorts of sizes, including silver dollars. I want to nail down handling those coins first, but I definitely plan on having it cover larger coins. I hope the Colorado clubs are doing well!
Definitely planned for later after pennies - quarters!
thanks for being so responsive. you're great!