The folks at [electro-labs] designed this simple USB power meter which does just that. The device measures voltage and current ... and the source files for schematic and board layout are available ...