Home Forums Software SSR Output Switching Rate

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • Cracked
    Participant
    Post count: 44

    Hi,

    Firstly, thanks for bring such a great product to market!

    I’m using my osPID to run a popcorn popper for roasting coffee (basically switching a 240VAC nichrome wire element in an air stream).

    I’d like to reduce the switching time for the ssr output, but it seems the minimum the front end will allow is 0.5s.

    Is this a hardware limitation or am I missing something?

    Cheers, Troy

    rhys
    Participant
    Post count: 20

    I can’t speak as to whether there is a particular hardware reason for the .5s minimum relay delay, but I can tell you what to modify in the IO.h file to change the minimum.

    Look for this section near the top of the output card portion of the IO.h file in the firmware.

    void setOutputWindow(double val)
    {
    unsigned long temp = (unsigned long)(val*1000);
    if(temp<500)temp = 500;
    outWindowSec = (double)temp/1000;
    if(temp!=WindowSize)
    {
    WindowSize = temp;
    }
    }

    The

    if(temp<500)temp = 500;

    statement is what limits the minimum output change interval to .5s. If you change the 500 to 250, you'll get .25s minimum, 100 would be .1s, etc.

    I briefly dug through the frontend code, and don't see anything in there that limits the input of the change interval to >= .5s. It looks like if you set it smaller than that, the IO.h code above automatically changes it .5s and then reports that back to the frontend as the current setting during the next update, which happens fairly quickly. As I haven't built my custom design yet, and do not have plans to purchase a stock osPID, I don't have hardware to try making the changes on and verifying though.

    Cracked
    Participant
    Post count: 44

    Many thanks Rhys. That is the exact behaviour I’ve experienced (resets to 0.5s when I try to send to the osPID).

    I thought I had read something about it (maybe in Brett blog) but can no longer find it!

    I’ll give it a crack.

    Cheers, Troy

    rhys
    Participant
    Post count: 20

    Not a problem. I’ve spent enough time working on my custom design, I’ve gotten fairly familiar with the hardware and firmware. Let me know how it works out. I don’t personally have a need to switch the output any faster than half second intervals for my design, but it would be nice to know if it is capable of it.

    I’ve been in contact with Brett as well, and I asked him about the hard coded limit. His response was “the 0.5 is to protect the relay mainly. but there is also the issue of computation speed. there’s a lot of stuff going on in there, and things start misbehaving if you ask for too much.”

    Cracked
    Participant
    Post count: 44

    Successfully edited the parameter, thanks Rhys!

    Below is a profile from my successfully modded popcorn popper (used for roasting coffee), with a 0.25s switching period. Still seems to be some tuning to do, but happy with the performance in general.

    The latter part of the profile shows the popper running out of juice in the “cold” weather.

    rhys
    Participant
    Post count: 20

    Another suggestion Brett gave me, which I am utilizing in my dual channel PID firmware, is to use PWM output to a non-zero-crossing type SSR, rather than the timer controlled output switching. It’s a fairly simple modification to the firmware to support it if you are interested.

    Cracked
    Participant
    Post count: 44

    Hi Rhys,

    Actually that sounds like it might be worth looking into. In my current configuration, 0% output from the PID is quite some way off 0% output from the heating element (outlet air temp is around 45C above ambient on 0% output) – I’m quite sure this is not residual heat, due to the cooling profile (see image).

    I’m not sure if this is a configuration issue with the osPID firmware, a problem with the front end (I’ve had a couple of issues), or just the limitations of the SSR (leaking current?).

    I’m also considering a second temperature input device (only for tracking, not for control purposes); how are you acheiving this with your dual PID?

    Cheers,

    Troy

    rhys
    Participant
    Post count: 20

    I have significantly rewritten the firmware to handle two PID loops, two inputs, and two outputs. I’m still in the process of rewriting the frontend to handle all of the firmware changes and a drastically modified serial comms protocol. It is completely incompatible with the osPID hardware, as I’ve gone to SPI for the button/LCD interface, and it’s designed for a 16×2 LCD instead of an 8×2, with 8 buttons. Waiting for PCB’s to show up from Seeed Studio for the prototype. I’ll post more info once the prototype is up and running.

    Cracked
    Participant
    Post count: 44

    Definitely interested in the firmware mods for dual PID. I would also love a diagram or some information describing the function of the various parts of the code. I’m getting lost in it all.

    Figured out the cause of my cooling problem. Turns out a secondary heating element was being used to drop the voltage to the fan, which was still powered even when the osPID output was 0!

    Separate power supply sorted that out.

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.