Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Hot bed Solid State Relay Safety cutout feature and proposed solution #27447

Open
flappydunk opened this issue Sep 29, 2024 · 0 comments
Open

Comments

@flappydunk
Copy link

Is your feature request related to a problem? Please describe.

Marlin 2.1.2.4
I have built a 3d printer that uses a 240V bed heater and I would like to examine a new safety feature specifically when using SSR (solid State relays). I am using RAMPS 1.6 and arduino Mega. Marlin drives the SSR for bed heating. The SSR switches 240v to the bed for fast heating. This all works well.

My concern is in the possible event of an SSR failure the bed heats up regardless of what marlin does. The bed overheats and Marlin will report a Maxtemp exceeded event. However this does not stop the over heating. The bed wiring can be wired to a heat sensing fuse but this has to be a predetermined temperature and will it really work?

Therfore I am requesting a change to Marlin for a safety feature to manage a SSR failure and avoid potential fire risk.

Are you looking for hardware support?

No response

Describe the feature you want

I have done some work and I have managed to create a safety system that does work. For this potential solution their is one small change to the Marlin code and some config changes are needed around PSU managament.

In my case I use a standard 12v supply for Marlin and RAMPS 1.6. A high voltage or switching PSU doesnt really exist, in this case it is only the settings that are used to activate a servo that switches the 240v on or off to the Bed.

Firstly in order to provide additional control of the 240v power I have provided hardware. Since Marlin supports servos and I have used them reliably for many years I use the servo to activate standard microswitch for the 240v. This has proven extremely reliable and the servo doesnt require power on all the time. So we have no additional heat or power problems as we may do using a normal relay. Also the 240v wiring and the high voltages are completly separated from the control hardware.

This microswitch is wired is series with the SSR bed wiring. The servo activates this switch and the servo is controlled by Marlin.
See the attached config files Configuration.h, configuration_adv.h, temperature.cpp. (note theses are uploaded as .txt files)

Configuration.txt
Configuration_adv.txt
temperature.txt

These changes provide the following functionality:
On power up the servo moves to the off position then moves to on. Providing 240 to the SSR. If the print does not start after 30 secs the servo goes to the off position and disconnects the SSR. Once the gcodes start the servo is activated.

During normal print operation if Marlin detects a overtemp on the bed the servo moves to the off position and disconnects the 240v.

See additional context below

Additional context

I have a proposed solution that I have tested however not knowing wider issues in Marlin the audience may want to modify naming or the code to meet the standards in use.

No changes to the slicer was required.

Firstly the existing code in Configuration.h.
The following is used to set up the PSU for activation as a Servo.

The following are uncommented
#define PSU_CONTROL
#define PSU_POWERUP_GCODE "M280 P0 S90 /n M280 P0 S10" //Cycles the servo OFF then to the ON position
#define PSU_POWEROFF_GCODE "M280 P0 S90" // Operates the servo to the OFF position
#define PSU_DEFAULT_OFF
#define AUTO_POWER_CONTROL

Configuration_adv.h
#define STARTUP_COMMANDS "M80 \n" //switch on Servo

temperature.cpp
void Temperature::disable_all_heaters() {
....

#if HAS_HEATED_BED
setTargetBed(0);
temp_bed.soft_pwm_amount = 0;

// ###### Mod Karl 25092024. Turns off power with SSR or Bed Overtemp failure
#if ENABLED(PSU_CONTROL)
#ifdef PSU_POWEROFF_GCODE
gcode.process_subcommands_now(F(PSU_POWEROFF_GCODE));
#endif
#endif
//#####################

WRITE_HEATER_BED(LOW);

#endif
....

From above you can see the change I am requesting is the additional lines of code to be added to
void Temperature::disable_all_heaters()
enclosed in //####.

20240929_132234
Servo_switch

@flappydunk flappydunk added the T: Feature Request Features requested by users. label Sep 29, 2024
@thisiskeithb thisiskeithb changed the title Hot bed Solid State Relay Safety cutout feature and proposed solution [FR] Hot bed Solid State Relay Safety cutout feature and proposed solution Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants