Control low voltage AC lighting with phototransistor

Thread Starter

auhnuld

Joined Dec 1, 2009
5
Hi all,

I've been searching the net for a while for ideas on how to do this. I'm looking to control my house number illumination via a phototransistor so that it isn't on all the time (only when dark). The lights are connected to the doorbell circuit, so it's 16 volts, 10 watts AC.

I found a basic phototransistor / comparator circuit, but I don't know if it would work with AC:
http://home.cogeco.ca/~rpaisley4/PhotoDetectors.html

Anyone ever done this before and can share a schematic?
 

mik3

Joined Feb 4, 2008
4,843
If you drive a relay with the output of the comparator then you will be able to control the AC voltage with the relay's contacts. If the comparator cannot supply the current required by the relay's coil use a transistor on its output to drive the relay. Note that you have to power the comparator circuit with a DC voltage and not AC. Use a bridge rectifier with a filter capacitor to convert the AC voltage into DC, if it is only 16V, and then use a voltage regulator IC (LM7812) to regulate this rectified voltage to 12V and power the comparator circuit.
 

Thread Starter

auhnuld

Joined Dec 1, 2009
5
If you drive a relay with the output of the comparator then you will be able to control the AC voltage with the relay's contacts. If the comparator cannot supply the current required by the relay's coil use a transistor on its output to drive the relay. Note that you have to power the comparator circuit with a DC voltage and not AC. Use a bridge rectifier with a filter capacitor to convert the AC voltage into DC, if it is only 16V, and then use a voltage regulator IC (LM7812) to regulate this rectified voltage to 12V and power the comparator circuit.
Thanks Mik3! Any recommendations on the values of a filter cap, type of relay coil and a transistor if needed? I need more experience in building circuits, but can pretty much follow what you're saying.
 

mik3

Joined Feb 4, 2008
4,843
What is the maximum current drawn by the lighting?

You said 10W but it not clear what is 10W. If it is 10W, then a relay rated for 1A and a voltage grater than 25VAC it will be fine. The coil voltage has to be 12V.

For the filter capacitor, a 270uF 35V electrolytic should be ok.

A transistor which can handle more 0.5 Amps will be fine to drive the relay. A general purpose BFY51 comes into my mind now which is able to handle 1 Amp.
 

Thread Starter

auhnuld

Joined Dec 1, 2009
5
What is the maximum current drawn by the lighting?

You said 10W but it not clear what is 10W. If it is 10W, then a relay rated for 1A and a voltage grater than 25VAC it will be fine. The coil voltage has to be 12V.

For the filter capacitor, a 270uF 35V electrolytic should be ok.

A transistor which can handle more 0.5 Amps will be fine to drive the relay. A general purpose BFY51 comes into my mind now which is able to handle 1 Amp.
The maximum current draw by the lighting is actually 8W, so it seems like your recommendations will work. Much appreciated.

Question: For the relay, would a G3MC-101PL-DC12 work? I've never used relays before, so trying to figure them out. is there something cheaper that would work?
 
Last edited:

mik3

Joined Feb 4, 2008
4,843
Yes it will work. If you want to find other relays visit the website of Digikey, RS, Farnell etc to find many.
 

mik3

Joined Feb 4, 2008
4,843
Also, 100nF ceramic capacitors should be connected as close the input and output of the regulator to reduce oscillations if the wires are longer than about 5 inches.
 

Thread Starter

auhnuld

Joined Dec 1, 2009
5
Also, 100nF ceramic capacitors should be connected as close the input and output of the regulator to reduce oscillations if the wires are longer than about 5 inches.
Thanks, yes, I'm planning on using a 50 volt .1uF ceramic cap. Once I have a schematic created on the 'puter, I'll upload it.

{edit} Schematic attached. Do you mind looking at it and let me know if I'm missing anything?
 

Attachments

Last edited:

mik3

Joined Feb 4, 2008
4,843
Add another 0.1uF ceramic capacitor on the input of the regulator, add a 10uF 25V electrolytic on the output of the regulator and add a 1K resistor between the base of the the 2N1711 and the comparator output.
 

Thread Starter

auhnuld

Joined Dec 1, 2009
5
Add another 0.1uF ceramic capacitor on the input of the regulator, add a 10uF 25V electrolytic on the output of the regulator and add a 1K resistor between the base of the the 2N1711 and the comparator output.
Thanks! Attached is the modified schematic. For my education, why did we need the additional caps and the 1k resistor?
 

Attachments

mik3

Joined Feb 4, 2008
4,843
You need the 0.1uF capacitors to minimize oscillations due to stray inductance if you have long connecting wires. The 1K resistor is to limit the current through the transistor and the comparator at acceptable values.
 

whatsthatsmell

Joined Oct 9, 2009
102
Sorry to bring this thread up again, but I have a newb question about the schematic.

Doesn't the 2n1711 (NPN) transistor have to be a PNP transistor? :confused:
 

mik3

Joined Feb 4, 2008
4,843
Thank you for the reply. While the schematic shows a PNP, the datasheet I read shows it as an NPN.

So, I was totally confused - and just when I thought I was starting to get some of this stuff! ;)
I had a look at the datasheet and the 2N1711 is an NPN transistor. Maybe it is shown as a PNP transistor on the schematic by fault. However, a PNP transistor has to be used for the application.
 
Top