How would I control the output of the power in USB ports in Linux?

The answers here seem to say it is a hardware issue, but I think this is a software issue. ASUS has Ai Charge which more then doubles the volts to charging Apple products from a standard 2.0 usb port.

USB 1.0, 2.0 and 3.0 Specs (All at 5 volts) 4 Wires (2 Data and 2 dedicated power)

Voltage Breakdown: USB 1.0 and USB 2.0 = 0.5A or 500 mA = 2.5 watt USB 3.0 = 0.9A or 900mA = 4.5 watt Wall wart = 1.5A or 1500 mA = 7.5 watt Ai Charge = 1.2A or 1200mA = 6 watt

Ai Charge works on ASUS and non-ASUS motherboards and is a program you can install in Windows.

Personally I HATE Apple so I want to figure out a way to do this 1.2A usb 2.0 output trick for my netbook while running Linux.


you need to use PWM to control motors speed, to do that you need a micro controller, PIC18F series supports USB communication, there are plenty of code samples available internet how to use USB in PIC18F series, also you need a transistor array or H-Bridge to control mortors from PIC.

The simplest way to communicate is, program a USB serial in PIC18F micro controller, and when you plug that 18F to your computer, it will detect USB serial port, so you can send the commands to serial port to control speeds.


I don't believe it is possible to directly manipulate the USB voltages. They are designed to provide a +5V output at all times unless power is diminised with other hubs.

You might be better served posting this question on http://electronics.stackexchange.com


The USB voltage is fixed at a nominal 5 volts and cannot be controlled.

The behavior of USB devices regarding their current draw is well defined in the USB specifications. USB devices are supposed to draw up to 1 unit load (100mA) unless they have negotiated a higher load from the USB host. It's quite likely that the servo motors that you have are going to need to draw higher currents than that, and wouldn't be able to request it without being a USB device and negotiating with the host.

It's also likely, depending on the servo motor that you are trying to control, that you'll need to either provide a PWM signal or an analogue voltage to control motor position. USB hosts are not intended to provide either of these.

Your best options to drive your motor from your PC are:

  1. Get a dedicated USB controller for your servo motor (if one exists)
  2. Make your own, based on a small microprocessor (eg. using an arduino)
  3. Choose a different port on the PC. If available, PC parallel ports can be controlled to provide control for motor drivers.

Tags:

Linux

Usb