>When the transistor or other switching device turns on for a >subsequent cycle and the diode remains on for a short period, say >1.5us, what exactly determines the current through the diode in this >period? I think... > >The diode would create a low impedance path from V+ to GND through >the transistor with nothing much to limit the current. So the current >is momentarily in the opposite direction (to when it was >"freewheeling"), the voltage drop across the diode is increasing >because it is turning off, and the current is higher than previous >because there is now a short circuit across the power supply, so all >these contribute to a large peak power. In practice I guess the >transistor will have a considerable turn on time which will help to >reduce this peak current, but like Spehro says it will get a hard >time too. This sounds like a reasonable probability to me. Do not forget to include the hash that is now going to be seen on the supply line feeding the relays due to the momentary near short circuit. If your diodes are that slow in turn off time that this becomes a problem, then it is probably going to be good practice to have a resistor in series with the diode to limit the current. The resistor should be sized to a value determined by maximum safe back emf voltage, and required decay rate of the current. OTOH the cost of a faster diode may be a better trade off due to less component count. However you may also find that a better way to deal with the same problem of reducing the coil current is to have a resistor from the supply to the relay coil, and a capacitor (say 1uF) from the resistor/coil junction to ground. Then you do not use PWM to reduce the relay current, but size the resistor to an appropriate value. When the relay is off, the capacitor is charged to full rail voltage, and supplies the initial peak pull in current to the relay when the transistor turns on. As the relay draws current from the capacitor, and the voltage drops, then the current will decrease to a value set by the resistor. You will still need a diode across the relay to clip the back emf on turn off though. Which of these becomes the best solution will be determined by the particular application. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads