Isolation?
Isolation?
Hello...
In the past I fryed USB port with incorrect cabling of USB oscilloscope. Now I'm thinking (datalogger project) how to isolate USB bus.
The supply should be not problematic. some isolated DC/DC converters should do the job. But what about D+ and D-?
I thinking to use some optocouplers. And after that I have at least two solution.
1. For receive just put optocouplers in receive path and for transmitt use separate 2 pins (so 4 pins nedded for USB)
2. Use two pairs of optocoupler and DIRection signal. So 3 pins are needed.
... and optocoupler's have tendency to invert signals.. How much trouble is to do 'reinvert' in software? Should be easy for transmit but what for receive?
Any idea?
In the past I fryed USB port with incorrect cabling of USB oscilloscope. Now I'm thinking (datalogger project) how to isolate USB bus.
The supply should be not problematic. some isolated DC/DC converters should do the job. But what about D+ and D-?
I thinking to use some optocouplers. And after that I have at least two solution.
1. For receive just put optocouplers in receive path and for transmitt use separate 2 pins (so 4 pins nedded for USB)
2. Use two pairs of optocoupler and DIRection signal. So 3 pins are needed.
... and optocoupler's have tendency to invert signals.. How much trouble is to do 'reinvert' in software? Should be easy for transmit but what for receive?
Any idea?
Re: Isolation?
I doubt that it is as easy as you expect. What about the direction: how do you want to find out in which direction communication takes place? And what about the pullups/pulldowns/voltage levels and so on?
Therefore I'd suggest you to have a look on the following sites/products:
http://www.analog.com/en/interface/digi ... s/fca.html
http://www.analog.com/en/interface/digi ... oduct.html
http://www.analog.com/en/interface/digi ... oduct.html
http://www.analog.com/en/interface/digi ... oduct.html
Therefore I'd suggest you to have a look on the following sites/products:
http://www.analog.com/en/interface/digi ... s/fca.html
http://www.analog.com/en/interface/digi ... oduct.html
http://www.analog.com/en/interface/digi ... oduct.html
http://www.analog.com/en/interface/digi ... oduct.html
Re: Isolation?
I had that isolator (commercialy made)
It's works with a lot of stuf but doesn't like some devices. Some usb key's doesn't work, Some mices doesn't work and all V-USB stuff doesn't work. I was tryed some other series and pullups but without success.
And I have VUSB thing in mind to isolate. And there I know when I got to transmit. So direction shouldn't be problematic.. Just spare pin. Seems that I should try (when I have some spare time )
It's works with a lot of stuf but doesn't like some devices. Some usb key's doesn't work, Some mices doesn't work and all V-USB stuff doesn't work. I was tryed some other series and pullups but without success.
And I have VUSB thing in mind to isolate. And there I know when I got to transmit. So direction shouldn't be problematic.. Just spare pin. Seems that I should try (when I have some spare time )
Re: Isolation?
What about not isolating AVR and instead isolate the inputs to your logger / oscilloscope etc ?
Re: Isolation?
Bob wrote:What about not isolating AVR and instead isolate the inputs to your logger / oscilloscope etc ?
That's not easy if the voltage have spectrum over few MHz. And my current project sample at 2GHz!
Re: Isolation?
I think the isolating 2 wires should be easyer than 24.... just need to try.
Re: Isolation?
That's true. You can invert the optocoupler outputs by adding an additional transistor and a resistor. Maybe you can create a draft of your suggestions and we can have a look on it and comment it.
Re: Isolation?
Something like this...
Power supply and Rx/Tx control isn't isolated here http://slavko.kocjancic.eu/vusb.pdf
Power supply and Rx/Tx control isn't isolated here http://slavko.kocjancic.eu/vusb.pdf
Re: Isolation?
Hmm, maybe this could work. Don't forget pullups on the AVR side (depending on the optos you choose). But I think enumeration will be a problem as a 1k5 pullup has to be either on D- for low speed OR on D+ for full speed devices. No idea what happens when there's a pullup on each signal.
Re: Isolation?
The pullup for device recongnision to D- is not drawn.
The pullups shown was enabled only when AVR is in transmitt mode. When receiving there are actualy pulldown but diodes make that like Tristated. I'm afraid that USB lines are to weak to drive optocouplers (AVR in receive mode)
The pullups shown was enabled only when AVR is in transmitt mode. When receiving there are actualy pulldown but diodes make that like Tristated. I'm afraid that USB lines are to weak to drive optocouplers (AVR in receive mode)
Re: Isolation?
You could add another (non-inverting) buffer that drives the LEDs of IC4. Or you connect R5 and R6 also to AVR_DIR and place a MOSFET which you drive with USB_D+/-.
Re: Isolation?
Micha wrote:You could add another (non-inverting) buffer that drives the LEDs of IC4. Or you connect R5 and R6 also to AVR_DIR and place a MOSFET which you drive with USB_D+/-.
R5 and R6 are already driven by AVR. Probably the USB bus can't sink or source enought current to drive LED directly so some buffer will be needed.
Re: Isolation?
eslavko wrote:Micha wrote:You could add another (non-inverting) buffer that drives the LEDs of IC4. Or you connect R5 and R6 also to AVR_DIR and place a MOSFET which you drive with USB_D+/-.
R5 and R6 are already driven by AVR. Probably the USB bus can't sink or source enought current to drive LED directly so some buffer will be needed.
I know that they are already driven by the AVR. But you have an inverter (IC1) in there. If you connect the resistors directly to AVR_DIR you could use the inversion which is coming through driving the LEDs by a MOSFET. Something like: AVR_DIR -> R5.1/R5.2 -> LED.A/LED.C -> N-chan.D/N-chan.S -> USB-GND where N-chan.G is connected to USB_D+/- (.1/.2/.A/.C/.D/.S/.G are the corresponding pins of the components).
What are R1/R2/D1/D2 for? You also have to consider that many/most optocouplers have an open collector output and therefore need another pullup.
Re: Isolation?
Micha wrote:eslavko wrote:Micha wrote:
What are R1/R2/D1/D2 for? You also have to consider that many/most optocouplers have an open collector output and therefore need another pullup.
That's are pullup as photocoupler are open collector. And diode asc as tristate switch when anode is low.
I will try that when I have little more spare time.