USB charging adapter for bench power supplies

USB charging adapter

USB charging adapter

Many gadgets and tools nowadays run from 5 V and incorporate an USB port for that purpose. When developing those devices powering them from a bench power supply is usual very handy as current can be easy monitored and limited. For that purpose I wanted to create a small adapter which plugs into my bench power supplies and offers an USB type A plug.

The power and current a device may draw from an USB port is limited and follows complex rules depending on the state of USB enumeration. Many devices ignore those rules and just draw 100 mA or 500 mA independently of USB enumerate state. This works for most power providing devices and almost all USB chargers/power supplies. If more current is needed the power supply needs to signal extra capability to the device. As most USB chargers are rather dump a simple solution, or to be exact many simple solutions were invented. The device that wants to draw current checks the status of the D+ and D- signal lines immediately after attach. Continue reading

I²C via USB on OS X using FT232H

Many sensor chips use the I²C bus, sometimes called TWI or SMBus, for communication. Most microcontrollers support I²C also natively and if not I can be implemented easily in software. Connecting I²C devices to a PC is much more difficult as soldering them onto the mainboard (where a SMBus can be found usually) is not a viable solution. Up to now I usually used a Atmel AVR microcontroller in teamwork with a FT232R (a standard USB↔RS232 converter).

The USB 2.0 successor of the FT232R, the FT232H, has a Multi-Protocol Synchronous Serial Engine (MPSSE) included which is designed to support serial interfaces such as I²C, SPI or JTAG at speeds up to 30 Mbps. This sounded to me as an interesting option to test I²C and SPI devices directly from my PC. Continue reading