Is it possible to disbable USB power



  • I have a USB device connected to my Omega2 that I would like to disable the USB power to temporarily.

    Even if I "reboot" or "poweroff" (via the command line) the USB port always has power.

    I've tried unbinding the usb1 device from linux, but that just disables the usb devices connected to the port but they still receive power.

    I'm wondering if there is some gpioctl that I could do to disable power to the usb port.



  • @David-Duffey No, the USB-port isn't powered by the Omega2, so it has no way of disabling power to it, either. The USB-port on the various docks is just passively-powered.



  • @WereCatf Thanks I noticed that too after posting that even with just the mini dock and omega2 removed the host usb port still had power.

    I guess my options are to try and find some small external usb device I can manage the power on, or a custom dock.



  • USB hubs with downstream power port software disable theoretically exist - the HUB ICs usually support this, but the switch chips are rarely populated, since that would add cost for a rarely required feature in something usually sold as a commodity consumer peripheral.

    The power switch chips that aren't being populated in those hubs are cheap and relatively easy to work with if you have a SOT-23 breakout, are making a board, or feel like hand-carving copper clad with a knife. The RT9701 is theoretically discontinued but still available (along with successors) and flexible enough people have used it for things beyond USB like enabling power to the smallest servos, letting an ESP8266 control it's own power, etc. This will probably be easier to control from a GPIO than trying to get a discrete MOSFET circuit right, though that is possible as well.

    If you don't need automatic control, there are USB hubs sold with pushbutton power that I find extremely useful for embedded development since power cycling devices is so commonly needed and that usually saves having to re-plug them. Worth keeping in mind though that sometime you can get enough power over data lines (more the logic ones than USB ones) to prevent power cycling from accomplishing a full reset, for example a board and a USB-serial converter can both potentially "almost" power one another in a way that prevents clean reset. And of course self-powered devices may not respond to loss of VBus at all, unless they are monitoring it.



  • @Chris-Stratton Thanks for the feedback, not an EE so this was really helpful.

    Probably worth explaining my application. I have a robotic vacuum cleaner (Neato XV) that has a usb serial port. When connecting to the USB serial port you can get information, set commands, tell it to start cleaning, etc. I will have it start cleaning automatically under certain conditions.

    But it won't start the "clean" command until you disconnect the usb because it thinks it is still physically wired to a PC.

    So I have the Omega2 wired up and it sends the "clean" command but then the bot waits until you pull the usb cable. Other folks have used small openwrt routers to do the same and then either 1. use a relay to disable the usb power or 2. reboot the router which disconnects it long enough for the vacuum to start cleaning.

    On newer revisions of this vacuum someone found the serial pins as well ... that may be another way of getting access without the bot waiting for a USB cable to be unplugged, but I've not seen anyone find that on the older XV model I have.

    I'm looking for the most simple / straight forward way to do so ... and this has given me some ideas to follow, thanks.



  • @David-Duffey Sounds fun. I'd use an RT9701 as I have them, but a little relay could work at the cost of higher power consumption.

    It is possible that even supplying 3v3 via a GPIO to the VBus pin (after removing the 5v connection!) would trick it (it may not be able to detect the difference form 5v) but probably best not to try that without understand the recipient circuit.

    Depending on your battery, you may also want to think about the power consumed by the Omega2 - it's not high, but over time will quickly add up compared to a battery pack. Shutting down (with an external power switch) is a possibility but adds complexity, and you'd need a button to restart it. Other types of radios may be better than wifi for connecting to something you want to generally have in an autonomous, battery-efficient sleep mode.



  • @Chris-Stratton Thanks, the GPIO alone was able to make the USB serial usable. I also found a 3.3V source on the robot to power the Omega2+. I'm just using the expansion board for the pinout and it' is now power by and controlling the robot.

    0_1486262933586_IMG_20170204_200812.jpg

    Now that this guy has a second brain running around I need to figure out what else I could/should be doing with it!



  • @David-Duffey said in Is it possible to disbable USB power:

    Now that this guy has a second brain running around I need to figure out what else I could/should be doing with it!

    Whatever you do, don't let it watch on-demand video. That never ends well



Looks like your connection to Onion Community was lost, please wait while we try to reconnect.