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
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:
Power off the board completely
Remove the USB cable
Hold down the Reset button
keep it held down (or, run a jumper wire from the RESET pin to the GND pin).
Still holding down Reset reconnect the USB cable.
Start uploading a sketch that does not have this problem (I use the Blink sketch).
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.
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.
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.
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.
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.
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.