I am back on the train control for a few days. I explained these PCBs awhile back in these posts (post 1, post 2, post 3 and others). I have installed one and have done some testing on it. These replace the existing ones I had built many years ago.
The major difference between the new design and the old design was how the relay(solenoid) driving circuit was controlled. The driving circuit is a N Channel MOSFET with a DIODE for back EMF protection. One side of the solenoid is connected to the positive voltage generated from the transformer accessory voltage (simple full wave rectification of the AC signal with lots of capacitance to make it as close to DC as possible). The other side is connected to the driving circuit which grounds this side of the solenoid, thus activating the solenoid. In the original design by Marklin, they used NMOS transistor. Because NMOS has a relatively high Rds ON, this required TO-220 type package to dissipate the heat. I am using MOSFET with an Rds ON in the 100's of mOhms. Thus a SOT-23 package works fine. When I first did this, I set up a test where a switched a track every 5 seconds for several days. The MOSFET never got warm. That convinced me that this would work.
The original design had 32 driving circuits. Therefore I needed 32 GPIOs, just to do this. There was an I/O expander from Microchip, but then it was only 8 bits. That would have meant I would need four of them. In those days PCB fabrication was a more expensive than today, thus I looked for a smaller footprint solution. I found a PIC16F1526 in a 64 pin QFP. Thus I used this as the IO expander with SPI interface from the main PIC18F47J53. The new design was driven by parts availability as I described in the earlier posts. This led to 3 16 bit I/O expanders. This is the main difference.
The I/O expanders were OPEN DRAIN outputs, which meant when they were on, they needed to be pulled up to drive the gate on the MOSFET. This afforded an opportuinty to push the gate beyond 3.3VDC and thus drive the MOSFET further into saturation. lowering the Rds ON.
The new design uses a single MOSFET to provide a bias as shown in post 1 above. That works for the schematic shown. But when you put 40 driving circuits in parallel (new design has 40 solenoid circuits), things change. Normally all the outputs of the I/O Expander are at ground. Only when driving the solenoid for the several hundred milliseconds does the output tri-state and the bias control pulls it up to 5VDC. Thus what you have is forty 10K resistors in parallel to ground that is then in series with the 1K pullup resistor on the MOSFET DRAIN, which at this time the MOSFET is off and the DRAIN is floating.
Going back to circuit theory, the forty 10K resistors form an equivalent circuit of a 250 ohm resistor. Then the voltage divider shows that the bias point is actually at 1VDC not 5VDC. Activating a driving circuit has minimal impact on these calculations as 39 resistors in parallel only rise a few ohms.
In an ideal world, the 1K series resistor should be 10 ohms. That would change the bias point to 4.88 VDC. But if the MOSFET controlling the bias point should turn on, then 500mA will flow and the resistor would have to dissipate 2.5W. Not possible with a SMT0603 resistor. So I put two 120ohm resistors in parallel, which moved the bias point to 4VDC and the total power dissipation to 416mW or about 200mW in each resistor. Not to specification, but much better than 2.5W.
So the question in my mind is what, if anything, did I do to the one PCB that is installed in the layout. It seems to work. There is nothing in my notes about changing the series resistor. Once I get something installed, I am going to have to pull that one and see what I did.
No comments:
Post a Comment