Welcome! Log In Create A New Profile

Advanced

Modify PWM frequency for Heated Bed

Posted by cwagner2 
Modify PWM frequency for Heated Bed
June 08, 2014 11:06PM
Hello!

I am in the final stages of retrofitting a Stratasys 1200 SST with an Azteeg X3 controller and am trying to utilize the heated bed feature to control the temperature in the build chamber. I was hell bent on utilizing the unit's original 120 VDC power supply/controller (it has an input that I connected to the Azteeg's heated bed output) to power the heaters. Unfortunately, I smoked it today and was hoping to just use 120 VAC with a solid state relay. I have a feeling that Stratasys spent the resources to design a custom controller, rather than use the 120 VAC, because heating the chamber requires finer control than the bang bang method, which seems to be the recommended method for a relay. I'd like to use PID, but in order to do so, I need to chance the PWM frequency on the heated bed output to 1 Hz or lower. I was digging around the source code (version .83) with the help of this post

[forums.reprap.org]

In particular, the line where they change the pwm_count:

if(pwm_pos_set[3] == (pwm_count & 127)) WRITE(FAN_PIN,0);

This is the line in the firmware version I have that I was going to change:

#if HEATED_BED_HEATER_PIN>-1 && HAVE_HEATED_BED
if(pwm_pos_set[NUM_EXTRUDER] == pwm_count && pwm_pos_set[NUM_EXTRUDER]!=255) WRITE(HEATED_BED_HEATER_PIN,0);

I don't completely understand what the & 127 does, if that's the right thing to change to adjust the PWM frequency of the heated bed, and if it will accomplish what I'm trying to do. I'd really appreciate any help you can provide.

Thanks!

Edited 1 time(s). Last edit at 06/09/2014 12:20AM by cwagner2.
Re: Modify PWM frequency for Heated Bed
June 09, 2014 04:09AM
Yes, that is the right part also there is an other to turn it on as well. It will normally go with 15.xx Hz which is the slowest you can achieve with a byte as counter (255 = max). That is also the value written by pid. You would need to add an additional counter, so that the off code only runs every 15-15th time it would normally do. Or you try dead time control which also has less switches if set to 255 for on. But not sure it works good in your case as it depends on reaction time and you have a long reaction time I guess.


Repetier-Software - the home of Repetier-Host (Windows, Linux and Mac OS X) and Repetier-Firmware.
Repetier-Server - the solution to control your printer from everywhere.
Visit us on Facebook and Twitter!
Re: Modify PWM frequency for Heated Bed
June 11, 2014 01:25PM
Thanks for the info. I did some more research and realized that at 15 Hz, a solid state relay could still be used. The relay becomes less workable as you get closer to the frequecy of the AC, and it will just stay on when the PWM frequency is greater than it.

I went with an Omron relay, part number G3NE-210T-US with the recommended heat sink and it worked like a charm. From what I can tell, the Zero Cross function is important for AC power. The Azteeg controller held the temperature of the chamber within +/- 1 degree Celsius with no adjustment of the PID parameters.
Sorry, only registered users may post in this forum.

Click here to login