Don't have an account? Register now to chat, post, use our tools, and much more.
Online Users
There are 141 users online: 13 members, 104 guests and 24 bots.
Members: 16aroth6, Ashbad, blue_bear_94, critor, rfdave, roblabla, Xeda112358.
Bots: MSN/Bing (1), Magpie Crawler (5), Yahoo! Slurp (1), Googlebot (16), MSN/Bing (1).
SAX
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
benryves

Cemetech Expert

Joined: 12 Aug 2008
Posts: 1357
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.
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?
benryves

Cemetech Expert

Joined: 12 Aug 2008
Posts: 1357
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.
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
benryves

Cemetech Expert

Joined: 12 Aug 2008
Posts: 1357
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!
aeTIos

Power User

Joined: 02 Nov 2010
Posts: 491

 Posted: 01 Jun 2012 10:47:58 am    Post subject: Yep, it does. Thanks! 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 EDIT2: Will this circuit work for a simple light/dark detector?
benryves

Cemetech Expert

Joined: 12 Aug 2008
Posts: 1357
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
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 (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?
benryves

Cemetech Expert

Joined: 12 Aug 2008
Posts: 1357
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).
aeTIos

Power User

Joined: 02 Nov 2010
Posts: 491

 Posted: 02 Jun 2012 09:51:24 am    Post subject: Ah ok. 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)
benryves

Cemetech Expert

Joined: 12 Aug 2008
Posts: 1357
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).
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 and the LDR of my choice is 5k-500k - What kind of var res would I need to pick?
benryves

Cemetech Expert

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

 Posted: 02 Jun 2012 09:59:42 am    Post subject: I suggest you read this page. (The formula is in there).
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 Edit: turns out I need a 50k varres Edit2: Does this mean i need a 50kΩ variable resistor or is just a 50k resistor OK?
benryves

Cemetech Expert

Joined: 12 Aug 2008
Posts: 1357
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).
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)
KermMartian

Joined: 14 Mar 2005
Posts: 55732
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.
_________________

aeTIos

Power User

Joined: 02 Nov 2010
Posts: 491

 Posted: 02 Jun 2012 12:14:06 pm    Post subject: Aha, thanks.
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
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.

»
 Page 1 of 1 » All times are GMT - 5 Hours

 Jump to: Select a forum Announcements----------------Cemetech AnnouncementsCemetech LabsContests General Discussion----------------Technology & Calculator Open Topic-- Electronics/Hardware Development-- Calculator HardwareYour ProjectsGeneral Open Topic-- Politics & Rants-- Reviews-- Humour/Jokes Cemetech's Projects----------------Doors CSSourceCoderMember Features-- TI-Freak8x-- Merthsoft-- GrammerOther & Upcoming Projects-- The BASIC Elite-- mobileTunes-- CALCnet 2.2-- SuggestionsProgramming the TI-83 Plus/TI-84 PlusUsing the TI-83 Plus/TI-84 PlusWebsite Programming & Design----------------General Programmingz80 AssemblyTI-BASICCasio Prizm/FX Development & ProgrammingWebsite Markup & ScriptingGraphics1337 Programming Tips Building with Blocks----------------FreeBuild, LEGO, and Minecraft-- FreeBuild General-- Suggestions & Troubleshooting-- Content & Gallery-- Servers & Activities
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.034120 seconds.