Open source coffee sorter project



Hi everybody
I’m a home roaster living in France.
My passion for coffee made me meet different people having the same interest.
I already have been supplying a small coffee producer in Réunion island with a humidity tester in order to improve the quality of the beens he is trying to sell.
Last time we met, he was telling me that he wasted a lot of his time sorting his coffee and he wished to find an automated solution for this job.
That’s why I’m here with you as an expecting end user of your sorter, for me and him.
If there is any way I can help, please ask.


Hello Antoine, and sorry for not answering your e-mail earlier. Anyway, you found the right place. This is the forum thread where you’ll get all the updates about the development of the coffee sorter, and where you can contribute as well.

We would be especially interested in the requirements of small-scale coffee producers for such a machine to be usable in practice, esp. cost and how rugged it has to be … . And of course we’re excited about a potential “customer zero” interested to buy the machine, though I also have to caution that (1) we do not yet have a proof-of-concept prototype working and (2) it’s a rather experimental approach. But glad to see that this machine would be useful to coffee growers, and we’re here to make this machine a reality …

Some work on the coffee sorter started already by now, as we are now three people “on the ground” here in Sidi Kaouki, Morocco, where development will happen until the end of April. More people of the development team will come in the following days. Photo of our first design brainstorming session below :slight_smile:


Hi Matthias, thanks for your reply.

I hope you will be able to drive this project until it becomes a real working machine.

My friend is facing the problem of loosing too much time sorting his beans: He works alone with his wife on a small production around 100 - 300 kg a year and aside, they have a small farm to take care of. Also as he is aging, his eyes get tired at this job.

I’m sure around 300 € would be a very fair price if reliability and durability are great. He lives in a place where humidity is present, so it has to be taken into account. Small size is also welcome as one person may be able to handle it easily.

Nice place to brainstorm and great project!

On the emerging science of cities, and what it means for Edgeryders settlements

Notes from the “P2P project sharing session” on 2018-02-22 at OpenVillage House Sidi Kaouki, where we presented the two projects in the House to the other team.


  • First concern: The coffee sorter will change the lifestyle of people. So the machine should be a communal property, not an individual property, to help make these lifestyle changes beneficial. Otherwise, the technology might lead to increasing inequality and exploitation.

  • Second concern: The future users need to master and build the technology by themselves. Otherwise, a new technology will be a foreign item / magic technology arriving out of nowhere into their life, making them dependent on things they do not understand. Addressing this concern is called co-conceiving / co-conceivement. A good example are projects by Benkit Roery in Kenia. Benkit said: “If you want to develop any technology, start with the women of the community.”

@islem: Introducing this technology should be done so it does not disturb the current production process of these farmers, but helps them along. (Also she mentioned she has a good presentation about co-conceiving she can share.)

(CC @hazem this is what we discussed after the project presentation. The second presentation by the Bitcut people will follow in a day, so you did not miss that. And @m_tantawy could you tell me the video link for the Talk by Benkit you were looking for?)


Hi Matthias

I have started building my own sorter using some of your design an modifying where needed. I started in June but finding the parts needed is not as easy to do and at a low coast. I will try to add photos when I can to show progress.


Ohh … that’s great news @Bobalso! Very welcome to modify it all as needed, and to continue the development. On our side, the coffee sorter project is on hold until @anu and me will set up a coffee roastery in Nepal early next year. But even now, we’re happy to discuss your deslgn, offer some feedback etc…

About sourcing the parts: what location does this refer to? Stepper motors are in old inkjet printers etc. … the special parts are probably the Raspberry Pi and its motor controller boards. Does it make sense (cost wise) to send you an envelope with this stuff?


Hi Matthias

Glad you got back so quick. My main drive Convery will be 4" wide and I can get 3 slow convers about 1/2" with air blow offs. I can use either Arduino or Raspberry Pi I have both.
I have a CNC to make the components. My biggest problem is I am not much of a programmer CCD camera
I have a Grove I2C Color Sensor, Also have 1000TVL CCD camera and OV7670. So I have several ways I can go with this. If can figure out the software for them I’ll be doing great.

Keep up your good work and I’ll get back to ya soon



We have mini coffee sorter for small scale farmer.The price is not scared.
The machine is very small and portable .It could sort many different grains,rice.It is full color.

you could find more information from our websites
Please visit our website for more information


I like the machine you have on offer … indeed one of the smallest and lightest ones I saw (80 kg, 40 × 100 × 100 cm). If you read through this thread you’ll notice that we try to build an even smaller one, and that there is commercial demand for it from different kinds of small agricultural industries (incl. small coffee growers and cooperatives, of course).

In other words, if you’d make a sorter with 10% of your MINI-32 sorter’s capacity and sell it for 10% of its price, @anu and I would buy one immediately. To my knowledge, no company is making something like that right now :slight_frown: It’s an untapped market! Maybe your company wants to develop such a model?


Hi everybody.
I agree with Matthias.
Try to make a smaller sorter.
With 25 to 30kg per hour at a cheap price and small footprint, you will find a market of small producers, small roasters and even coffee geeks.
If you also can make it compliant with electric generators, it will be almost perfect.
Thanks you all!


Hi Matthias
why do you need so small machine? for that small capacity,the human can manually sort it .It just take a few minutes to finish the job.


Well of course manual sorting is possible, and 80% of the coffee worldwide is still hand-sorted (or so I’ve read).

But in many cases, these people would also choose a color sorter if one would be available for their size of operations, matching in both capacity and price. This might be a small to medium farm, a coffee cooperative of small farmers, or a small artisanal roastery in coffee-consuming countries. For all of these cases, even your small color sorter is too expensive and has way more capacity than they need. So there is the opportunity that they’d buy a cheaper, smaller machine.

As we found out, a worker can sort 5 kg of green beans per hour under average conditions. So, 200 kg in a 40 hour work week. On the other hand, your small sorter, when running 24/7, can process 250 kg/h * 24 hours/day * 7 days = 42 tons per week, as much as 42,000 kg/week / 200 kg/worker/week = 210 workers. That’s way more than most manual sorting operations need. They might have 5 - 30 workers for sorting, could be replaced with a sorter sorting 25 kg per hour, replacing 21 workers.

I’m not proposing to put these workers out of business, but to enable small farms etc. to produce higher quality coffee instead of selling it unsorted to wholesalers. Because then they get a much better price for their coffee as well.

I hope this makes it clear, otherwise I can explain it more. And let me know when your company decides to make a “micro color sorter” :smile:


Hi :slight_smile: I like this project! You have a lot of notes here, but they are mostly from the last year. You wrote that

The major development will happen from January to April 2018 during the OpenVillage Academy in Sidi Kaouki,

Did this happen? Do you have a video of working machine? Are there some newer updates about this project, about things you’ve learned from the actual prototype?

Thanks a lot!


Ah yes, I did not yet update the time plan.

In reality, we worked on that between January and April but got stuck with the image classifier. I now think that neural networks are not good at sorting something based on “fuzzy spots of color”, they want to see edges and clear lines. So maybe creating color histograms from the bean images and running a classifier on that would help, but we did not try that yet.

If you want to do some experiments on your own, I could upload our dataset of coffee beans images at least.


Yes, that would be cool :slight_smile: How many beans per second (on the conveyor belt) did you process? Were the pictures too blurry? How did you manage consistent lighting?


Ok, I will upload the picture set then. It’s just the first training set for the image classifier though, not yet produced with a coffee sorter machine. We simply made photos of 20-30 beans at once (unordered) and I wrote a small script that split these up into individual images with one been each. For consistent lighting, the best trick was direct sun and a white translucent plastic bowl over the beans when taking a photo.


How did you want to sort them out when they were clumped together? Once you find that some bean is bad, you’d throw away also the neighbours?


They should not be clumped together because the two conveyors and funnels in the current machine design will place the beans into a single line, with enough distance between them so that each can be removed individually.

Throwing out the whole group of beans together would also be an option, though. Commercial optical sorters do it similarly: they create “first rejects” in a first pass, which includes some good beans. The first rejects are then fed to the machine again. This time, the beans will be grouped differently and so the machine will only throw out the bad ones (with a few exceptions of course). These are then called the “final rejects”.


Ok then @xixli, I have just converted and uploaded our coffee bean images in a manageable size. they in our repo in the training-data-jpg directory, and to download them you can either git clone the whole repository or download it as a ZIP archive. Happy experimenting! :slight_smile:


Thanks for your explain .I will report to our company for your request.
By the way,we have some mini color sorter videos on YOUTUBE ,you could check for your reference


This video for sorting rice.We also have video for sorting green coffee.If you need I could send you for your reference.