CEMETECH
Leading The Way To The Future
Login [Register]
Username:
Password:
Autologin:

Don't have an account? Register now to chat, post, use our tools, and much more.
Latest Headlines
Online Users
There are 110 users online: 4 members, 73 guests and 33 bots.
Members: CalebHansberry, flyingfisch, gbl08ma, LuxenD.
Bots: VoilaBot (1), Spinn3r (2), MSN/Bing (1), Magpie Crawler (4), VoilaBot (4), Googlebot (21).
RSS & Social Media
SAX
You must log in to view the SAX chat widget
Author Message
aeTIos


Power User


Joined: 02 Nov 2010
Posts: 491

Posted: 01 Jun 2012 05:21:55 am    Post subject: aeTIos's generic electronics-related question thread

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.


Last edited by aeTIos on 01 Jun 2012 12:59:25 pm; edited 1 time in total
Back to top
benryves


Cemetech Expert


Joined: 12 Aug 2008
Posts: 1358
Location: London, United Kingdom

Posted: 01 Jun 2012 10:02:31 am    Post subject:

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.
Back to top
aeTIos


Power User


Joined: 02 Nov 2010
Posts: 491

Posted: 01 Jun 2012 10:14:36 am    Post subject:

but ehm, don't you still have the conflicting between the set and the reset?
Back to top
benryves


Cemetech Expert


Joined: 12 Aug 2008
Posts: 1358
Location: London, United Kingdom

Posted: 01 Jun 2012 10:31:02 am    Post subject:

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.
Back to top
aeTIos


Power User


Joined: 02 Nov 2010
Posts: 491

Posted: 01 Jun 2012 10:44:22 am    Post subject:

Hmm, but the flipflop won't be broken? I was actually assuming that. Thanks Smile
Back to top
benryves


Cemetech Expert


Joined: 12 Aug 2008
Posts: 1358
Location: London, United Kingdom

Posted: 01 Jun 2012 10:47:25 am    Post subject:

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!
Back to top
aeTIos


Power User


Joined: 02 Nov 2010
Posts: 491

Posted: 01 Jun 2012 10:47:58 am    Post subject:

Yep, it does. Thanks! Very Happy
Edit:
I found out that quite some components use I²C 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?
Back to top
benryves


Cemetech Expert


Joined: 12 Aug 2008
Posts: 1358
Location: London, United Kingdom

Posted: 02 Jun 2012 09:27:27 am    Post subject:

Wikipedia on I²C. Note that due to slight trademark concerns some devices will support I²C but not actually call it I²C (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.


Last edited by benryves on 02 Jun 2012 09:31:44 am; edited 1 time in total
Back to top
aeTIos


Power User


Joined: 02 Nov 2010
Posts: 491

Posted: 02 Jun 2012 09:29:18 am    Post subject:

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?
Back to top
benryves


Cemetech Expert


Joined: 12 Aug 2008
Posts: 1358
Location: London, United Kingdom

Posted: 02 Jun 2012 09:44:14 am    Post subject:

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).
Back to top
aeTIos


Power User


Joined: 02 Nov 2010
Posts: 491

Posted: 02 Jun 2012 09:51:24 am    Post subject:

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)
Back to top
benryves


Cemetech Expert


Joined: 12 Aug 2008
Posts: 1358
Location: London, United Kingdom

Posted: 02 Jun 2012 09:55:36 am    Post subject:

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).
Back to top
aeTIos


Power User


Joined: 02 Nov 2010
Posts: 491

Posted: 02 Jun 2012 09:58:18 am    Post subject:

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?
Back to top
benryves


Cemetech Expert


Joined: 12 Aug 2008
Posts: 1358
Location: London, United Kingdom

Posted: 02 Jun 2012 09:59:42 am    Post subject:

I suggest you read this page. Wink (The formula is in there).
Back to top
aeTIos


Power User


Joined: 02 Nov 2010
Posts: 491

Posted: 02 Jun 2012 10:01:44 am    Post subject:

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?
Back to top
benryves


Cemetech Expert


Joined: 12 Aug 2008
Posts: 1358
Location: London, United Kingdom

Posted: 02 Jun 2012 10:14:36 am    Post subject:

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).
Back to top
aeTIos


Power User


Joined: 02 Nov 2010
Posts: 491

Posted: 02 Jun 2012 11:58:21 am    Post subject:

But I don't really get it. Do I need to manually adjust the rheostat or is the resistance getting lower (for some reason)
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55742
Location: Earth, Sol, Milky Way

Posted: 02 Jun 2012 12:13:33 pm    Post subject:

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.
_________________


Back to top
aeTIos


Power User


Joined: 02 Nov 2010
Posts: 491

Posted: 02 Jun 2012 12:14:06 pm    Post subject:

Aha, thanks.
Back to top
Display posts from previous:   
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
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are GMT - 5 Hours

 
Jump to:  
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

© Copyright 2000-2013 Cemetech & Kerm Martian :: Page Execution Time: 0.034864 seconds.