How would I accomplish this?
Since this circuit does not work.

(the upper button is the set, the lower is the reset)
Edit: I am trying to block the R when S is high.
If you wish to change the logic so that when S is high the output is high, even if R is also high (which would otherwise be invalid) then connect an OR gate to S and the current output and use the output of that OR gate as the actual output.
but ehm, don't you still have the conflicting between the set and the reset?
The only way to prevent the conflict is to not set R and S at the same time. If you do, both Q and /Q end up being 0. From "I am trying to block the R when S is high" I assume you mean that when S is high (i.e. Q=1) you want to prevent R from setting the output to 0. You can do this by ORing the output of the flipflop (which would be 0) with S (which would be 1) to force an output of 1 when S is 1.

Wikipedia has more information if you need it.
Hmm, but the flipflop won't be broken? I was actually assuming that. Thanks Smile
Assume both R and S are 1. Each flip-flop is a NOR gate, which means that if at least one of its inputs is a 1 it will output a 0. Therefore the output of each NOR gate is 0. Each 0 is fed back into the opposite NOR gate, but as the NOR gates already have a 1 on the other input this doesn't make any difference.

I hope that makes sense!
Yep, it does. Thanks! Very Happy
Edit:
I found out that quite some components use IC for communicating. Could someone explain this protocol a bit and give a little schematic about how to interface with it? Thanks Very Happy

EDIT2:
Will this circuit work for a simple light/dark detector?
Wikipedia on IC. Note that due to slight trademark concerns some devices will support IC but not actually call it IC (for example, on an AVR it's called TWI for "Two Wire Interface").

Your circuit diagram is... interesting (I've never seen symbols like that before). This page on transistor circuits may provide some ideas, though if you're using a microcontroller then using an LDR to form a voltage divider and connecting the output of that into an analogue input may be easier.
A microcontroller is a bit... too expensive I guess Razz (I only want to illuminate my LEGO train with some LEDs)
Also I drew the circuit with Logisim
EDIT:

What is the 470Ω resistor for?
It's a current limiting resistor. Suppose you were powering the circuit from 9V; the LED incurs a voltage drop of 2V so there would be around 7V across that resistor. According to Ohm's law I=V/R, which would give us 7V/470R=15mA (roughly) through the resistor. As current flowing through a series circuit is the same at any point that also means 15mA is flowing through the LED, which is a bright (but not too bright) illumination.

As the resistance decreases the current increases, and eventually the LED will burn out. 470R is a fairly typical current limiting resistor value (as is 330R on circuits powered from 5V).
Ah ok. Smile
I guess this is good enough for illuminating my train, only need to buy some components and figure out how to place the LEDs.
Oh, also: Is a 5k LDR a 5kΩ resistor? (5k when illuminated)
LDRs will usually specify resistances as a range. You'll need to pick a variable resistor (to calibrate the circuit) according to the range of resistances offered by your LDR.

Note that the circuit will not switch on and off exactly - there'll be a region where it is partially on. If you want a sharp cut-off point you'll need to use a different circuit (using an op-amp as a comparator, for example).
No problem, I will only use the circuit when fully light and fully dark Smile
and the LDR of my choice is 5k-500k - What kind of var res would I need to pick?
I suggest you read this page. Wink (The formula is in there).
Sorry <_< I tend not to read very carefully Neutral
Edit: turns out I need a 50k varres Shock
Edit2: Does this mean i need a 50kΩ variable resistor or is just a 50k resistor OK?
You need a 50K variable resistor (though in practice this may end up being a 47K or similar). The other resistor is to protect the base of the transistor when the variable resistor is set to its lowest resistance, so just make sure it's at least a few K (too much current into the base of a transistor will pop it).
But I don't really get it. Do I need to manually adjust the rheostat or is the resistance getting lower (for some reason)
aeTIos wrote:
But I don't really get it. Do I need to manually adjust the rheostat or is the resistance getting lower (for some reason)
The manual adjustment is a sort of calibration for where you want the light-dark cutoff point to be, tolerances of the other resistors, characteristics of the particular transistor, etc.
Aha, thanks.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement