Over-current Protection Circuit

Post Reply
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Over-current Protection Circuit

Post by TerryJC »

Below is the first draft of the circuit for the Over-current Protection module which will ultimately sit on top of the Motor Drive Board. I would welcome comments on this.

Overcurrent_Protection.png
Overcurrent_Protection.png (83.26 KiB) Viewed 451 times

The top half of the circuit is straightfoward. The incoming power from the 15 V PSU Brick is routed through a 0.1 R resistor to generate a differential voltage to the Sense terminals on the ZXCT1107 Sense Amplifier IC. The maximum current that can be tolerated by the Motor Drive Board is 2 A, so I have selected 5 k Ohm for the value of R Gain as that is the probable value needed at the ideal maximum current of 1.5 A. This calculation is a bit hit and miss because it depends on the exact threshold of the 76HC00 to trigger the NAND gate inputs.

Once the threshold has passed, the three left-hand NAND gates will behave as an AND Gate with an inverter on its input and therefore enable the PWM only if the current has not exceeded the limit. The right hand pair of NAND Gates will latch the event; the LED will glow and the PWM will be permanently disabled.

Penri,

Could you check this for me? I was hoping to realise the whole thing in a single NAND chip, but unfortunately I've only been able to do it with five gates. Also. I'm not 100% sure about my solution to latch the PWM off once the threshold has passed.
Terry
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Over-current Protection Circuit

Post by TerryJC »

I just realised that I got the polarity of the LED wrong. That'll be fixed in the next version.
Terry
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Over-current Protection Circuit

Post by TerryJC »

Also just realised that my Latch circuit is completely wrong in that the Q and /Q outputs should not be connected together.

I'll sleep on this and do Version 2 tomorrow.
Terry
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Over-current Protection Circuit

Post by TerryJC »

I realised overnight that my original circuit was over complicated and have produced a new Version below.

Overcurrent_Protection.png
Overcurrent_Protection.png (83.77 KiB) Viewed 447 times

In this version the latch does its work and then gates the PWM accordingly:
  1. At startup the capacitor to 3.3 V momentarily puts a 1 onto the R input to the latch and sets Q to 1 and /Q to 0.
  2. The LED is unlit and the PWM on the input NAND is enabled by the 1 on input B.
  3. If an over-current occurs, then the latch flips, putting a 1 on the /Q and a 0 on Q.
  4. The LED Illuminates and input B of the NAND is 0. This puts a 1 on the NAND O/P and a 0 at the Inverter O/P, so no PWM.
While I was doing this I remembered why logic circuits always made me confused, so comments are welcome. :D
Terry
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Over-current Protection Circuit

Post by TerryJC »

After extensive off line discussions with Penri, here is the latest version of the circuit:

Underground_Railway_Circuit(V0.9).png
Underground_Railway_Circuit(V0.9).png (101.42 KiB) Viewed 425 times

Penri,

If you feel that I've missed something, please let me know.

Today I intend to build the circuit on Veroboard designed to be mounted as a mezzanine over the existing Veroboard. I had to abandon all thoughts of mounting it on top of the Motor Drive Board because there was insufficient real estate and the new board would interfere with connections to the Pi. The proposed location is still less than ideal because it will interfere with access to the Terminals, but it should be fairly easy to remove the screws and move it to one side when needed.
Terry
Penri
Posts: 1284
Joined: 18/05/2017, 21:28

Re: Over-current Protection Circuit

Post by Penri »

Terry

This looks good to me.

You haven't suggested a value for the power up reset capacitor (connected to R of the FlipFlop).

I think this should be between 100nF and 2.2uF, why?

At power-up with the +15V demand current below max. the circuit will always power up with /Q high, which is what we want.
At power-up with the +15V demand current above max. the circuit will power up with both Q and /Q high until the capacitor charges sufficiently to allow R to be high, /Q will than go low and the PWM o/p will be shut off.

The RC time constant has to be long enough for the circuit to settle and the FlipFlop forced into the required state but not too long as we don't want the PWM to be asserted over long in a fault condition.

Penri
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Over-current Protection Circuit

Post by TerryJC »

Penri,

Thanks for this; I was going to use 100 nF but I'll increase it if needed.

This **** tool had unsubscribed me again !!!

I've also reduced the resistor in the LED circuit to 120 Ohms. The LED illuminates with 1 k but it's a bit dim. 120 Ohms gives an on current of just under 10 mA, which is not too bright and not too dim.

Construction is proceeding in fits and starts but I'm hopeful that I can get the board built and tested today.
Terry
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Over-current Protection Circuit

Post by TerryJC »

Sitrep

It took me a while, but I managed to solder the ZXCT1107. It isn't easy because the body of the device is only 2.9 x 1.3 mm and the surface mount contacts are only 0.5 x 0.1 mm. The nozzle on the solder paste dispenser is about the same diameter as the contact and invariably too much is dispensed at a time. The trick is to get a tiny dot of the paste onto each pad of the carrier using a needle point and apply the soldering iron to one contact, ensuring that the device doesn't slide out of line. The rest of the contacts are then fairly straightforward.

I have a little more testing to do, but I've proved that the sense amp is working and a voltage proportional to the current appears across RGain. I have also soldered in all of the components except the startup capacitor; I have discovered that all my low value capacitors are less than 100 nF (eg 10 nF or less). A kit with values between 100 to 10000 nF is on order and should arrive tomorrow.
Terry
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Over-current Protection Circuit

Post by TerryJC »

Penri and I have had some off-line discussions about this circuit because the 2N3904 transistor was sucking current from the ZXCT1107 as it began to turn on. There was also an error in my calculations for the value of RGain (in the OUT circuit of the ZXCT1107).

As a result, we decided to substitute an N-Channel FET (a BS170) for the NPN bipolar transistor to ensure that the input impedance of the inverter circuit remains high throughout the range of currents through RShunt. In addition the threshold voltage of the BS170 is quite broad, so a 5 k trim pot has been used to allow the desired switching point to be reached. See below:

Over-current_Protection_Module.png
Over-current_Protection_Module.png (368.97 KiB) Viewed 384 times

The good news is that the voltage at the OUT terminal of the ZXCT1107 is linear as it should be, The bad news is that the BS170 does not switch as expected. When I measure the voltage on the drain of the BS170 it is 3.3 V, (as expected), when the current through the shunt is zero, but it gradually falls as the shunt current increases. I am seeing a similar effect on the 0 V line when measured at the bottom of the load WRT to the 0V line.

Clearly my test circuit leaves something to be desired. For one thing I am putting a fixed load onto the circuit at pins c and d and varying the current by changing the input voltage between 0 V and 12 V and more to obtain a maximum current of approximately 1.5 A. Secondly my load is made up of a number of high power loads connected in series and parallel to obtain the required resistance. Thirdly the whole thing is a bit of a Heath Robinson affair made up using sundry ceramic and wirewound resistors connected together with multiple croc-clip leads. I feel that I need to simplify this to see the wood for the trees.

So it's progress, but not as I'd hoped.
Terry
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Over-current Protection Circuit

Post by TerryJC »

This circuit is now working. The problem with the falling 3.3 V was down to my test setup as suspected. Once I had convinced myself that the FET and the NAND gates were behaving as they should I was able to do an end-to end test:
  1. A PWM signal was derived from a Function Generator and applied to pin f. This was observed on Channel A of the scope.
  2. The output at at pin g was monitored on Channel B of the scope and seen to be in phase with input.
  3. The current through the shunt was gradually increased until it reached approximately 1.4 to 1.5 A. At this point the PWM at pin g was cut off.
This board is now ready for integration into the main Interface Board. I will need to do some minor updates to the Interface wiring, which I will document in an updated Composite Document, once the modifications are complete.
Terry
Post Reply