1. Got a question or need help troubleshooting? Post to the troubleshooting forum or Search the forums!

Community Favorite Bed Heater - Installing SSR & PID Control Instructions

Discussion in 'Mods and Upgrades' started by Perry Genovese, Jan 20, 2017.

  1. Perry Genovese

    Joined:
    Dec 13, 2016
    Messages:
    43
    Likes Received:
    22
    I'm going to provide a write up with some pics of this conversion I did earlier today. Its really easy and has some benefits.

    Why am I doing it? 2 weeks ago my R1+ starting shutting down randomly with a complete black out...and then turn itself back on after a few minutes. With a ton of help from Geof and Mark I made a bunch of changes resulting in a pretty fine running machine....way better than it ever has been in fact. Long story short...I replaced the power supply, installed an E3DV6 hotend and a new RAMPs/Arduino. The 1st 2 did not solve my problem....problem was my RAMPs was fried in part. Thanks to Geof for sending me a new one immediately. But those changes and now the printer is a completely different machine.

    That all being said Mark and Waldo suggested that I get the bed load off the RAMPs as it can be a common failure since the bed heater can pull 10-12 amps. To do this you need to run it through a DC-DC Solid State Relay of proper rating and enable PID control in the software. The benefits are the RAMPs is no longer seeing the high current demand of the heater so chance of frying it is minimized and PID control is a more accurate and stable method to control the heater.

    There is 1 risk....and that is making sure you acquire a non-counterfeit SSR. After some research I found UL listed this simple way of checking a UL approved FOTEK SSR....in the pic below I circled mine and if you enlarge it you will see the bottom right corner of the label is beveled. Apparently all the counterfeit melt downs have 4 square corners...why the counterfeiters can;t fake that I have no idea but its what I found. The risk is the internal components are under-rated and the SSR runs extremely hot to the point of melting. I read an article that they happen to be well built just under-rated...to be safe you could just get a way over-rated SSR I suppose. I used a 25A and after a 3 hour print it was ice cold. I also have a 2nd fan blowing in and around the RAMPs and the SSR. So this is important. The SSR does not need to be a FOTEK but it is the most common and lower cost. Input needs to be 12v and its usually a range such a 3vdc-32vdc. Here's the pic:

    Fotekssr.jpg

    The connections: We take the 12V Bed outputs from the board and wire them direct to the inputs of the SSR. Easy enough!

    SSRinput-wiring.jpg

    The other side of the SSR can be thought of as a switch and your bed heater will go inline between the SSR and the 12V from your PSU. I have pics of the wiring in a second. I don't know if the heater cares about polarity so maybe somebody could answer that but I made sure to pay attention to how it was wired prior to removed it form the board. You take you negative heater leg and connect it the negative terminal on the switch side of the SSR. Take the Positive heater leg up to 12V - (negative) on the PSU terminal. Then run a wire from 12V+ PSU to SSR + contact. You now essentially have an electronic switch inline between your PSU and the heater.

    SSRheaterConnection.jpg
    PSUwiring.jpg

    Thats it for the wiring. I mounted my SSR as seen and so long as its real and rated properly I do not expect it to be a problem. 1st long print suggests its ok!.

    Now the software changes. 1st here's a resource to read up on to familiarize yourself with PID Tuning http://reprap.org/wiki/PID_Tuning. There more out there if you search.

    At this point I assume you know how to mod the firmware and will just show the simple changes to make and where (also thanks to Waldo for help here):

    In the Configuration h tab find this block of code;
    -----------------------------------------------------------------------------------------------------------
    //#define PIDTEMPBED
    //
    //#define BED_LIMIT_SWITCHING

    // This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
    // all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
    // setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
    // so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
    #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current

    #ifdef PIDTEMPBED
    //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
    //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
    #define DEFAULT_bedKp 10.00
    #define DEFAULT_bedKi .023
    #define DEFAULT_bedKd 305.4

    //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
    //from pidautotune
    // #define DEFAULT_bedKp 97.1
    // #define DEFAULT_bedKi 1.41
    // #define DEFAULT_bedKd 1675.16

    // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
    #endif // PIDTEMPBED
    -----------------------------------------------------------------------------------------------------------------------
    In the 1st and 3rd line remove the double hash marks // to enable PID control for the bed so those lines look like this now:

    #define PIDTEMPBED
    //
    #define BED_LIMIT_SWITCHING

    next you need to run PID Autotune. In the control panel (matter control has terminal, S3D has the input line on the communication tab of control panel. As instructed in the code above run this:

    M303 E-1 C8 S90

    this will raise the bed temp to 90 8 times and each time will generate Classic values for Kp, Ki, Kd. After the 8th time it will tell you to use the last set of values generated. These value go into the above code in this section where you see Kp, Ki, Kd:
    ---------------------------------------------------
    #ifdef PIDTEMPBED
    //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
    //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
    #define DEFAULT_bedKp 10.00
    #define DEFAULT_bedKi .023
    #define DEFAULT_bedKd 305.4

    //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
    //from pidautotune
    // #define DEFAULT_bedKp 97.1
    // #define DEFAULT_bedKi 1.41
    // #define DEFAULT_bedKd 1675.16
    -----------------------------------------------------
    You can either comment out the 3 lines and add a 3 set or I just commented out the 3 #defines by adding // in front of each one and then I removed the // from the 2nd set of #defines. There is where you change the Kp, Ki, Kd value to what was generated from the PID Autotune. The total block of code now looks like this:
    ---------------------------------------------------------------
    #define PIDTEMPBED (note // removed to enable)
    //
    #define BED_LIMIT_SWITCHING (note // removed to enable)

    // This sets the max power delivered to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
    // all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
    // setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
    // so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
    #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current

    #ifdef PIDTEMPBED
    //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
    //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
    // #define DEFAULT_bedKp 10.00 (note commented out by adding // to line)
    // #define DEFAULT_bedKi .023 (note commented out by adding // to line)
    // #define DEFAULT_bedKd 305.4 (note commented out by adding // to line)

    //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
    //from pidautotune
    #define DEFAULT_bedKp 97.1 (note removed // to enable and added the generated values)
    #define DEFAULT_bedKi 1.41 (note removed // to enable and added the generated values)
    #define DEFAULT_bedKd 1675.16 (note removed // to enable and added the generated values)

    // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
    #endif // PIDTEMPBED

    -----------------------------------------------------------------------

    Thats it...thats all I got!!!! I can say the Bed temp was a literal rope over the 3 hour print pegged at set temp.

    I am not a software guy but do have an engineering degree so tinkering is my nature and with a little pointing I'm a quick study. but this really is simple. There are other write ups out there for modifying the firmware so do a little searching if I confused you ... LOL. I'm sure if I mispoke the guys will point it out and I will revise as needed. But I have spent a year here quietly taking advantage of all the knowledge so I wanted to contribute something back that I haven't seen anywhere yet. Hope it helps and makes sense!
     
    jim3Dbot, m4r1n5, Geof and 3 others like this.
  2. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,818
    Likes Received:
    3,539
    Well done write up and with pictures too! This should be an easy mod for anyone wanting to replace the heater pad with a higher wattage one or those who want ultra stable bed temperatures. Good job.

    One note, if you are doing this mod, please do not plug in the numbers shown above. Every PID may have variances so you want to test and discover those numbers for yourself.
     
  3. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    21,339
    Likes Received:
    7,036
    Made it a sticky
     
    Rigmarol and Geof like this.
  4. Spidematt

    Spidematt Member

    Joined:
    Nov 24, 2016
    Messages:
    63
    Likes Received:
    14
    Where is a good place to find the ssr?
     
  5. Perry Genovese

    Joined:
    Dec 13, 2016
    Messages:
    43
    Likes Received:
    22
    WheresWaldo likes this.
  6. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,818
    Likes Received:
    3,539
    There are several reasons to do this upgrade.
    • The original heater is undersized only covering about 2/3 of the actual build area.
    • The original heater is under-powered, it is just 110W.
    • The RAMPS board is only rated to draw a maximum of 11A through the bed heater MOSFET (11A x 12V = 132W max). Provided it is built to exact specifications.
    • With this mod you can go both larger (~ 240mm x 240mm) and more powerful (~20A+ or a 240W+ heater pad). Resulting in:
      • More even and complete bed heating
      • Faster bed heating
    Maintaining PID control also give you more precise bed heating control, if you require it and enable it in firmware.
     
    #6 WheresWaldo, Jan 24, 2017
    Last edited: Jan 24, 2017
    jim3Dbot and mark tomlinson like this.
  7. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,818
    Likes Received:
    3,539
    This is the SSR I used, but I also went bigger with a bigger power supply, 40A since the Robo 30A supply failed. I also went with a 300W heater (300W / 12V = 25A).

    This is a 100A DC-DC Fotek SSR. Available from China or US based warehouses. (link is Banggood.com)

    You can squeak by with a 25A heater and the original Robo 30A power supply if PID is enabled, as the RAMPS/Arduino board draws around 3 - 5A total. The steppers are close to 1A each. Safer to stay around 20A just in case the Robo power supply can't be pushed that hard.
     
    #7 WheresWaldo, Jan 24, 2017
    Last edited: Jan 24, 2017
    mark tomlinson likes this.
  8. Perry Genovese

    Joined:
    Dec 13, 2016
    Messages:
    43
    Likes Received:
    22
    FWIW I went with a 400W PSU here https://www.amazon.com/uxcell-AC110V-Switch-Supply-Driver/dp/B019RNKOK6

    This was the 1st change I made and for some reason the entire machine was instantly quieter as if everything was struggling from being under powered. I have also changed out all the fans as well to further improve the noise. I don't know...but now this thing is so quiet its amazing...it used to be I;d be on my office phone and the printer would be running in the background and people would ask if I had a bad connection. Now it can't be heard.
     
    jim3Dbot likes this.
  9. jim3Dbot

    jim3Dbot Active Member

    Joined:
    Jun 1, 2015
    Messages:
    246
    Likes Received:
    123
    Nice article Perry,
    Another great, inexpensive passive way to keep that SSR coooool...........http://www.ebay.com/itm/New-Aluminu...-Small-Type-Heat-Dissipation-LJ-/161813099525. Use heatsink compound between the sink & the SSR & you will be good to go...........I purchased two of SSR's with heatsinks for around $10.00........note the cutoff corner also...........however, I wouldn't trust that....hence the sink...........Thanks for sharing bro..........Jimmy
     

    Attached Files:

    Perry Genovese likes this.
  10. Tom Finzel

    Tom Finzel Member

    Joined:
    Jan 10, 2016
    Messages:
    35
    Likes Received:
    8

    Ok, I'm confused and I'm not sure if this matters but the below picture looks to have a different wiring configuration. Thoughts??

    http://i58.tinypic.com/210kk02.png

    210kk02.png
     
  11. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    21,339
    Likes Received:
    7,036
    That looks fine.
     
    Tom Finzel likes this.
  12. Perry Genovese

    Joined:
    Dec 13, 2016
    Messages:
    43
    Likes Received:
    22
    It's the same
     
    Tom Finzel likes this.
  13. Tom Finzel

    Tom Finzel Member

    Joined:
    Jan 10, 2016
    Messages:
    35
    Likes Received:
    8
    I ordered the 100A DC-DC from the link and it only lasted for a couple of test heat ups of the bed. No more red light on the SSR and bed heats up all by itself. :) Looks like the SSR is shorted. Got a MKS MOSFET board so I'll try that.
     
  14. daniel871

    daniel871 Well-Known Member

    Joined:
    Apr 18, 2015
    Messages:
    1,322
    Likes Received:
    510
  15. Perry Genovese

    Joined:
    Dec 13, 2016
    Messages:
    43
    Likes Received:
    22
    is the bottom right corner of the label beveled or square?
     
  16. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,818
    Likes Received:
    3,539
    The one I got was clipped at the corner, a complaint to Banggood and they usually make it right. They are not a bad company to deal with.
     
    Tom Finzel likes this.
  17. Tom Finzel

    Tom Finzel Member

    Joined:
    Jan 10, 2016
    Messages:
    35
    Likes Received:
    8
    SSR pic.jpg
     
  18. Tom Finzel

    Tom Finzel Member

    Joined:
    Jan 10, 2016
    Messages:
    35
    Likes Received:
    8
  19. Perry Genovese

    Joined:
    Dec 13, 2016
    Messages:
    43
    Likes Received:
    22
    even under rated I find it hard to believe a 100A SSR melted down....I mean those who took them apart noted they were well built but the components were under-rated .... maybe they use all the same parts and just change the label rating on the counterfeits. Only other thing the UL warning states is that it says made in Taiwan and I notice your says made in China
     
    Tom Finzel likes this.
  20. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,818
    Likes Received:
    3,539
    Tom, that one came from Banggood? The one I got from them is exactly like the pictures even down to the Made in Taiwan. Maybe they got some bad one or fake ones now. Either way just snap a picture and send them an email, I am sure they will do something about the dependency and subsequent failure.
     
    Tom Finzel and mark tomlinson like this.

Share This Page