You may find the shield is connecting something that it shouldn't be...
e.g. the VIN pin to the +5V or something else.
Vcc 10.41V (measured between pins 7 and 8)
AVcc 10.42V (measured between pins 20 and 22)
Also, I am getting 10.4V on one pin of USB connector. ALL VERY BAD !, TERRIBLE, FAKE VOLTS !
Surprisingly - the 328 may not be completely dead yet if the event was very 'short'! - but if it's a plug-in (DIP) chip - they're cheap to replace, but you must verify the on-board regulator is OK first.
12V going to the USB connector is not good either !
so don't connect the 12V and USB together until yo have figured it out!
You schematic (not Fritzing) will help understand where this went off the rails.
Calm down...!
Your last post is meaningless sentences strung together without context.
Let's get the schematic first, then we can think about 'does even' see the board? Are you surprised? Which board? old dead one, or new replacement?
Take a deep breath, collect your thoughts and start again.
The only thing that I do notice is that if you move that pot over 40% or so, you will get >5V on the pin and the zener conducts keeping the pin at the 5V level. So far so good.
Now if you move the pot even higher and get at the 12V side, the resistance gets really low and the zener will be overloaded. If the zener blows and stops conducting (I don't know the failure mode of a zener) your input pin will see 12V and your Arduino is likely to be toast.
To prevent this from happening, add a resistor above the pot. This way even if you turn it all the way up, you never get to the full 12V, and more importantly you limit the current to the zener so it can continue to do its job.
p.s. Zeners are not linear, so your sensor readings will not be directly proportional to the VR position.
You may and/or consider a resistor between the sensor and zener - a different way of limiting the current into the zener.
Another alternative is to feed the top of the sensor with a voltage divider (or regulator / 5V), which will never overdrive the input pin... but then you /can/ eliminate the zener to get a linear input value.
I should have added some details for the water flow sensor (link below).
It operates from 12V and outputs a square wave. I am using the variable resistor as a voltage divider and the zener is to ensure that no more than 5.1V can get to the input pin.
I have used an oscilloscope to check the output from the flowmeter, and the voltage from the divider.
I also now have a new UNO and will very carefully be checking everything before applying high voltage.
At this stage, I also intend to use an adjustable regulator to power the new board with 7V.
Exactly. And if there is an overriding reason why you must use 12 volts, make a potential divider from two fixed resistors of , say, 1K and 750 Ohms and ensure that the grounds of the supplies are common.
Thanks for the responses, and Tom particularly for drawing up the circiut.
Using 5V sounds like a good idea, and fixed resistors for higher voltages are definately the better option.
But, for 5V, I then need a 5V source for the sensor, >7V for the Uno and 12V for the solenoid. Not a good option.
I also don't know how long the sensor wires will be or what voltage loss I will have over them, probably little, but, with the setup I have currently working, it can be tweaked at the Uno input to give a clean, high/low, signal.
I have come across several sources that are suspicious of 12V supply for the Uno, so I have a little voltage regulator that I can use to supply 7V for the Uno.
Unfortunately, none of this helps with working out what killed my first Uno.
Or if you really want just one power source: the regulator of the Arduino can handle 12V just fine. Do make sure to have good decoupling capacitors (to suppress the peaks of the switching solenoid - on top of the flyback diode) and that the flow meter doesn't draw much power, or the regulator may overheat.
Nevertheless the 5V + 12V supplies as suggested above are recommended. If you have a good 12V-5V buck converter, you may consider using that to power the Arduino from the 12V. Those can handle a lot more than the little on-board linear regulator.
I had not noticed that the 5V came of the Uno. I will however, use the USB to send data to a laptop on a semiregular basis. Then I can check that I the flow meter is measuring the actual volume delivered.
I should be able to do this as serial data via Tx/Rx, but it adds more to the programing and hardware.
wvmarle - I have not come across using capacitors in conjuction with a diode on solenoids. I will do some reading about this.
As for my original problem, on the Leonardo Uno, there appears to be a diode between the center pin of the power socket and the Vin pin. I am currently wondering if this (and no decoupling capacitors) was the cause of death.