kiln-controller-max31856/README.md

129 wiersze
6.3 KiB
Markdown
Czysty Zwykły widok Historia

Kiln Controller
2013-11-23 19:09:06 +00:00
==========
2018-12-17 02:39:28 +00:00
Turns a Raspberry Pi into an inexpensive, web-enabled kiln controller.
2018-11-26 18:06:29 +00:00
## Features
* easy to create new kiln schedules and edit / modify existing schedules
* no limit to runtime - fire for days if you want
* view status from multiple devices at once - computer, tablet etc
* firing cost estimate
* NIST-linearized conversion for accurate K type thermocouple readings
2018-11-27 16:21:33 +00:00
* supports PID parameters you tune to your kiln
2018-11-30 13:40:09 +00:00
* monitors temperature in kiln after schedule has ended
2018-12-25 01:52:10 +00:00
* api for starting and stopping schedules
2013-11-23 19:12:51 +00:00
2018-11-28 13:38:36 +00:00
**Run Kiln Schedule**
2018-11-28 13:38:36 +00:00
![Image](https://github.com/jbruce12000/kiln-controller/blob/master/public/assets/images/kiln-running.png)
2014-02-08 12:23:39 +00:00
2018-11-28 13:38:36 +00:00
**Edit Kiln Schedule**
2018-11-28 13:38:36 +00:00
![Image](https://github.com/jbruce12000/kiln-controller/blob/master/public/assets/images/kiln-schedule.png)
## Hardware
### Parts
2018-11-28 18:22:21 +00:00
| Image | Hardware | Description |
| ------| -------- | ----------- |
2018-11-28 18:41:41 +00:00
| ![Image](https://github.com/jbruce12000/kiln-controller/blob/master/public/assets/images/rpi.png) | [Raspberry Pi](https://www.adafruit.com/category/105) | Virtually any Raspberry Pi will work since only a few GPIO pins are being used. |
| ![Image](https://github.com/jbruce12000/kiln-controller/blob/master/public/assets/images/max31855.png) | [MAX 31855](https://www.adafruit.com/product/269) | Thermocouple breakout board |
| ![Image](https://github.com/jbruce12000/kiln-controller/blob/master/public/assets/images/k-type-thermocouple.png) | [K-Type Thermocouple](https://www.auberins.com/index.php?main_page=product_info&cPath=20_3&products_id=39) | Invest in a heavy duty, ceramic, k-type thermocouple designed for kilns |
| ![Image](https://github.com/jbruce12000/kiln-controller/blob/master/public/assets/images/breadboard.png) | Breadboard | breadboard, ribbon cable, connector for pi's gpio pins & connecting wires |
2019-01-09 01:39:49 +00:00
| ![Image](https://github.com/jbruce12000/kiln-controller/blob/master/public/assets/images/ssr.png) | Solid State Relay | Zero crossing, make sure it can handle the max current of your kiln. Even if the kiln is 220V you can buy a single [3 Phase SSR](https://www.auberins.com/index.php?main_page=product_info&cPath=2_30&products_id=331). It's like having 3 SSRs in one. Relays this big always require a heat sink. |
2018-12-09 20:19:48 +00:00
| ![Image](https://github.com/jbruce12000/kiln-controller/blob/master/public/assets/images/ks-1018.png) | Electric Kiln | There are many old electric kilns on the market that don't have digital controls. You can pick one up on the used market cheaply. This controller will work with 110V or 220V (pick a proper SSR). My kiln is a Skutt KS-1018. |
2018-11-28 18:22:21 +00:00
### Schematic
2019-01-04 19:54:34 +00:00
The pi has three gpio pins connected to the MAX31855 chip. D0 is configured as an input and CS and CLK are outputs. The signal that controls the solid state relay starts as a gpio output which drives a transistor acting as a switch in front of it. This transistor provides 5V and plenty of current to control the ssr. Since only four gpio pins are in use, any pi can be used for this project. See the [config](https://github.com/jbruce12000/kiln-controller/blob/master/config.py) file for gpio pin configuration.
My controller plugs into the wall, and the kiln plugs into the controller.
2018-12-09 19:46:51 +00:00
2019-01-10 14:20:18 +00:00
**WARNING** This project involves high voltages and high currents. Please make sure that anything you build conforms to local electrical codes and aligns with industry best practices.
![Image](https://github.com/jbruce12000/kiln-controller/blob/master/public/assets/images/schematic.png)
2018-11-28 18:22:21 +00:00
2019-01-04 19:54:34 +00:00
*Note: I tried to power my ssr directly using a gpio pin, but it did not work. My ssr required 25ma to switch and rpi's gpio could only provide 16ma. YMMV.*
2018-12-09 20:02:37 +00:00
## Software
2018-11-27 16:18:40 +00:00
### Raspbian
2013-11-23 23:02:24 +00:00
2018-11-29 12:21:59 +00:00
Download [NOOBs](https://www.raspberrypi.org/downloads/noobs/). Copy files to an SD card. Install raspbian on RPi using NOOBs.
2013-11-23 23:02:24 +00:00
2018-11-27 16:18:40 +00:00
$ sudo apt-get install python-pip python-dev libevent-dev python-virtualenv
$ git clone https://github.com/jbruce12000/kiln-controller.git
$ cd kiln-controller
$ virtualenv venv
$ source venv/bin/activate
$ pip install greenlet bottle gevent gevent-websocket
*Note: The above steps work on ubuntu if you prefer*
2018-11-27 16:18:40 +00:00
### Raspberry PI deployment
If you want to deploy the code on a PI for production:
2018-11-27 16:18:40 +00:00
$ cd kiln-controller
$ virtualenv venv
$ source venv/bin/activate
$ pip install RPi.GPIO
If you also want to use the in-kernel SPI drivers with a MAX31855 sensor:
2018-11-27 16:18:40 +00:00
$ pip install Adafruit-MAX31855
## Configuration
All parameters are defined in config.py, just copy the example and review/change to your mind's content.
$ cp config.py.EXAMPLE config.py
## Usage
### Server Startup
2018-11-28 13:38:36 +00:00
$ source venv/bin/activate; ./kiln-controller.py
### Autostart Server onBoot
If you want the server to autostart on boot, run the following commands
2018-11-27 16:18:40 +00:00
$ /home/pi/kiln-controller/start-on-boot
### Client Access
2018-11-30 13:40:09 +00:00
Click http://127.0.0.1:8081 for local development or the IP
of your PI and the port defined in config.py (default 8081).
2018-11-26 16:10:22 +00:00
### Simulation
Select a profile and click Start. If you do not have a raspberry pi connected
2018-11-30 13:40:09 +00:00
and configured, then your run will be simulated. Simulations run at near real
time and kiln characteristics are defined in config.py.
2018-11-26 16:10:22 +00:00
## License
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
## Support & Contact
Please use the issue tracker for project related issues.
2018-12-25 00:48:50 +00:00
If you're having trouble with hardware, I did too. Here is a [troubleshooting guide](https://github.com/jbruce12000/kiln-controller/blob/master/docs/troubleshooting.md) I created for testing RPi gpio pins.
If you're having trouble setting PID values, I did too. Here is a [PID Tuning Guide](https://github.com/jbruce12000/kiln-controller/blob/master/docs/pid_tuning.md)
## Origin
This project was originally forked from https://github.com/apollo-ng/picoReflow but has diverged a large amount.