vusb device us very sensitive to static charge

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
Pyles OS

vusb device us very sensitive to static charge

Post by Pyles OS » Sun Feb 23, 2014 8:29 pm

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?

blargg
Rank 3
Rank 3
Posts: 102
Joined: Thu Nov 14, 2013 10:01 pm

Re: vusb device us very sensitive to static charge

Post by blargg » Mon Feb 24, 2014 9:32 pm

Have you got a pin floating in your device? That could make it very sensitive to touching things.

Pyles OS

Re: vusb device us very sensitive to static charge

Post by Pyles OS » Tue Feb 25, 2014 6:39 am

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.

martinay
Posts: 10
Joined: Mon Feb 03, 2014 5:20 pm

Re: vusb device us very sensitive to static charge

Post by martinay » Wed Feb 26, 2014 10:48 pm

Did you got chance to try it with another computer, because it is maybe your computer that has a ground problem. (my 2 cents)

Pyles Os

Re: vusb device us very sensitive to static charge

Post by Pyles Os » Tue Mar 04, 2014 5:47 am

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.

martinay
Posts: 10
Joined: Mon Feb 03, 2014 5:20 pm

Re: vusb device us very sensitive to static charge

Post by martinay » Tue Mar 04, 2014 6:33 pm

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 ...

sarna

Re: vusb device us very sensitive to static charge

Post by sarna » Mon Mar 17, 2014 5:29 pm

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.

Post Reply