97Views21Replies

Author Options:

Need help with basic circuit? Answered

So, I was making this circuit and ran into some problems so I would like it if any one of you could help me.

(Schematic attached)

Q1. Do you see any basic problem in this circuit?
Q2. Will this relay (http://zaymanta.com/media-library/stores/RALEY-6V-10A.jpg) work with 5v? I have tried this before and it works but I was wondering if there will be any problem like flickering, fluctuating or something like that.
Q3. Which transistor should I use for this job?
Q4. Can you check if the  esistor with ldr (and rest) is of the right value?
Q5. Can anyone modify this circuit so that the red led turns off when the relay is active and the green turns on (instead of both turning on)? The relay will be used to control 240v.

Thanks alot in advance :).

Discussions

0
None
-max-

Best Answer 2 years ago

Do you understand how a circuit like this works? Understanding it will not only answer all your questions, but also help you greatly in troubleshooting.

Assume the LDR is out of the circuit. The 2k2 resistor allows ((5-0.7)/2200) amps, or about 2mA of current to flow into the base. Assuming the transistor has an Hfe of about 50, then about 100mA can flow through the relay as well as the green LED and resistor.

If the LDR gets hit with light, then its resistance falls greatly, and most of the current that was going into the base of the transistor will instead flow into the LDR, and with <0.6V on the base of the transistor, it will turn off and stop conducting.

-

Q1: Yes, the transistor 'x' is backwards. You have the collector and emitter mixed. While transistors look symmetric, they actually are not. Reversing C and E will greatly reduce the performance of the transistor. Also, you will notice that this circuit is always drawing current, as there is always current going through the LDR. This circuit will never draw less than ~2mA.

Q2: Didn't didn't supply enough info to know.

Q3: This is a really basic task, almost any transistor capable of >200mA and with decent Hfe will do the job.

Q4: The resistors are the easiest. the 150 ohm resistors are just setting the current through the LED, they are a little low in value. I'd choose 470 ohms. There is no reason to drive LEDs with maximum current. Set the brightness of the LED to your preference. The 2K2 resistor can be adjusted if the circuit does not work, if not enough current flows through the relay to energize it. However be mindful that it may also change the sensitivity to light.

Q5: I will let you think about this one, it is really easy. Hint: think about what voltage is present between the emitter and collector of the transistor.

0
None
SA-DIY-max-

Answer 2 years ago

Isn't it supposed to be 5/2200 instead of ((5-.7)/2200)?

0
None
-max-SA-DIY

Answer 2 years ago

Connect the emitter to ground, base to resistor, and other side of the resistor to 5Vdc as shown in your schematic, and measure voltage between the base (red positive lead) and emitter (common black lead). What do you notice? You could just use the probes without the resistor or the 5V supply if you have a multimeter that supports diode test.

-

Like I said in the previous comment, basically any NPN BJT will work (BJT = bipolar junction transistor, the type you are working with.) If you are unsure if your transistor works, assuming your multimeter doesn't have a transistor tester, (good ones will not have this) put your multimeter in diode mode and check the junctions for 0.6-0.7v voltage drop. If you pretend like the NPN transistor is like back to back diodes internally, like:

(e)----[NP]----(b)----[PN]----(c)

or

(e)-----|⊲----(b)----⊳|-----(c)

Then you can test the individual junctions. You should expect to get ~0.6v the correct way and nothing when reverse biased. If so, you be fairly confident your transistor is good. If you get what appears as a dead short or an open circuit between either junction, then you have killed the transistor. Small transistors are easy to kill. which is why it's good to buy a bunch at a time.

-

If you are unwilling to go to radioshack or some equivalent to buy a pack of transistors or better yet, get a transistor kit online, then you can salvage BJTs and FETs from old equipment like TV's and toys. Look for components in the TO-92 or TO-220 package, google the part # printed on them to see if they are things you could use. Use a desoldering tool and a soldering iron to desolder them. You could also desolder SOT23 surface mount packages real easy, and solder 30AWG magnet wire to these tiny components to make them usable on a breadboard. SOT23 is probably not big enough to handle the power in this circuit, however.

p.s. Thanks for best answer! :)

0
None
-max--max-

Answer 2 years ago

Also, I forgot to mention, it is often a good idea to add a flyback diode across the relay contacts and maybe a 100uF capacitor across the supply rail. The diode will normally be reverse biased and be transparent to the circuit, however when the transistor stops conducting (turns off) then a high voltage kickback can kill the transistor, esp. if it has a low voltage rating. The diode allows a path for current to continue flowing until the magnetic field fully collapses.

0
None
SA-DIY-max-

Answer 2 years ago

Can't seem to find a transistor can you help me? I did some mods and need one that can control the relay and 2 leds.

0
None
SA-DIY-max-

Answer 2 years ago

Thanks alot :)

0
None
SA-DIYsteveastrouk

Answer 2 years ago

Thanks for that, it was explained quite well. My objectice is the opposite of that circuit but I got the point. Can you answer the questions please?

0
None
steveastroukSA-DIY

Answer 2 years ago

Swap the LDR and its resistor, and it reverses the operation.

Use Iceng's circuit.

Q1 Yes, Joe's identified them for you.

Q2 Very hard to say, some will, some won't.

Q3 Find a nice little power darlington.

Q4 You'll need to experiment a bit with the resistor on the LDR, it needs to suit the light level you want to switch at.

Q5 Use the changeover contact on the relay to switch on another LED when the first is off.

0
None
SA-DIYsteveastrouk

Answer 2 years ago

Thanks. Q4. I need it to be off when a laser is shining at it and on when the laser contact is broken.

0
None
SA-DIYSA-DIY

Answer 2 years ago

oh and can you give me a rough estimate of what power you think this relay will consume? maybe 100 ma?

0
None
SA-DIYSA-DIY

Answer 2 years ago

So which one of these would you consider optimal?

1.png2.png3.png
0
None
Josehf Murchison

2 years ago

Where is your power source?

Assuming the power supply is the wire on the right your NPN transistor is backwards.

Try something like this.

Answer 2.bmp
0
None
SA-DIYJosehf Murchison

Answer 2 years ago

Thanks for that, please take a look at the schematics I posted in reply to steveastrouk's answer and tell me whether anything from there needs to be added in this circuit.

0
None
Josehf MurchisonSA-DIY

Answer 2 years ago

I did look at those before posting.

Depending on the switching speed, you might want to add D3 in schematic 3 to my schematic. Just for rebound EM.

The only other change I might make is to change the 2.2 k ohm to a 100 k ohm pot so you could adjust the light sensitivity to your needs.

0
None
Josehf MurchisonSA-DIY

Answer 2 years ago

OK you will need to adjust the value of the 2.2 k ohm resistor to match the LDR and the light level.

This circuit will turn the red LED off and the green LED on in the dark, and it will turn the red on and the green off in the light.

We cannot tell you the values of the components you should use without knowing the spec values of the components you are using like the LDR you are using, or the lazer.

I would up the LED resistors to 1 k ohm.

At 150 ohm and 5 volts that could be a little over current depending on the LEDs.

I can tell you for the PNP transistor on the red LED you can use a 2N3906.

Answer 3.bmp