# arduino grinder project help required please



## Jim bean

hi there i'm after some help with my mazzer major grinder project i'm doing a funnel mod plus (hopefully lol) adding a arduino timer i've never done any coding or programming so apologies for that in advance i have seen a couple of arduino grinders on the forum so thought it might be a good place to ask









here's a video of the finished grinder by Henrik Thomsen






im using the same project from Github

arduino grinder timer

i'm having problems when i try to verify or load the sketch

on GitHub readme it says

Copy the three libraries from the lib folder: "EEPROM, Encoder & DigoleSerial" to "Arduino\libraries" folder and restart arduino application

Open "Grinder_Timer.ino".

which i've done

but i get the same #include wire.h error as mentioned on the GitHub issues page i've tried both methods mentioned to try and fix this

i edited #include "../Wire/Wire.h" to #include "Wire.h" in the DigoleSerial.h file

but get the same errors as timcoolguy on github

ive also tried to put all the files in the same folder as follows

i've made a new folder in the arduino library named Grinder_Timer_1_1 put in the EEPROM, Encoder & DigoleSerial files along with all the ino files from the folder named src but when i verify i get this error message about the encoder.h

Arduino: 1.8.5 (Windows 7), Board: "Arduino/Genuino Uno"

C:\Users\jimbean\Documents\Arduino\libraries\Grinder_Timer_1_1\Grinder_Timer_1_1\Grinder_Timer_1_1.ino:14:21: fatal error: Encoder.h: No such file or directory

#include <encoder><encoder.h><encoder.h><encoder.h></encoder.h></encoder.h></encoder.h></encoder>

compilation terminated.

exit status 1

Error compiling for board Arduino/Genuino Uno.

i'm thinking this is a library issues I've maybe not loaded them properly if anybody has any pointesr it would be great.

even better







lol if anybody with the IDE software could verify the code from GitHub that would be amazing

many thanks jim bean


----------



## Jim bean

i managed to get this loaded if anybody is interested in using this project you will need to change the DigoleSerial.h file

from

#include "../Wire/Wire.h"

to

#include "Wire.h"

also the src folder needs renaming to Grinder_Timer_1_1 and all should work


----------



## spoxehub

Always interesting to hear/read the trials and tribulations of these mods and the workarounds to get them functioning. Nice simple looking mod to the grinder that.

I'm working on echoing this one;


----------



## Jim bean

spoxehub said:


> Always interesting to hear/read the trials and tribulations of these mods and the workarounds to get them functioning. Nice simple looking mod to the grinder that.
> 
> I'm working on echoing this one;


hi spoxehub I'm still waiting for the oled screen from digole Canada to test the circiut again if anyone wants to do this project the code is written specifically for the digole oled screen linked on the GitHub page

i considered the project you linked to I thought a good idea to put it in this lid whiteyJ made for the funnel everything should fit in nicely and would save drilling holes

https://www.thingiverse.com/thing:803708

you could use the extra button to start the grind instead of using the factory button used in the video


----------



## spoxehub

Jim bean said:


> hi spoxehub I'm still waiting for the oled screen from digole Canada to test the circiut again if anyone wants to do this project the code is written specifically for the digole oled screen linked on the GitHub page
> 
> i considered the project you linked to I thought a good idea to put it in this lid whiteyJ made for the funnel everything should fit in nicely and would save drilling holes
> 
> https://www.thingiverse.com/thing:803708
> 
> you could use the extra button to start the grind instead of using the factory button used in the video


Ha! That lid is awesome! I'll check that out in detail tonight; still assembling parts for my mod at the moment so plenty of time to adapt.

Thanks for the heads up!


----------



## spoxehub

Also I would say mate it's for the SJ I bought off you! Ha!


----------



## Jim bean

spoxehub said:


> Also I would say mate it's for the SJ I bought off you! Ha!


Hahaha no way what a coincidence







how you getting on with your grinder?


----------



## GrahamS

I'd check for smelling mystayks.

Encoder.h in the code and the file's called Encader.h (not suggesting it is, but that sort of monor typo can cause issues, especially as it is happy with the other two library files.

what does the mechanical encoder do in the circuit? is this not just a timer to run the motor?


----------



## Jim bean

Hi Graham I managed to load the code eventually the solution is in post #2

the encoder sets the grind time in seconds and the push button on the encoder if pressed in takes you to a menu where you can save the grind time alter the brightness of the LEDs ect

yes it's a grinder timer to run the motor for however many seconds the encoder is turned or set to with funnel mod will turn a grinder into on demand


----------



## spoxehub

Jim bean said:


> Hahaha no way what a coincidence
> 
> 
> 
> 
> 
> 
> 
> how you getting on with your grinder?


Hi mate, getting on great with it. Obviously works like a charm, perfect! Have run a few different beans through now to dial it in and it's made all the difference in the world.

I think with the mod, it'll be absolutely perfect!


----------



## Jim bean

Great stuff just need a PID on your classic now







have you got any further with you're arduino project?

the screen arrived I've tested the circuit (to the best of my ability lol) but the number seem to large for the screen I'll have to double check my connections but there was simalar problems on the Danish forum where the project was discussed http://www.espressobar.dk/forums/showthread.php?7376-Vildt-Mazzer-Kony-doserless-og-timer-mod/page19

someone wrote a new code for the oled which seemed to solve the problem I might try that when I get time


----------



## spoxehub

Looking solid mate so far, sure you can iron those numbers out eh!

Not progressed my project at all yet, been pretty stuffed with work lately so everything on the backburner until I get some time to set it all up.


----------



## Jim bean

spoxehub said:


> Looking solid mate so far, sure you can iron those numbers out eh!
> 
> Not progressed my project at all yet, been pretty stuffed with work lately so everything on the backburner until I get some time to set it all up.


No worries I've just got my funnel yesterday but yeah it's getting the time but I'd do enjoy a good tinkerer

I've put the the edited oled code from the link above and it's a lot better but still not correct as there's 2 letters on the screen and the s is in the wrong place might have to do a bit more jiggery-pokery


----------



## spoxehub

Jim bean said:


> No worries I've just got my funnel yesterday but yeah it's getting the time but I'd do enjoy a good tinkerer
> 
> I've put the the edited oled code from the link above and it's a lot better but still not correct as there's 2 letters on the screen and the s is in the wrong place might have to do a bit more jiggery-pokery


Yeah, I've got the parts for the switches, arduino, OLED and wiring, no doserless bits yet though. Wanted to see if I could make the mod work before I rip the doser apart etc. All in good time.

OLED looks good mate, weird how the extra characters show up. Still, plenty of help online eh! Be cracking to see it finished and functioning mate.


----------



## jimbojohn55

this thread is great, its the confusion from the online github that put me off doing this mod - gentleman I salute you - once you sort out the issues a detailed step by step with pictures will turn you both into legends







- keep up the good work


----------



## spoxehub

jimbojohn55 said:


> this thread is great, its the confusion from the online github that put me off doing this mod - gentleman I salute you - once you sort out the issues a detailed step by step with pictures will turn you both into legends
> 
> 
> 
> 
> 
> 
> 
> - keep up the good work


No worries mate, the first step was arranging my collection of hammers. After that I got stuck.


----------



## Jim bean

jimbojohn55 said:


> this thread is great, its the confusion from the online github that put me off doing this mod - gentleman I salute you - once you sort out the issues a detailed step by step with pictures will turn you both into legends
> 
> 
> 
> 
> 
> 
> 
> - keep up the good work


Cheers John more leg end though lol yeah it's not the perfect starter project with hindsight I got some great help on the arduino forums but there is a couple of issues the first is the library which is strait forward when you know how the person helping me on the arduino forum asked for a pull request lol (insert your gags here) on the GitHub page so hopefully that might get fixed

and then the screen used has been hit and miss hopefully I can get it working though with a bit more investigation


----------



## Jim bean

spoxehub said:


> No worries mate, the first step was arranging my collection of hammers. After that I got stuck.


lol

Which project did you go for mate this one or the Australian one?


----------



## spoxehub

Jim bean said:


> lol
> 
> Which project did you go for mate this one or the Australian one?


Aussie one mate. Have to stick with my adopted country eh! Good on yer.


----------



## Jim bean

Hi I'm struggling with matching the switch to the wiring diagram my switch has 4 connectors marked + - 2A/ 250vac I'm thinking the + is coming from the lamp (marked 4 in red) to the 100ohm resistor then to pin 11

The - coming from the switch (marked 3 in red) to pin 10 that would leave the 2A/ and 250vac to connect to the ground on the arduino board and the ground to the encoder? I hope that makes sense lol If anyone could confirm that would be great many thanks James


----------



## grumpydaddy

I would agree that *+* and *-* are most likely the connections to the LED within the push button

So the other pair provide the *Switch* function

Check with a multimeter


----------



## Jim bean

Great thanks grumpydaddy that's correct the led lights up when testing + and - on the multimeter

and when testing 2A/ and 250vac I get a buzz on the multimeter when pressing the push button

does it matter which way round there connected ie 250vac to the arduino board or the encoder?

cheers James


----------



## grumpydaddy

Nope, it is just a switch electrically.


----------



## Jim bean

Thanks grumpydady I've not been able to control anything when all connected tested all the components and all was good there I think the firmware for the screen and the code aren't compatible possibly lol

I thought I would try this project

https://github.com/Espressobar/Automatic-Coffee-Grinder-Doser

I had it up and running in 15 minutes with a £4 oled not even the same make as the original lol it's pretty much plug and play really easy to get up and running every thing is working apart from the menu's in danish but I'm just in the process of translating to English

First one done


----------



## timmyjj21

ah, never mind, my brain failed....


----------



## Jim bean

timmyjj21 said:


> ah, never mind, my brain failed....


lol it's not that difficult to get going I will do a step by step when I get time

all menu's now translated to English and working (up to now lol) I will share the code if anyone wants to try this project

cheers James


----------



## Jim bean

There's loads of settings and pre sets to play with which can all be controlled by the encoder and push button on the encoder so I'll have to work out what the other 2 separate push buttons do haha I've only connected 1 and it seems to do the same as the encoder button a few pictures of some of the menus


----------



## Jim bean

After struggling with the 1st project this has been a absolute doddle just got to work out how to wire it to the grinder now lol it's a great little project it's really easy to tweak the grind time/weight by long pressing the encoder and it let's you adjust that preset straight away by twisting the encoder







Bingo


----------



## Jim bean

Hi here are the English translation of the original code ive put them in 2 separate files "grinder libraries" and "Automatic-coffee-grinder-doser-master" for anyone new to arduino it should make it easier to load the code

https://www.dropbox.com/s/24ajpysl3eef7xh/Automatic-Coffee-Grinder-Doser-master.zip?dl=0

https://www.dropbox.com/s/wxstrkzdedyztgi/grinder%20libraries.zip?dl=0

once downloaded i find it best to move them from downloads to the desktop and extract here or extract all files here

download the arduino IDE software https://www.arduino.cc/en/Main/Software if using windows choose windows installer not Zip file follow the instructions to install

now you need to connect your arduino to the IDE software

connect the arduino to the computer with the USB lead it should update the drivers strait away now open the IDE software on the toolbar in IDE select tools then board and select your arduino board from the list i've tested with a nano and the uno board and both work,

still in tools select port and your arduino board should be there highlighted with COM3 or 4/5 etc select this and the board and software should be talking to each other

now you want to load the sketch/code to the arduino board

when the IDE software is downloaded it creates a folder in your documents called arduino this is where you put the 4 library files

open your documents open the arduino folder open the libraries folder (this is where to place the 4 files from the grinder libraries)

now open the "grinder libraries" folder thats been unziped on your desktop and move drag and drop the 4 files "clickbutton" "LEDfader" "MsTimer2" "u8glib" to the arduino libraries folder we have just opened

so we are moving the 4 library files from the grinder libraries folder on our desktop to C:\Users\your username\Documents\Arduino\libraries thats the hard bit done

if you have IDE running close it down open the unzipped "Automatic-Coffee-Grinder-Doser-master" folder on your desktop

there will be a"documentation" folder "OLEDTimerWizaed" folder a licence and a readme file

open the "OLEDTimerWizard" there will be 5 files "button" "display" "eeprom" "encoder" "OLEDTimerWizard"

open the "OLEDTimerWizard" the arduino IDE software will now start automatically and the code/sketch will be loaded ready to verify and load on to the arduino board

the top left corner of the IDE software there is a circle with a tick if you move you mouse it will say verify click this button and the script will verify when finised it will say somthing like Done compiling used 91% of storage space

now press upload "the circle with arrow next verify" it will now upload the code on to the arduino board wait for the Done Uploading/compiling message and that should be it good to go

you may or may not get some warnings depending what operating system i don't get any using windows 7 but do with windows 10 both work fine these are warnings not errors these happen with the original code as well as the English version so i don't think its anything to worry about as it works fine if used windows 7 or 10

ive translated the flow diagrams too its in the documentation folder but its a rough google translation so if anyone has any suggestions or improvements great 









shopping listed ive listed UK sellers but it would be cheaper from china

Arduino Nano

http://www.ebay.co.uk/itm/Arduino-Nano-v3-with-soldered-headers-ATMEGA328P-CH340G-UK-TESTED-UK-Stock/161861831569?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2060353.m1438.l2649

the OLED screen i used

https://www.ebay.co.uk/itm/New-0-96-inch-OLED-module-128X64-OLED-LCD-LED-Display-Module-For-Arduino-0-96/302306266789?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2060353.m1438.l2649

5V 2 channel relay Optocoupler

https://www.ebay.co.uk/itm/5V-2-Channel-Relay-Board-Module-Optocoupler-for-Arduino-PiC-ARM-AVRC/222652337587?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2060353.m1438.l2649

Push button encoder

https://www.ebay.co.uk/itm/10Pcs-12mm-Electronic-Rotary-Encoder-Switch-Keyswitch-Component-Push-Button-UK/262398403507?

ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649

Knob for encoder i used this as im replacing the mazzer switch for the encoder this is a similar diameter

https://www.ebay.co.uk/itm/Aluminum-Potentiometer-Knurled-Knob-Caps-Volume-Control-For-6mm-Dia-Shaft-Hole/222609712834?ssPageName=STRK%3AMEBIDX%3AIT&var=521452531001&_trksid=p2057872.m2749.l2649

12mm momentary push button

https://www.ebay.co.uk/itm/12mm-Waterproof-Metal-High-Round-Momentary-Push-Button-Switch-Screw-Flat-Top/292304855559?epid=2165083762&hash=item440eba2207:g:iSoAAOSwiBJZ7ty0

i think this is a 230v to 5v stepdown so the arduino will power from the mazzer but im not sure any one?

what was used in the original project

https://www.ebay.com/itm/DC-5V-1A-AC-to-DC-Power-Module-Supply-Isolation-AC85-265V-220V-110V-210V-AC-/261322500442?hash=item3cd808e95a

but maybe this is better for the uk voltage?

https://www.ebay.co.uk/itm/1PC-AC-DC-100-240V-To-5V-2A-2000MA-Switching-Power-Supply-Replace-Repair-Module/263319099808?_trkparms=aid%3D222007%26algo%3DSIM.MBE%26ao%3D2%26asc%3D49480%26meid%3D8585f44d4d1e47a6a47b30ad7b78eeaa%26pid%3D100005%26rk%3D6%26rkt%3D6%26sd%3D253023449509&_trksid=p2047675.c100005.m2219

if anyone needs any assistance just give me a shout cheers James


----------



## spoxehub

Outstanding job mate. I'll be in touch - having murders with mine so a change in tactics are in order!


----------



## Jim bean

spoxehub said:


> Outstanding job mate. I'll be in touch - having murders with mine so a change in tactics are in order!


 @spoxehub hi mate what is it your having problems with?

i tried the code your working on but it wasn't in a ".ino" file which is what the arduino IDE software wants so i think it may be a case of copying and pasting the code i will try it later


----------



## spoxehub

Jim bean said:


> @spoxehub hi mate what is it your having problems with?
> 
> i tried the code your working on but it wasn't in a ".ino" file which is what the arduino IDE software wants so i think it may be a case of copying and pasting the code i will try it later


Code starts upload ok, but I get some "variable invalid" message. I'll try emailing the code author to see if he can shed any light on it. Failing that I'll switch to your project mate, haven't drilled any holes yet!


----------



## Jim bean

spoxehub said:


> Code starts upload ok, but I get some "variable invalid" message. I'll try emailing the code author to see if he can shed any light on it. Failing that I'll switch to your project mate, haven't drilled any holes yet!


ive just copy and pasted your code but im getting some error messages too there is usually some library files but it may use the genric ones insatlled in IDE like you say the author may be able to shed some light


----------



## jimbojohn55

Just a quick mention for @Jim bean who assisted me with setting up the Arduino project, we got the hardware and the board working and switching the relay on and off - this is aneat and great solution, a lot harder than an auber to work out but once its going should prove a more cosmetic solution that can be run from the combination rotary knob/push button installed instead of the usual control knob - and very easy to change the times. Just waiting on a duel relay from china and should be able to implement and add some photos. As always this is not the path for those without an understanding / respect of 240v and safety - but with due diligence its possible to follow safely.


----------



## Jim bean

thanks jimbo specially for ironing out changing the code getting the relay up and running and the 240v side of things.

its worth making a new thread once everything is working we found a problem with the schematics pin D13 on the arduino is connected to the +on the relay

the correct pin is D8 on the arduino to +on the relay

i will try and change the schematics but at the moment if anyone wants to try this change pin D13 For D8









jimbo had to change the code to get the SSR relay working that may not be the case if using a 2 channel relay


----------



## craigsalisbury

i think i need to do this, how about making the grinder an IoT device so i can control t from Alexa/Google home?









In Berlin a couple of weeks ago I saw a Jura machine connected to an arduino and throwing out the stats to the cloud, literally every bit of information on the damn thing...very cool.


----------



## Jim bean

craigsalisbury said:


> i think i need to do this, how about making the grinder an IoT device so i can control t from Alexa/Google home?
> 
> 
> 
> 
> 
> 
> 
> 
> 
> In Berlin a couple of weeks ago I saw a Jura machine connected to an arduino and throwing out the stats to the cloud, literally every bit of information on the damn thing...very cool.


im sure you could the great thing about arduino the code is probley already out there and would just need adding to the existing code but the nano and uno are 91% full so you would need to go up a board or 2 and the right adaptor

but with having to be at the grinder when operating, Alexa/Google with arduino might be better implemented on a espresso machine maybe switch it on set the temperature etc stats wouldn't be that difficult it would just be the mounting and reliability of the probes definitely doable


----------



## jimbojohn55

Still working on this project with the kind assistance of @ jim bean if anyone is wondering where we are upto we will do an update of the whole process and the components once we get it fully up and running.

In the mean time we have come up with the wiring diagram below (subject to further tweaks - just waiting on a couple of components in the post from China before implementing on my major Aut and Jim Beans,s SJ timer.

Its not a project for the faint of heart but very rewarding to do, also it involves moving 240V 10A circuit wires so UNPLUG or don't even try it, if your not sure what your doing then don't attempt it as with all coffee machines and grinders the voltage inside them can be lethal.

The positive aspect of this timer / controller is that it runs on just 5v and is isolated from the 240v grinder electrics by the use of a twin relay but the whole project requires an understanding of safely working on electrics / electronics and tiny tiny tiny tiny components,

The implementation of this project as with all ad hock wiring and controllers should be treated with caution as its not backed by a company or subject to national standards or extensive testing but on a personal level and its just my opinion is a viable adaption for most grinders.


----------



## Jim bean

Thanks Jimbo

if anyone is looking for every thing programmed and wired up then there is a genius option







ive cleared this with Glen thanks mate

mactree over at kaffe netz has custom designed a circuit board with arduino chip so the Oled screen and encoder attach on









the arduino and some resistors are under the Oled the encoder PCB can be removed for fitting away from the screen (you would need to solder 5 wires for this) or there is the option for a smaller board but you cant remove the encoder but with the smaller board the screen and decoder can be moved and rotated like so

1. smal one

has the option to mount the display at 0° and 90° with the ability of the software any combination of display an encoder is possible

display right / encoder left

display left / encoder right

display top / encoder below

display below / encoder top

2. bigger one

has the option to cut of the encoder, you have to solder 5 wires and then you can separate the encoder from the display









easy connections on the back of the board









the full kit power supply, SSR, board with srceen encoder and arduino









this was a non commercial project by mactree i will list the parts

boards and parts possibly may be bought separately

the cost is 48 Euros

8.89 Euros DHL without tracking

13 99 Euros DHL with tracking

this is his thread if you want to contact him or PM me for his email address hes a really helpfully guy

Universalplatine Mühlentimer"]http://[/url]Universalplatine Mühlentimer

this is also a universal board so you can choose from 3 seprate codes/programs to have on it see the post in the link

also if anyone wants the timer codes loading on to Arduino and a circuit making for a DIY i can do that for the cost of parts ive got a few encoders and will be looking to get some decent cable so i could knock a few up but beware my soldering is function at very best but it would probably be cheaper and easier to to go with the full kit

cheers james

timer parts.pdf


----------



## Jim bean

been having a play around with another timer which can be controlled via a scale it also can be controlled by weight time or manual grind theirs a lot of options and can have up to 20 different presets

project and code here https://www.kaffee-netz.de/threads/millcontrol-arduino-muehlensteuerung-mit-timer-gewichtsautomatik-waagensteuerung-und-brew-timer.95553/









to get the scale working it will need a HX711 module https://www.ebay.co.uk/itm/HX711-Dual-channel-24-bit-A-D-99-UK-Weighing-Sensor-Module-Metal-Shied/181753863483?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649

when working press a button it will stop the grinder when the desired dose is weighed









theres some tricky bits of soldering but if i can manage it with my mincers so can you lol


----------



## grumpydaddy

This is now getting a lot more interesting

The premise of controlling the grinder to weigh a given dose opens up a bunch of possibilities, especially if it can learn ....


----------



## spoxehub

What an absolutely fantastic thread this has become! Still no nearer on my project, but given the progress and advice in here, I think I'll bin it and start on the one you guys have successfully implemented.

Well done all round. Excellent work.


----------



## Jim bean

grumpydaddy said:


> This is now getting a lot more interesting
> 
> The premise of controlling the grinder to weigh a given dose opens up a bunch of possibilities, especially if it can learn ....


Yeah i thought it was cool

im just testing the HX711 with that code as im waiting for a loadcell to try this with the scale built in to the portafilter handle

mamu's brilliant conversion













[/QUOTE]

hi mate just let me know what timer you like i can knock something up for you


----------



## jimbojohn55

your going to beat me to it, I'm still waiting on my crimps ;-)

and yours will weigh !

I can feel a long line of Jim Bean mod ex commercial grinders coming on stream across the UK


----------



## Jim bean

jimbojohn55 said:


> your going to beat me to it, I'm still waiting on my crimps ;-)
> 
> and yours will weigh !
> 
> I can feel a long line of Jim Bean mod ex commercial grinders coming on stream across the UK


Haha i went for 1 of mactree's kits for my major with the english version of richys code in the end just love the ingenuity of the idea

but im on the lookout for a rescue Super Jolly to adapt it for mamu's portafiter scale

ive ordered a couple of extra power PCB's of mactree they were only 1.50 euros i think the hi-link power supply is a copy of yours if so it should just pop on the PCB it would save a bit of space i think

ill pop you 1 over when they land see if it fits your power supply


----------



## jimbojohn55

Jim bean said:


> Haha i went for 1 of mactree's kits for my major with the english version of richys code in the end just love the ingenuity of the idea
> 
> but im on the lookout for a rescue Super Jolly to adapt it for mamu's portafiter scale
> 
> ive ordered a couple of extra power PCB's of mactree they were only 1.50 euros i think the hi-link power supply is a copy of yours if so it should just pop on the PCB it would save a bit of space i think
> 
> ill pop you 1 over when they land see if it fits your power supply


That's pretty cheap for a PCB board ! and it would make it a lot neater- I was getting ready to but micro crimps on the legs, at the moment I'm using fugly connector blocks and black tape hahaha


----------



## spoxehub

Jim bean said:


> Yeah i thought it was cool
> 
> im just testing the HX711 with that code as im waiting for a loadcell to try this with the scale built in to the portafilter handle
> 
> mamu's brilliant conversion
> 
> mamu's original thread here https://www.kaffee-netz.de/threads/mazzer-sj-arduino-waage.94786/ mamu kindly sent me the code to share if anyone want the code just PM me
> 
> hi mate just let me know what timer you like i can knock something up for you


Very kind mate, I will take you up on that! Any timer!!!


----------



## Jim bean

spoxehub said:


> Very kind mate, I will take you up on that! Any timer!!!


yeah no probs matey

the ones ive linked to hear anyway lol but if you've found any others id be interested to know


----------



## spoxehub

Your original one seems the simplest option mate. I do have a (knock off) nano here lying about.


----------



## Jim bean

My timer kit arrived from mactree

















its put together brilliantly if anyone is thinking of a grinder timer this is a great option i think

now to fit it to the Mazzer Major Timer version 2013 i know jimbo is fitting his soon but thought i would get the ball rolling and get some help with mine if possible please

the 2 red cables are the SSR go to +L1 -L2 ?









the 2 black cables 5v power suppy go to 230v ?









this is how mactree has wired it up to a motor the SSR wires are black in this photo









i want to remove the mazzer switch and replace it with the encoder if im remembering rightly the mazzer is in standby when plugged in (power to part of the contactor) when the switch is turned the other part of the contactor is turned on and power to the motor

the plan is to fit a on/off switch for the first part of powering the contactor

https://www.ebay.co.uk/itm/2-Position-12V-ON-OFF-15A-250VAC-Heavy-Duty-Flick-Toggle-Switch-SPST/122595628002?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649

the arduino timer will control the second part of the contactor powering the grinder how would this part need to be wired up?

im assuming it to be the one of the +and - from the switch

looking at the schematics would it not be possible to connect the SSR to pins 2 and 4 coming off the switch

and pins 1 and 5 for the toggle switch?

Mazzer Major Timer Schematics from around 2004









im not sure if they have changed if any one has a upto date one please post

many thanks james

everything was unplugged and then switch operated to release any power stored in the contactor


----------



## Jim bean

i hope this is a bit clearer









cheers Jim


----------



## jimbojohn55

That's the route I'm planning

take the L 1 and L2 feed wires from the old rotary timer switch and route them through the relay and then back to L1 and L2

with the new power on off switch connected to the old power feed from either side of the old rotary switch

if that makes sense


----------



## Jim bean

Cheers jimbo









have I connected the 5v power supply in the right place?

Cheers James


----------



## jimbojohn55

Jim bean said:


> Cheers jimbo
> 
> 
> 
> 
> 
> 
> 
> 
> 
> have I connected the 5v power supply in the right place?
> 
> Cheers James


Yes and no

If you wire it that way the timer will be permanently on

You could attach one side of the feed to the to the 240 -5v transformer to the switched power from the toggle switch or the Arduino will be powered up as long as the grinder is plugged in.

If the toggle switch is duel pole you could connect both + and - power feed through it, but if its a single pole I would just switch the +

and as with all electrics proceed with caution and unplug while working on it ;-)


----------



## jimbojohn55

hang on I'm not sure the toggle is connected to the right poles - will go to PM


----------



## Jim bean

jimbojohn55 said:


> Yes and no
> 
> If you wire it that way the timer will be permanently on
> 
> You could attach one side of the feed to the to the 240 -5v transformer to the switched power from the toggle switch or the Arduino will be powered up as long as the grinder is plugged in.
> 
> If the toggle switch is duel pole you could connect both + and - power feed through it, but if its a single pole I would just switch the +
> 
> and as with all electrics proceed with caution and unplug while working on it ;-)


Cheers mate I think I've got that I will update the schematics tomorrow just to confirm

Cheers James


----------



## Jim bean

Okie Dokie this should be the correct schematics









I will try and get it fitted over the weekend

cheers james


----------



## grumpydaddy

My advice to you when doing this rewire is to be bold.

Get a new terminal block for the multiple connections, use coloured wiring to help you understand the circuits, remove any redundant wiring.

Whilst we were fault finding an Auber timer I put this together:










The idea here is to try for no more than 2 wires in each connection and you can follow the coloured cables to see what each is doing

The contactor connections 6, 4, 2 are not disturbed.

Your Mod will in this instance replace the Auber


----------



## grumpydaddy

Your 5v power supply can be fed from Auber 9 and 10 above

The SSR contacts would go to Auber 8 and 7

This of course assumes the Mazzer switch is retained purely as an on off switch

Your timer activates your SSR which in turn closes the contactor


----------



## Jim bean

grumpydaddy said:


> Your 5v power supply can be fed from Auber 9 and 10 above
> 
> The SSR contacts would go to Auber 8 and 7
> 
> This of course assumes the Mazzer switch is retained purely as an on off switch
> 
> Your timer activates your SSR which in turn closes the contactor


Thanks grumpydaddy that makes sense if i remove the mazzer switch i can just replace that with a 2 pole DTSP switch?

http://www.ebay.co.uk/itm/On-Off-DPST-Toggle-Switch-250V-AC-15A/253029332323?epid=23004682439&hash=item3ae9b93563:g:cugAAOSw6ShZXNps

as the encoder will be going where the Mazzer switch was like this






cheers james


----------



## grumpydaddy

Yes.

In my diagram that is effectively what the Mazzer switch is: DPST (double pole single throw) Double pole switches both the live and the neutral, Single throw denotes on/off.


----------



## Jim bean

Thanks grumpydady I'll try and pick a double pole switch up today I can have a go over the weekend cheers James


----------



## Jim bean

Would I be OK with a 10A DPST toggle switch?

https://www.maplin.co.uk/p/10a-toggle-switch-dpst-jk26d

I gave maplin the specs of the Major 230-240v 650w and by there calculations they seem to think 10A should be fine

Many thanks James


----------



## Jim bean

I got the timer wired up to the major following grumpydadys schematic it works perfectly







thank grumpy a big thanks to jimboJohn for all your help and building half my grinder lol

I'll take a video when I get the backing plate cut for the oled screen

Many thanks all

Cheers James


----------



## Jim bean

i think i may have some slight EMI

if dose 2 or 3 is activated after the dose has finished the screen jumps back to dose 1 it only happens sometimes i will move the 5v supply and the SSR to different positions

i think it may be the timer cables touching the body of the toggle switch, ive fitted the toggle temporary where the green light was so the timer cables have to touch the toggle as the pass to the base (it's a small gap)


----------



## joey24dirt

I'm going to have to read this thread from the start, but from the last few pages it seems like something I need to do. Thanks for all the detail guys


----------



## Jim bean

Just thought it was worth mentioning static and sprayed coffee has completely vanished very little grinds if any on the grinder when ive finished a dose

I've not tried any different beans yet so that could be a test but the same beans before i fitted the timer would spray everywhere, interesting to know if it was grumpydaddy schematics layout or the timer

cheers jim


----------



## spoxehub

Jim bean said:


> Just thought it was worth mentioning static and sprayed coffee has completely vanished very little grinds if any on the grinder when ive finished a dose
> 
> I've not tried any different beans yet so that could be a test but the same beans before i fitted the timer would spray everywhere, interesting to know if it was grumpydaddy schematics layout or the timer
> 
> cheers jim


Well done mate, great job


----------



## grumpydaddy

I would not expect that wiring schematic to do anything wonderful, however, when you do the bold thing and essentially rewire everything and remake connections, it is possible you have improved the bonding connections and tightened certain screws/bolts so that everything is at the same potential as the case/earth bond. This will not stop the burrs rubbing on the coffee to produce static but grounding provides a path for static charges to rapidly flow to earth, reducing the voltage of the object to zero.


----------



## rein

Hello Jim,

being a nitwit with Arduino, i am very happy to have found your English translation of the original Danish concept.

I have compiled and uploaded your full library for Nano, Oled,Rot.Encoder and second Button.

Now i got stuck. The system works. My questions are:

Can i work with the Switch of the Rot.Encoder only?

Can i control a SSR from pin 8?

Can i have access to timer settings, etc?

Your reply is much appreciated.

Kind regards, Rein


----------



## grumpydaddy

Can no longer edit my post so..... The missing diagram from a few posts above I think: Incidentally, this started out as a USA part diagram so capacitor value and contactor info are of no use


----------



## Ullum

Hello there

I do not know if this thread is still alive, but I will give it a try.

Jim Bean described how he managed to get the arduino grind time loaded and up running.

I have done the same years ago, but never saved a copy.

Now I want to redo it, but I get a lot of errors from the arduino program, which I can not solve.

Can anyone provide me with the files for making it running, I will be happy for any help, and if possible even pay for it.


----------



## Rob1

You'll probably find something here: https://github.com/search?q=arduino+grinder


----------



## Ullum

thanks, I will give it a try


----------



## ArtD

grumpydaddy said:


> Can no longer edit my post so..... The missing diagram from a few posts above I think: Incidentally, this started out as a USA part diagram so capacitor value and contactor info are of no use
> 
> View attachment 40887


Hello Grumppydaddy,
Please advise whether the following diagram would make sense for the timer as follows:



























this is for mazzer major.

thx


----------



## Rincewind

@ArtD hi, unfortunately Grumppydaddy died a while back, sorry to be the bearer of bad news.


----------



## ArtD

Rincewind said:


> @ArtD hi, unfortunately Grumppydaddy died a while back, sorry to be the bearer of bad news.


 sad to hear it.

Anybody else with support on it?Note switched phase should work for existing contactor


----------



## ArtD

Update :- Ok I have managed all connections however mazzer switch timer interfere with arduino timer. Do I need to change mazzer switch to on/off DPST or current one can be used like it? and if the last how to make it work? thx


----------



## ArtD

ArtD said:


> Update :- Ok I have managed all connections however mazzer switch timer interfere with arduino timer. Do I need to change mazzer switch to on/off DPST or current one can be used like it? and if the last how to make it work? thx











sorted - jumper instead of green cables from switch sorted the issue. Arduino connected from switch (blue and brown) to contactor (the same way switch was connected initially) rest as per photo.


----------



## ArtD

And this is my setup.









Happy to help if anyone needs guidance on similar setup for mazzer major.


----------



## Rincewind

Hey buddy, is that a push-to-Enter shaft encoder or just a standard shaft encoder ?...what dimensions is the Oled ?...TIA


----------



## ArtD

Rincewind said:


> Hey buddy, is that a push-to-Enter shaft encoder or just a standard shaft encoder ?...what dimensions is the Oled ?...TIA


Hi Rincewind, push to enter encoder. oled 0,96 inch which is plenty.


----------

