Maker Pro
Maker Pro

Advice on photorelay type circuit

Z

zebeste

We have an audio amplifier that we power with a battery. Currently, the battery is powering the amplifier 24/7 and results in the battery needing to be replaced roughly every 3 days. The amplifier only needs to be on during the night, so we hope to create a simple circuit that limits how long the battery is powering it to just nighttime hours.

The sheet that came with the amplifier states it is a 20W amplifier that draws 1.5-2A at 12-18V (we are using 12). We are looking at using that same 12V source to power this control circuit.

It's been a long time since I've used my (limited) electronics knowledge, so a lot of it has escaped me. I'm thinking that for the circuit we will use a relay. But I've been looking into transistors, which look like they could meet the continuous power draw requirements of this project, and for a cheaper price with no mechanical parts. Would there be any disadvantages to using a transistor for this application?

Next, I've been looking into photodiodes, photoresistors, and phototransistors. They all look like they would be usable for this project, but I'm not sure of the advantages and disadvantages of each. Any advice on this would be appreciated.

I've seen at least one circuit diagram that should meet our requirements, but I'm the type of person who likes to explore and understand all of the options before committing to one. I learn more that way.

Thanks.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
is the actual operating time of the amplifier critical? turning it on and off with ambient light levels will change the operating hours during the year (more or less depending on your latitude).

The simplest solution is a light dependant resistor (LDR or photoresistor) hooked up to an op-amp so that the amplifier is turned on when it gets dark, and turns off again when it gets light.

Phototransistors and photodiodes are much faster devices (able to detect very brief pulses of light) but for this you would want a slow response, so they are of no particular advantage. Also (at least in the case of photodiodes) the output signal is much lower and your circuit would be more complex.

Someone has been playing with something similar for temperature (using a temperature dependant resistor rather than a light dependant resistor). You might like to take a look at that.

I would consider using a mosfet to switch the amplifier on and off as they have lower voltage drop at moderate currents as compared to bipolar transistors. The disadvantage is that they are somewhat more sensitive, and potentially have a higher resistance than a relay, however they will waste less power when turned on.
 
You can get a package of 3 or 4 CdS (cadmium sulfide) photocells from Radio Shack for a couple of dollars. They will work well with a transistor to turn the power on and off as steve suggests.
 
Z

zebeste

Thanks for the advice. Fortunately, this is actually a wildlife application where having the circuit activate as it gets dark and deactivate as it gets light would is ideal, so I don't have to worry about timers.

I like the idea of using a mosfet, so I've started looking into their usage. I've attached a simple schematic that I was wondering if designed it correctly (no values yet). It contains a mosfet, a resistor, a preset (to adjust sensitivity), the amplifier(rectangle), and a photoresistor. Hopefully I got it right; I was never very good at figuring out where the resistors go.

Based on my limited understanding, I believe that the mosfet would result in a voltage drop that can be calculated by multiplying the Source-Drain resistance by the current draw of the amplifier, correct? Also, I should look for a mosfet with a power dissipation rating of 20+ Watts?
 

Attachments

  • 01.jpg
    01.jpg
    4.8 KB · Views: 225

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
The problem with that is that it might turn on and off quite a lot as the light fluctuates around the level where it is switching on and off.

The link I gave you was to a discussion about a circuit that does not suffer from that effect any where near as much.
 
Z

zebeste

Yeah, I've been looking at that, but have never learned about op-amps before. But I'm working on it, and may consider something like that circuit.

But I've discussed it with the person wanting the circuit, and it appears as though he would be fine with the fluctuation that would occur at the threshold levels (which is good because cost is an issue, and I'm pretty sure the simple one I posted would be cheaper). You didn't straight out say that the circuit would work, but I get the impression from your post that it would, correct?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
I get the impression from your post that it would, correct?

Maybe. The relay would not be pulled in strongly, and may not open fully or quickly. As long as it is switching low voltage, low current then it won';t be a problem. You may get arcing in other cases though.
 
Here are a couple of circuit suggestions that I believe will work better. I'd choose a transistor output over a relay due to cost, size, power consumption, & function, etc.
Resistor values are only approximate. The 1M resistor provides a positive feedback (= hysteresis) for fast & clean switching. Reducing the value increases the hysteresis.
 

Attachments

  • 01.GIF
    01.GIF
    2.7 KB · Views: 214
  • 02.GIF
    02.GIF
    2.7 KB · Views: 219
Z

zebeste

Thank you for the schematics. I'm currently working on understanding them completely before I actually implement them. While I'm working on that, let's say we throw out the power saving aspect of the project, and merely want it to disable the amplifier during daylight. Would a voltage divider using a photoresistor work, or even just a photoresistor bypassing the amplifier? (see attachments) Basically, I'm assuming that if I can drop the voltage far enough below the input voltage required by the amplifier, it just won't run.
 

Attachments

  • 01.jpg
    01.jpg
    2.7 KB · Views: 173
  • 02.jpg
    02.jpg
    2.6 KB · Views: 180
If the amplifier were drawing 1/1000'th as much as it does then the divider idea would work. The second thumbnail would not, the photoresistor would only get hot at day.
The transistors are there to amplify the small current available from the LDR - into the much larger current needed by the amplifier.
You can stop yourself walking with your feet, but try to stop a car Flintstone style.. ;) You need something to boost the small force, and being able to deal with the stress.
 
Z

zebeste

Yeah, I had a facepalm moment a few hours after posting those when I realized that the second one wouldn't work. I don't exactly understand why the first doesn't work, but I'll figure that out later.

So, I guess I'm going to use the schematic you posted with the 2 mosfets, but I don't understand how it works. For starters, I know what mosfets do in general, but don't understand the difference in behavior between the p and n ones. Based on what I've read, when a high enough voltage is applied to the Gate pin of the n-channel mosfet, it allows current to pass through between the source and drain, correct? how does the p-channel mosfet behave?
 
The first circuit won't work for the same reason you can't jump start a car with a 9V transistor battery. There's simply not enough juice available.

The P-channel works just the same, only with negative voltages instead of positive. Just flip the circuit upside-down and you can think of it as an N-channel.
The circuit works as follows:
As darkness approaches the LDR resistance increases and thus the N-gate voltage increases and the N-MOS starts to draw a current through the 10k resistor. This places a negative voltage on the P-gate, causing it to conduct and deliver current (& voltage) to the amplifier. A small portion of this voltage is fed back through the 1M resistor to the N-gate, causing a further slight increase in voltage, which augments the switching action, making it switch on fast and stay on. Thus the LDR will have to decrease its resistance a certain amount in order to turn the thing off again. There won't be an analog action where the output is only partially swithed on.
 
Z

zebeste

Thanks, for the most part it makes sense. Had to look up negative voltage, however. Let's see if I'm understanding it correctly in the context of this circuit...

Let me know if the following is correct:
1) When a voltage is applied to the Gate of the NMOS, the reason it is positive is because it is relative to the voltage of the Drain pin (which in this case is the circuit's ground). In other words, the voltage is Vg-Vd.
2) When the NMOS is activated it causes the Vg of the PMOS to drop. The reason it is considered negative is because it is calculated relative to Vs. Vg-Vs. If Vg is 0 or close to it (occurring when the NMOS is activated) and Vs is positive, then the PMOS is considered to have a negative voltage applied to it, and activates.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
An N channel (or NPN) device requires the controlling element to be positive with respect to the source (emitter). A P channel (or PNP) device requires that the controlling element be negative with respect to the source (emitter).

Vacuum tubes are P channel devices :)

If you look at the specs for Vgs you will find that they are +ve for N channel devices and negative for P channel devices.

Similarly NPN transistors have Vce values which are positive, and PNP have Vce values which are negative.

edit: For JFET's the same rules apply, except that you can only ever have 0.6V of forward bias on the gate. The forward bias turns them on more, but since a zero voltage has them turned on anyway, a reverse bias is used to turn them off. Thus you will always see them biased in the opposite direction to that suggested above because are "normally on". The same can be true for mosfets (see enhancement vs depletion mode) but is far less often seen these days.
 
Last edited:
Z

zebeste

Ah, I get it. I was thinking that the source pin is the top one in the schematic symbols for both, but a quick check on wikipedia shows that the source pin on the N-channel is actually the bottom. Thanks. Now, that I understand, I'm off to look for mosfets for the circuit. Quick question: I see capacitance as part of the specification on these devices. However, I know nothing about this, so what effect does this have on the circuit?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
In your case where the switching speed does not have to be very high, the capacitance will not be a huge issue.

Pick a device that can handle several times the current you require and has a max voltage at least 50% higher than your supply voltage.
 
Z

zebeste

Pick a device that can handle several times the current you require and has a max voltage at least 50% higher than your supply voltage.
Thanks for the tip.


In your case where the switching speed does not have to be very high, the capacitance will not be a huge issue.
Good to know, should make selecting them slightly less complicated.


Quick question about Vgs(th) and Vgs: In the data sheets, I see that Vgs(th) is given a min and max value, and Vgs is given one value in the abs max section. My understanding is that the min and max values indicate when the device starts to activate and becomes fully activated,and that as long as the voltage is between Vgs(th)max and Vgs the device will be fully on, correct? or am I wrong, and the min and max values indicate the ideal constant voltage range the device can continuously handle, and Vgs simply indicates the max pulse (rather than continuous) voltage the device can handle?
 
It indicates the variation where different production samples will start to turn on. Rds(on) will steadily decrease above this voltage, up to the abs. max. Vgs of 20V.
So the definition "fully on" will depend on the actual drain current, but a Vgs of 10-15V is usually enough to enable it to handle the full rated drain current.
Of course the first N-channel need only be a small TO-92 case type, whereas the second P-channel may need to be the bigger TO-220 case type.
 
FDU3N40: 400V 2A 2.8ohms I-PAK
FQP17P06: -60V -17A 0.1ohm TO-220

Both will work fine. Do you have a supplier that you'll prefer using?
Of course the 400V spec on the N-channel is overkill but if it's cheap and not too big then it doesn't matter. The P-channel will drop up to 0.2V and dissipate up to 0.4W.
 
Top