[personal profile] dmaze
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 [livejournal.com profile] nonnihil.

Date: 2006-12-14 03:18 am (UTC)
From: [identity profile] rjpb.livejournal.com
My electronics clue is too rusty to confirm this works, but I have to ask: Is this for driving model trains? :)

Date: 2006-12-14 12:46 pm (UTC)
From: [identity profile] nonnihil.livejournal.com
Been a long time since I've looked over this sort of thing, so take this with a grain of salt.

First off, you're using PNP transistors, which IIRC are generally a bit less efficient than NPN and require more current in cutoff. Consider switching to NPN.

It looks generally workable to me, although I wonder a bit about having two large, different inductances (the motor and the relay) there. It seems like a recipe for sparking at the switch and possible a bit of weird motor jerking. You might consider a largeish capacitor somewhere in the general vicinity of M1/Q2/U1. Shorting M1 with a capacitor will reduce sparking, while shorting Q2 with a capacitor might also reduce the chance that motor load jitter burns out Q2. Or just get a really huge Q2.

Oh, and a fuse. Always a fuse for anything driving a motor.

Date: 2006-12-15 06:53 am (UTC)
From: [identity profile] iabervon.livejournal.com
What's the left side that you already have? It seems to me like the right general strategy is to put a resistor between the ground track and ground (instead of having them connected directly), and do a thresholded voltage measurement across that resistor. If you can get an appropriate mosfet (so that its min V_GS * the range of currents you want to supply isn't too big a fraction of 12 V), it should work with a pullup resistor to produce your desired signal for a high-impedence input (so not an LED directly, but logic driving one). Or measure it with an analog comparator; ICs are cheap these days.
Page generated May. 26th, 2025 04:46 am
Powered by Dreamwidth Studios