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!