Printrboard heatbed bang-bang configuration

Printrboard heatbed bang-bang configuration

Postby Mad_Gouki » 2014-Feb-Sat-12-Feb

Hi,
I just set up my heated bed and I'm using a G8QN relay. It's a mechanical relay, and when I use it wired to the heatbed pins on the printrboard, it constantly clicks while driving the heater at about 4hz. I'm guessing the pins are set to drive a heated bed with PID, but I'd like to use bang-bang. How do I go about doing this? I am assuming I need to compile the marlin firmware from github/PxT/Marlin and comment out something or other. What do I need to comment out if that's the case?

Is there a way to use the m304 G code command to make it just power full or 0 and no PWM?

Thanks
  • 0

Mad_Gouki
Waiting to connect to printer...
 
Posts: 4
Joined: 2014-Feb-Sat-12-Feb
Reputation: 0

Printrboard heatbed bang-bang configuration

Sponsor

Sponsor
 

Re: Printrboard heatbed bang-bang configuration

Postby RetireeJay » 2014-Feb-Sat-12-Feb

I think you will need to recompile and re-flash. I recommend starting with the Unified v2 source code. It corrects a few errors found in earlier versions.
You can find full info on how to modify and re-flash your firmware, and a link to the Unified software in the Printrbottalk wiki.
WikiButton.PNG


This section of declarations in Configuration.h seems to say that what you want to do is possible with only editing declarations in header files.
Code: Select all
// 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 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

Note: I have not done this change myself. Also, I note that the instructions here say to uncomment "#define PIDTEMPBED" in order to use PID control... but in even though the line shown here is commented (by the "//") it seems that we are using PID control. This is one of the hazards of open-source software: the code probably works, but the comments and instructions don't always get updated. I don't know exactly where to tell you to look.
  • 0

You do not have the required permissions to view the files attached to this post.
Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4797
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Printrboard heatbed bang-bang configuration

Postby Mad_Gouki » 2014-Feb-Sat-12-Feb

I figured I would have to recompile from source. It seems fairly straightforward, I'll update on how progress goes.
Is there a way to dump my current firmware settings? I've calibrated my X and Y fairly accurately and don't want to lose those values.
Any reason you suggest unified v2 over unified v3? Which one actually comes stock on the printrbot?
  • 0

Mad_Gouki
Waiting to connect to printer...
 
Posts: 4
Joined: 2014-Feb-Sat-12-Feb
Reputation: 0

Re: Printrboard heatbed bang-bang configuration

Postby Mad_Gouki » 2014-Feb-Sat-13-Feb

So, after thinking about it for a few moments and digging through my box of tools, I came upon a great solution which required no compilation. As a programmer by trade, I enjoy not having to do such work in my free time (especially not having to set up a development environment and tweak every little setting). My limited experience with electronics gave me the idea to smooth out the PWM signal, so that's exactly what I did.

That said, here's what I did.

Get a 470uf capacitor (mine is rated 35v). shove it in pins 1 and 4 of the HOTBED connector on the board.

That's all.

I'd post a link to the image but it won't let me because it's too spammy for a new user, so I've attached it.

I'm not sure if it matters which direction it goes, but if the cap blows I'll let you know which way it shouldn't go.
  • 0

You do not have the required permissions to view the files attached to this post.
Mad_Gouki
Waiting to connect to printer...
 
Posts: 4
Joined: 2014-Feb-Sat-12-Feb
Reputation: 0

Re: Printrboard heatbed bang-bang configuration

Postby RetireeJay » 2014-Feb-Sat-13-Feb

Oh, I didn't even know there was a v3. But from the description it looks like they just updated the identification string that is printed out when you connect. That was a problem with V2... you didn't have a very sure way to know from the string you got a connect time which version of the software you were looking at. So either V2 or v3 should be fine.

Printrbot keeps on updating their products, so it's hard to know what your 'bot came with. Probably not the Unified software, but I don't really know.

Mad_Gouki wrote:Is there a way to dump my current firmware settings? I've calibrated my X and Y fairly accurately and don't want to lose those values.

Yes and no. See my Wiki article. You should back up your values before you flash, but flashing the code space does not automatically over-write the EEPROM values for calibration. It's not too complicated, but you need to read up on how it works before you flash or your previous values might technically still be in EEPROM but be unusable with your new software.
Mad_Gouki wrote:Get a 470uf capacitor (mine is rated 35v). shove it in pins 1 and 4 of the HOTBED connector on the board.

That's all.

I'd post a link to the image but it won't let me because it's too spammy for a new user, so I've attached it.

I'm not sure if it matters which direction it goes, but if the cap blows I'll let you know which way it shouldn't go.


Yikes! Not the most elegant solution! Yes, the capacitor polarity DOES matter! The terminal marked + needs to be attached to the wires farthest away from the corner of the board, and the other terminal attached to the wires closest to the corner of the board.

Now you still have PID control, but the capacitor will keep your relay "closed" until the current through the relay drains enough voltage off the capacitor. Every time the MOSFET switches "on" the capacitor will get fully charged again. So you are now depending on the PID signal to go to zero for a period of several cycles before the relay can drop out. And you are "teasing" the relay by making it work with an intermediate voltage between full on and full off. As a EE, I can't say I like this solution, but if it works for you then what more can I say?
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4797
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Printrboard heatbed bang-bang configuration

Postby Mad_Gouki » 2014-Feb-Sat-18-Feb

That's how I hooked the cap up. I have a lot of trouble finding information like the pinouts and their polarity for the printrboard online. It seems like a lot of the printrbot stuff is not easy to locate. Anyway, it's working great and I haven't smelled anything burning or seen any blue smoke. I realize it gives the relay an intermediate voltage between the spikes, but I'm willing to accept that I may break the relay if it saves me half a day of compiling a new firmware for the board. It seems like it closes pretty quickly (within half a second?) once the current is turned off to the relay. I wonder if a larger capacitor would be better or worse in this case, but I'm not going to mess with it since it seems to be working for the moment.
  • 0

Mad_Gouki
Waiting to connect to printer...
 
Posts: 4
Joined: 2014-Feb-Sat-12-Feb
Reputation: 0

Re: Printrboard heatbed bang-bang configuration

Postby plexus » 2014-Feb-Tue-11-Feb

once you get the arduino apps working it takes about 30s to recompile and another 2 mins to flash and test. its worth getting it set up that way there is nothing in the way if you need to tweek the firmware
  • 0

User avatar
plexus
Site Admin
 
Posts: 2115
Joined: 2011-Dec-Mon-16-Dec
Location: Toronto, Canada
Reputation: 95

Re: Printrboard heatbed bang-bang configuration

Postby PxT » 2014-Feb-Tue-12-Feb

RetireeJay wrote:Oh, I didn't even know there was a v3. But from the description it looks like they just updated the identification string that is printed out when you connect. That was a problem with V2... you didn't have a very sure way to know from the string you got a connect time which version of the software you were looking at. So either V2 or v3 should be fine.



Just for your reference, the description string was the only change in v3. They are identical other than that.
  • 0

User avatar
PxT
Print complete...
 
Posts: 1340
Joined: 2011-Dec-Mon-16-Dec
Location: Sacramento, CA
Reputation: 97

Re: Printrboard heatbed bang-bang configuration

Postby protom » 2014-Mar-Sun-03-Mar

I have the same problem since I flashed to unified 3 my relay keeps clicking as soon as I hit the heat the bed button
I had to use a rely because I'm using a 8x12 bed....
Anyway if anyone with the knowledge could modify the firmware for us so we don't have to add capacitors...
I also heard about solid state relay being silent but less reliable that mechanical ones any chance it would work better ?

Cheers
  • 0

protom
Loading filament...
 
Posts: 10
Joined: 2012-Nov-Thu-01-Nov
Reputation: 0

Re: Printrboard heatbed bang-bang configuration

Postby RetireeJay » 2014-Mar-Sun-12-Mar

protom wrote:I also heard about solid state relay being silent but less reliable that mechanical ones any chance it would work better ?


I have no idea why the solid state relay would be considered less reliable, unless it was being used too close to the limits of its ratings; generally, I would consider SSR's to be more reliable than mechanical ones. And yes, they will be silent.
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4797
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Printrboard heatbed bang-bang configuration

Postby ivymike1031 » 2014-Mar-Sun-14-Mar

could do the mechanical version of your capacitor, and give the thermistor a larger thermal inertia to read from. I have an Al bed about 8mm thick, so it takes a while to heat/cool and the cycle frequency on my mechanical relay is very long ... minutes. Right now I'm printing with the bed at 78C and the indicator LED strip I put on the bed has just turned off for the first time during this print (I'm about 6 minutes in). It turned back on about 30 sec later ...

I suppose it's possible that the firmware is controlling the bed differently too.
  • 0

User avatar
ivymike1031
Layer 100 of 1234
 
Posts: 185
Joined: 2012-Dec-Mon-12-Dec
Location: Houston, TX
Reputation: 11

Re: Printrboard heatbed bang-bang configuration

Postby protom » 2014-Mar-Sun-16-Mar

so it would be possible to use this kind of SSR ?
Sunkee-Solid-SSR-25-3-32VDC-SSR-25DD

if it is I suppose the fact that the printrbot sending signal that keeps my mechanical relay switching every half second is not good
or does the SSR behave differently and make this a non issue ?
  • 0

protom
Loading filament...
 
Posts: 10
Joined: 2012-Nov-Thu-01-Nov
Reputation: 0

Re: Printrboard heatbed bang-bang configuration

Postby RetireeJay » 2014-Mar-Sun-20-Mar

protom wrote:so it would be possible to use this kind of SSR ?
Sunkee-Solid-SSR-25-3-32VDC-SSR-25DD

if it is I suppose the fact that the printrbot sending signal that keeps my mechanical relay switching every half second is not good
or does the SSR behave differently and make this a non issue ?


Yes, that SSR looks suitable. And frequent switching of the SSR on and off is a non-issue. It's silent, so there is no annoyance factor. In fact, the interface with the Printrboard is a lot "cleaner" if you do NOT try to use a capacitor to make the switching slower. I recommend this approach.
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4797
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Printrboard heatbed bang-bang configuration

Postby protom » 2014-Mar-Mon-00-Mar

thanks a lot for your reply retireeJ
just a quick last question what would be the wiring for the ssr ?
would I need a diode ?

regards
  • 0

protom
Loading filament...
 
Posts: 10
Joined: 2012-Nov-Thu-01-Nov
Reputation: 0

Re: Printrboard heatbed bang-bang configuration

Postby RetireeJay » 2014-Mar-Mon-08-Mar

You could try browsing through this post: viewtopic.php?f=80&t=4975&p=32628
and this post: viewtopic.php?f=15&t=2665

With a solid-state relay you don't need a diode.
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4797
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477

Re: Printrboard heatbed bang-bang configuration

Postby protom » 2014-Mar-Thu-23-Mar

Thanks retireejay i read the post but my SSR only has
one - and one + input labelled 4 and 3 rated 3~32v Dc
And
One - and one + output labelled as 1 and 2
Rated 24~220v Dc
So where should I plug
the two signal wires coming from my printerboard heat bed output
The two wires going to my heatbed
The two wires coming from my power supply

Also will it work since output is marked as 24~220v and i guess I'm only outputting 12v dc ?

Thanks again for your help

Cheers
  • 0

protom
Loading filament...
 
Posts: 10
Joined: 2012-Nov-Thu-01-Nov
Reputation: 0

Re: Printrboard heatbed bang-bang configuration

Postby protom » 2014-Mar-Thu-23-Mar

Here is a picture of my SSR
  • 0

You do not have the required permissions to view the files attached to this post.
protom
Loading filament...
 
Posts: 10
Joined: 2012-Nov-Thu-01-Nov
Reputation: 0

Re: Printrboard heatbed bang-bang configuration

Postby thawkins » 2014-Mar-Thu-23-Mar

I used a 12v car solenoid, $4.14 wired the coil into the printer board, connected the heatbed to the powersupply via tne contacts.

Gives a little click as the bed turns on and off, but its not a problem, and it tells me its working.

I have the ability to rebuild my firmware, so im not using any of the printrbot supplied source or hex files, so seting it to bang bang is trivial. Im not using a printrboard anymore, as mine died.

http://www.amazon.com/gp/product/B0002K ... UTF8&psc=1

Low tech, but works like a charm.
  • 0

You do not have the required permissions to view the files attached to this post.
Jonbot+
225mm x 200mm - Heated Bed
RAMPS 1.4 running Marlin 1.1.0
Full Graphic display.
-------------------------------
Zen Toolworks CNC/3d printer
230mmx360mm bed
Dual j-head hotends.
Dual heated beds.
RAMPS 1.4 running Marlin 0.98
-------------------------------
Flashforge 3d Creator Pro
Dual Extruder
220x143x150mm
Mightyboard rev e, runnimg Sailfish 7.7r1234
-------------------------------
Photon, self designed printed printer.
User avatar
thawkins
Print winner 2nd
Print winner 2nd
 
Posts: 1636
Joined: 2013-Aug-Sun-10-Aug
Location: Manila, Philippines
Reputation: 172

Re: Printrboard heatbed bang-bang configuration

Postby protom » 2014-Mar-Tue-11-Mar

so I finally figured it out
1-load/positive from power supply
2-red/positive to heatbed
3-positive from the printrboard heated connector
4-negative from the printrboard heated connector

solder black front he heatbed to black from the power supply
  • 0

protom
Loading filament...
 
Posts: 10
Joined: 2012-Nov-Thu-01-Nov
Reputation: 0

Re: Printrboard heatbed bang-bang configuration

Postby REPRAP SQUAD » 2014-Mar-Tue-11-Mar

Are you using a 12v bed as I noticed that the rating is 24 v on the ssr
  • 0

Twitter: @REPRAPSQUAD
Check it out: Build logs, 3D printer news and all things Printrbot--http://reprapsquad.wordpress.com
PC Case Mods 3D printed:
http://www.enviousmods.com

RepRap Squad's The 1st Simple (XL)
* Custom built that towers over the LC

Printrbot Plus V2 W/
*Dual extruder PB Version (2-Ubis 1.75mm hotends)
*Heavily Modded and all axis extended
User avatar
REPRAP SQUAD
Metal hotbed butt
 
Posts: 1628
Joined: 2013-Feb-Sun-11-Feb
Location: Pacific NW Oregon-US
Reputation: 71

Re: Printrboard heatbed bang-bang configuration

Postby protom » 2014-Mar-Tue-12-Mar

here is a picture on ow to connect a SSR in general
  • 0

You do not have the required permissions to view the files attached to this post.
protom
Loading filament...
 
Posts: 10
Joined: 2012-Nov-Thu-01-Nov
Reputation: 0

Re: Printrboard heatbed bang-bang configuration

Postby bres55 » 2014-Apr-Tue-16-Apr

protom wrote:here is a picture on ow to connect a SSR in general


I think in that configuration, control is on the mains side of the power supply,
SSR's are AC, DC, specific.
  • 0

bres55
I'm an end stop.
 
Posts: 50
Joined: 2014-Mar-Tue-18-Mar
Location: Folkestone, UK.
Reputation: 1

Re: Printrboard heatbed bang-bang configuration

Postby protom » 2014-Apr-Fri-16-Apr

I found a SSR that is DC TO DC fotek sir-40-dd after frying a fotek SSR-25 DD
  • 0

protom
Loading filament...
 
Posts: 10
Joined: 2012-Nov-Thu-01-Nov
Reputation: 0

Re: Printrboard heatbed bang-bang configuration

Postby protom » 2014-Apr-Fri-17-Apr

I just plugged my new 40amp ssr with a pretty decent heatsink but it seems the heatsink is getting abnormally hot even only after a few minutes am i doing something wrong ?
  • 0

protom
Loading filament...
 
Posts: 10
Joined: 2012-Nov-Thu-01-Nov
Reputation: 0

Re: Printrboard heatbed bang-bang configuration

Postby REPRAP SQUAD » 2014-Apr-Fri-17-Apr

On my fotek ssr, I added a heatsink with a fan to cool the fins as I've noticed that they can get warm. I'll try and get some pics together.
  • 0

Twitter: @REPRAPSQUAD
Check it out: Build logs, 3D printer news and all things Printrbot--http://reprapsquad.wordpress.com
PC Case Mods 3D printed:
http://www.enviousmods.com

RepRap Squad's The 1st Simple (XL)
* Custom built that towers over the LC

Printrbot Plus V2 W/
*Dual extruder PB Version (2-Ubis 1.75mm hotends)
*Heavily Modded and all axis extended
User avatar
REPRAP SQUAD
Metal hotbed butt
 
Posts: 1628
Joined: 2013-Feb-Sun-11-Feb
Location: Pacific NW Oregon-US
Reputation: 71

Re: Printrboard heatbed bang-bang configuration

Postby Extrudo » 2014-Sep-Thu-17-Sep

Hi protom, I'm just wondering if your 40A fotek SSR worked out fine in the end using your 12V bed please? I guess you added a fan to it in the end too? Thanks.
  • 0

Extrudo
Levelling print bed...
 
Posts: 27
Joined: 2014-Sep-Tue-08-Sep
Reputation: 0

Re: Printrboard heatbed bang-bang configuration

Postby Mooselake » 2014-Sep-Fri-14-Sep

If you're into the giant auction site, try a search for "SSR 40DD" (or 25DD) without the quotes. Check the description to make sure it'll work with 12V (it might anyway, but best to have it rated for it).

Kirk
  • 0

Modified KickStarter Classic Plus 7/2012
KS Thingybot Delta Pro 10/31/16
User avatar
Mooselake
My next printer is...
 
Posts: 3509
Joined: 2011-Dec-Tue-23-Dec
Location: Moose Swamp, Upper Michigan, USA
Reputation: 170

Re: Printrboard heatbed bang-bang configuration

Postby yedyel » 2016-Sep-Fri-12-Sep

hi i have a cuestions, I have a PC power supply of 12V 20A, this power supply could be connected to the printboard?.
  • 0

yedyel
Waiting to connect to printer...
 
Posts: 1
Joined: 2016-Sep-Fri-12-Sep
Reputation: 0

Re: Printrboard heatbed bang-bang configuration

Postby RetireeJay » 2016-Sep-Fri-12-Sep

yedyel wrote:I have a PC power supply of 12V 20A, this power supply could be connected to the printboard?.

Certainly, if you are not driving a heated bed. You need to match the required Voltage rating of 12V, and you need a minimum of 10A to run the board and the extruder heater. The wattage is found by multiplying the voltage and current, so your supply is capable of 240 Watts.

If you have a heated bed, then 240 watts might work, but you would be pushing it to the limit. Most people with heated beds insist that you need at least 350 watts (almost 30A).
  • 0

Printrbot Plus operational January 2013
Brass threaded rods (5/16" X 18) & nuts for Z axis
GT2 belts & pulleys
Cable chain to reduce probability of fatigue failure in wires
E3D V5 Hot End, 0.4mm nozzle, also 0.8 and 0.25 in use occasionally
PB fan mount + 40mm fan -- using printed mount adapter, not the E3D supplied fan
Injection molded extruder gears
Optical Z "endstop" (custom designed and built)
Have used many pounds of T-Glase filament. Now also doing some work with Ninjaflex SemiFlex
Print on glass with Scotch Craft Stick or other glue stick
User avatar
RetireeJay
My next printer is...
 
Posts: 4797
Joined: 2013-Jan-Wed-13-Jan
Location: Greenville, SC
Reputation: 477


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest