Skip to content

A remix of bjoern70's "suicide switch" power button for Sovol 3D SV04

Notifications You must be signed in to change notification settings

hpax/SV04-Suicide-Switch-Remix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Soft-off power button for the Sovol SV04 3D printer, using an RGB LED
pushbutton, a miniature 5V standby power supply module, and an
ATtiny85 microcontroller.

(I used ATtiny85 because I had them on hand. ATtiny25/45 would work
just as well, but seem to be hard to get in DIP8 packages anymore. The
-V versions would work as well, but are typically more expensive.)

The bracket in this tree holds a 16 mm (hole diameter) pushbutton. See
hw/powerctl-sch.pdf for the expected pinout of the connection to the
control board.

Either common anode or common cathode LED buttons can be used: both the
board jumper/connection JP1 and the firmware EEPROM needs to
configured accordingly.

The prebuilt firmware is configured for common anode; for common
cathode, change byte 0 of the EEPROM data file (onoff.eeprom.bin) to
0x28 rather than 0x3b (clear bits 4, 1, 0) or change LED_COMMON_ANODE
in sw/leds.h and recompile.

See the comment near the top of sw/eeprom.h for all the configuration
options can be set using the EEPROM without recompiling.

It is not technically necessary to use an RGB pushbutton. A
one- or two-color pushbutton can be used just as well; the
microcontroller can even dim or pulse the LED(s) if desirable. The
prebuilt firmware uses the LEDs as follows:

	RED	- AC power available, power off
	GREEN	- Button is pressed
	BLUE	- Power on

As the circuit is very simple, I originally used a stripboard rather
than waiting for a custom PCB. However, this turned out to be
mechanically unstable and cracked after a bit. Instead, I ended up
designing a PCB; the design files and a .zip file with CAM files
compatible with JLCPCB (https://jlcpcb.com/) are included. Uploading
that .zip file to their website and they make 5 circuit boards for a
few USD including the cheapest shipping.

The firmware uses avr-gcc and avr-libc; it does not require the
Arduino build environment or boot loader. Note that since all 6 I/O
pins are in use, the RESET DISABLE fuse needs to be programmed, and a
standalone (high voltage) programmer needs to be used. I recommend
socketing the MCU.

If you get a precrimped JST cable you apparently want to be careful
with the pinout (straight or crossover.) I found myself having bought
the latter. The pin that should be connected to the microcontroller
matches the one facing to the REAR of the SV04 mainboard connector J2
(yellow color on the adjacent wires.) Either kind of cable can be
used; simply rotate the connector on the stripboard appropriately.

The silkscreen on the PCB reflects the crossover cable configuration,
since that is what I was using.

Instead of using an SSR, you can opt to upgrade your power supply to
one which supports remote power control. However, most power supplies
are *active low* unlike the SSR, so in that case you will need to
change the polarity of the output in the firmware (or set bit 2 in
byte 0 of the EEPROM); you should also remove resistor R4.

To enable the M81 poweroff G-code command, you need a patch to the
mainboard firmware to define the following options in the Marlin
pinout configuration:

#define SUICIDE_PIN		PE4	/* Connector J2 */
#define SUICIDE_PIN_STATE	LOW

You can use bjoern70's patched firmware:

  https://github.com/Bjoern70/SV04-IDEX-3D-Printer-Mainboard-Source-code

or I have a patch to johncarlson21's Marlin 2.1.x tree:

  https://github.com/hpax/SV04-Marlin-2.1.x.git

Both of those requires the appropriate display firmware update.

Alternatively, adding the above two lines into the file
Marlin/src/pins/stm32f1/pins_CREALITY_V4.h of the stock Sovol firmware
should work too (in which case a display firmware change should not
be necessary as long as you are running the latest one already):

  https://github.com/Sovol3d/SV04-IDEX-3D-Printer-Mainboard-Source-code.git

About

A remix of bjoern70's "suicide switch" power button for Sovol 3D SV04

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published