question for the seasoned

Thread Starter

fredric58

Joined Nov 28, 2014
252
OK , It's backwards in my head..... (K) attracts POS? right? Everything is done but the hook up to the TL431A. I will make the correct connections tomorrow morning and test the circuit. REALLY appreciate your input. Where did you find the data sheet? I LOOKED ALL OVER, and couldn't find one with the explanation of the contact points. Just the symbol. I'd like to bookmark the page. I will let you know tomorrow how it works. And you were correct , in that is was a very affordable way to do it. Like 7.00 for all the parts. Awesome, I thought it would be much more. Thanks again, keep your fingers crossed....... I've burn up a lot of sh...stuff. But I was very careful this time, worked slow and measured all the components. I think it's going to work as needed. Let you know tomorrow.
 

Thread Starter

fredric58

Joined Nov 28, 2014
252
OK...fry another one up for me. I used (2) 9v batteries. I forgot to put a resistor on the power supply to bring it down to 12 AND...I may have wired something wrong, but anyway R6 and R7 went smokin'. So I tore it apart from the output signal (everything to the right) checked the resistors (all) with an ohm meter and they were all in line with the measurements I took before put this together. I CAREFULLY, VERY CAREFULLY put it back together and cleaned it up abit. However there is NO power output. The store is right down the street so I am going to replace the 2N3906, 2N3904 and the TL431A. PERHAPS??? they got fried?

? the OUT on the schematic is 9v+ and the bottom right hand corner is ground. RLOAD 100 is the load of the second circuit. ?
 

Thread Starter

fredric58

Joined Nov 28, 2014
252
Anyone else want to look at this? The light switched 9v regulator up above. I think the LAOD is on the wrong side of R6 but I am a novice. to me it seems that power is going to Q2 and R 6 is connected to the emitter of Q2. which in my novice mind makes the current go to ground (a short)thats with a ? mark
 

Alec_t

Joined Sep 17, 2013
14,280
:confused: Are you sure you have the right value resistors for R6 and R7? 5k6 = 5.6 kilohms = 5600 Ohms. 2k2 = 2.2 kilohms = 2200 Ohms.
There is no way a 9V battery would make those even slightly warm.

Edit: Rload (100 Ohms) is an example of a dummy load which would draw ~90mA. It just represents a typical circuit such as you are intending to supply with 9V. You don't need a 100 Ohm resistor there in practice (and indeed if used it would get hot, since it would be dissipating ~810mW !!).
 
Last edited:

Thread Starter

fredric58

Joined Nov 28, 2014
252
I got a 2.2K and a 5.6k, because the K represents the decimal? On the ohm meter the 2.2 is 2.6 ohms, not 2200?

Q2 and R6 are connected by a dot that says OUT. I can/could understand it with a break Q2 being pos and R6 being ground. Can you clarify this? thanks

color codes are orange orange gold and green blue gold
 
Last edited:

Alec_t

Joined Sep 17, 2013
14,280
because the K represents the decimal?
k means 'x 1000'. It is placed between the two significant figures because a decimal point can easily get 'lost' when badly printed or viewed on a limited resolution display.
color codes are orange orange gold and green blue gold
Perhaps your orange is actually red? Gold means 'x 0.1'. Those colours represent 3.3 Ohms and 5.6 Ohms. No wonder the resistors fried :(. The colour bands should be red/red/red for 2.2k and green/blue/red for 5.6k.

Q2 is configured as an emitter-follower. In other words the emitter voltage (which drives the load) follows the base voltage. The base voltage is set by the TL431A shunt regulator, which is active when Q1 is conducting (i.e. when the light sensor is dark). R6 and R7 just sample the load voltage and control the TL431 accordingly. If the load voltage rises, so does the voltage at the R6/R7 junction, causing the TL431A to conduct more and so pull down the base voltage of Q2 and hence the load voltage.
 

Thread Starter

fredric58

Joined Nov 28, 2014
252
That's over my head. I will replace these 2. with 2.2K instead of 2.2 ohms and the other, my bad I'm just learning. AND today I learned another way it "Won't" work : -) so the point where Q2 and R6 meet is my POS 9v out and then just put the other side to ground?
 

Alec_t

Joined Sep 17, 2013
14,280
so the point where Q2 and R6 meet is my POS 9v out and then just put the other side to ground?
That's right. Your load goes between the point marked 'out' and ground, i.e. it replaces the simulated load 'Rload'.

Edit: When you have built the circuit, measure the voltage across your load. If it's not exactly 9V and you need to adjust it slightly, let us know what the voltage is and we can tell you how to adjust it.
 

Thread Starter

fredric58

Joined Nov 28, 2014
252
OK, just so I have it right. Because I DO NOT understand the circle marked out, do I break it and use the emitter of Q2 as pos and R6 as ground? OR do they stay connect and "ARE" the pos to my other circuit and my neg goes to the ground bar that R7 is connected to? It's just confusing because "as is" it looks like the power just goes straight to ground.

Now, I don't just want build this, I want to understand HOW it works. It's basically a ladder schematic. SO...starting on the left I have 2 questions to start.
1. Trim pot, it allows me to adjust the output from 0 up to my battery voltage YES?
In other schematics , when we KNOW what Voltage is needed, resistors can be used to determine the voltage, it is called a "voltage divider" YES?, Example: if you have 9v and instead of a trim pot and you know you need half the voltage you can put (2) 10k resister in series and from the middle it would measure 4.5 volts. YES? AND...if you want to figure a different voltage you can use VxR2/(R1+R2) YES?

HERE'S THE 1st QUESTION: WHY. (2) 10K? why not (2) 50K, or (2) 1000K, or (2) million K in other words in designing a circuit HOW do I determine HOW big the resistors should be? they come in different WATTS to so 1/8, 1/4, 1/2, 1? working with 9v as an example.

Question 2: What is the BEST type of photocell to use for a project like this? THAT'S all I want to learn today!

The next question LATER will be about the photocell part of the ladder, measuring the photocell resistance in light and dark and determining the appropriate resistor to use, it is a divider too? just one resistor has a variable, YES/NO But later. My electronics store is closed on weekends, but I will be taking the project on Monday morning. have a great weekend!
 

Alec_t

Joined Sep 17, 2013
14,280
1. Trim pot, it allows me to adjust the output from 0 up to my battery voltage YES?
Yes.
In other schematics , when we KNOW what Voltage is needed, resistors can be used to determine the voltage, it is called a "voltage divider" YES?
Yes.
Example: if you have 9v and instead of a trim pot and you know you need half the voltage you can put (2) 10k resister in series and from the middle it would measure 4.5 volts. YES?
Yes.
AND...if you want to figure a different voltage you can use VxR2/(R1+R2) YES?
Yes.
HOW big the resistors should be?
It's a compromise (like so many things in life :)). Too low a resistance value and they pass a lot of current and may get hot. Not good for battery-powered circuits. Too high a value and there may be problems with stray conductance changing their effective resistance.
they come in different WATTS to so 1/8, 1/4, 1/2, 1?
Calculate the Watts (Volts across the resistor times Amps through the resistor) dissipated, and use a resistor of twice that wattage (as a rule of thumb).
What is the BEST type of photocell to use for a project like this?
I would use a cadmium sulphide cell (LDR, light-dependent-resistor), since it has a very big resistance change as a function of light on it, e.g a typical one has a resistance of, say, 500kOhms in the dark, dropping to just a few kOhms in bright light.
 

Thread Starter

fredric58

Joined Nov 28, 2014
252
Thank you sir for confirming that I have some things RIGHT and for the answers to the other questions. which brings me to the cadmium sulphide cell. Mine have a strange anomaly, I tested several with an ohm meter and....
1. in the dark there is 0 resistance, or maybe .001mk
2. as I bring it out of the dark is rises quickly to around 450 ohms, and under cloud cover as well it hangs about 450 with slight fluctuation with the moving clouds.
3. in DIRECT sunlight though, it drops and settles in around 150 ohms

1. which is backwards from your description, and 2, why is there the big SPIKE and not a steady increase?

An LDR is a resistor (of sorts)? and I can measure the ohms to determine it's resistance? yes?

YES the drawing is easier to comprehend, Thanks again
 

Thread Starter

fredric58

Joined Nov 28, 2014
252
NEVERMIND.....In my work for the last 40 years, K is the value of 100 and M, is the value of 1000. So I see how I screwed up, because .01 mk is actually 10,000 ohms of resistance, so it is higher in the dark. my second reading in the overcast was probably K ohms and in the sun probably ohms... Learned another lesson so progress has been made. I see also how the choice of resistors can be a bit arbitrary. another lesson learned. So now I will go figure the voltage output at different times of day for fun and try to figure out WHY you chose a 56K in the 2nd rung of the ladder and HOW it affects the variable voltage input to the LM339. The power input seems to be pretty straight forward, so I guess the feedback would be next.
 

Alec_t

Joined Sep 17, 2013
14,280
I have never seen the units 'mk' used, or seen K used to denote 100 and M used to denote 1000. Which part of the world does that? Very confusing.
I chose R1 as 56k on the basis that a typical CdS photocell would have about that resistance in arbitrary 'twilight' conditions. A sort of 'threshold' resistance if you like. I've no idea at which light/dark threshold you want to trip the comparator, or what your particular photocell characteristics are.
Let us assume, for the sake of argument, that at the desired trip point your photocell also has a resistance Rcell = 56k. Then the voltage at U2 pin 5, if R2 were absent, would be V(V1) x R1/(Rcell + R1) = 6V. If Trim 1 were set half-way, U2 pin 4 would also be 6V, so U2 would be at the trip point. However, the slightest variation in the voltage at pin 4 or pin 5 would cause U2 to dither, so it is advisable to add some 'hysteresis' to the circuit by use of R2 which provides positive feedback to pin 5 to give a snap action to the comparator. The value of R2 determines how much hysteresis there is. Usually only a small amount is needed, so R2 is made several times higher than the parallel combination of Rcell and R1. Since Rcell = R1 = 56k, that combination = 28k. Here, R2 is 270k. That means the fraction of the U2 output voltage fed back to pin 5 is 28k/(270k + 28k) = about 10%. That feedback changes the old single trip point to two trip points; an upper one about 10% above the old one and a lower one about 10% below the old one, giving 20% hysteresis. Trim1 needs to be adjusted to suit the new trip points. Increase R2 if you want less hysteresis: decrease it if you want more.
 

Thread Starter

fredric58

Joined Nov 28, 2014
252
mk = bad eyesight
the printing industry does it, 1 M = 1000, a 1M with slash through the M = 500. go figure....beats me!

I am practicing with 9Vcc

At sunrise the photocell has a resistance of 30K with R1 56K = 5.86 V on the variable input at the time I want the unit to turn off.
At dusk the photocell has a resistance of 5M with R1 56K = .09 V on the variable input when I want it to turn on.

At 12 Vcc: 7.82V
.13V

Now... I have (2) reference points and there is quite a bit of difference between them and you only mention one. So first off, I THINK I will need to make a compromise? By that I mean I only get one specific light intensity. for example, say the sun down goes 5-4-3-2-1, and in the morning it goes backwards, 1-2-3-4-5. So say I pick 3.....sun goes down....5......4......... hits 3 BOOM-ON, stays on all night, sun goes up......1.........2..... hits 3, BOOM-OFF , If I choose 5, it would turn on earlier and it would turn off later. That make sense?

So your 56K was a great choice. I understand Rcell when at 56K and R1 @56K = 6v. also the trim to 50% =6v. I understand the feedback. But not quite the parallel combination, Rcell = R1 = 56K = 1/2 How/why is that determined? OK the rcell and R1 are in series in the schematic, correct? I took 2 56K resistors and measured them in parallel, guess what, they equal 28k.

why in parallel?, is that a law, pertain to comparators or just something you know?
R2 is 270, I guessed and took the 28k x 10 = 280k added 28k, did the math and came out with 9% as you said if it is increased, but I don't know WHY/ how you got to 270 in the first place. arbitrary? just plug numbers in till you find what you want?
 

Alec_t

Joined Sep 17, 2013
14,280
why in parallel?
Because current flow through R2 affects the current in both Rcell and R1.
I don't know WHY/ how you got to 270 in the first place. arbitrary?
I assumed an arbitrary hysteresis of 20%. So that's a shift of 10% above 6V and 10% below 6V. A 10% shift implies a feedback resistance about 10 times the source resistance. 10 x 28k = 280k. Nearest standard value is 270k. I'm glad you did the maths and confirmed 9%.
 

Thread Starter

fredric58

Joined Nov 28, 2014
252
OK, I finished the circuit. connected a 9v bat to it cause it's just there. 9v in-9v out, twist the pot same, cover the photocell same +- a 1/10 of a volt. what should I try next?

I have seen pnp's, arrow going toward the base, and sometimes people put them upside down. does it matter. the base emitter and collector are still the same?
 

Thread Starter

fredric58

Joined Nov 28, 2014
252
I didn't make it work today, but I sure as hell learned ALOT! I really do appreciate you taking time to tutor. Thank you. when I am done.....I will be able to tell someone everything they need to know to build one of these. and WHY it does what it does..... I didn't fail. I simply discovered that "this way" doesn't quite work. It's 5 o'clock here!
 
Top