Unable to upload sketch to my Arduino UNO R3

hello, I have been testing out my arduino code for my project. Everything was normal, I was able to upload code to the arduino UNO without any issue. But I tried to connect a 4 channel relay to my arduino and tried to upload code, it kept giving me error. I have 12V supply to the relay and I hooked it directly to the Arduino board Vin pin with ground, then I plug the VCC on the relay to the 5V pin on board. After all that and upload code, it wouldnt let me. I have checked if i selected the right board and port. I only have COM1 but it doesnt say Arduino UNO. Is there any other ways to solve the issue?

An error occurred while uploading the sketch
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x18
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x18
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x18
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x18
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x18
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x18
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x18
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x18
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x18
avrdude: stk500_recv(): programmer is not responding
Problem uploading to board.  See https://support.arduino.cc/hc/en-us/sections/360003198300 for suggestions.
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x18

Unplug EVERYTHING from the UNO. See if it shows up, if not, it MAY be broke.

yea the first time i uploaded was with all the cable connected, then I unplugged all the wire and tried to upload again, it doesnt work

Check if the TX LED is stuck on, and garbage comes out of the monitor when resetting. If so you probably have flooded the serial output with diagnostic messages. Load the Blink sketch, this may take many tries. If you are successful put a 5 second delay at the top of your setup() function, this allows the programmer to get at it right after reset. When the code is done you can remove that.

Try these steps:

  1. Power off the board completely
  2. Remove the USB cable
  3. Hold down the Reset button
  4. keep it held down (or, run a jumper wire from the RESET pin to the GND pin).
  5. Still holding down Reset reconnect the USB cable.
  6. Start uploading a sketch that does not have this problem (I use the Blink sketch).
  7. When you see the Receive light blink, release the Reset button
    Note: I have seen this happen several times when I flood the serial output. An indication is the tx light is stuck on.

The TX LED is not on, only the L LED and the ON LED are on. When i uploaded the sketch, I had all my cables connecte, would it burn chips on the board that causing this problem?

Could you upload the blink sketch? Can you upload to another board? Without a complete schematic I can not determine if you burnt chips. If you cannot upload to that board and another known good board you may have fried something in your computer. Power down everything, then bring up the IDE and connect a known good board. Try to program the blink sketch if it works your computer is OK. Then try the "bad" board, If it works go from there, if not it is probably fried or chip control fuses got programmed by mistook.

I am not able to upload any sketch, and I only have one board, so I cannot test out if its good or bad.

Does the 28-pin Atmega328P feel warm or hot to the touch? If so, you damaged it, and will need a new chip.
Same for the USB control chip near the USB connector. If that is hot, you need a new board; that part is not easily replaceable.

1 Like

It is best to assume it is bad and get another two (so you have a spare).

1 Like

If it used to say Arduino Uno in the past, the TTL-to-USB chip is damaged. If you're lucky it has just lost the firmware but I have some doubts about that. You can try to fix it but need a programmer or other Arduino as far as I know and it still needs to show in Windows device manager as something.

Incorrect use of 12V on Arduinos is usually deadly for them and Arduino Uno/Mega are even more susceptible than others.

I thought Arduino UNO Vin pin can take between 7 to 12V. If thats the case, which board would suit me the most?

1 Like

It can, if there is nothing or very little else connected to the 5V rail. The onboard 5V regulator is not well heat sinked which severely limits its ability to supply current. The higher the voltage on Vin the less current can be supplied before the regulator heats up and shuts itself down (best case). If you are supplying things from the 5V rail, best to supply 5V with an external well regulated 5V supply. Like a good cell phone charger.

1 Like

Please note that I said "incorrect use". One mistake will kill it; and you must have made that mistake. It's just difficult to say what the mistake was.

1 Like

In my case, can I using 5V pin to supply power to the relay, and use a 9VDC 1A power supply to plug in the barrel connector on arduino?

You will have to check what broke. You can hook up 9V/12V to the barrel or to Vin (and nothing else to the Uno) and check the 5V and 3.3V output with a multimeter.

My interpretation of this is that you have a 12V relay. If I'm correct, it will not work on 5V. Which relay / relay board do you use; link please.

Can you provide a wiring / schematic diagram (resonably sized photo (300 kB or so) of a hand-drawn one is OK) what/how you had everything connected when the incident happened?


This is how I wired everything. I got it to work when I plug a 9V battery to the arduino, but once I connected the power supply to the Vin pin, the arduino is still on but wouldnt let me upload sketch.

This is the link of the relay: Inland 8 Channel 5V Relay Module for Arduino - Micro Center

What is the purpose of the blue and orange/red wire on the center contact of each relay?

image

those 2 wires are from the linear actuator