Project: Using an at tiny85 to turn on a G5V-1-DC5 relay coil for a few seconds every time a normally open button is depressed. The completed board will be part of a sculpture and will control 2 100ma pneumatic solenoid valves.
Question: I know you have to use a diode between the coil of a relay and a micro controller to avoid frying the micro controller with the emf from the relay coil. What I do not know is how to properly select a diode. I know I have to make sure it does not have too much forward voltage but can I use a zener diode, general diode, how much maximum clamping voltage do I need, etc...? Is there a way to calculate the properties of the emf?
In the past I have used a 1n4004 for this most of the time but I would like to make the final board surface mounted.