My Arduino Uno R3 seems to be stuck

I had an issue last night where I couldn't upload sketches. Removing the wire from Pin 0 done the job and then I could put it back in after upload. Worth a shot.

the problem is not with my PC or drivers, because I actually went to buy a new board, which works perfectly.

You will need a friend who has hardware knowledge to research... It sounds like a component got "fried" since the new board works correctly. If just the ATmega328, you are only a few dollars from a fix. Anything else will require a skilled individual. The blinking LED does not prove the two microcontrollers are working on all pins.

Thanks for all the answers:

Yes, I did try the loop-back instructions. The led in 13 keeps on, but I stop at

  1. Connect the terminal application to the serial port for your board.

because the computer does not see the board.

It will take me a qhile before I can sketch the full circuit . But I will have to do that anyways at some point: when I have it, I will post it ... the only thing that I know is that the circuit is working with the new board.

@RyanfaeScotland: What do you mean by "Removing the wire from Pin 0" ?

Andrea

It is possible your circuit is damaging the board, for example by drawing too much current. Your new one will eventually fail if this is the case.

Nick, thanks for your reply.

I am now using 8x1.5V AA batteries to supply the needed power to the ardumoto board.

At the time the board failed, I had been using (for a few days already) a 12V-0.5A MAX, AC-DC adapter connected to the wall, for which I checked that the voltage was indeed 12V.

In my project, when the dc motor is under a load, I am measuring a voltage drop of about .6V across a 100 Ohm resistor, that is, 6 millAmp (voltage measured on the multimeter and confirmed on the Analog in PIN).

R3 = 100. # ohm
motor_current = AnalogRead2 / 1023.*5. / R3 * 1000. # [milli-amp]

The maximum voltage that I have measured (with the multimeter) across the terminals of the dc motor is less than 10V, and I have confirmed it using a voltage divider:

R1 = 1496. # ohm
R2 =  997. # ohm
motor_voltage = (AnalogRead1-AnalogRead2) / 1023.*5. / (R2/(R1+R2)) # [volt]

During the runs, I am not stalling the DC motor (a mistake that I have made earlier), and I understand that the ardumoto board has inductive spikes protection
(Inductive spikes protection? - Motors, Mechanics, Power and CNC - Arduino Forum)

This is pretty much the power supply part of the circuit.

Thanks for your replies and I will be more than glad to give you any other details you wish to have

Andrea

Do you have another Arduino? You can check if the processor is alive:

Nick, I actually do have another working arduino, and the link is VERY interesting ... give me some time to absorb the contents

Andrea

acortis:
@RyanfaeScotland: What do you mean by "Removing the wire from Pin 0" ?

The pins on the Arduino are numbered 0 to whatever. Pin 0 has another function named RX (maybe TX). I'm not sure why but some people have reported issues uploading sketches when there is a wire plugged into this port so if you have a circuit set up that uses this pin try removing it to see if it solves your issue.

Hello Nick,
It took me longer than I expected to connect the two arduinos together and run your sketch, but here it is. The only different thing that I see with respect to what you have on your page is

HFuse = D6 instead HFuse = DE

I have no idea of course of what that means!
Looking forward to your thoughts

Andrea

Atmega chip detector.
Entered programming mode OK.
Signature = 1E 95 0F 
Processor = ATmega328P
Flash memory size = 32768
LFuse = FF 
HFuse = D6 
EFuse = FD 
Lock byte = CF 
Clock calibration = 8D 
Bootloader in use: Yes
EEPROM preserved through erase: Yes
Watchdog timer always on: No
Bootloader is 512 bytes starting at 7E00

Bootloader:

7E00: 11 24 84 B7 14 BE 81 FF F0 D0 85 E0 80 93 81 00 
7E10: 82 E0 80 93 C0 00 88 E1 80 93 C1 00 86 E0 80 93 
7E20: C2 00 80 E1 80 93 C4 00 8E E0 C9 D0 25 9A 86 E0 
7E30: 20 E3 3C EF 91 E0 30 93 85 00 20 93 84 00 96 BB 
7E40: B0 9B FE CF 1D 9A A8 95 81 50 A9 F7 CC 24 DD 24 
7E50: 88 24 83 94 B5 E0 AB 2E A1 E1 9A 2E F3 E0 BF 2E 
7E60: A2 D0 81 34 61 F4 9F D0 08 2F AF D0 02 38 11 F0 
7E70: 01 38 11 F4 84 E0 01 C0 83 E0 8D D0 89 C0 82 34 
7E80: 11 F4 84 E1 03 C0 85 34 19 F4 85 E0 A6 D0 80 C0 
7E90: 85 35 79 F4 88 D0 E8 2E FF 24 85 D0 08 2F 10 E0 
7EA0: 10 2F 00 27 0E 29 1F 29 00 0F 11 1F 8E D0 68 01 
7EB0: 6F C0 86 35 21 F4 84 E0 90 D0 80 E0 DE CF 84 36 
7EC0: 09 F0 40 C0 70 D0 6F D0 08 2F 6D D0 80 E0 C8 16 
7ED0: 80 E7 D8 06 18 F4 F6 01 B7 BE E8 95 C0 E0 D1 E0 
7EE0: 62 D0 89 93 0C 17 E1 F7 F0 E0 CF 16 F0 E7 DF 06 
7EF0: 18 F0 F6 01 B7 BE E8 95 68 D0 07 B6 00 FC FD CF 
7F00: A6 01 A0 E0 B1 E0 2C 91 30 E0 11 96 8C 91 11 97 
7F10: 90 E0 98 2F 88 27 82 2B 93 2B 12 96 FA 01 0C 01 
7F20: 87 BE E8 95 11 24 4E 5F 5F 4F F1 E0 A0 38 BF 07 
7F30: 51 F7 F6 01 A7 BE E8 95 07 B6 00 FC FD CF 97 BE 
7F40: E8 95 26 C0 84 37 B1 F4 2E D0 2D D0 F8 2E 2B D0 
7F50: 3C D0 F6 01 EF 2C 8F 01 0F 5F 1F 4F 84 91 1B D0 
7F60: EA 94 F8 01 C1 F7 08 94 C1 1C D1 1C FA 94 CF 0C 
7F70: D1 1C 0E C0 85 37 39 F4 28 D0 8E E1 0C D0 85 E9 
7F80: 0A D0 8F E0 7A CF 81 35 11 F4 88 E0 18 D0 1D D0 
7F90: 80 E1 01 D0 65 CF 98 2F 80 91 C0 00 85 FF FC CF 
7FA0: 90 93 C6 00 08 95 80 91 C0 00 87 FF FC CF 80 91 
7FB0: C0 00 84 FD 01 C0 A8 95 80 91 C6 00 08 95 E0 E6 
7FC0: F0 E0 98 E1 90 83 80 83 08 95 ED DF 80 32 19 F0 
7FD0: 88 E0 F5 DF FF CF 84 E1 DE CF 1F 93 18 2F E3 DF 
7FE0: 11 50 E9 F7 F2 DF 1F 91 08 95 80 E0 E8 DF EE 27 
7FF0: FF 27 09 94 FF FF FF FF FF FF FF FF FF FF 04 04 

MD5 sum of bootloader = FB F4 9B 7B 59 73 7F 65 E8 D0 F8 A5 08 12 E7 9F 

First 256 bytes of program memory:

0: 0C 94 61 00 0C 94 7E 00 0C 94 7E 00 0C 94 7E 00 
10: 0C 94 7E 00 0C 94 7E 00 0C 94 7E 00 0C 94 7E 00 
20: 0C 94 7E 00 0C 94 7E 00 0C 94 7E 00 0C 94 7E 00 
30: 0C 94 7E 00 0C 94 7E 00 0C 94 7E 00 0C 94 7E 00 
40: 0C 94 E6 00 0C 94 7E 00 0C 94 7E 00 0C 94 7E 00 
50: 0C 94 7E 00 0C 94 7E 00 0C 94 7E 00 0C 94 7E 00 
60: 0C 94 7E 00 0C 94 7E 00 00 00 00 00 24 00 27 00 
70: 2A 00 00 00 00 00 25 00 28 00 2B 00 00 00 00 00 
80: 23 00 26 00 29 00 04 04 04 04 04 04 04 04 02 02 
90: 02 02 02 02 03 03 03 03 03 03 01 02 04 08 10 20 
A0: 40 80 01 02 04 08 10 20 01 02 04 08 10 20 00 00 
B0: 00 07 00 02 01 00 00 03 04 06 00 00 00 00 00 00 
C0: 00 00 11 24 1F BE CF EF D8 E0 DE BF CD BF 11 E0 
D0: A0 E0 B1 E0 EC E8 F5 E0 02 C0 05 90 0D 92 A8 30 
E0: B1 07 D9 F7 11 E0 A8 E0 B1 E0 01 C0 1D 92 A1 31 
F0: B1 07 E1 F7 0E 94 B5 02 0C 94 C4 02 0C 94 00 00

The fuses look OK and the MD5 sum of the bootloader indicates you have the expected Optiboot installed. So the processor is OK, the fuses are OK, and the bootloader is installed.

Yes, I did try the loop-back instructions.

And what happened exactly?

Nick,

As I indicated above the loop-back instructions stop at:

  1. Connect the terminal application to the serial port for your board.

because the computer does not see the board. The serial port '/dev/tty.usbmodem1421' simply does not show up in the list.

Andrea
edit( I am including to screenshots of the ports that appear when I connect the two boards)

Right. Can you please run the chip detector sketch (the one you ran above) on the USB chip (the other ICSP connector, near the reset button). Pay close attention to which is pin 1 (it is marked with a white dot).

The "ICSP for USB interface" above. Pin 1 is on the top right as shown.

The pins are in the same relative location (from pin 1) as the other ICSP header.

Nick,
I do not have female-female jumpers handy, I will do that tomorrow. But I do not think that I have understood how to connect this second example Sorry if I am a bit slow, but can you detail the connections one more time for me? thanks
Andrea

Arduino Uno      Target chip ICSP header

D10 (SS)         Reset (ICSP pin 5)
D11 (MOSI)       MOSI  (ICSP pin 4)
D12 (MISO)       MISO  (ICSP pin 1)
D13 (SCK)        SCK   (ICSP pin 3)

Gnd              Gnd   (ICSP pin 6)
+5V              +5V   (ICSP pin 2)

Where the ICSP pins are as follows:

Pin 1 is marked with a dot and the others follow as in the diagram above (top-down view, that is from above when the board is sitting on the table normally).

Nick,

Can you please run the chip detector sketch (the one you ran above) on the USB chip (the other ICSP connector, near the reset button). Pay close attention to which is pin 1 (it is marked with a white dot).

This is is what I get ... any thoughts here?

Andrea

Atmega chip detector.
Entered programming mode OK.
Signature = 1E 94 89 
Processor = ATmega16U2
Flash memory size = 16384
LFuse = EF 
HFuse = D9 
EFuse = F4 
Lock byte = CF 
Clock calibration = 9A 
Bootloader in use: No
EEPROM preserved through erase: No
Watchdog timer always on: No
Bootloader is 4096 bytes starting at 3000

Bootloader:

3000: 4B C0 00 00 64 C0 00 00 62 C0 00 00 60 C0 00 00 
3010: 5E C0 00 00 5C C0 00 00 5A C0 00 00 58 C0 00 00 
3020: 56 C0 00 00 54 C0 00 00 52 C0 00 00 EE C4 00 00 
3030: 4E C0 00 00 4C C0 00 00 4A C0 00 00 48 C0 00 00 
3040: 46 C0 00 00 44 C0 00 00 42 C0 00 00 40 C0 00 00 
3050: 3E C0 00 00 3C C0 00 00 3A C0 00 00 38 C0 00 00 
3060: 36 C0 00 00 34 C0 00 00 32 C0 00 00 30 C0 00 00 
3070: 2E C0 00 00 2C C0 00 00 2A C0 00 00 28 C0 00 00 
3080: 26 C0 00 00 24 C0 00 00 22 C0 00 00 20 C0 00 00 
3090: 1E C0 00 00 1C C0 00 00 11 24 1F BE CF EF D2 E0 
30A0: DE BF CD BF 11 E0 A0 E0 B1 E0 EA EF FC E3 02 C0 
30B0: 05 90 0D 92 AA 33 B1 07 D9 F7 11 E0 AA E3 B1 E0 
30C0: 01 C0 1D 92 AB 35 B1 07 E1 F7 72 D3 14 C6 98 CF 
30D0: 98 2F 15 C0 80 91 F2 00 88 23 71 F4 80 91 E8 00 
30E0: 8B 7F 80 93 E8 00 03 C0 8E B3 88 23 51 F0 80 91 
30F0: E8 00 82 FF F9 CF 02 C0 80 91 F1 00 91 50 99 23 
3100: 49 F7 08 95 20 91 4A 01 30 91 49 01 80 91 48 01 
3110: 90 91 47 01 80 93 3F 01 90 93 40 01 C9 01 80 93 
3120: 41 01 90 93 42 01 08 95 DF 93 CF 93 00 D0 00 D0 
3130: 00 D0 CD B7 DE B7 80 91 45 01 84 30 09 F4 5A C0 
3140: 85 30 30 F4 81 30 59 F0 83 30 09 F0 D7 C0 1F C0 
3150: 85 30 09 F4 A0 C0 86 30 09 F0 D0 C0 C3 C0 80 91 
3160: 46 01 82 30 08 F0 CA C0 CD DF 80 91 46 01 88 23 
3170: 61 F4 80 91 3F 01 90 91 40 01 23 E0 FC 01 20 93 
3180: 57 00 E8 95 07 B6 00 FC FD CF 85 E0 08 C0 80 91 
3190: 46 01 88 23 11 F0 82 30 29 F4 B4 DF 89 E0 80 93 
31A0: 01 01 AC C0 81 30 09 F0 A9 C0 20 E0 30 E0 40 E0 
[snip:The message exceeds the maximum allowed length (9500 characters). ]
3FE0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
3FF0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 

MD5 sum of bootloader = D8 8C 70 6D FE 1F DC 38 82 1E CE AE 23 B2 E6 E7 

First 256 bytes of program memory:

0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
10: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
20: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
30: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
40: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
50: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
60: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
70: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
80: 6B C0 00 00 69 C0 00 00 67 C0 00 00 65 C0 00 00 
90: 63 C0 00 00 61 C0 00 00 12 01 10 01 02 00 00 08 
A0: 41 23 43 00 01 00 01 02 DC 01 09 02 3E 00 02 01 
B0: 00 C0 32 09 04 00 00 01 02 02 01 00 05 24 00 01 
C0: 10 04 24 02 06 05 24 06 00 01 07 05 82 03 08 00 
D0: FF 09 04 01 00 02 0A 00 00 00 07 05 04 02 40 00 
E0: 01 07 05 83 02 40 00 01 04 03 09 04 32 03 41 00 
F0: 72 00 64 00 75 00 69 00 6E 00 6F 00 20 00 28 00

My own USB chip gave exactly the same bootloader and fuses but the program memory is different. I got:

MD5 sum of bootloader = D8 8C 70 6D FE 1F DC 38 82 1E CE AE 23 B2 E6 E7 

First 256 bytes of program memory:

0: 90 C0 00 00 A9 C0 00 00 A7 C0 00 00 A5 C0 00 00 
10: A3 C0 00 00 A1 C0 00 00 9F C0 00 00 9D C0 00 00 
20: 9B C0 00 00 99 C0 00 00 97 C0 00 00 48 C4 00 00 
30: 0C C4 00 00 91 C0 00 00 8F C0 00 00 8D C0 00 00 
40: 8B C0 00 00 89 C0 00 00 87 C0 00 00 85 C0 00 00 
50: 83 C0 00 00 81 C0 00 00 7F C0 00 00 02 C1 00 00 
60: 7B C0 00 00 79 C0 00 00 77 C0 00 00 75 C0 00 00 
70: 73 C0 00 00 71 C0 00 00 6F C0 00 00 6D C0 00 00 
80: 6B C0 00 00 69 C0 00 00 67 C0 00 00 65 C0 00 00 
90: 63 C0 00 00 61 C0 00 00 12 01 10 01 02 00 00 08 
A0: 41 23 43 00 01 00 01 02 DC 01 09 02 3E 00 02 01 
B0: 00 C0 32 09 04 00 00 01 02 02 01 00 05 24 00 01 
C0: 10 04 24 02 06 05 24 06 00 01 07 05 82 03 08 00 
D0: FF 09 04 01 00 02 0A 00 00 00 07 05 04 02 40 00 
E0: 01 07 05 83 02 40 00 01 04 03 09 04 32 03 41 00 
F0: 72 00 64 00 75 00 69 00 6E 00 6F 00 20 00 28 00

Yours just looks wrong:

First 256 bytes of program memory:

0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
10: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
20: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

Valid code doesn't start with FF FF.

You need to re-flash the ATmega16U2 chip. I haven't done this (not directly). Since your bootloader looks OK you need to put it into DFU mode and re-flash it. I suggest you look up exactly how to do that.

Here, for example: Broken/unprogrammed UNO R3? =( - #6 by LouisDavis - IDE 1.x - Arduino Forum

I have tried to follow the instructions at:

https://github.com/arduino/Arduino/tree/master/hardware/arduino/firmwares/atmegaxxu2

I downloaded the 'UNO-dfu_and_usbserial_combined.hex' file and then run the command

acortis@acortis-air:Downloads$ avrdude -p at90usb82 -F -P usb -c avrispmkii -U flash:w:UNO-dfu_and_usbserial_combined.hex -U lfuse:w:0xFF:m -U hfuse:w:0xD9:m -U efuse:w:0xF4:m -U lock:w:0x0F:m

avrdude: usbdev_open(): did not find any USB device "usb"

I guess it was the same problem, i.e., that the device is not recognized.

SO, I did try to move around the microcontroller from the bad one, to follow the instructions at

and that's where I broke two of its pins ... silly me ... I will have to order a new one I guess =(

Andrea

sorry to bother again: I as not able to reflash following the instructions there ... is there a more down to earth tutorial on how to do it. Presumably I should do it with an Arduino as an ISP programmer?

thanks

Andrea

I haven't put mine into DFU mode so I don't know. Maybe someone else has ...