Introduction: Small Current Circuit Breaker
I had an Arduino Nano fail due to over-voltage when I used a breadboard power supply to power my breadboard. The breadboard power supply used an AMS1117 linear regulator to reduce the 12V from the plug pack I was using, to provide the 5V needed by the Arduino and some other modules.
The AMS1117 failed (presumably due to overheating) and let almost the full voltage from the power supply through to the Nano and other modules. Fortunately the other modules survived. However I decided that I needed some protection against this happening again.
I tried a fuse and a 5.1V zener diode, which worked quite well but after accidentally blowing the fuse twice I realised that I needed a resettable circuit breaker, not a fuse. I looked on the internet for a suitable circuit breaker, but the lowest current rating I could find was 1.5 Amps, much too high for my requirements. So I decided to build something to do the job.
This Instructable is the result.
I learned several things along the way, and if was starting again today I would probably do it differently (see Alternatives in the last step).
Step 1: Circuit Breaker Specification
The main requirement was to have a trip current not too much higher than my breadboard circuit was using, and an easy way to reset it. I decided to aim for a trip current of 100 mA, and then added the ability to increase this in increments of about 100 mA, up to a maximum of about 1A. The precise trip current values were not critical.
I wanted an indication that the circuit breaker was operating normally, and another indicator to show that it had tripped.
I also added reverse connection protection (which is an ever present risk with breadboards).
Finally I added test points to allow a multimeter or other current meter to be connected to measure the actual current being passed to the load.
Step 2: Circuit Breaker Design
The reverse current protection is achieved by using a P-channel FET, IRF4905, with its Gate connected to ground (Q1). Since the working voltage is 12V, and even my unregulated 12V plug pack produces only 17 V with no load, the 20V Vgs rating of the IRF2905 is sufficient and there is no need for a zener diode and resistor as commonly specified.
The circuit uses a 0.1 Ohm resistor in series with the load current to provide a current dependent signal (R2 in the schematic). There is a voltage divider on each side of that resistor to bring the signal to a suitable DC level, and then a differential amplifier to amplify the difference and trigger the circuit breaker if the trigger voltage is exceeded.
The circuit breaker function is performed by a P-channel MOSFET, another IRF4905 (Q2).
There are two resistive dividers, one of them fixed on the supply side of R2 (R3 and R4). and another variable voltage divider on the load side of R2. This variable divider has 12 resistors in it (R5 to R15 and also the variable resistor RP1 (it is shown on the schematic without a label near the top left hand side).
The differential amplifier consists of an input stage using 2 N-channel FETs (2N7000, Q4 and Q5) and 2 NPN bipolar transistors (BC337, Q6 and Q7). They are followed by a final output P-channel FET (BS250, Q3) driving the gate of the IRF4905 Q2.
The differential amplifier has capacitors C1 to ground on the fixed side and C2 to the output on the variable side. C2 provides negative feedback. These capacitors damp the frequency response and prevent oscillation.
The differential amplifier also has a positive feedback path through resistor R24. As soon as the current in R2 approaches the trip current, the change in the output voltage drives the differential amplifier all the way to the opposite polarity. It will stay in this state until reset.
Reset is done with switch S3, which applies a Ground to the (approximate) mid point of the variable voltage divider, This is sufficient to overcome the effect of the positive feedback resistor R24 and, provided the current is not too large, the circuit breaker state will be ON.
The other feature of the design which can be seen in the schematic is the division of the implementation into two circuit boards. There is an upper board, which carries all of the "man machine interface" components - that is, the switches and LEDs. There is a lower board, which carries all of the other components - the transistors, capacitors and resistors. The two boards are connected together by two sets of headers - female on the lower board, male on the upper board.
Things to note:
1. I found that the P-channel MOSFET BS250 had different pinout than the one given in the data sheet.
2. I find the depiction of the IRF4905 in the schematic confusing as to the connection of Drain and Source. Q1 is connected with its Drain to the supply side and Source to the load side. Q2 is connected with its Source to the supply side and its Drain to the load side. The way the Gate is drawn in the Eagle library I used suggests it is the other way around. I tried to change it but failed.
Step 3: Breadboard Stage
The design evolved through several stages on the breadboard. I started with a diode for reverse polarity protection. Later I realised that a P-channel FET would be better.
I also started with a single differential stage using the FETs, but discovered it did not have enough gain, so I added the second stage.
I also had to fiddle around with the resistor chains to get the right DC operating point for the differential amplifier and the desired step size. Also I did not implement the full 8-stage switched resistive divider on the breadboard.
Step 4: Making the Upper Board and Box Lid
In the photos here you can see both sides of the upper board, and the lid of the box with the access holes for the LEDs, the potentiometer and the switches.
I am using a box which measures 98*58*24 mm and two prototype circuit boards 5 * 7 cm. The upper board is double sided, which allows the visible components to be mounted on top (soldered underneath) and the male headers to be mounted underneath (soldered on top).
First I positioned the empty double sided board against the lid, clamped it in the right spot and drilled 2mm holes for the mounting screws. I used an additional board the same size (5*7 cm) as a drilling template, with the same mounting hole positions.
Then I positioned each component on the template board, marked where the access hole had to be, and drilled pilot holes in the lid either in the corners (rectangular holes) or in the centre (round holes). For the large holes I then enlarged the pilot holes and cut between them with a coping saw; for the small ones I just enlarged them with a file. All the holes with finished with a file.
I found the 3mm LEDs needed a 3.5mm hole.
The header pins for the current metering points are 0.6mm wide. I first melted through the plastic with the pins soldered in position and heated with the soldering iron until the heated pin pushed through the plastic. I then used a drill 0.79 mm diameter to provide enough clearance to allow the pins to slip in and out (fairly) easily.
Step 5: Making the Lower Board
The components are positioned on the lower board in what I considered a logical order, soldered in place and wired together. The board ended up quite busy, but not excessively so.
Looking at the photo, the input side is on the right, output on the left (so it is the reverse of the schematic diagram).
Step 6: Checking the Final Circuit Boards Together
Having made both upper and lower boards, I wanted to check that the circuit worked. I needed to be able to put my multimeter and CRO probes on various leads. So I used a set of M-F rainbow cables to join the 2 boards together. The result looks a bit strange but enabled me to check out the circuit.
Step 7: Final Assembly
With the combined boards working, I put them together in the box.
It did not work!
So I took it apart, plugged it together, and it worked fine.
I went around this loop a few times. I discovered that the circuit breaker stopped working when I tightened the nut on the assembly screw near the top left corner (near the power outlet). What could it be? Eventually I found that the red LED that indicates that the breaker has tripped must have had a crack in its lead, AND when pushed hard into the lid, the hole was very slightly off centre and pushing the LED sideways. So I replaced the LED, and widened put it back in a slightly different position so that it was more accurately aligned with the hole - and problem solved.
The last step was to write some labels and stick them on the box, to help the user (mainly me) to operate the unit.
Step 8: Alternatives
The project took a bit longer than my original expectation. But that is true of many projects.
While designing, building and debugging, I realised that perhaps I could have had a better design. This one works fine for my needs at the moment. However I think that there are two improvements that could be made:
a) instead of the sense resistor and resistive divider network, I think it would be better to use a Hall effect current sensor (such as the ACS712-05.
b) instead of the differential amplifier made out of discrete components, I think it would be better to use an off-the-shelf operational amplifier, such as LM358.
With the current design, the trigger current level is proportional to the operating voltage. Using a Hall effect current sensor would remove this linkage and make the current level independent of operating voltage.
Using an Op Amp would reduce the number of components, and therefore the construction effort. I would have done it myself at the outset however I did not have a suitable op amp in my parts box, so I would have had to wait for a delivery.
We have a be nice policy.
Please be positive and constructive.