Designed atmega32u4 circuit - avrdude failure

Go To Last Post
12 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,

 

I've designed and assembled a fairly minimal circuit around the ATMega32u4, but when I try and get any response from the ISP via avrdude, it errors out with an rc=-1

I'm wondering if there's something wrong with my circuit that might be causing problems.

 

I tested the power pins, and there's some voltage going to the VCC, AVCC and uVCC pins, but nowhere near 5v (closer to 0.5V or even less)

I swapped out the 10uf cap C3 with a 1uf, but that didn't help. (I even removed the cap and shorted it with solder with no luck)

What else might be going on? Am I missing a step in bringing up a bare chip from factory? Or is there a mistake with my circuit? I'm pretty sure it's all assembled correctly (now).

 

I've attached the schematic and board design. I've also got a website where I've documented some of the design process at  https://grantelliott.ca/2019/03/20/button-controller.html

 

Here's the verbose output from avrdude -c usbtiny -p m32u4

avrdude.exe: Version 6.3, compiled on Feb 17 2016 at 09:25:53
             Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
             Copyright (c) 2007-2014 Joerg Wunsch

             System wide configuration file is "c:\avrdude-6.3-mingw32\avrdude.conf"

             Using Port                    : usb
             Using Programmer              : usbtiny
avrdude.exe: usbdev_open(): Found USBtinyISP, bus:device: bus-0:\\.\libusb0-0001--0x1781-0x0c9f
             AVR Part                      : ATmega32U4
             Chip Erase delay              : 9000 us
             PAGEL                         : PD7
             BS2                           : PA0
             RESET disposition             : dedicated
             RETRY pulse                   : SCK
             serial program mode           : yes
             parallel program mode         : yes
             Timeout                       : 200
             StabDelay                     : 100
             CmdexeDelay                   : 25
             SyncLoops                     : 32
             ByteDelay                     : 0
             PollIndex                     : 3
             PollValue                     : 0x53
             Memory Detail                 :

                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               eeprom        65    20     4    0 no       1024    4      0  9000  9000 0x00 0x00
               flash         65     6   128    0 yes     32768  128    256  4500  4500 0x00 0x00
               lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
               hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
               efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
               lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
               calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
               signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

             Programmer Type : USBtiny
             Description     : USBtiny simple USB programmer, http://www.ladyada.net/make/usbt...
avrdude.exe: programmer operation not supported

avrdude.exe: Using SCK period of 10 usec
avrdude.exe: initialization failed, rc=-1
             Double check connections and try again, or use -F to override
             this check.

avrdude.exe done.  Thank you.

 

 

Thanks

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

0.5V is certainly a no-go.

 

You need to get that fixed, or nothing else will work.

 

A simple short between power and ground will typically be under 0.1V, depending on how much current the supply can deliver. Are you sure that you don't have a supply pin connected to ground, somewhere? 

 

Why would you "test" a capacitor by removing it, then shorting it with solder? That is a guaranteed failure, right there.

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

Last Edited: Sat. Apr 20, 2019 - 08:42 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ka7ehk wrote:

0.5V is certainly a no-go.

 

You need to get that fixed, or nothing else will work.

 

A simple short between power and ground will typically be under 0.1V, depending on how much current the supply can deliver. Are you sure that you don't have a supply pin connected to ground, somewhere? 

 

Jim

I'm pretty sure, yes. I had that happen already when I first put it together and had to do some rework, but I think it's good now.

I think the problem is very likely the way I put the decoupling cap (C3) into the circuit. It's supposed to be grounded. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Why does the micro's Reset\ pin go to a switch to alternatively route PortB.6 to the ISP programming header's Reset pin?

 

Your LEDs connected to the micro are drawn backwards on the schematic.

Hopefully that is a schematic error, and not an installation error.

 

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DocJC wrote:

Why does the micro's Reset\ pin go to a switch to alternatively route PortB.6 to the ISP programming header's Reset pin?

 

Your LEDs connected to the micro are drawn backwards on the schematic.

Hopefully that is a schematic error, and not an installation error.

 

JC

 

I'm using the 6-pin header to also connect to an RPi via SPI and planned on using the switch to toggle the one pin between RESET and SS, and the rest for Vcc, GND, MISO/MOSI/SCK 

And the LEDs may well have gone in backwards, hmm...

Last Edited: Sat. Apr 20, 2019 - 09:43 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ka7ehk wrote:
Why would you "test" a capacitor by removing it, then shorting it with solder? That is a guaranteed failure, right there.

 

I figured the decoupling cap isn't critical for minimal functionality of the IC and that if I jumped it, all it would do is get the full 5v to the VCC pins. Not suitable for long-term use but I thought it would at least get the IC working so I could get a response via the ISP. (I bought 2 ICs when I ordered everything, just in case)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You’ve put the capacitors in series! Bypass capacitors are mean’t to go between power and ground.
Bypass capacitors are critical - the circuit may not work, or may work unreliably without them.
Use the Arduino leonardo circuit as a basis for your circuit. They have put the bare minimum components for proper operation.
Your pcb needs some work - your tracks look very thin for no good reason.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman wrote:
You’ve put the capacitors in series! Bypass capacitors are mean’t to go between power and ground. Bypass capacitors are critical - the circuit may not work, or may work unreliably without them. Use the Arduino leonardo circuit as a basis for your circuit. They have put the bare minimum components for proper operation. Your pcb needs some work - your tracks look very thin for no good reason.

 

I looked at the Leonardo circuit, but must have not understood the way the cap was in the circuit. 

I have a few other changes I wanted to make with the PCB design after putting this one together already, I'll include increasing the trace widths a bit with those changes, thanks. The signal traces are 6 mil right now, and the Vcc is 18mil. What's a more reasonable width?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

8 or 10mil would probably be better. No use going thin unless you really need it. It makes any modification of the pcb diffilcult.
The power should be 40+ mil where possible. Keep it short and add bypass caps per chip. The pcb is a critical part of your circuit - not simply a bunch of conductors to connect things together.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If it's a 32U4 isn't it preloaded with DFU? So why do you need to ISP it at all?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:

If it's a 32U4 isn't it preloaded with DFU? So why do you need to ISP it at all?

 

*looks up DFU bootloader*

Oh, well isn't that handy. I figured since the adafruit breakout board (I used this for prototyping) had the ISP, it was necessary for programming the chip (without the Arduino bootloader) and didn't even bother looking into whether this was the case or not. 

Still, I can't seem to use the USB as expected either, and I suspect I made the same mistake with C1 on VBUS  as I did with C3 on Vcc.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

According to your schematic you have.