Help: Basic Electronics
Dec. 13th, 2006 08:47 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
This wound up getting sketched out on my whiteboard at work, but it seems simple enough to me that I can build it on a breadboard. I assume some of you fine readers have basic electronics clue, maybe even to the point of having actually applied your 6.002 knowledge recently. So, if you wouldn't mind reviewing the following and telling me if it makes sense...

V1 is 12V, V2 is 5V, but that's not terribly relevant. The idea is that if the switch S1 is closed, then the motor M1 will draw current through the transistors Q1 and Q2, with how much being determined by resistors R1 and R2. If current is flowing through Q1, then it's also flowing through the optoisolator, lighting the LED.
(Original version here; current flowing through Q1 also pulls current through Q3, and thence the relay, lighting the LED..)
Does the basic idea make sense? I assume that then I can put arbitrary digital junk on the right-hand side of the relay. I think I have my transistors in the right direction too. I can figure out actual values for parts later.
Edit: [14 Dec 2006] Updated schematic after commentary from
nonnihil.

V1 is 12V, V2 is 5V, but that's not terribly relevant. The idea is that if the switch S1 is closed, then the motor M1 will draw current through the transistors Q1 and Q2, with how much being determined by resistors R1 and R2. If current is flowing through Q1, then it's also flowing through the optoisolator, lighting the LED.
(Original version here; current flowing through Q1 also pulls current through Q3, and thence the relay, lighting the LED..)
Does the basic idea make sense? I assume that then I can put arbitrary digital junk on the right-hand side of the relay. I think I have my transistors in the right direction too. I can figure out actual values for parts later.
Edit: [14 Dec 2006] Updated schematic after commentary from
![[livejournal.com profile]](https://www.dreamwidth.org/img/external/lj-userinfo.gif)
no subject
Date: 2006-12-15 06:53 am (UTC)no subject
Date: 2006-12-15 11:38 am (UTC)The other exciting detail here is that I might not want variable-voltage DC across M1; there's an alternate standard where I can use +/-12V to send digital signals. That simplifies one aspect of this (I can send "don't move" across the tracks and still detect block occpancy, where now no voltage implies no current implies no detection). It complicates one aspect (the train can respond to the controller by manipulating its current draw). I can buy a DCC system off-the-shelf, but it's pricey, nice ones are overkill for the layout I have, and it still doesn't do signals.