Originally Posted by gunrunnerjohn:
The opto for headlight input is because the headlight drive for TMCC boards is negative in respect to frame ground, so I needed to isolate it.
Well, that an input signal is "negative" with respect to a common reference does not mean you need to isolate it. It just means you need to adjust the biasing positive which can be done with a resistor. Isolation is generally used when you don't have a common or stable reference; but in this case it the frame ground IS a common and stable reference.
The transistor driving the cab lights may be called on to supply quite a bit of current, so I wanted to drive that one a bit harder. The same for the motor. On reflection, I could probably get away with 1K for those and drop the power 10ma and not incur any problems.
It appears you're using the 12F1601 INTOSC mode and you probably notice from that 300 pg datasheet that the PIC itself draws a miserly 2 mA at full speed. It just doesn't seem patriotic for the biasing components to draw more than 10 times the processor current For example, the IRLML2060 is about 15 cents at DigiKey. That's a 60V 1 Amp N-FET which would draw essentially 0 gate current. I don't know what constitutes "quite a bit of current" but I'd think it would be nice to eliminate the need for a heat-sink. I realize you're probably using some 5 cent NPN's so hard to second-guess your design. Perhaps if you have the board space you could insert a gate-to-ground resistor should you choose to go the N-FET route. You'll need this for the brief interval when the PIC starts before you set the I/O pins and the FET gate needs to be defined or else the motor/light will briefly turn on.
I had already changed the 330 to a 680 for the chuff output opto in my production schematic. Since I don't know the characteristics of what I'd be driving with that one, I figured to be on the safe side and have reasonable drive available, but I did decide that 330 was a bit much.
I am ignorant about TMCC interfaces but I was simply doing a back-of-envelope calculation. So at 330 driving a 1.2V LED from 5V, that's about 11 mA. Ouch! Even a "crummy" opto would have a CTR of 50% so the output transistor driving RS CHUFF (whatever that is) has 5 mA of trigger current. Presumably RS CHUFF is some digital input and shouldn't require 5 mA to reliably switch it. Or maybe it does. Anyway, 680 gets you down to 5.5 mA loading 5V which is still quite burdensome considering the PIC is drawing many times less than that running millions of instructions per sec!
Now that I have one built up with the real parts, I can change a couple of values and see what effect it has. Thanks for the suggestions Stan, you make some good points. Where were you before I built up the production one?
What made you think the video showed the regulator getting hot? That prototype has a larger regulator, and I didn't have an issue with that one.
Well, I don't follow the TMCC sub-forum but happened to see the video topic in the Recent Posts box on the right. In it you mentioned the regulator getting hot. So apparently you're using the plastic pkg in the production board and used a TO-3 in the photographed prototype board. I'm sure we both agree it would be nice to get by with a TO-92 for your production board without a heatsink.
BTW, I'm sure you realize that I'm only trying to help you reach the red zone and then the end zone. I don't use TMCC but I can see how this is quite a contribution you're making to the hobby!