Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

creating 5v reference voltage for usb bus detection

Status
Not open for further replies.

somespirit

New Member
heya- i have an application where i have two custom usb devices- a host and a device. i am self-taught, so apologies if my terminology is flawed.

the usb device attaches to the usb host via 3 pins (d+, d-, gnd) of an 8 pin connector, and works great. both devices are self-powered.

however- currently, in my usb device, i am using a resistor (from Vcc) to give 5v to the microcontroller's usb bus-detection pin, because i don't have access to the usb interface 5v line to truly detect bus, and i don't have the capability of adding an extra pin for the 5v.

my question is whether it is possible to generate a reference voltage from the two usb data lines?

i wondered whether i could create a parasitic voltage, for example a schottky diode from each usb data line, into a cap, then to the bus pin? would this work, since all it has to do is keep the microcontroller input capacitor full? is there a better way?

thanks!
 
You have access to the d+ d- and gnd lines but NOT +vcc? That doesn't make sense, what kind of weird setup are you using that doesn't have access to the 5V line, it's free power you should be using it not separate power supply unless your circuit uses a lot of power. Even then you should still have wired the circuit to the +5V line of the USB host, for detection as you're finding this problem now..


No you can't use the USB data lines as a reference for anything, the signal that goes across them is a high speed differential data signal that's only about 200mv's. Connecting almost any circuitry to the data lines will likely kill the ability to transfer data.
 
Last edited:
Nope, high speed USB is -10/10mv for logic low and 360-440mvs for logic high in high speed mode. Low speed mode you might be able to detect that's .3volts max for low and 2.8-3.6 but that would only be for some devices. You could probably detect the high speed signal i you really wanted to by using an opamp to tap the data lines but it seems more trouble than it's worth, I still don't understand why you don't have access to the +5V line from the HOST's USB bus, it makes device detection trivial. You may be able to sense if a device is connected as a USB port in high speed mode both data lines are terminated to ground via a 45 ohm resistor.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top