Tried everything: avrdude: stk500_getsync(), can't upload, Tx and Rx don't blink

Hello,

I am relatively new to electronics and the Arduino. I bought my first Arduino Uno in mid-May of this year. I have had a lot of fun and learned a lot since that time. However, there are still a lot of things I don't understand about electricity and the Arduino.

During my free time in the last few weeks I have been working on a project that involves 14 rows of LEDs. Each row has 4 LEDs in series. The rows are controlled via 2 shift registers (TPIC6B595). I am using Windows 7.

My first Arduino worked without problem from May until last Saturday. Occasionally I had upload problems, but these were easily fixed by unplugging and re-plugging in the USB cord.

Last Saturday I finished installing most of the electronic hardware for my project. I already had all of the software ready to go, so, after a few false starts, I plugged everything in and it looked great! Everything worked as it was supposed to. I spent maybe 30 minutes playing with the program, uploading something every few minutes. At some point, however, I hit upload and I received an error saying something like "Unable to find COM5, check to see if another device is using the port." I had seen this before from time to time and wasn't too concerned; so I unplugged and re-plugged the USB cord back in.

After a few tries, however, something different happened. When I hit the "upload" button, Arduino complies the sketch, then begins to upload. The upload process takes a long time, about 12 seconds. During this time, the Rx light flashes on the Arduino 3 times. The Tx light never flashes. Eventually, it says "Done Uploading" along with the following error message:

avrdude: stk500_getsync(): not in sync: resp=0x00

Basically, I cannot upload anything. However, the Arduino still receives 5V from the computer.

I spent a long time browsing the forums and tried the following solutions: -Unplugging and re-plugging in the USB cord -Pressing reset at various times during the upload process -Uninstalled and re-installed the Arduino program -Uninstalled and re-installed the latest Uno Rev 3 Driver -Changed the COM port -Changed the "Bits per second" to 57600 under "Port Settings" via the Device Manager -Tried a new USB cord

I have checked the following: -The COM port under Tool > Serial Port matches the COM port in the Device Manager -Selected the correct board (Arduino Uno) under Tools > Board

Since none of these suggestions worked, I decided to try replacing the ATmega328 processor. So I ordered a new chip from Adafruit that has the bootloader pre-loaded (https://www.adafruit.com/products/123). I received this chip yesterday and switched it out for the original. Nothing changed, I received the same error as before.

So yesterday I bought a new Arduino Uno from Radio Shack. I came back home and continued working on the same project. There were no signs of trouble with the Arduino. After a few hours, however, I received the same “avrdude” error as before. This time there are a few new observations. Now neither the Rx or Tx lights will blink during the upload process. However, the last sketch that I uploaded continues to run flawlessly. All 14 rows of LEDs light up according to my programming. When I click “upload”, the sketch does not pause or appear to “notice” the fact that I am trying to upload a sketch.

Because inserting a brand new ATmega 328 chip did not change anything, I do not think the problem lies there. I think this idea is further confirmed by the fact that my last sketch continues to run flawlessly. Due to the nature of the error and the behavior of the Rx and Tx lights, I would surmise then that there is something wrong with some part of the USB interface. I could definitely be wrong though.

Because I have had two nearly identical boards fail in nearly identical ways under nearly identical circumstances, I find it hard to believe that I am simply unlucky.

So, I have two main questions: First, is there anything I can do to fix this? Second, am I killing these boards? If so, how?

I have uploaded a diagram of my circuit (http://www.flickr.com/photos/dwhittenphoto/7619274786/sizes/l/in/photostream/). I only have one idea about what could I could be doing wrong. On the top left of the diagram you will see that I have a 12V wall-wart powering the LEDs. During the short time that the Arduino was working, I would occasionally, either by accident or without thinking, disconnect the blue ground wire that connects the power supply to the circuit. When I did this, the LEDs would dim. At first I was puzzled as to how the LEDs were lit at all, but I later realized that of course they are still connected to ground via the USB interface. Perhaps this is a bad thing to do. Should I even have my 0V lines connected together?

Anyways, I would really appreciate any thoughts on my problem. I would like to know if I am doing something wrong or if this could just be some sort of bug. I’m not sure I can justify buying another pre-made Arduino, buying 3 within a few months seems absurd. I apologize if this post is unusually long; I thought that perhaps more detail was better than leaving information out.

Thanks for reading!

  1. Where are your current limiting resistors?
  2. Does your code send a lot of serial data?
  3. Changing connections while powered will definitely result to failure at some point. This alone could easily caused damaged to all 3 of your boards. (And yes I know you'll probably say you only did it that one time. Generally, this is a habit not a one time thing.)

Thanks for the reply. In response to your post:

1) Well, since each row has 4 LEDs in series, I determined that I did not need one, although I could be wrong. Each blue/white LED is rated for 3.2-4.0 V with 20mA of current. 4 x 3.2 = 12.8 V. With this configuration I figure that each LED is powered by 18-19mA, which is safe.

2) No, it does not send a lot of serial data.

3) That is interesting, could you possibly explain why this is the case? I know that I unplugged that ground wire more than once, it wasn't until I had done it multiple times that I thought it might a bad idea.

And, to clarify, I've only gone through 2 boards, I just meant that I wasn't sure I could justify buying a third :)

DWHIT:
I determined that I did not need one

This is not correct. LEDs must have external current limiting. This comes in form of a resistor or a constant-current driver.

When a LED’s forward voltage is applied, it effectively turns into a short-circuit. So they will draw all the current they can. This damages the LED and whatever is supplying them power.

Example: If you have a LED with a forward voltage of 3.2V and a 5V supply, you need a 90ohm resistor to limit the current to 20mA. (Using Ohm’s law you calculate that a series resistor will drop 1.8V. 1.8V / 20mA = 90ohms).

If you have a 12V supply and your LEDs drop 3.2V, then you can only put 3 in series. This leaves 2.4V to drop on a current limiting resistor.

DWHIT:
2) No, it does not send a lot of serial data.

Okay. A common issue is flooding the serial port with data. Sometimes it is helpful in the troubleshooting process to let others see your code. (Provided you wrap it in your post with tags.)

DWHIT:
3) That is interesting, could you possibly explain why this is the case?

Well, wiring mistakes can lead to damaging components. Put the wrong wire in the wrong place or disconnect the wrong wire and damage can occur. Also, not all damaged components fail immediately.

Never, never change wiring while powered. Never.

DWHIT:
I know that I unplugged that ground wire more than once, it wasn’t until I had done it multiple times that I thought it might a bad idea.

The LAST wire you want to disconnect while powered is Ground! Without ground, you will get unexpected voltage drops across components which then mean unexpected current flowing in unexpected directions.

One test you might want to try is the loop-back test (sticky at the top of this forum). It will determine if the 8u2 chip has been damaged. It seems to be the least robust when abuse to the board occurs.

When a LED's forward voltage is applied, it effectively turns into a short-circuit. So they will draw all the current they can.

Well shoot, I guess the only thing I have learned about electricity is that I have a lot to learn.

Never, never change wiring while powered. Never.

I suppose this should have been fairly obvious to me, somehow I thought that the Arduino had enough protection built in to prevent my ignorance from doing damage.

The LAST wire you want to disconnect while powered is Ground!

Again, this seems fairly obvious now that you say it. It's a wonder that I have never ran into problems before.

One test you might want to try is the loop-back test (sticky at the top of this forum).

Thanks I will check out this test.

And thank you for all of your responses. When I first started with electronics a few months ago I was extremely cautious. Spurred on by small successes, I have gotten careless. I will use this rather expensive lesson to pay more attention to what I am doing and put more effort into protecting my equipment.