Brent Brown writes: > One of the lowest parts count current regulator circuits is an LM317 with= =20 > one > resistor (circuit in most LM317 data sheets as an application example or= =20 > search web > images for LM317 current regulator). Resistor from Vout pin to Adj pin,=20 > apply Vin to > Vin, your LED or optocoupler from Adj pin to GND. >=20 > R1 is approx =3D Vref/Iout =3D 1.2V/0.015A =3D 80 Ohms. Thanks to the person who added the EE tag. That was my intention but I forgot. Also thanks to all for the good circuit suggestions. > How about swapping out the lamp in your door bell switch with an LED=20 > (will last > forever then) and put in series with the optocoupler so it gets regulated= =20 > current as > well? I couldn't agree more. These lighted buttons appear to be turned out by the box car loads and I was astounded that they still use a tiny grain-of-wheat incandescent lamp whose operating voltage is probably around 5 volts because they are extremely bright at 7 volts. To respond to the comment about the diode across the button: This seems to be a common design as we have an electronic bell at our house, also and it, also, uses a diode across the button. With no lamp, the bell gets half-wave DC from the transformer through the diode and that powers the microcontroller which may even be a PIC for all I know. When someone presses the button, the diode is shorted and the bell sees the AC sine wave from the transformer and rings by playing its tune. With no diode, it looses power as soon as the button is released so that is the reason for the diode. With a lamp in the button, the bell gets a half-wave DC signal with a lower-voltage/current other half-wave. It apparently won't trip until what it is getting is close to a symmetrical AC signal. Again, thanks. Martin McCormick --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .