This is a fork of GatCode's OpenGrind, modified to be closer to the function of commercial grinders like the Mythos.
The getting started section below assumes that you are using mostly the same hardware and configuration as stated in this Instructable.
If your screen doesn't work, it's probably SH1106x rather than SSD1306 so try changing the driver.
The DS18B20 should be connected to pin 7 with a ~5k pullup resistor.
Make sure you have installed PlatformIO and know the basics on how to use it.
-
Open the OpenGrind Folder in VSCode
-
Choose the correct
upload_port
corresponing to your MCU and OS in theplatformio.ini
file. This can be for exampleCOM3
on Windows or/dev/ttyUSB0
on Mac or Linux. -
Connect your microcontroller and hit the upload button --> enjoy 🎉
The first screen you see after booting is the second dose grind screen. You can turn the encoder left/right to adjust the dose time. At the top you will see the temperature sensor value (will display -127 if not detected/connected).
Pressing and rotating the encoder will allow you to change between doses.
Holding the encoder will take you into the stats screen.
If you choose to alter the hardware configuration (IO pins) or you are not satisfied with the behavior of the firmware, you can find all major settings in the src/Definitions.h
file.
EMI is a serious problem with this kind of project, so keep wires as short as possible, and keep the electronics away from the grinder as much as possible. Shielding the electronics may be helpful.
Shielded cable to the encoder, DS18B20, and grind button are recommended. These cable shields should be connected to ground, which itself should be tied to an earth connection (and the grinder chassis if it's metal). The LCD should be immediately adjacent to the microcontroller as i2c is not designed for long distance communication.
Strong hardware pullups on the input pins, and decoupling capacitors may also be helpful/necessary.
This program is provided as-is, and although care has been taken to avoid them, bugs may be present. If you find one, please submit an issue, or fix it yourself and submit a PR.
WARNING:
Working with mains voltages can be dangerous so take care if you decide to replicate this project. You're responsible for your own actions. Also take note of the fact that performing this modification on a grinder that has a warranty will cause it to no longer have a warranty.