Thanks
@The-Engineer-That-Brews
I do have a few Arduino minis sitting in a cupboard that I could experiment with.
Is there any guides/guidance on the best way to control the toggle time of the SSR?
Curtis
Hi Curtis - apologies, I've only just seen your reply and question about the switching rate.
It's important to note that if you re using a
zero-crossing SSR (which you should, in order to reduce both RF interference and shock-loading of the heater element) then the minimum on-time is half a mains cycle (=10ms) so there's no point switching faster than 100Hz (i.e. the internal control circuitry will always stretch the on-time to this anyhow).
Equally you don't want to switch
too slowly, otherwise the temperature of the heater element will vary too much during the cycle.
A good straightforward compromise is a 1Hz basic cycle time, and to adjust the length of the pulse within that time in units of 10ms. This gives you a 1% granularity of control, which is arguably far more accuracy than you actually need for the job :-)
Geeky Footnote
The above approach is absolutely fine. But ideally instead of adjusting the pulse
duration we should change the average pulse
density. This both reduces surge heating and improves our granularity of control.
I do that with a variation of the
Bresenham algorithm. My code for it (in C, for the esp32c) is really simple, and looks like this:
You want to define BRESENHAM_FRAME_LEN to be a reasonable prime number (I use 1009); and then call the above function from a timer interrupt every 1/50th of a sec.
To adjust the pulse density just use some other function to change the value of the global ones_count between zero (no power) and BRESENHAM_FRAME_LEN (full power).
Give me a shout if you want help with the Arduino code...