Welcome! Log In Create A New Profile

Advanced

Bang_Bang settings in Teacup

Posted by Shank man 
Bang_Bang settings in Teacup
January 31, 2017 05:50PM
I like to power my heat bed through a relay but once the heat bed heats up the relay starts chattering. I tried to enable the Bang_Bang option
in Teacup but the relay still chatters. Do I need to comment out some PWM settings somewhere? Any help is appreciated.

/** \def BANG_BANG
Drops PID loop from heater control, reduces code size significantly
(1300 bytes!).
*/
#define BANG_BANG

/** \def BANG_BANG_ON
PWM value for Bang Bang 'on'.
*/
#define BANG_BANG_ON 200

/** \def BANG_BANG_OFF
PWM value for Bang Bang 'off'.
*/
#define BANG_BANG_OFF 45
Re: Bang_Bang settings in Teacup
February 12, 2017 11:21AM
BANG_BANG is in the first view a 2 position controller. BANG_BANG_ON is in your case a PWM of 200/255 and BANG_BANG_OFF a PWM of 45/255.

You want entirely on and entirely off.
#define BANG_BANG_ON 255
#define BANG_BANG_OFF 0

Edit: You can also disable PWM on your heater definition with the PWM-flag, via configtool or in the board.xxx.h
//            name      pin      invert  pwm
DEFINE_HEATER(extruder, DIO4,    0,      1)

Edited 2 time(s). Last edit at 02/12/2017 11:39AM by Wurstnase.


Triffid Hunter's Calibration Guide --> X <-- Drill for new Monitor Most important Gcode.
Re: Bang_Bang settings in Teacup
February 15, 2017 07:14PM
Thank you Wurstnase That's exactly what I needed. Problem solved.
Re: Bang_Bang settings in Teacup
February 15, 2017 11:34PM
You're welcome. smileys with beer


Triffid Hunter's Calibration Guide --> X <-- Drill for new Monitor Most important Gcode.
Re: Bang_Bang settings in Teacup
May 06, 2023 09:02PM
Hola, no logro estabilizar la temperatura del hotend , serviría jugar con el código bang_bang pues se pone +-5° o que otra configuración hacer
Sorry, only registered users may post in this forum.

Click here to login