I want to use a mini usb jack to power my device off board, but I want to make sure that the usb power coming in is not any higher than the 5V. I've read a bit about polyfuses but I am unsure if they would be useful for this scenario. Thanks!

  • Arduinos can handle a wide variety of voltages. The main reason to keep it below about 7 is simply to reduce heat stress on the on-board regulator. Putting the voltage in via the Vin pin bypasses the regulator, though. Using the mini USB will definitely limit the current the unit can draw for driving output pins.
    – SDsolar
    Commented Feb 27, 2017 at 17:27
  • you can use an LM7805 or an AMS117 LDO@5v to snub any excess voltage. It might "warble" at ~5v, but it will stop higher voltages dead in their tracks.
    – dandavis
    Commented Feb 27, 2017 at 19:14
  • @SDsolar below 7V? Well, according to the datasheet on Vin pin you should give voltages ABOVE 7V (otherwise the regulator cannot work properly) or give it exactly 5V on the +5V pin (bypassing the regulator). No other ways...
    – frarugi87
    Commented Feb 28, 2017 at 7:42
  • @dandavis LM7805 has a dropout voltage of around 2V, so if you power it with 5V you will get 3V on its output. The AMS1117 (not AMS117) has a lower dropout, but it's still greater than 1V, thus giving you at most 4V
    – frarugi87
    Commented Feb 28, 2017 at 7:45
  • Below 7v for the normal barrel-style plug which goes through the regulator. Vin goes directly into the circuit and can handle 12 Volts.
    – SDsolar
    Commented Feb 28, 2017 at 20:28

2 Answers 2


A polyfuse will limit current not voltage.

There are transient protection diodes which switch on if voltage exceeds a given level, which are often used in conjunction with a polyfuse. The diodes cause excessive current to flow, effectively turning on the polyfuse for extended overload, or just absorbing shorter transients. The Raspberry Pi uses a SMBJ5.0A device to suppress transients.

You should NOT need any of this if you use a reasonable power supply.

  • What is the recommended way of adding reverse polarity protection to surge protection in such a circuit ?
    – 6v6gt
    Commented Feb 27, 2017 at 9:11
  • Raspberry Pi is different from Arduino. The specs say to never put in more than about 5.5 Volts. Since power supplies are widely available for Rpi boards, it should be easy to find one that is regulated enough. The Pi itself doesn't draw all that much power, but the more USB devices you plug into it will increase the current requirements. Total current for all 4 USB ports should not exceed 1.5 Amps. If you are running an external hard drive it is best if it has its own power supply.
    – SDsolar
    Commented Feb 27, 2017 at 17:32
  • The easiest way to ensure polarity protection is with a full-wave rectifier. 4 diodes. The only negative is that each diode would have some voltage drop. So in my case I use approved power supplies that can only be plugged in one way. But if you want to build a full-wave rectifier, here is what they look like: google.com/…:
    – SDsolar
    Commented Feb 28, 2017 at 6:43
  • @SDsolar. Thanks. I don't want to incur a voltage drop because the USB supply should already be 5volts, regulated, with the correct polarity and the circuit design will assume that, but also protect itself in the case that it isn't the case, or there is a voltage spike (lightning strike in the electricity distribution network etc.). I guess I use the series polyfuse, the tvs diode across the supply after the polyfuse and say a 1N4007 normal diode reversed also across the supply after the poly fuse.
    – 6v6gt
    Commented Feb 28, 2017 at 9:33
  • You hit the nail on the head. That's why I just use regulated power supplies with the micro-USB plug that enforces polarity physically.
    – SDsolar
    Commented Feb 28, 2017 at 20:30

I second Milliways answer:

You should NOT need any of this if you use a reasonable power supply.

Anyway, if you really have a crappy power supply you can use one of the modules you find on ebay (for instance this is the first result I came across). Be sure to look for "buck boost" modules (step up/down), because they can both raise and lower the voltage.

This will do the job your power supply is not able to do, so to give you a stable voltage. You can then also vary the voltage without worrying (they usually are able to handle 4V (e.g. lithium batteries), 7.2V (e.g. 2 lithium batteries), 12V, ...

If you want also reverse protection, I suggest you to simply put a diode in series with THE INPUT (anode on the positive of your power supply, cathode on the IN+ terminal of this regulator). This way the voltage drop will be absorbed by the regulator. You can use a cheap 1N4007 or even a Schottky diode (which have less drop -> better power consumption).

I discourage you from using a full wave rectifier, since the diodes on the ground will change the ground reference (and so if you connect something else you may experience problems).

You can find a lot of "buck/boost" modules out there, just check that the input and output voltages and currents are suitable for your project.

But again, unless your power supply is really crappy you won't need this. If you just need an inversion protection, you can also use a circuit I found on a PC : put a fuse (they used a real fuse, you can use a polyfuse) between the power positive input and the circuit positive, then add a diode with the anode to ground and the cathode to the circuit positive. If you attach it correctly the diode will be reverse polarized and the circuit will work correctly, if you attach it in reverse the diode will conduct and so will create a large current which will trip the fuse.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.