Extreme simple system for auto turn off atx power supply requested by Shauki 2

Extreme simple system for auto turn off atx power supply requested by Shauki 2 week ago.

Need modify marlin_main.cpp

1 turn on via switch.
2 after bootstrap or ramps or during printing enable pin58 (depend on modify on marlin_main.cpp)
3 now can turn off power swith (if using push button and autoenable pin can hold it for 7 second (bootstrap time of mega) )
4 in end-gcode ad command for turn off pin58

tested and work .

9d1a5c0c28f73a24e96d733edeb98475.jpeg

Wow, this is way too complicated.
Simply (directly) connect the green wire to D4 (to the left in your image) and use M80 and M81 to turn your PSU on and off. The power supply will even start up as the printer is turned on if you use 5VSB (purple) to power your printer’s electronics.

Check…and test thx… I lose it

Ok but Arduino need 5v alimentation…I think shauki prefer remove completly power…but thx I learn one thing more