Control USB Ports (English)

edited May 2022 in Questions & Answers
Hey Community!

I would like to control USB ports.

And my plan is as follows:

I have 2 USB interfaces with USB strips. Now I would like to be able to switch them on or off via GCODE or something.

Use:
e.g. if a screenshot is made for the time lapse, it goes on for the picture and then off again.

Or that I can generally add a command to turn the lamp on and off.

For example, when the print is paused, the lamp comes on and stuff like that.

Is that possible?
In other words, it should only be able to turn power on and off.


I will enjoy your answers.

Kind regards
Nico

Comments

  • I'm not sure this is possible. If I understand you correctly you want to enable/disable the 5v power to an usb port since the led is not controllable via software?

    It is no problem to execute any command from server at times where needed. With @execute / extcommands.xml (see manual) you can call any external command to trigger anything.

    If you are on a pi the easiest way would be using/controlling the GPIO pins. You can define them in global settings->GPIO and there you also see gcode commands to toggle the signal. Only problem is that you can not draw more then 10-20mA for a 3.3V pin. So you need some electronics to amplify that signal so you can control a led.

    If it is a self made printer and printer board has a free heater or fan output you could also use that and configure firmware to enable it with a g-code. Here you get normally 12 or 24V so you need a led stripe that can handle that.

    We can also control remote 220V plugs via web call (if supported). Depending on where th eurl activates it the delay can be high - e.g. if we need to call a www url that tells the plug later to enable a few seconds delay is normal. Also not sure if frequently enabling a usb charger with that would be good for life time of the charger.
Sign In or Register to comment.