Avisos
Vaciar todo

Turn off USB when Printer is off?  

  RSS
Alex
 Alex
(@alex-5)
New Member
Turn off USB when Printer is off?

Hi,

I am using Octoprint and have a script to reconnect automatically when the USB is reconnected, but on the Prusa MK3 the USB is still active even if the Main Power of the printer is off. Is there any way to change this?

 

Thanks, Alex

Respondido : 25/05/2021 6:13 pm
Baklin
(@baklin)
Reputable Member
RE: Turn off USB when Printer is off?

My OctoPi disconnects as soon as I power off the printer. It than shows the Connect button.

 

How could yours be active if there is no power to the printer? Or do I misunderstand what your are trying to do?

Respondido : 25/05/2021 6:58 pm
Alex
 Alex
(@alex-5)
New Member
Topic starter answered:
RE: Turn off USB when Printer is off?
Posted by: @baklin

My OctoPi disconnects as soon as I power off the printer. It than shows the Connect button.

Yes, this happens, but the USB device is still attached (the "/dev/ttyACM0" device is still visible on linux). On my other printer the USB device is detached (like I would pull the USB plug) and I can trigger a script when the device is attached again.

Looking at the schematics I seems that the 5V power from the USB is attached directly to the Atmega32u2 for the USB interface. So it seems that it cannot be disabled when the main power is off. 🤔  I might need another solution to automatically reconnect Octoprint.

Respondido : 25/05/2021 8:21 pm
--
 --
(@)
Illustrious Member
RE: Turn off USB when Printer is off?

@alex-5

The Power Supply switch kills 100% of the DC. So where the USB derives power doesn't really matter.

Respondido : 26/05/2021 7:03 pm
Alex
 Alex
(@alex-5)
New Member
Topic starter answered:
RE: Turn off USB when Printer is off?
Posted by: @tim-2

The Power Supply switch kills 100% of the DC. So where the USB derives power doesn't really matter.

The USB to serial bridge on the Atmega32u2 is still active, because the Atmega32u2 get its power from the connected device and not from the Power Supply of the prusa. Only the serial interface of the printer is powered down.

Respondido : 26/05/2021 9:30 pm
--
 --
(@)
Illustrious Member
RE: Turn off USB when Printer is off?

@alex-5

Lol - thanks, I missed that detail (actually, had noticed it before but spaced it). You might head over to github and post an issue and see if anyone over there has an idea. 

The only other suggestion would be getting creating with a shell script to some way to set a timeout to force a disconnect or to eject the device. Not something I've done recently so can't help coding one, but probably possible. 

Respondido : 27/05/2021 2:01 am
dgarcu
(@dgarcu)
Active Member
RE: Turn off USB when Printer is off?

In some other printers that I had this is also an issue. The Artillery LCD even gets turned on from the power from the Pi. I didn't do such a deep research but I suspect that in the PCB, the 5V supply for the electronics is shorted to the 5V in from the USB, so althought the printer PSU is disconnected, everything connected to that rail is still powered up by the Pi. 

Since the connection only uses the data pins of the USB and ground (not sure of this last thing, but it's a good practise to keep it), I was able to solve the problem just by cutting the +5V cable of the USB. Normally it's red colored. However there's also models out there which are "inserted" on the USB plug in order to block only the +5V contact.

You can try with and old cable if you wanna keep the original intact. Here's a pic:

USB pinout

Respondido : 08/06/2021 8:40 pm
towlerg
(@towlerg)
Noble Member
RE: Turn off USB when Printer is off?

There is a thread on the Octoprint forum called something like "Put tape on the 5v pin".

Respondido : 09/06/2021 9:29 am
Alex
 Alex
(@alex-5)
New Member
Topic starter answered:
RE: Turn off USB when Printer is off?
Posted by: @towlerg

There is a thread on the Octoprint forum called something like "Put tape on the 5v pin".

That does not work on the Prusa because the Atmega32u2 that is the USB-Serial bridge is powered only from the USB bus. So if you cut the 5v or put tape over it the USB port in the Prusa has no power at all.

Respondido : 09/06/2021 10:23 am
Compartir: