USB Wrapper

A place to document your own projects.

USB Wrapper

Postby scasagrande » Mon Mar 10, 2014 2:38 pm

[edit] You can order it on my website at http://galvant.ca/shop/usb-wrapper/

Hey everybody, I've got another project of mine to show today.

Image

Inspired by the USB Condom, the USB Wrapper helps protect your device against untrusted USB ports by severing the USB data lines and only allowing the power lines to connect through. This ensures that no data information can be transfered between the power source and your device. This helps against known attacks such as juice jacking: http://krebsonsecurity.com/2011/08/bewa ... e-jacking/

This however does present a problem. In legitimate USB chargers, the data lines are used to communicate to your device how much power they are capable of sourcing. The exact means by which they do vary between manufacturers. The standard calls for the D+ and D- lines to be shorted together, while companies like Apple will apply specific voltages on both lines depending on the charger. By entirely disconnecting these data lines, your device does not know any information about the charger, and will thus assume it is a standard USB2.0 port. This limits means the device will self-limit the charging rate to 2.5W, even if the charger can in fact handle more.

To deal with this, the USB Wrapper has two slider switches allowing you to tell your device what kind of charger it is connected to. This also allows you to mix and match chargers and device manufacturers which don't follow the same signalling rules. For example, an iPhone with a Samsung charger cube. It features selections for dedicated charger port (D+ & D- shorted), Apple, Sony, and open circuit. For Apple, there are 4 options, 500mA, 1A, 2.1A, and 2.5A.

The project is open source hardware and the sources can be found at https://github.com/Galvant/usb_wrapper-pcb

Here is a video I made today for USB Wrapper:
http://www.youtube.com/watch?v=KMzj8KeqWx8

As usual, questions/comments/concerns/etc are welcome and appreciated. Thanks!
Last edited by scasagrande on Fri Mar 21, 2014 5:04 pm, edited 1 time in total.
scasagrande
Newbie
Newbie
 
Posts: 23
Joined: Sat May 05, 2012 2:26 pm

Re: USB Wrapper

Postby frank26080115 » Tue Mar 11, 2014 9:59 am

neat, since the design is SMD and has plenty of free room, perhaps you'd like to add a current monitor? a long bar graph along the side would look fantastic.

question: which devices use the shorted D+ and D- configuration?

suggestion: please upload PDF or PNG versions of the schematic and PCB for easy viewing, on computers without KiCAD and on smartphones/tablets
frank26080115
Jr. Member
Jr. Member
 
Posts: 57
Joined: Wed Apr 28, 2010 11:24 pm

Re: USB Wrapper

Postby scasagrande » Tue Mar 11, 2014 10:15 am

A current monitor would probably increase the BOM by too much. I'd like to keep this one as minimal as possible. I am thinking about a more "advanced" version which could include a current monitor. Let's see if people like this version first!

Lots of devices use the shorted configuration. In fact, everything that actually follows the USB charging spec does. My Samsung Galaxy Nexus cellphone and my Blackberry Playbook tablet both check for shorted D+ and D- lines.

I usually forget to generate a PDF so I will do so later today. Thanks for the reminder :D
scasagrande
Newbie
Newbie
 
Posts: 23
Joined: Sat May 05, 2012 2:26 pm

Re: USB Wrapper

Postby frank26080115 » Tue Mar 11, 2014 11:11 am

ohhh you are selling this thing, I thought it was one of those "here's the design on github, take it or leave it", in which case, empty footprints and cuttable traces won't hurt.

I am currently designing a 6 port charging station with individual current monitors. I was thinking about connecting filtered PWM to the D+ and D- pins to auto detect optimal charging settings. What do you think of that?
frank26080115
Jr. Member
Jr. Member
 
Posts: 57
Joined: Wed Apr 28, 2010 11:24 pm

Re: USB Wrapper

Postby scasagrande » Tue Mar 11, 2014 11:51 am

Yep! I just finished my MSc and I'm trying to do OSHW full time.

Is your plan to just vary the voltages on D+ and D- until you find the maximum charge rate? Totally an option but I've found that many devices will require you to disconnect the 5V supply between changing the voltages on D+ and D-. IE the device will set its charge rate when connection is initially made and does not continue to monitor those other lines. You'll need to break the 5V connection each time while hunting for that optimal rate.
scasagrande
Newbie
Newbie
 
Posts: 23
Joined: Sat May 05, 2012 2:26 pm

Re: USB Wrapper

Postby frank26080115 » Tue Mar 11, 2014 12:04 pm

scasagrande wrote:Is your plan to just vary the voltages on D+ and D- until you find the maximum charge rate? Totally an option but I've found that many devices will require you to disconnect the 5V supply between changing the voltages on D+ and D-. IE the device will set its charge rate when connection is initially made and does not continue to monitor those other lines. You'll need to break the 5V connection each time while hunting for that optimal rate.


Thanks for the tip. It was just an idea I was toying with. I am probably over complicating things in my design. I can't supply 6*2.5 amps from a wall-wart anyways, especially with a DC/DC converter without adding extra heat sinking.

For a single port charger, adding a MOSFET to quickly disconnect-reconnect the 5V is feasible.
frank26080115
Jr. Member
Jr. Member
 
Posts: 57
Joined: Wed Apr 28, 2010 11:24 pm

Re: USB Wrapper

Postby Trippy » Tue May 06, 2014 3:27 pm

Hi! What package size is the resistors? And do you have any info on where to find the slider switches? This is a nice cheap little project to test out pcb and part ordering sites :)
Trippy
Newbie
Newbie
 
Posts: 3
Joined: Tue May 06, 2014 3:23 pm

Re: USB Wrapper

Postby scasagrande » Tue May 06, 2014 8:10 pm

Resistors are all 0603. As an exercise to the reader, you'll have to find the switches yourself!
scasagrande
Newbie
Newbie
 
Posts: 23
Joined: Sat May 05, 2012 2:26 pm

Re: USB Wrapper

Postby Trippy » Wed May 07, 2014 10:22 am

scasagrande wrote:Resistors are all 0603. As an exercise to the reader, you'll have to find the switches yourself!


Great, thanks =) Im 90% sure this switch will fit, Digikey: SS-24E06-TG 5 (seems i cant post links) =P
Nice project btw. Cant wait to get my pcbs from OHS Park =D
Trippy
Newbie
Newbie
 
Posts: 3
Joined: Tue May 06, 2014 3:23 pm

Re: USB Wrapper

Postby Trippy » Wed May 07, 2014 10:22 am

*Double post*
Trippy
Newbie
Newbie
 
Posts: 3
Joined: Tue May 06, 2014 3:23 pm

Re: USB Wrapper

Postby scasagrande » Wed May 07, 2014 8:16 pm

In the future I'd appreciate the business, even if you're looking for un-assembled boards. I'm trying to work on OSHW full time instead of getting a "real job". I'm almost going even on a monthly basis, and I don't even own a car.

But hey, its within your right to order them else where.
scasagrande
Newbie
Newbie
 
Posts: 23
Joined: Sat May 05, 2012 2:26 pm


Return to Project logs