Giter Site home page Giter Site logo

brycesub / silvia-pi Goto Github PK

View Code? Open in Web Editor NEW
137.0 23.0 42.0 12.85 MB

A Raspberry Pi modification to the Rancilio Silvia Espresso Machine implementing PID temperature control.

License: MIT License

Python 94.75% Shell 0.72% HTML 1.91% JavaScript 2.62%
raspberry-pi espresso pid-controller

silvia-pi's People

Contributors

brycesub avatar jfbibeau avatar pouryaparsa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

silvia-pi's Issues

Convert to celsius?

How do I change the unit to celcius? Do I only need to delete the line where you change it to farenheit and then change allowed input?

Thanks for a great project!

Explanation for cold/warm switch in pid_loop

Can you please explain the warm/cold logic:

silvia-pi/silvia-pi.py

Lines 152 to 168 in 54de212

if avgtemp < 100 :
lastcold = i
if avgtemp > 200 :
lastwarm = i
if iscold and (i-lastcold)*conf.sample_time > 60*15 :
pid = PID.PID(conf.Pw,conf.Iw,conf.Dw)
pid.SetPoint = state['settemp']
pid.setSampleTime(conf.sample_time*5)
iscold = False
if iswarm and (i-lastwarm)*conf.sample_time > 60*15 :
pid = PID.PID(conf.Pc,conf.Ic,conf.Dc)
pid.SetPoint = state['settemp']
pid.setSampleTime(conf.sample_time*5)
iscold = True

iswarm will always be false. Should the pid values for the warm state be set only once when avgtemp >= 100?

Thank you :)

MAX31855K to GPIO

Hello,
thanks for sharing your project.

Could go define how to connect the breakout to the GPIO? Not sure how to connect them proper.

Thanks

Installation issue

I've had a good crack at installing this today. I've got web app coming up but it's not reading out any values (sticking to 32 degrees) and it's not triggering the relay. I'm not sure of the best way to troubleshoot it from here.

I did notice in another thread that you said you only needed to solder 2 wires. Did I not need to solder the 6 to the thermocouple breakout?

Thanks in advance

Thermocouple question

@brycesub Hey there - currently buying parts for the project, can you clarify if you bought the thermocouple with the mini connector or the regular spade; and if so what did you have to do to solder to the breakout board? I can't see the connection between thermocouple and breakout and the pictures... I have no issue with soldering, but was it easy to split the two wires from the mini connector?

Thanks!

ERROR IN PID THREAD, RESTARTING

Hello guys,
I just installed silvia-pi on my Raspberry Pi Zero W and without connecting the MAX31855K, the web interface is working perfectly. The problem is, as soon as I connect the MAX to the Raspberry (connected as you described in the image), the web interface is not available anymore and if I SSH into the Raspberry, it tells me "ERROR IN PID THREAD, RESTARTING".
Can anyone help me out?
Thank you!

IMG_6593

No values webinterface

image

So, as you can see above, I finally managed to get the webapi going. I bought a new amplifier (https://www.adafruit.com/product/3328), the MAX31855, because I've a PT100 sensor I thought it might has something to do with this.. This has the following outputs:

  • GND
  • VIN
  • 3vs3
  • CLK
  • SDO
  • SDI
  • RDY
  • CS

I've connected them in the following manner:

  • VCC (green wire) to RPI physical pin #17
  • GND (red wire) to RPI physical pin #25
  • SO (yellow wire) to RPI physical pin #21
  • SCK (blue wire) to RPI physical pin #23
  • CS (black wire) to RPI physical pin #24

SSR is connected to:

  • SSR + (red wire) to RPI physical pin #37
  • SSR - (white) to RPI physical pin #39

Also we've measured on the amplifier the values of the PT100 in ohm. This is functioning properly.

So the question is: why aren't we receiving any values on the webapi? Is this because the amplifier isn't giving the signal to the RPI?

MAX31855 does not support grounded thermocouples

on adafruits official website:

The MAX31855 does not support grounded thermocouples - if the sensor touches ground the chip will return an error

the project should be updated to avoid grounding the thermocouple. if you're not getting an error you're not grounding you machine which is illegal in europe and generally a bad idea, or you're very lucky and having the thermal paste somehow act as electrical insulator.

Web interface

Maybe this is obvious, but I need to install apache for the web interface to work, right? I've followed the readme steps and I get nothing from localhost:8080.

After installing Apache, I get:

root@raspberrypi:~/silvia-pi# ./silvia-pi.py
Starting Scheduler thread...
Starting PID thread...
Starting HE Control thread...
Starting REST Server thread...
Starting Watchdog...
./silvia-pi.py:67: RuntimeWarning: This channel is already in use, continuing anyway.  Use GPIO.setwarnings(False) to disable warnings.
  GPIO.setup(conf.he_pin, GPIO.OUT)
Bottle v0.13-dev server starting up (using CherootServer())...
Listening on http://0.0.0.0:8080/
Hit Ctrl-C to quit.
root@raspberrypi:~/silvia-pi# 

and then it exits back to the command line and still nothing on localhost:8080. Am I missing some steps?

Thermocouple temp drops when Silvia is plugged in

Hey again!

Did you ever have any issues where the thermocouple temperature readings drop when you plug the Silvia in?

I could've sworn I had the whole thing working, then when I re-assembled the machine and tried it, the boiler was way too hot and pushing steam out the group head. Took everything apart again, and noticed that with the machine disconnected the idle temp is ~80F, but as soon as I plug in the machine (don't even flip the power switch), the temp readouts drops to 60F... so all my temps are 20F off which explains the steam.

Have you encountered that at all? It looks like AC interference or a grounding problem... :(

Know nothing...

Hi There,

Found your project and can unfortunately not get it to work.

I know nothing about programming, so I am sorry for these dumb questions:

  1. When i run "setup.sh" i get this error in the end:
    "jaraco.functools requires Python '>=3.6' but the running Python is 2.7.16"
    .. can you help?

  2. It's then installed and then what?... I am not able to access any web page to set brew time and more.... Can you help?

Again.... sorry for the stupid questions.

BR Bo (Denmark)

Pin 26 is always 3.3 Volts

First off - Thank you for this wonderful project. I have been disappointed with my Gaggia Classic, and I am incredibly excited to get this running!

My current setup:
1: Dashboard works, and accurately represents temp of boiler.
2: SSR light is always on - The DC wires are connected to the GPIO pins 25 and 26. My voltmeter confirms its always on (output is 3.3VDC).
3: The output of the program in terminal does show "Heating true when cold" and Heating False when over the setpoint. So, it appears the program is working fine.

Do you have any suggestions as to what I can do to fix pin 26 from always being on? Is it my board?

Thanks,
Andrew

capture

Get temp values from def pid_loop(dummy,state):

Hi

i been trying to get the temp value from def pid_loop(dummy,state): but i dont get it to work. what values do i have to have in the dummy and state??

i trying to add a oled display and i get it to work when i call the sensor twice. but i get conflicts. so i need to get ether the sensor variable or tempc from def pid_loop

i made a def see below and that works but its in conflict with the pid_loop(dummy,state) def because i load the sensor twice

def display():
spi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)
cs = digitalio.DigitalInOut(board.D5)
sensor = adafruit_max31865.MAX31865(spi, cs)

tempc = sensor.temperature

hope some one could help me :)
best regards Mikael

How to get the wakeup running?

Hi everyone,

I know there hasn't been a lot of activity in this repo recently, but I'm gonna try anyway.

I got everything up and running and the software is controlling my temperature, but I'm still figuring out how to get the machine to wake up. Right know, the temperature control only works if i manually switch on the machine.

I wired the two cables from the relay with the temperature control previously connected to the brew thermostat, as shown in the description. Did I miss anything? I am not an electronics engineer or anything related, so maybe someone can help me...

Edit: I have the Silvia with automatic shutdown after 30 minutes, so maybe this doesn't work with this machine?

Thanks in advance!

in pid.err.log: sef._device.cshigh = False. SystemError: error return without exception set.

Hi folks,
I've just built this thing, and am running into some errors.

My PID.err.log is showing the error:

pi@raspberrypi:/root/silvia-pi $ tail pid.err.log
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 267, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "silvia-pi.py", line 116, in pid_loop
sensor = MAX31855.MAX31855(spi=SPI.SpiDev(conf.spi_port, conf.spi_dev))
File "build/bdist.linux-armv6l/egg/Adafruit_GPIO/SPI.py", line 46, in init
self._device.cshigh = False
SystemError: error return without exception set

Some digging suggests that the MAX31855 library has been deprecated:
https://github.com/adafruit/Adafruit_Python_MAX31855

...and I believe it is no longer compatible with SPI.py.

I've already spent a few hours on this, so I'm going to punt for now.
Has anyone resolved this issue?

Is the easiest fix to install some older versions of the ...adafruit gpio libraries, maybe?

FWIW, this is on a pi-zero.

My thanks in advance!

Light doesn't turn on

First of all: thank you for this great project!

But i've encountered the following problem: when I turn on the machine, the light doesn't turn on. Only when I turn on the steamfunction, the light turns on. Seems to be affecting only the light, because the boiler is warming up. Is this a problem, or is this just the way it should work?

And as a result of this, is the only way to check if the temperature is okay, is to acces the dashboard?

Speaking of the dashbaord, is the way to acces the webinterface just go to the ip-address of your raspberry pi?

Thanks in advance for helping out

ImportError: No module named cheroot

Process Process-5:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 267, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "silvia-pi.py", line 297, in rest_server
run(host='0.0.0.0',port=conf.port,server='cheroot')
File "/root/silvia-pi/bottle.py", line 3703, in run
server.run(app)
File "/root/silvia-pi/bottle.py", line 3281, in run
from cheroot import wsgi
ImportError: No module named cheroot

trying to run pip install cheroot gives:

Process Process-5:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 267, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "silvia-pi.py", line 297, in rest_server
run(host='0.0.0.0',port=conf.port,server='cheroot')
File "/root/silvia-pi/bottle.py", line 3703, in run
server.run(app)
File "/root/silvia-pi/bottle.py", line 3281, in run
from cheroot import wsgi
ImportError: No module named cheroot
root@raspberrypi:~/silvia-pi# pip install cheroot
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting cheroot
Using cached https://files.pythonhosted.org/packages/bf/be/51b1517c6dbf3851d44b36ff08a6e1012464149f89f74c46b29d2f76545e/cheroot-8.2.1-py2.py3-none-any.whl
Collecting backports.functools-lru-cache; python_version < "3.3" (from cheroot)
Using cached https://files.pythonhosted.org/packages/da/d1/080d2bb13773803648281a49e3918f65b31b7beebf009887a529357fd44a/backports.functools_lru_cache-1.6.1-py2.py3-none-any.whl
Collecting more-itertools>=2.6 (from cheroot)
Using cached https://files.pythonhosted.org/packages/2f/9d/dcfe59e213093695f108508af1214cf9cd95cc5489e46877ec5cb56369e5/more_itertools-5.0.0-py2-none-any.whl
Requirement already satisfied: six>=1.11.0 in /usr/lib/python2.7/dist-packages (from cheroot) (1.12.0)
Collecting jaraco.functools (from cheroot)
Using cached https://www.piwheels.org/simple/jaraco-functools/jaraco.functools-3.0.0-py2.py3-none-any.whl
jaraco.functools requires Python '>=3.6' but the running Python is 2.7.16

GPIO Pins

Hello,

I am using a Pi Zero W for my machine. I just wanted to check which pins to use. In the high level diagram it suggests one layout then your images use a different layout.

Thanks very much in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.