Maker Pro
Maker Pro

Converting LED to Street Light?

Paul Saha

Jul 7, 2016
42
Joined
Jul 7, 2016
Messages
42
remove relay and 9V and connect LED + 220R to 5V and collector. Anode to 5v and use two NPNmin Darlington mode.
I did that in the first circuit if you can recall. And it works.
But I am willing to use the same circuit to power a street light as said before.
I should use 220V so thats why I am trying with a led .
 

Sunnysky

Jul 15, 2016
541
Joined
Jul 15, 2016
Messages
541
The LED draws ~20mA and the contacts require 100mA min to keep clean.

The relay coil draws 360mW at rated V and your transistor cannot drive current required with ~10uA base current and hfe= 20-50 when near saturation thus only 200~500uA out. Thus Darlington or CMOS inverter required with suitable pot to adjust LDR trip threshold.

more details if you need relay for bigger load
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
@Poulostyo Saha: Below is a diagram of the terminal connections for the relay you specified in your post #16. Notice this diagram bears no resemblance to the circuit diagram you posted in post #12 Please draw the circuit you are trying to use by adding connections and devices to the relay shown below and then post an image here.
upload_2016-7-19_16-49-58.png

The zig-zag thingy on the left side represents the relay coil. To the left of the relay coil terminals is the common contact terminal. The common contact moves from a connection to the N.C. contact on the bottom right side of the drawing to a connection with the N.O. contact on the upper right side of the above drawing when the relay coil is energized. On the right side of the drawing are terminals for the two contacts, N.C. and N.O., that the common contact switches between. In the diagram the relay is shown de-energized with the common contact making contact the N.C. contact. After the relay coil is energized, the common contact will move to make contact with the N.O. contact in the upper right corner of the drawing.

Please start with the diagram above and show us where you would connect the LDR, transistor, resistors, 9 V battery, etc. Don't leave anything out of your sketch.
 

Paul Saha

Jul 7, 2016
42
Joined
Jul 7, 2016
Messages
42
Here's the circuit. Apart from changing the polarity of the 9V battery and shifting the COM connection from NC to NO, I have not changed anything. But, still its not working!
 

Attachments

  • 20160720_223712.jpg
    20160720_223712.jpg
    106.3 KB · Views: 113

Sunnysky

Jul 15, 2016
541
Joined
Jul 15, 2016
Messages
541
Your connections to relay look wrong. The coil should not have a centre tap unless it is a latching bipolar relay, which I doubt you have.

Report relay p.n. and coil resistance.

If coil is say 100Ω, the transistor switch needs a gain of more than 1k if biased by 100kΩ. This can only be done with a two stage transistor design, which of course is overkill if only driving an LED with 330Ω and 2-3 V drop across LED for Red or white.

It is far better to design this correctly or look for a design already done with ani accurate Vref like an LDO and a comparator with the voltage divider R's to define your input threshold, then the active low out may have enough to drive the coil current.

Ensure your LED polarity is correct and correct coil polarity and use two stages of gain or a much lower LDR value and bias R or anything. This schematic has too many errors. One must understand Ohm's Law and how circuits work, before attempting to stab at something that works. Learn what works and why.

For safety, keep at least 4 mm gap between >100 V output and DC inputs. when you are ok to try.
 
Last edited:

Sunnysky

Jul 15, 2016
541
Joined
Jul 15, 2016
Messages
541
Sorry to say, hevans1944 schematic was a bad example.

This is better schema of relay and it shows 1k input R needed to saturate Q with a 100Ω coil. If LDR cannot drive 1K then NG.
Relay-Schematic.jpg


Use this and imagine the coil has a conduction resistance which determines the operating current ..Most schematics are logical, not actual, but the coil is not a resistor rather an inductor with pull on the armature, but has resistance.
Therefore when designing with active switches, a clamp diode across the coil must be added in reverse polarity to the applied voltage so that the transistor does not burn out when switched off from excessive V=Ldi/dt
 

Sunnysky

Jul 15, 2016
541
Joined
Jul 15, 2016
Messages
541
perhaps a better example .
Here relay is inactive in light.
Dark LDR turns off Q1 which turns On Q2 and relay using N.O. contact.
FET's can also be used with some skills, or even CMOS Schmitt trigger and NPN.

relayldr.gif

R3 provides positive feedback for hysteresis (aka backlash, deadzone, stable flip flop thresholds). so the relay does not oscillate or chatter at threshold.
http://www.sentex.ca/~mec1995/circ/relayldr.html
 
Last edited:

Gryd3

Jun 25, 2014
4,098
Joined
Jun 25, 2014
Messages
4,098
Your connections to relay look wrong. The coil should not have a centre tap unless it is a latching bipolar relay, which I doubt you have.
It doesn't ... it just places the 'Common' pin between the two coil pins for some reason. They are not actually connected.

Sorry to say, hevans1944 schematic was a bad example.
This is the schematic provided with the part number the OP posted... it really is this strange pinout.

At this point... the op needs to listen very carefully to see if the relay makes a 'click' noise when it switches over. It won't be silent, so you should be able to hear it.
If the relay makes no sound, you need to focus on the left side of the circuit, and only the 2 coil pins on the relay first.
If the relay 'clicks' then you need to fix your right-hand circuit.
 

Paul Saha

Jul 7, 2016
42
Joined
Jul 7, 2016
Messages
42
the op needs to listen very carefully to see if the relay makes a 'click' noise when it switches over.
It doesn't make a click sound, but the relay when powered separately, it does make a click sound.
 

Paul Saha

Jul 7, 2016
42
Joined
Jul 7, 2016
Messages
42
At last it worked, I made changes in the value of some resistances.
Figure d) worked.
I have attached 4 circuits in this post. Can anyone explain me why figure a) & d) are working and why figure b) & c) are not working?
Please, it will be helpful!
 

Attachments

  • 20160721_212251.jpg
    20160721_212251.jpg
    109.5 KB · Views: 92

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
It's all about how you bias the base of the transistor and its "current gain" versus how much current the LED needs to turn on and off, and how much current the relay coil needs to turn on and off. Ideally, you want the transistor to be fully "on" or saturated when the illumination on the LDR is sufficiently low. And you want the transistor to be fully "off" or non-conducting from emitter to collector when the illumination on the LDR is sufficiently high.

Problem is, the resistance of the LDR varies over a huge range from fully dark to fully illuminated. Typical values are in the megohm range when left in the dark for awhile, and a few hundred ohms when fully illuminated. The change in resistance is very non-linear as a function of illumination intensity. For this reason, it is difficult to design a simple bias scheme that will apply sufficient bias to turn the transistor ON when the LDR is not illuminated and to turn the transistor OFF when the LDR is illuminated. Your two working circuits demonstrate this difficulty.

The base bias is different in circuits (a) and (c), providing too much base current in non-working circuit (c). The LED stays ON all the time in circuit (c) because the resistance of the LDR does not decrease enough, when illuminated, to decrease the emitter-base voltage sufficiently to turn the LED OFF.

Circuits (b) and (d) use the same bias resistors as circuits (a) and (c) respectively but the relay coil requires more current than the LED to actuate the relay. Sufficient base drive is provided in circuit (d) to operate the relay but it is not sufficient in circuit (b), so the relay actuates when the LDR is not illuminated in circuit (d) but does not actuate in circuit (b).

The relay "drops out" with insufficient current, which (luckily) occurs when the LDR in circuit (d) is illuminated. Decreasing resistance of the LDR in circuit (d) causes the relay to de-actuate (drop out) by decreasing the base drive and hence the collector current of the transistor. However, the LDR, when illuminated, does not decrease the base drive and hence the collector current to the relay to zero. This is why the LED in circuit (c) stays ON. However, in circuit (d) which uses the same bias resistors as circuit (c) the illuminated LDR does decrease the collector current sufficiently to allow the relay to "drop out". This is just a lucky coincidence, not a good circuit design. Changes in any of the components may cause circuit (d) to fail. You also have neglected to include a diode across the relay coil to prevent back emf damage to the transistor that could be caused by a sudden and rapid decrease in the LDR resistance or interruption of power while the relay coil is energized.

As mentioned before, you have not deliberately included any provision for hysteresis in the switching point from daylight-to-dusk or from night-to-dawn. The relay does provide some hysteresis because the pull-in current for its coil is always greater than the drop-out current. Depending on this is not good design practice, nor is it good practice to operate the transistor in a linear mode instead of operating in a switching mode. You would be better served by using a flip-flop circuit, such as the one posted by @Sunnysky in post #27. And maybe learning a little bit more about how transistors and LDRs and relays work.
 

Paul Saha

Jul 7, 2016
42
Joined
Jul 7, 2016
Messages
42
Thanks for your explanation. I realize it that I need to start from basics. Certainly,I will be looking forward to clear all my doubts here in this forum.
Thank you all for enlightening me!
 

Paul Saha

Jul 7, 2016
42
Joined
Jul 7, 2016
Messages
42
And I know that just saying Thank you is not enough to compensate with the amount of time & energy you have given towards me!
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
And I know that just saying Thank you is not enough to compensate with the amount of time & energy you have given towards me!
A "Thank You" and maybe a "Like" are all that we ever expect here. Almost all who respond on EP with intelligent answers have many years experience in electronics, and I suspect many are also hobbyists. Electricity and, later, electronics has been my "hobby" since about age nine or so, when I spent a year living with my paternal grandparents. Grandfather was a retired coal mine electrician who introduced me to the wonders of electricity. Grandmother cooperated by taking me to the library every two weeks or so to borrow books. They weren't all Hardy Boys or Tom Swift novels either: I cut my "electrical teeth" on Alfred P. Morgan's The Boy Electrician which I still recommend today as a good introduction to electricity for children, or even for adults who know nothing about electricity.
 

Paul Saha

Jul 7, 2016
42
Joined
Jul 7, 2016
Messages
42
You are right. The information about electronics in the internet is pretty much messed up. It is the book which we need to follow first.
 

Paul Saha

Jul 7, 2016
42
Joined
Jul 7, 2016
Messages
42
I just hope that whether it is possible for you to reply me here, with the the road map to become a good and best electronics engineer?
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
Thank you for recommending that book!
The Boy Electrician by Alfred P Morgan has been out of print for many years, but there are decent photocopies available on the Internet. I had to look at several before I found the edition I read in my youth... the one that shows how to build your own x-ray machine and make radiographs of your hand on silver halide film stock developed in your own photographic darkroom. That's verboten today, just like the old fluoroscopic x-ray machines that used to be in shoe stores to allow a customer to check the fit of a pair of shoes on their feet. Everyone is paranoid about radiation today. My feet didn't turn black and fall off after I stuck them inside the machine and Dad looked at the results on the fluoroscopic screen, but I have not seen or used such a machine since then. Lots of other neat stuff in that book that will give you a "hands on" feel for electricity. :eek:

I just hope that whether it is possible for you to reply me here, with the the road map to become a good and best electronics engineer?
That would be a whole 'nother topic... and it would just be my own opinion, not necessarily the best "road map to become a good and best electronics engineer." You have to set goals for yourself, and when you achieve them, set higher goals. Do this throughout your life. Surround yourself with intelligent people so you can learn from others instead of making their mistakes yourself. Find a mentor a few years older than you are who is willing to help you. Ask lots of questions, build lots of projects, continue your education. If you graduate from a school, don't throw away or sell your text books. You can use them for references later. Read a lot of technical or "trade magazines" to keep up with what's going on. The purpose of formal education is to provide you with the tools you will need learn on your own without a teacher to guide you. If you are fortunate to find a mentor (teacher) use them as much as possible, but "learn to learn" by your own efforts.
 

Herschel Peeler

Feb 21, 2016
401
Joined
Feb 21, 2016
Messages
401
I did that in the first circuit if you can recall. And it works.
But I am willing to use the same circuit to power a street light as said before.
I should use 220V so thats why I am trying with a led .

Well, lets see, Typical old street light is 400 Watts putting out about 51,000 lumen. How many LEDs do you think you might use?
Google "street light". There are a lot of LED and solar powered street lights available.
 
Top