|A small configurable electronic circuit breaker that can be placed between your laptop or USB power supply and anything you happen to be working on.|
The idea is to use an ACS712 allegra current sensing module (thank you to whoever put them in the vending machine!) to keep an eye on the current drawn by anything connected to a USB port or USB power supply, and to break the circuit when whatever you're working on draws a little more juice than you expected/wanted it to. It's a circuit breaker, hence the name of the project. It is mostly meant for when you're working with an Arduino, ESP8266 or other micro, and any additional (breadboarded) circuitry that's attached, but of course it could also be used when you're working on some analog stuff and want to use a convenient USB supply for powering it.
You could just use a current-limiting lab power supply, but they tend to be rather cumbersome, and this design includes the whiz-bang option of feeding data through it. That means you can power the target, upload your program to the micro, monitor current draw and presumably (hopefully?) protect both your USB port and target circuit from emitting unwanted smoke, all at the same time and with just one extra device.
By the way, it's meant for RevSpace, so if you have any ideas, or a burning desire for some extra functionality that I have not envisaged, let me know and I will see what I can do.
This project will include a micro USB input, a relay or MOSFET for switching the positive rail, an ACS712 current sensor and a normal USB female connector for plugging in your target circuit. The display consists of twelve LEDs, six of which displaying actual current consumption, and the remaining six displaying current trip point of the breaker. Due to the relative inaccuracy of the ACS712 module, the trip point can only be selected from six pre-programmed values. Why six? I don't know what to tell you, but it's six. Anyway, the ranges will fall somewhere between 100mA and 1A or 1.5A.
The unit will include a pot for selecting current trip point, as well as a reset button and a trip button. I may add a linear regulator and output both 3.3v and 5v to some banana connectors on the side, also feeding from the current sensed supply.
Why not just use a current sense resistor? The Allegra sensor has very little internal resistance (1.2 mΩ), so there will be no appreciable voltage drop across the breaker, and it is easier to implement.
I haven't decided on the details of the circuit. Depending on the stability of the ACS712, I may change the filter capacitor on the module as per the datasheet. This will give you reduced noise and hence accuracy, in exchange for a decreased rise time of the sensor output. The whole point of this project is to disconnect the load before it is rendered extra crispy, so there will have to be some experimenting to see what the best trade-off is. The output of the ACS712 will feed into the A/D of an arduino, which in turn controls the LEDs, reads out the control pot and switches the relay or mosfet. I'm working on the sketch now.
The case is a small ancient aluminium project box rescued from the recycling bin. I just need to find some screws to put it together, but the holes for the connectors, buttons and leds are drilled, and the proto-pcb is mounted.
UPDATE: I decided to ditch the Arduino and build it with a PIC18F25K22 I had lying around. It has a highly configurable 10bit ADC on board (with many analog reference voltage options) that should make it simpler to get the most out of the allegra sensor. I also salvaged a small and spectacularly annoying alarm buzzer (cmb-06) from an old elevator control board out of the junk pile. It will do nicely.