OK all, after a little break over the holidays and stuff, I started in on this project again. I took a look at the schematic Ron H posted and while I sincerely appreciate the effort, I have a feeling the resulting circuit would be pretty large indeed. I'm trying to make this fit in as small a package as humanly possible - something like 1" by 2". As to using a servo's electronics; I suppose I could, but most are surface mount components and I don't have the tools to work with them. So, after a little planning, I came up with the simple schematic shown below:
**broken link removed**
As you can see, the waverforms at various stages have been drawn in. They aren't exactly to scale, but that's what they look like. I drew lines from the input waveform so that the others will fall in line.
Anyway, this works quite well actually. There are a couple things that are bothering me though.
1: The reference voltage on comparator U2 is
very critical. Any more or less than 5.3v totally screws up the output. This worries me because of drift and tolerances in components from heat or whatever. Unfortunately, if you look at the waveform on C1, you can see why it has to be so precise.
2: The circuit works well... until Vcc drops/rises to a value below/above the nominal 6.2vDC. I'm using a NiMH battery pack (5 cells of 2/3AA size, 1100mAh capacity) and it's output will drop as servos are used and as the charge level changes. I thought about using a 5v regulator to keep Vcc below whatever the batteries voltage might be under load, but that isn't too elegant in my opinion and the TO220 package is kinda big which would bloat the circuit's size. Plus, I don't have any 5v or LM317T's laying around (unless someone would like to trade a few for about twenty LM7912 regulators I have for some reason).
I'm still not quite done as I have to take the output of U2 (which has exactly what I was looking for) and convert it to variable DC, then feed it to the output comparator/current amplifier circuit, but that's the easy part. I don't want to go further until I can take care of my concerns first.
I like my design as it would be very small, but I'm at a loss right now. And to add insult to injury, I accidentally stumbled across the very thing I was looking for online - the "Opto Isolated E-Switch" (
https://www.emsjomar.com/SearchResult.aspx?CategoryID=6 2nd item down). But even that one is kinda big and I want to finish this for the principle of the thing! Besides, you can somewhat see the circuit they used and it doesn't look that complex. However, if I can't get my project to work like I want, I'll just break down and with head hanging low in defeat, go buy theirs.