Voltage Question

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
kevintshaver
Posts: 2
Joined: Sun Apr 05, 2009 1:42 am

Voltage Question

Post by kevintshaver » Sun Apr 05, 2009 1:48 am

Hi. Does anyone understand why I would only get 1.6V from this setup? If pin 7 (ATMEGA VCC) is disconnected I measure 5.2V but with the VCC pin connected, it drops to 1.6 so there is not enough voltage to run the microcontroller. Thanks!

http://img8.imageshack.us/img8/2931/avrusb.png
Image

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Re: Voltage Question

Post by christian » Sat Apr 11, 2009 3:46 pm

If your AVR tears down the USB supply, it must be broken (take more than 500 mA) or your USB port is broken.

BTW: I'd recommend 1k5 instead of 2k2 for the pull-up. You probably don't reach the threshold voltage on D- with 2k2 due to the current through the zener diodes.

Grendel
Rank 4
Rank 4
Posts: 167
Joined: Sat Dec 16, 2006 9:53 pm
Location: Oregon, USA
Contact:

Re: Voltage Question

Post by Grendel » Mon Apr 13, 2009 4:32 am

2k2 worked for me w/ mega8 & tinyX61 devices. I tested a bit, 6k8 still works w/ m8, 2k2 is pretty much max. for the tinys (trying to minimize power use.. :))

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Re: Voltage Question

Post by christian » Mon Apr 13, 2009 10:55 am

The limit of the resistor value does not depend on the type of AVR you use, it depends primarily on the characteristics of the zener diode and the voltage limit on the host side.

Grendel
Rank 4
Rank 4
Posts: 167
Joined: Sat Dec 16, 2006 9:53 pm
Location: Oregon, USA
Contact:

Re: Voltage Question

Post by Grendel » Mon Apr 13, 2009 6:37 pm

That were physically the same Z-diodes and the same USB port tho. Odd, I better recheck that.

kevintshaver
Posts: 2
Joined: Sun Apr 05, 2009 1:42 am

Re: Voltage Question

Post by kevintshaver » Mon Apr 13, 2009 6:43 pm

Thanks. I guess my circuit looks OK then other than the pull-up. I'll try the 1k5 in place of the 2k2.

I also thought the AVR may be bad. I tried two different chips (both ATMEGA 168). I'm using the STK500 as an external programmer. I get no connection to the AVR with the circuit shown above, which makes sense because the voltage drops too low when it's connected. I can take the chip out and plug it into the STK500 directly which means it's being powered by the STK500 supply and it works just fine, so I don't think it's just a bad AVR anymore.

I was using an extra (powered) usb hub for the supply. I'll give it a try and see if maybe the hub is bad when I get home.

markjuggles
Posts: 2
Joined: Wed Jun 17, 2009 4:25 am

Re: Voltage Question

Post by markjuggles » Wed Jun 17, 2009 4:32 am

Please try connecting AVCC to VCC and AGND to GND.

Post Reply