I have been testing two UNO R3's with a solenoid. One is still working, the other is not. 2 led's are on "ON" and "L".
What I noticed is a wire sticking out of pin 4 (I never used this pin and it is not used in the tested program).
What I tried is resetting, also linking the reset pin to the gnd pin.
I get:
avrdude: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\tools\avr/etc/avrdude.conf"
Using Port : COM7
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x45
I also tried to burn a bootloader:
avrdude: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\tools\avr/etc/avrdude.conf"
Using Port Error while burning bootloader.
: usb
Using Programmer : stk500v2
avrdude: usbdev_open(): did not find any USB device "usb" (0x03eb:0x2104)
avrdude done. Thank you.
Did you have the "flyback" diode to clamp the negative voltage spike it generates when disconnected?
Connecting a large load, particularly an inductive one like a solonoid, improperly can cause damage to the arduino.
Is it a genuine/faithful clone with 16u2, or a ch340g based cheap clone? (they have slightly different symptoms in event of such damage - the cheap clones are actually more resistant to damage)
When you press and release the reset button, does the L led blink?
Test: put a resistor (basically any value should work) between pin 13 and Gnd, hold reset down. If L light stays on while reset is held down, the board is damaged and should be discarded. The board uses an opamp to buffer pin 13 for the purpose of controlling the LED (so the LED doesn't load pin 13 output). With the board in reset, and a resistor between pin 13 and gnd, the pin should be tristated, and the resistor will ensure that pin13 is low. The led thus should be off, unless the opamp (or '328p, I guess) is damaged. The opamp and the 16u2 used as serial adapter on genuine/faithful clones are the parts that are most easily damaged when the board is subject to (electrical) abuse, and this is an easy way to confirm such damage when the L led appears stuck on.
You did not attempt to burn the bootloader correctly - see guides on this; it requires uploading Arduino as ISP to a working arduino (or using a dedicated hardware programmer, such as a USBAsp or USBTinyISP, or one of the more expensive ones), connected to the target arduino via the SPI pins. Correct programmer (and port if applicable) for the programmer must be selected from tools menu. There are many guides so I won't repeat the process. The error you posted indicates that you selected an STK500v2 USB programmer (this is a fairly expensive professional grade programmer from Atmel), and do not have such a programmer connected to the computer - my guess (based on your post count and tone of your post) is that you didn't realize that burning bootloader required separate hardware and left Tools -> Programmer with the default option.
That said, I think burning bootloader is unlikely to resolve the problem - it is hard indeed to corrupt the bootloader via any means other than connecting an external ISP programmer (as one would to burn bootloader as described above) and uploading something through that (at least on a classic-AVR based Arduino (uno/nano v3/pro mini/mega) without native USB (Leo/Micro have native USB, and are easier to put into a bad state that reburning bootloader will fix - though it is possible to unbrick these without doing so too)). I think it is much more likely that you damaged the board by using it with the solonoid with improper connections.
In that diagram, I assume (hope) AC/DC 14v means an AC adapter that outputs 14V DC.
I see no obvious problems with that diagram (though 10k base resistor looks kind of high, that wouldn't damage the arduino; maybe the transistor, but not the arduino (especially not with a 10k resistor blocking it)
So the Arduino was being powered by the 14v power supply through the barrel jack? That ought to be fine (you can't pull much from the Arduino's 5v supply like that, but I see no evidence that you're doing anything other than driving a solenoid)... And you have the diode connected correctly.
All I can think of is that the power supply has poor transient response and outputs a spike when the solenoid is turned off, and that caused the damage.
That is the output from you uploading the Arduino as ISP sketch to the arduino (presumably the one you were planning to use as programmer). That is not the output from doing a "burn bootloader" operation with that arduino with arduino as ISP sketch on it to burn the bootloader to another board.
DrAzzy:
That is the output from you uploading the Arduino as ISP sketch to the arduino (presumably the one you were planning to use as programmer). That is not the output from doing a "burn bootloader" operation with that arduino with arduino as ISP sketch on it to burn the bootloader to another board.
avrdude: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\tools\avr/etc/avrdude.conf"
Using Port : COM7
Using Programmer : arduino
Overriding Baud Rate : 19200
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : Arduino
Description : Arduino
Hardware Version: 2
Firmware Version: 1.18
Topcard : Unknown
Vtarget : 0.0 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.1 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x000000 (retrying)
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x000000 (retrying)
Error while burning bootloader.
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.
avrdude done. Thank you.