Close



Page 3 of 9 FirstFirst 12345 ... LastLast
Results 21 to 30 of 83
  1. #21
    Staff Engineer printbus's Avatar
    Join Date
    May 2014
    Location
    Highlands Ranch, Colorado USA
    Posts
    1,437
    Add printbus on Thingiverse
    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.

    The ATMEGA2560 processor provides a number of hardware PWM channels, but each is associated with a particular processor pin. For purposes of flexibility regardless of underlying hardware, the Arduino libraries also support software-based PWM. Software PWM can be used with any pin. Software-based PWMs will typically run slower than possible in hardware, along with some cost in software overhead. Slower doesn't mean they'd be unacceptably slow. Assuming the 7 Hz rate is correct, a 7 Hz PWM frequency is still far faster than the bang-bang control loop.

    More info on the hardware-based PWM: RAMPS D8, D9, and D10 are all connected to ATMEGA2560 pins that can be, at least theoretically, configured as hardware PWM outputs. When configured for hardware PWM, RAMPS D8 for the default heat bed connection is derived from ATMEGA2560 timer/counter 4, as can be the D6 servo output. Separate output compare registers for D6 (register OC4A) and D8 (register OC4C) are provided to allow the on/off ratio for D6 and D8 to be managed independently. With both derived from the same timer/counter, both D6 and D8 would have the same pulse train frequency. The other output compare register on timer/counter 4, OC4B, is associated with an ATMEGA2560 pin that is not passed to RAMPS.

    How much Marlin and the underlying Arduino libraries can already leverage the hardware-based PWM would be where someone with existing knowledge would help. I know more about the AVR processors themselves than I do about Marlin and Arduino.

    Understanding the internal workings of the hardware timers isn't trivial. The ATMEL datasheets are light on top-level info on how to make them work. I typically look into Arduino sketches or C-code examples on avrfreaks when I need to do something new with them.
    Last edited by printbus; 08-28-2015 at 02:02 PM. Reason: corrected OC4C label on D8

  2. #22
    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.

    ....

  3. #23
    Staff Engineer printbus's Avatar
    Join Date
    May 2014
    Location
    Highlands Ranch, Colorado USA
    Posts
    1,437
    Add printbus on Thingiverse
    Soft PWM would make sense, since although the MEGA2560 board used in our case has a number of hardware PWM channels, not all motherboard types would. I wouldn't be surprised if one could find a hardware PWM library to use though, similar to the way there are fast I/O libraries that leverage underlying hardware more efficiently than vanilla Marlin does.

    I didn't mean to exaggerate the complexity of the hardware PWM. My point is that for someone not familiar with them, the hardware timers/counters can be daunting because of the extensive amount of flexibility ATMEL built into them.

  4. #24
    Technologist
    Join Date
    Apr 2015
    Location
    Lakeport, CA.
    Posts
    174
    Understood..., and thx for the specific pointer to an SSR.

    When I have an excuse to unseal my next spool of PLA..., gonna give it the blue tape vs heated bed test. And for sure..., a trip to Amazon for a new metric dial indicator is in the works.

    And heck..., the SSR is probably worth it, even in bang-bang mode, just for the quiet.

    Quote Originally Posted by printbus View Post
    Soft PWM ....

    I didn't mean to exaggerate the complexity of the hardware PWM. My point is that for someone not familiar with them, the hardware timers/counters can be daunting because of the extensive amount of flexibility ATMEL built into them.

  5. #25
    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.

  6. #26
    Engineer-in-Training
    Join Date
    Feb 2015
    Posts
    211
    I did this test with my printer last week. The Z banding was much better but I still had a periodic Z band spaced at ~.8 mm so to me that indicates that there is still some issue with hardware as .8 mm is the pitch of the threaded rods.

    The banding with the heat bed on is horrible so I know that the heat bed is causing the majority of the issues.

    I am just going to go down my list of things and try to get it taken care of, too many people are having banding issues with the 12" printers so there has to be some inherent issue with the design/components used in them. I think we will find it is a combination of things that are stacking up and causing the problems.

    Quote Originally Posted by lakester View Post
    Understood..., and thx for the specific pointer to an SSR.

    When I have an excuse to unseal my next spool of PLA..., gonna give it the blue tape vs heated bed test. And for sure..., a trip to Amazon for a new metric dial indicator is in the works.

    And heck..., the SSR is probably worth it, even in bang-bang mode, just for the quiet.

  7. #27
    Technologist
    Join Date
    Apr 2015
    Location
    Lakeport, CA.
    Posts
    174
    Hey Chadd: would you be able to post A/B photos that illustrate the difference w/ heated vs not heated? It would be cool if for no other reason that it's kinda rare to see "smoking gun" diagnostic photos related to 3d printing!

    Quote Originally Posted by Chadd View Post
    I did this test with my printer last week. The Z banding was much better but I still had a periodic Z band spaced at ~.8 mm so to me that indicates that there is still some issue with hardware as .8 mm is the pitch of the threaded rods.

    The banding with the heat bed on is horrible so I know that the heat bed is causing the majority of the issues.

    I am just going to go down my list of things and try to get it taken care of, too many people are having banding issues with the 12" printers so there has to be some inherent issue with the design/components used in them. I think we will find it is a combination of things that are stacking up and causing the problems.

  8. #28
    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.

  9. #29
    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.

  10. #30
    Engineer-in-Training
    Join Date
    Feb 2015
    Posts
    211
    Quote Originally Posted by lakester View Post
    Hey Chadd: would you be able to post A/B photos that illustrate the difference w/ heated vs not heated? It would be cool if for no other reason that it's kinda rare to see "smoking gun" diagnostic photos related to 3d printing!
    Here is a picture, I am sure you can guess what one is with the heated bed on.

    IMG_20150829_000447.jpg

    These two were printed with the exact same settings on both, except the one on the left is with the heated bed on the one on the right is with the heated bed off. As I mentioned earlier even with the bed off I still have some periodic banding at .8mm intervals.

Page 3 of 9 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
  •