Close



Page 3 of 8 FirstFirst 12345 ... LastLast
Results 21 to 30 of 83

Hybrid View

  1. #1
    Technologist
    Join Date
    Apr 2015
    Location
    Lakeport, CA.
    Posts
    174
    It appears as though Marlin does soft PWM (at least that's what it looks like in temperature.cpp), and that it is easy to enable HE and HB PID independently. Per your comments about non-trivial hardware usage, it looks like the minimal cpu overhead for an acceptable and universal PWM solution is the way they went.

    Quote Originally Posted by printbus View Post
    What's needed here is someone already familiar with temperature control options in Marlin. For all I know, PWM control on the heater output is a simple configuration file change.

    ....

  2. #2
    Yes to use PID you will need a solid state relay. The way the Marlin firmware works is using PWM I believe (like I said I don't even have my printer yet lol); meaning it would vary the frequency of the pulses to the relay in order to maintain the temperature of the bed. The mechanical really just can't turn on and off quickly enough for PWM to work. You would also probably need a heatsink for the relay more than likely if you are running it on 12v. In 24v maybe or 110v especially the problem goes away because there isn't as much current draw; P=VI. Of course you would then need a heat bed that would work on 24v or 110VAC.
    Last edited by super fly; 08-28-2015 at 11:19 AM.

  3. #3
    Engineer-in-Training
    Join Date
    Feb 2015
    Posts
    371
    Where does one get a solid state relay for use on the maker farm 12" heated beds? I'd switch if I could use a PID loop instead of the bang/bang programming we are now using.

  4. #4
    Engineer-in-Training
    Join Date
    Feb 2015
    Posts
    211
    Quote Originally Posted by tsteever View Post
    Where does one get a solid state relay for use on the maker farm 12" heated beds? I'd switch if I could use a PID loop instead of the bang/bang programming we are now using.
    I ordered one from Amazon, it should be here tomorrow or Monday, if it works ok I will post a link to it.

  5. #5
    Engineer-in-Training
    Join Date
    Feb 2015
    Posts
    371
    Here is where I am getting confused. My current setup is a Rumba which sends a 12 volt voltage to the relay to open and close letting higher current flow through the relay. This isn't a PWM signal. Can one simply reconfigure the firmware to send the appropriate signal to a SSR via the same wiring or is a different approach required.

  6. #6
    Technologist
    Join Date
    Apr 2015
    Location
    Lakeport, CA.
    Posts
    174
    From looking at configuration.h and temperature.cpp, it would appear that the answer is yes.

    Looking at the Makerfarm Configuration.h, it's sorta interesting though.

    here are some comments from the file:

    // Bed Temperature Control
    // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
    //
    // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
    // If your PID_dT above is the default, and correct for your hardware/configuration, that means 7.689Hz,
    // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
    // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
    // If your configuration is significantly different than this and you don't understand the issues involved, you probably
    // shouldn't use bed PID until someone else verifies your hardware works.
    // If this is enabled, find your own PID constants below.
    //#define PIDTEMPBED
    //
    //#define BED_LIMIT_SWITCHING
    This suggesting that hysteresis is NOT enabled by default on the Makerfarm.

    Which is weird..., cuz it sure seems to ACT like some kind of hysteresis is being accounted for..., but I guess not.

    SO..., it might be worth a shot enabling "BED_LIMIT_SWITCHING" if it enables a mechanical relay friendly form of hysteresis management.

    Otherwise..., PID + SSR seems to be the way to go.

    Of course..., your mileage may vary...

    Quote Originally Posted by tsteever View Post
    Here is where I am getting confused. My current setup is a Rumba which sends a 12 volt voltage to the relay to open and close letting higher current flow through the relay. This isn't a PWM signal. Can one simply reconfigure the firmware to send the appropriate signal to a SSR via the same wiring or is a different approach required.

  7. #7
    Engineer-in-Training
    Join Date
    Feb 2015
    Posts
    371
    At the beginning of this discussion, I understood what was being discussed...but now I am loosing grasp of the concepts. I too have the Aluminum bed to combat the warping and I have also have the banding issues.

    What is the hysteresis being referenced?


    To start my understanding, would the current output on the Rumba that opens and closes the relay also be used to control the SSR? Or are other changes needed?

  8. #8
    Engineer-in-Training
    Join Date
    Feb 2015
    Posts
    211
    Quote Originally Posted by tsteever View Post

    To start my understanding, would the current output on the Rumba that opens and closes the relay also be used to control the SSR? Or are other changes needed?
    To my knowledge yes the current output should be able to drive the SSR using PID. That's my plan at this point in time and I will find out for sure as soon as my SSR gets here.

    I also think that the Aluminum Bonded MK3 heat bed that I mentioned at the start of this thread would fix the issue and I would like to swap to one but, the issue with that is that I can't find anyone carrying the MK3 bed in 12" and it would require ordering it directly from China and to order a single bed it would cost ~$100. I am going to have a $1500 makerfarm by the time I am done trying to fix the issues with it.

  9. #9
    Staff Engineer printbus's Avatar
    Join Date
    May 2014
    Location
    Highlands Ranch, Colorado USA
    Posts
    1,437
    Add printbus on Thingiverse
    Quote Originally Posted by tsteever View Post
    ...would the current output on the Rumba that opens and closes the relay also be used to control the SSR?
    As Chadd said, yes the existing output should be fine. The heater is still controlled by the controller output toggling in a digital, off and on way between 0V and 12V. All the discussion is in regards to the software algorithm behind how that output is being toggled.

    "Bang Bang" is like your typical dumb thermostat. Heat stays on until an upper threshold has been met and heat will then shut off. Heat will stay off until a lower threshold is met, and heat will then turn on again. Hysteresis is the difference between the upper and lower thresholds. Simple and easy to implement. I don't know what the relationship of set point to hysteresis is in Marlin, but I assume the desired set point would be in the middle of the hysteresis window. One problem with bang-bang is that some amount of overshoot and undershoot is a given. For example, when the lower threshold is met and the heater is turned on, it'll take a bit for the heat to make a difference. In the meantime, the temperature continues to drop off, leading to undershoot.

    PID adds smarts to this, using a model that "predicts" what it will take to maintain the temperature. The algorithm might turn off the heater a bit early as the threshold nears, knowing the temperature will still creep up a bit to reach the upper threshold. Likewise, it'll turn on the heater a bit early before the lower threshold is hit in order to keep the measured temperature from undershooting too low. It can even start to toggle the control output as threshold approach. "Tuning the PID" involves the software characterizing the system typically through a number of heating and cooling cycles. The tuning results in some coefficients that can be plugged into the predictive algorithm to optimize it for the specifics of your printer and environment - heat quickly but without a lot of overshoot.

    Applying Pulse Width Modulation (PWM) will refine this a step further. Instead of crudely turning heat on and off early in advance of reaching a threshold, PWM can constantly toggle the heater on and off at a comparatively fast rate. "More heat" is obtained by increasing the ratio of on-time to off-time. Cooling is obtained by decreasing the ratio. This is no different than using PWM to control LED brightness. The LED is always either fully off or fully on. "Brighter" is obtained by more on-time. Dimmer is obtained by less on-time. If the PWM frequency is fast enough, the eye doesn't see the LED being constantly toggled on and off, and what you get is an "averaged" brightness level. Now leverage this to a printer. Toggle the heater on and off fast enough, and what you get is an averaged amount of heat.

    I don't know what options Marlin has, but in a generic sense use of PID is not necessarily tied to using PWM. For example, I know the temperature controller on my green egg smoker is PID based but it does not use a PWM to control the speed of the airflow fan on the firebox. Marlin might have a similar way of applying the PID algorithm with a mechanical relay, but the SSR is going to be requirement if the PID algorithm inherently includes using PWM to toggle the output at a high rate.

    DISCLAIMER: I may have some the specifics less than perfectly accurate, but this should help with some of the fundamentals involved.
    Last edited by printbus; 08-29-2015 at 12:38 PM.

  10. #10
    Engineer-in-Training
    Join Date
    Jul 2014
    Posts
    305
    I have also been printing PLA with the heatbed off and my banding issues have disappeared. After I finish a set of prints for a friend I will be switching to the aluminum bed to see if that fixes everything.

    I am really interested in PID and will be watching this thread closely.

Page 3 of 8 FirstFirst 12345 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •