Page 1 of 1
vusb device us very sensitive to static charge
Posted: Sun Feb 23, 2014 8:29 pm
by Pyles OS
I guess it is a hardware question... I've built a V-USB device on Attiny85 - typical bus-powered 5V scheme with two zener diodes on D+ and D-. I do have two caps (electrolytic 10uF and ceramic 0.1uF) between +5V and GND. The USB cable I am using has five wires (usual four plus the shield that is connected to the outer shell of USB connector). I tried leaving the shield wire floating and connecting it to the ground on my board - no difference.
It works fine, but is very sensitive to static discharge on computer case. Basically, every time I touch the metal on my laptop case, the USB device stops communicating. The client app reports:
Code: Select all
Warning: cannot query manufacturer for device: error sending control message: Protocol error
Could not find USB device!
and /var/log/syslog shows
Code: Select all
usb 4-1: usbfs: USBDEVFS_CONTROL failed cmd usbDisplay rqt 128 rq 6 len 256 ret -71
This is definitely not normal - e.g. my USB mouse does not get disconnected when I touch my computer.
Any ideas how I can fix it?
Re: vusb device us very sensitive to static charge
Posted: Mon Feb 24, 2014 9:32 pm
by blargg
Have you got a pin floating in your device? That could make it very sensitive to touching things.
Re: vusb device us very sensitive to static charge
Posted: Tue Feb 25, 2014 6:39 am
by Pyles OS
No.
Just for an experiment, I removed as much from my breadboard as I could. Now I have one Attiny85, two zener diods, two signal resistors, pull-up resistor for D-, two caps between power and ground, and pull-up resistor for reset pin of the Attiny (I am not sure if I really need it, but I wanted to err on the safe side). I connected the three unused pins of Attiny to LEDs.
Even this minimal device has the same problem - it works fine until I touch the computer case.
Does it matter how far the caps are located on the breadboard from the Attiny or from incoming cable connection? Could it be the quality of some components? (if so, which ones are the like candidates?)
I'll also try to reassemble it on another breadboard - this one is a super-cheap board and I have some doubts about the connections' quality.
Re: vusb device us very sensitive to static charge
Posted: Wed Feb 26, 2014 10:48 pm
by martinay
Did you got chance to try it with another computer, because it is maybe your computer that has a ground problem. (my 2 cents)
Re: vusb device us very sensitive to static charge
Posted: Tue Mar 04, 2014 5:47 am
by Pyles Os
Tried on two different computers. The other one is even worse - it simply disconnects the vusb device after several minutes.
I also assembled the device on a PCB, no change. I ran out of options and now I'll try to figure out how to "reboot" the device every few minutes and cause the computer to rediscover it.
Re: vusb device us very sensitive to static charge
Posted: Tue Mar 04, 2014 6:33 pm
by martinay
It must be something else. My own project runs for days without problems.
Is the ATTiny85 using internal oscilator or a crystal ?
Maybe try another chip such atmega328 ...
Re: vusb device us very sensitive to static charge
Posted: Mon Mar 17, 2014 5:29 pm
by sarna
Hi, have you solved your problem yet? I have the same issue with V-USB running on atmega8 @16MHz when i connect GND of my board with another GND of power supply which voltage is measured by ADC (obviously ADC wire isn't connected yet). Sometimes circuit react to switching desk light on and off.