Bluetooth Raspberry Pi for grinder control

Grinders are one of the keys to exceptional espresso. Discuss them here.
jwCrema
Supporter ❤
Posts: 1098
Joined: 11 years ago

#1: Post by jwCrema »

(Nerd Alert)
I've been mulling ways to simplify doserless dosing and became intrigued by these earlier threads:
Espresso Preciso - the Bluetooth scale adapter for doserless grinders
Bluetooth modded Mazzer Robur for weight-based dosing

They used Bluetooth devices to dose. But, with all respect for their projects, I didn't want to have to lend a guest my phone if they wanted to make us a shot. And I wanted to have an open source solution that would enable other tasks to be incorporated into the platform.

The Raspberry Pi at $35, has always been around for a while; the breakthrough for the Pi option was the release of the Touchscreen display this Fall. This allows everything I want to do to operate through touch. Since the Pi supports Bluetooth, my goal to eliminate computer junk on the counter is fulfilled - the only cable I need is the power cord to the Pi.



Right now, a person just touches the button and they get the dose they want. Since I have a Cremina and a Technika there is a button for each machine. I'll embellish the screen later with spinning saucers or Dan's head twirling, etc, - I've intentionally kept it uber simple for now. If the user touches the Technika button they'll get the right number of grams. As the previous posts alluded to, the SJ is slow enough that its grind measured in grams per second is very consistent. So much so, I'm not proceeding with streaming data from the scale back to the Pi to control the grinder based on weight at this time. But, I'm open to doing that someday.

I used Python for the programming language, mainly because of the availability of BlueTooth (BT) libraries from Plugable, the vendor of the BT accessories I'm using. Going into this I did not know Python at all - its a programming language that's been around for a while. But why let that stop anyone? I didn't need technical support from the BlueTooth device vendor (Plugable) to make this work. Everything provided by Plugable has performed flawlessly, and I have a pile of crap from other vendors I tried before I discovered them.

While the starting point of this project is modest, the upside is it can go any way the imagination can devise. My interest in sharing this with our community is to see if there is any interest from others? I kept exact build instructions that should enable anyone to start in a much better place than I started from. I'm going to add a couple more power switches to turn on the Technika based on a schedule using what's here:

http://plugable.com/2015/01/29/pi-and-c ... spberry-pi

Here is the shopping list:
Raspberry Pi 2 B - Earlier Pi models would probably work, but this is what I used.
https://www.raspberrypi.org/products/ra ... 2-model-b/
Raspberry Touch Display - The Pi Foundation Touch Display is probably not the cheapest display, but it's a nice sized unit and it was very easy to configure.
https://www.raspberrypi.org/products/ra ... h-display/

Plugable USB BlueTooth Adapter - This USB device enables the Pi to communicate with BT devices. A number of BT adapters are listed as compatible with the Pi, but I had issues with one and gave up trying to get it work. After I bought it and had issues I found others had the exact same problem I was having over a year ago, with no response from the vendor. So, that one went to the trash can, and I went with this Plugable device. It worked out of the box, no issues at all. This is what I used:
http://plugable.com/products/usb-bt4le

Plugable BlueTooth Power Switch
This BT power switch can run a Mazzer Super Jolly. I did try a different BT Power Switch, as I was thinking about doing this through my iPhone, but integrating it with the Pi was a pain. Go with the Plugable product unless you're cool with writing your own.
http://plugable.com/products/ps-btaps1

What I am not particularly happy with:
• The display stand for the touchscreen isn't really something I want in the kitchen. There isn't a commercially available enclosure for the touch display that I like. Right now, I have open circuit boards, with wires exposed, which is not acceptable. I would love a stone enclosure, but fabricating one would be a hassle. Teak or other hardwood would be cool, but I don't have a wood shop at home.
• While my Python code works, not knowing Python drove me a bit crazy. But, it's pretty easy to learn and I have no barriers due to this ignorance.

Here is what I spent:
• Raspberry Pi 2B $35
• Micro SSD - 8 gb is more than enough. $6. I have a MicroSSD card reader on hand, which I needed to format this for the Pi. You will need one.
• Raspberry Touch Display $70
• Touch Display Stand $15
• Plugable USB BlueTooth Adapter $13
• Plugable BlueTooth Power switch $35

About $ 174 altogether. Obviously, this is way cheaper than getting an iOS programming environment up for the iPhone. And cheaper than the Mazzer electronic doser. And vastly more interesting.

Beezer
Posts: 1355
Joined: 17 years ago

#2: Post by Beezer »

This is intriguing. I'm not sure I understand how this works, though. Is there a Bluetooth scale that interfaces with the grinder, or is it based on time? Can you post a video of the whole thing in action?

Anyway, good work on coming up with an innovative and reasonably cheap way to do automated dosing.
Lock and load!

jwCrema (original poster)
Supporter ❤
Posts: 1098
Joined: 11 years ago

#3: Post by jwCrema (original poster) »

Sure, I'll post video after I'm done with work. In a nutshell, if you press the Technika button on the Pi TouchScreen, through Bluetooth the Pi turns on the grinder for 9.2 seconds. Press the Cremina button on the Pi and the grinder runs for 8 seconds.

The python program controls the length of time the grinder runs via this code (for the Technika button):
def technika(self):
   btaps = libbtaps.BTaps("8C:DE:52:21:32:FD")
   connected = btaps.connect()
   if not connected:
	sys.exit(0)

   btaps.set_switch(True)

   time.sleep(9.2)

   btaps.set_switch(False)

ds
Posts: 669
Joined: 11 years ago

#4: Post by ds »

Why simply just not buy the Coffee Grinder Timer from Aubers??? Cheaper, simpler, cleaner, everything better... :D

User avatar
arcus
Posts: 770
Joined: 11 years ago

#5: Post by arcus replying to ds »

Maybe cheaper and simpler but definitely not cooler. The Pi 2 is definitely on my Xmas list.

Beezer
Posts: 1355
Joined: 17 years ago

#6: Post by Beezer »

OK, so it's basically a high tech timer for your grinder. Interesting.

I have the Auber coffee grinder timer, and it works pretty well. However, it sometimes fails to grind unless you press the button a couple of times. Not sure if there's a problem with the button or the timer itself. It also takes up some space on the counter, so it's not quite as clean as having a built in timer. I wish there was a way to install it into the grinder itself to cut down on the clutter on my counter. Still, it does the job, so I don't feel the need to get a Raspberry Pi just to do the same thing.

I'm still waiting for a weight based grinder that's Titan class. Something like a Baratza Forte but with bigger burrs and a bigger motor that can be used with the PF in place. I was hoping the LWW EG-1 would have these features, but they chose to go with (IMHO) a more cumbersome single dosing option. Oh well.
Lock and load!

User avatar
keno
Posts: 1409
Joined: 18 years ago

#7: Post by keno »

Very cool! Just bought my 11 year old a Raspberry Pi kit for his birthday. He is learning to program. Hoping that before long he might be able to help me with some mods like this! :D

jwCrema (original poster)
Supporter ❤
Posts: 1098
Joined: 11 years ago

#8: Post by jwCrema (original poster) »

ds wrote:Why simply just not buy the Coffee Grinder Timer from Aubers??? Cheaper, simpler, cleaner, everything better... :D
I did look at it and put it in the one trick pony category. The Pi can control turning the espresso machine on/off by time of day as well, and when/if we find a good precision scale with BT, we can easily move to grind by weight.

And, I'm not sure they could do anything more to make it any uglier - it looks like a 8th grade metal shop project you'd get a C+ for.

Not really trying to insult it, but you asked "why"

Marcelnl
Posts: 3837
Joined: 10 years ago

#9: Post by Marcelnl »

Looks very high tech.... ;-)

I'm using a seventied darkroom timer for my SJ, works pretty good too and only cost me fiver :-)
LMWDP #483

day
Posts: 1315
Joined: 9 years ago

#10: Post by day »

Are both machines able to be properly dialed in by leaving the grind constant and changing dose?
Yes, i you per this on an iPhone

Post Reply