1
\$\begingroup\$

I have (had?) an Arduino UNO Rev 3.

While uploading sketches Arduino IDE reports this error avrdude: stk500_getsync(): not in sync: resp=0x00

Arduino IDE Error

I'm not sure when or why it stopped working. It would be either while I was messing with the ambient light setup which was working perfectly. I could have accidentally shorted something.

Here is what I have tried so far using a multimeter.

  1. Tested using the multimeter and the 5v pins reads 4.75v.

  2. 3.3v pin reads 3.4v

  3. Removed the ATMEGA328PU from the socket before testing further from this point

  4. TX Pin reads 4.8v

  5. Multimeter shows no continuity between 5v pin and TX pin

It looks like the TX pin is shorted to the 5v pin. Is there anything I can do to fix this?

Or while trying this. Simple ECG Circuit

I powered the ECG circuit from the Arduino's 5v pin. I tried to upload a blank sketch (Bare Minimum from the examples) thats when this problem popped up.

Tried the loopback test

  • Connected GND to RESET ... and RX to TX..
  • Removed the ATMEGA328 from the socket and connected RX to TX

In both cases when I use the serial monitor there is no echo. When I type something in serial monitor and hit enter the RX LED on the Arduino UNO blinks but the TX LED does not blink.

Same happens while uploading sketches. The LED on pin 13 is always powered up. When I upload a sketch PIN13 led blinks around 4-5 times. LED on 13 turns off. then the RX blinks 3 times. LED on 13 turns and stays ON again and thats it.

Are there any other tests I could do to determine the problem? Should I consider my Arduino UNO dead?

P.S. I have no background in electrical engineering but referring to the EAGLE schematics found on the link below can anyone tell me what I should test for using a multimeter? http://arduino.cc/en/Main/arduinoBoardUno

\$\endgroup\$
  • \$\begingroup\$ Anything connected to the Arduino, especially digital pins 0 and 1? \$\endgroup\$ – jippie Apr 14 '14 at 14:44
  • \$\begingroup\$ @jippie nothing is or was connected to any of the pins while I tried things out. \$\endgroup\$ – Prathamesh Gharat Apr 14 '14 at 14:47
  • \$\begingroup\$ Did you try to detach the USB so the board powers off entirely? Are you sure the IDE is using the correct port? \$\endgroup\$ – jippie Apr 14 '14 at 14:51
  • \$\begingroup\$ @jippie Yes to both questions. I would like to mention that when I power up the arduino from USB, the on-board LED 13 blinks 3-4 times, turns off for a second or so and then stays ON. This behavior is not related to any of the sketches I uploaded in the past. \$\endgroup\$ – Prathamesh Gharat Apr 14 '14 at 14:54
  • \$\begingroup\$ The fun part about this circuit is that if anything in the computer fails, and you get mains voltage on your audio jack, it kills you. Now, this is unlikely, but this sure as hell wouldn't pass any proper safety certification. \$\endgroup\$ – Connor Wolf Aug 21 '14 at 10:13
2
\$\begingroup\$

This may or may not be an answer, but it should be interesting.

First off, your question and other comments indicate that an awful lot of the Arduino is working as expected. Some comments about that:

  1. TX and RX pins default to high (slightly less than 5V) when the Arduino starts up. So the readings you see on those lines are fine. I have just verified this with a scope.

  2. The pin-13 LED flashing on start-up is normal -- several brief flashes. That's programmed in to at least some of the bootloaders. See: http://arduino.cc/en/Hacking/Bootloader. And my Arduino Uno R3 indeed did that.

  3. The RX and TX lines are not directly connected from the 16U2 (USB-to-serial handler) to the shield headers. Instead they connect through 1k resistors RN4A and B. This gives a fair amount of protection from abuse.

  4. The RX and TX LEDs are not directly connected to the RX and TX lines. Instead, the 16U2 has separate outputs via which the software flashes them. The fact you saw RX blink during the loopback test indicates that the 16U2 is doing a lot of things right... handling the USB I/O and at least trying to send data to the 328.

Now, the fact that you don't see the TX LED light is a key symptom. This could be:

  • failure of the 16U2's output to the actual RX wire,

  • failure of the 16U2's input from the TX wire

  • failure in the path from RX to TX via the shield header (which consists of some length of trace, and the two RNA&B resistors.

  • failure of the TX LED... (though the fact there's nothing showing in the serial monitor suggests it's not just the LED).

Some tests you can do using the loopback procedure:

(I have tested these...)

Preparation: Remove the 328!

Test 1: Is 16U2 able to output to RX? Run the loopback test from the Arduino IDE serial monitor. Make sure the built-in RX LED flashes to confirm that the right COM port is engaged. Set a slow baud rate (like 1200) so that the symptoms will be easier to see. Now connect an LED to the RX header pin, as in the following diagram.

enter image description here

With no communication, the LED should be off, but if you send a message from the serial monitor, the LED should flash. If it does not, then there's a problem with either the 16U2's output, or the path from the 16U2 to the shield header. Regardless, continue...

Test 2: Can we get RX-->TX to work by eliminating part of the path? You can short the path indicated by the curved wire in the following diagram.

enter image description here

You can do that by applying a pointy metal object across the two pins of the '102' (1 kohm) resistor pack, as shown in this image by the red arrows:

enter image description here

With that in place, perform the loopback test again. If that permits loopback message to make it back to the serial monitor, then there's some issue with the resistor pack, or the traces beyond it.

If it doesn't work, yet the on-board RX LED flashes (confirming a reasonable test) then there's something more obtuse wrong with the 16U2, and probably not much chance of tracking it down.

\$\endgroup\$
  • \$\begingroup\$ Sorry I haven't been on stackoverflow for a while and missed this. I did the tests you mentioned. Instead of an LED I tested it with a multimeter while having Processing write to the COM port continuously. There is approx 0.125V across the RX and 5V header pins when writing to the COM port and 0.007V when not writing to it. I tested the '102' in a similar manner and it seems to be working too. I had assumed something was wrong with the 16U2 too. One of my relative said he could replace the 16U2 if I found one but its not possible to get it here in India. Thanks for the reply. I appreciate it. \$\endgroup\$ – Prathamesh Gharat Jun 1 '14 at 6:29
1
\$\begingroup\$

The Arduino IDE is often quite buggy and sometimes closing it down and opening it again can fix programming errors.

Assuming you've done that, you made the comment "I powered it up from the 5V pin". What does this mean? That you powered your ECG circuit from the 5V pin of the Arduino, or that you powered the Arduino by putting a voltage to its 5V pin? When an Arduino's plugged into a USB port it will draw power from the USB 5V rail. It's not a good idea to connect any other power source at the same time.

The Tx and Rx pins are connected on the board to an ATMega8U2 chip which does the USB-Serial conversion. It's not clear if you tested the voltage with the AVR present or not, but if there's a voltage on those pins it's not necessarily indicative of a fault. According to this SO question the Tx pin is held high when the serial connection is idle.

Generally if an Arduino dies it's because something happened to the AVR microcontroller, which in the case of the UNO is in a DIP socket. You can buy Arduino-bootloader ATMegas for perhaps $5.

\$\endgroup\$
  • \$\begingroup\$ Thanks for the reply. Sorry I wasn't clear, I meant I powered the ECG circuit from the Arduino's 5V Pin. And also I have tested with and without the ATMega328PU in place. In both cases the voltage across TX and RX is 4.8V. Yes I have tried restarting the Arduino software, restarting the PC, changing USB Ports, testing if the USB cable is OK (Continuity test) and uninstalling the Arduino's COM Port. Hmm I'm not sure if its the ATMega328PU at fault as the board fails the LOOPBACK test. Tested this with and without the ATMega328PU in its place too. \$\endgroup\$ – Prathamesh Gharat Apr 14 '14 at 14:38
  • \$\begingroup\$ It sounds like you've been quite thorough! (Unfortunately this means that a faulty board is more likely). If the board is damaged then there's not much you can do that wouldn't be considerably more effort than an easily replaceable $30 board justifies. \$\endgroup\$ – LeoR Apr 14 '14 at 15:00
  • \$\begingroup\$ Yea gonna buy a second one but would be worth knowing what I did wrong.. Or at least deduce what I did wrong based on what the problem is. \$\endgroup\$ – Prathamesh Gharat Apr 14 '14 at 15:18
  • \$\begingroup\$ Did you connect or disconnect anything while the board was powered? Things that kill electronics quickly generally involve connecting power the wrong way or shorting it out. Static electricity can also lead to dead ICs - if the air is dry and you're standing on a synthetic carpet you have to be really careful. If you don't touch exposed contacts of chips and never power anything on until you've tripled checked every wire then you can hopefully not kill too much hardware. Every practicing engineer will have killed something (or lots of things) in their career, so you're not alone! \$\endgroup\$ – LeoR Apr 14 '14 at 15:48
0
\$\begingroup\$

I had the same problem and I don't think your your Arduino is broken. You need to upload a bootloader using avrISP MKII (unfortunately you need to buy it for about $30) and you need to flash the file "optiboot_atmega328.hex" located in C: program(x86)/Adruino/Hardware/adruino/bootloaders/optiboot (or a similar location) following these instructions on YouTube: Arduino Tut. #5 - Bootloader Burning with AVR ISP MKII.

I am quite sure it will work for you as I had an identical problem. It seems without flashing the file above the IDE does not recognize that there is a microcontroller connected at the other end. I have tried with 2 more new ATmega328 and when I try them I get the same behavior until I flash the bootloader and the problem is fixed.

If you buy a new Arduino maybe it may work directly or you might get the same problem. So it is up to you as it is difficult decision to take.

\$\endgroup\$
  • 1
    \$\begingroup\$ That the board failed the loopback test with the ATmega328p removed seems to indicate that a missing bootloader in the 328p is not the problem. And even if it were, there are far cheaper solutions than buying an avrISP - such as using another Arduino or MCU board as a programmer, or paying a small premium for a 328p with a bootloader already flashed in it. \$\endgroup\$ – Chris Stratton Oct 8 '14 at 14:45
-1
\$\begingroup\$

Im having the exactly the same problem. I had tried most of the method suggested online and still cant. Lastly, i just simply tried to replace a new 328 chip (board still the same), surprisingly, it works!!

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.