Electric Kiln/Components/Hardware Components

From Fat Cat Fab Lab
Revision as of 20:26, 17 May 2024 by AMD (talk | contribs) (Created page with "= ESP32 board = This is essential component, that is the base of whole controller. Until ESP32Kiln v1.2 you needed ESP32-Wrover board or ESP32-Wroom with PSRAM. Since then you can go with Wroom without PSRAM, but for ease of use, and perhaps future releases, Wrover is still recommended. To use Wroom board, you have to change part of the code in ESP32Kiln.ino file (comment Wrover part and uncoment Wroom): <pre>// If you have Wrover with PSRAM #define MALLOC ps_malloc #d...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

ESP32 board

This is essential component, that is the base of whole controller. Until ESP32Kiln v1.2 you needed ESP32-Wrover board or ESP32-Wroom with PSRAM. Since then you can go with Wroom without PSRAM, but for ease of use, and perhaps future releases, Wrover is still recommended. To use Wroom board, you have to change part of the code in ESP32Kiln.ino file (comment Wrover part and uncoment Wroom):

// If you have Wrover with PSRAM
#define MALLOC ps_malloc
#define REALLOC ps_realloc

// if you have Wroom without it
//#define MALLOC malloc
//#define REALLOC realloc

I've used two TTGO boards, first one - because I had it, second one - because it has external antenna connector - this can be beneficial, if you plan to put it in the metal case.

Both will work just fine - and also all others that have enough pins available (some dedicated for camera or with LCD don't have all the necessary pins provided).

MAX31855 breakout board

There are few other boards on the market, some are more common, some are more expensive. We will use this breakout board to measure readouts from the most commonly used thermocouple - K-type. I've decided to use this chip, because:

  • it works with 3,3V logic,
  • it can read temperature up to max K-type thermocouple limit 1350C
  • and uses SPI protocol to communicate with controller.
MAX31855
MAX31855 breakout board

There are many other shapes of this breakout board, they all work the same. If you want to use my 3d printable case, it's best if you buy this one. You will also need good quality thermocouple, that can work up to 1350C. Usually this are thermocouples in ceramic or stainless steel housing. Those that you can buy together with MAX31855 board are not good enough.

You need also 10+nF capacitor, to connect it in parallel with your thermocouple on the MAX31855 side. This should help to get rid of most of the noise from thermocouple.

Extension:

Optionally, to not only measure temperature inside kiln (or other heated comparment), I wanted also to measure it's housing temperature. Both for protection (in case of insulation failure - it can crack, overheat etc.) and for scientific reasons (I've build my own kiln and I want to know how good/bad insulation is).

The second board is totally optional, but if you decide to use it - you will also need additional thermocouple. The one shipped with board will be enough (they are usually rated up to 350C).

Relays

SSR relays

Basic relay for this project is DC controller SSR relay(s). This are electronic relays (opposite to mechanical/magnetic ones) that can switch much faster and without creating sparks or welding connectors with high current. They use (or at least should) optoisolated triac (for AC) or transistor (for DC) for this task. I've used this type Fotek SSR relay:

40DA SSR relay
40DA SSR relay

Markings means that it can be controlled with DC 3-32V, it can switch AC voltage in range of 24V to 380V and should withstand 40A of passing current. When you buy relay you should make sure, it can be driven with 3,3V and needs less then 12mA. In my case, specs says this relay uses MAX 12mA, but measured value was less then 8mA. This is important, since ESP32 board pins can provide safely up to 12mA (chip itself can provide much more, up to 50mA, but 12mA is safe value for all board components and board itself).

Also if you buy relay from unknown source (you don't know if it's genuine) good practice is to buy SSR for twice the current you are planing to use - this is especially true for most of Chinese relays (Aliexpress, Bangood etc).

All SSR relays can get quite hot when used, so think on providing proper heat dissipation - there are dedicated heat sinks for those relays.

More heaters

If you have more heaters you can control them in few ways:

  • connect all heaters to single SSR relay - just make sure, sum of it's power does not exceed SSR safety margin
  • connect more SSR relays to ESP SSR pin (usually 19), but keep in mind safety margin of 12mA (a bit more should work, but may shorten your ESP32 board lifespan)
  • you can use additional pin (by default 22) for second SSR relay - both relays are turn on/off simultaneously
  • you can use small transistor (like 2N3904) and just limit it's gate current with resistor (330R / 330 Ohm should limit current to 10mA)
  • or you can use logic level converter module base on TXS0108E chip (this is just an example - you can use any other) to control up to 8 SSR relays. See here.

EMR relay

As an extension, I've implemented second stage relay. There is small chance of SSR failure in closed state - when it supply power to heaters all the time. For this scenario, I've installed additional, mechanical relay in front of the SSR. This relay is always on during program run, so it won't work/switch all the time (what would kill it almost instantly). Since it mechanical, it only heats as much as the coil inside of it - so not much comparing to SSR. This way we can always power off our devices - even if SSR will fail. So this is an optional safety feature.

EMR Relay
EMR Relay

I've used one as on the picture above. This relay should work with up to 30A of current (my heaters use 3,5kW on 230V - so around 15A). EM relay requires much more juice to operate, since it needs to magnetise its coil to switch - because of it, we should provide it with 5V and at least 185mA.

LCD and rotary encoder

LCD

This is kind of optional - you could always work only with Web interface - but in my opinion, you should always have it as a last resort in case of Web interface failure (it should not - but still there is this kind of possibility - read about "known bugs").

You will need dot matrix LCD 128 pixels width and 64 pixel height. You can choose colour of your likening (they came in blue, green, white) and size (it's always 128x64 - but pixels size differs - some bigger are quite expensive).

LCD 12864b
LCD 12864b

Mine is with ST7920 controller (exactly like on picture above), but you can use anything that is supported by u8g2 library. Driver definition is in "ESP32Kiln_LCD.ino" file.

// Other variables
//
#define LCD_RESET 4   // RST on LCD
#define LCD_CS 5      // RS on LCD
#define LCD_CLOCK 18  // E on LCD
#define LCD_DATA 23   // R/W on LCD

// You can switch hardware of software SPI interface to LCD. HW can be up to x10 faster - but requires special pins (and has some errors for me on 5V).
//U8G2_ST7920_128X64_F_SW_SPI u8g2(U8G2_R2, /* clock=*/ LCD_CLOCK, /* data=*/ LCD_DATA, /* CS=*/ LCD_CS, /* reset=*/ LCD_RESET);
U8G2_ST7920_128X64_F_HW_SPI u8g2(U8G2_R2, /* CS=*/ LCD_CS, /* reset=*/ LCD_RESET);

Rotary encoder

This is simple encoder that can provide information of rotation direction and button press. With this, all LCD functions can be navigated. Nothing special here.

Rotary Encoder
Rotary Encoder

This is exactly the one as I've used. You have to connect 3,3V (in place of 5V), GND and 2 pins (S1, S2) to detect movement and one pin (Key) to detect button press.

Power meter

This is late addon for ESP32Kiln, it not to much utilised yet. You can see power consumption on the chart and it's logged into CSV. I also wanted to use it as additional safety feature, but this is not implemented yet. Idea is to check if the power consumption is at expected level when heating element is working and if there is large enough deviation - assume error.

To measure current flow in main circuit, I've used contact less meter based on measuring inducted current in the coil wrapped around the mains wire.

Current Sensor
Current Sensor

For this you will need 30A (or less/more - depending on your setup) sensor, two 10k resistors and small 10uF capacitor. My sensor has build in burden resistor (that's why it "produces" +/- 1V), if your has output in mA (current), you will need to add proper resistor - read here.