-
Notifications
You must be signed in to change notification settings - Fork 355
Power Supply OTG
This page is relevant to the IOIO-OTG board. For IOIO V1, visit this page
The IOIO-OTG board has two main modes of operations on the USB bus: device and host. When acting as a device (normally when connecting to a PC), the IOIO-OTG can be powered either through the USB connector or from an external source, whereas when both are connected, current will be drawn from the external source. When acting as a host (normally when connection to an Android / Bluetooth dongle), the IOIO-OTG must be externally powered, and must supply power through its USB connector.
The choice of which role to assume normally depends on which type of connector is plugged into the USB jack: micro-A will imply host, micro-B will imply device. Since micro-A connectors are not very common, the IOIO-OTG can be forced into host mode, by moving the host switch on the board to the "H" position. Do not connect the IOIO to a host (PC) when in this mode.
The most common way of externally powering the IOIO-OTG is by connecting a DC voltage source, anywhere between 5V-15V, to the JST connector. As soon as this is done, the red power LED should light. An alternative way is to feed the power directly between the VIN and GND pins. A power supply of 5W is the minimum recommended, 15W or more should be used when higher current is drawn from VIN or 5V by your circuitry.
IMPORTANT: Due to a design limitation in the IOIO-OTG, the board might be damaged when powered over long wires (high inductance) with more than 10V. This is because the voltage may momentarily glitch to over 20V and damage the voltage regulator switcher. Make sure to either use 10V or less, use short wires between the power supply and the VIN terminals or use a power supply that is not capable of very high current bursts. We are working on a fix.
While making the connections, it is recommended to keep the power off, as accidental contact between a 5V+ source and some of the points on the circuit may damage it. This is a good practice in general.
The IOIO supplies 5V to the Android device through the USB connection (on the VBUS line). This 5V supply both charges the Android device's battery and lets the Android device know that a USB host is connected. For some applications (e.g. applications that have a permanent connection to mains power), charging the Android device is desired. To achieve that, locate the trimmer pot on the IOIO, and with a little screwdriver, turn it all the way clockwise (in the direction of the arrow, thus increasing charge current to the maximum).
For those applications where charging is not desired, charge current can be limited. It is important to realize that limiting charge current inevitably decreases voltage on the USB VBUS (5V) line. According to the USB specification, decreasing VBUS under a certain threshold below 5V is illegal. It will not damage your Android device in any way to do so, but at a certain point your Android device will stop sensing that it is connected to the IOIO. To make things even a bit more interesting, the exact point where this happens varies from device to device, and varies slightly depending on the battery charge level. For example, Nexus One phones are known to be very forgiving for voltage drops on the VBUS, thus can be heavily current-limited while maintaining a reliable connections. Nexus S phones are known to be very sensitve, thus they inevitably need to be provided with more current.
The simplest way to adjust this for a specific device is by starting from full charge current (trimmer all the way clockwise), and with the Android device connected, slowly turn the trimmer counter-clockwise, keeping an eye on the battery icon on the screen. When the charge icon (flashlight icon over the battery icon) disappears, you have choked the current too much. Turn it back a notch or two to be on the safe side. When the Android devices battery discharges substantially, you might have to increase a bit further in order to maintain a stable connection.
The IOIO-OTG has two on-board voltage regulators:
- A switching regulator that can take 5V-15V input and outputs up to 3A of stable 5V.
- A linear regulator that feeds off the 5V line and outputs up to 500mA of stable 3.3V.
The 5V line is used for powering a USB device (when in host mode) as well as powering any 5V peripherals you might have, such as servo motors. It is available on any of the three pins marked "5V". USB devices can draw up to 500mA of current when charging, leaving about 2.5A for external devices. The switching regulator is very efficient. It should run fairly cool and thus does not waste a lot of energy. When powering it from a high-voltage source, the current drawn from this source will decrease accordingly. This regulator is protected against over-current or shorting 5V to GND. It is not protected against excessive or reverse input voltage - care should be taken!
3.3V is being used mainly for powering the IOIO's MCU. It draws about 30mA under normal operation, leaving a little over 400mA for any external 3.3V peripherals. It is available on any of the pins marked "3.3V". It is very useful for connecting to potentiometers, as the IOIO's analog inputs are 0-3.3V. Never feed this line 3.3V. It is to be used as output only. Under maximum load, the 3.3V regulator might get hot. It is internally protected against over current or over heating, and will shut itself down in such a case. As a rule of thumb, if you need more than 100mA or so drawn from this line, you should probably look more carefully into what is the best way to achieve this.
As mentioned above, some Android devices are very sensitive to the voltage they get on the USB VBUS line. Should this voltage drop momentarily below a certain threshold, the USB connection will drop, resulting in a IOIO disconnect. There are two very common causes for such drops to occur, which are worth knowing:
This is the simpler of the two. When charge limiting is over-aggressive, slight changes in the Android device's current draw (e.g. as result of battery discharging over time) will drop the VBUS voltage below threshold. The solution is to increase charge current slightly.
The on-board 5V (switching) regulator will maintain a stable 5V on the 5V line, as long as it is getting 5V or more on the VIN line, and that the current drawn from it is not greater than 3A. However, very commonly, batteries (such as 9V) and cheap household AC/DC converters drop their voltage drastically when drawn a significant amount of current. Very often, when powering motors from the 5V line, sudden current spikes (very typical to servos) cause the supply voltage to drop below 5V. Possible solutions are either to use more stable power sources (good AC/DC converter, LiPo batteries, etc.), or to separate the IOIO power supply from the motor power supply - that way the voltage drops occur but do not affect the 5V line on the IOIO.