The Torpedo 2: a cheap and super powerful 3A DC/DC converter with built-in charger

By on July 7, 2017
Pin It


Some time ago we had introduced you to the Torpedo switching power supply, a particular kind of DC/DC power supply called SEPIC capable of supplying 5 V from several external supply sources, such as an external voltage between around 3.5 and 20 V, the 5 V coming from a USB connector or the 3 to 7 V supplied by a LiPo battery. The very small power supply also had a circuit capable of charging the battery up through external sources, where available.

The only real limit of Torpedo was the max output current of around 800 mA, which is enough to power small devices and/or prototyping boards like Arduino and Fishino with some onboard shields, but not, for instance, a Raspberry Pi, which requires a current of around 2 A.

By the way, another interesting application of this power supply have been pointed out to us, something we had not thought about: by connecting the input of Torpedo to a solar panel and equipping it with a LiPo battery, we have a virtually infinite power supply, which is very useful for instance in case of remote sensor where replacing batteries or connecting supply cables is very difficult. So this is a perfect Energy Harvesting solution.


Given the resounding success of our Torpedo and the need to have bigger currents, we thought about developing an updated and more performing model; and since we are here, we thought about equipping it with some other interesting additional features.

First of all, let’s take a look at the tech specs of Torpedo 2:

  • triple power source: USB, LiPo battery and an external source;
  • a wide range of input voltage values: 6,5 – 18 V;
  • can supply a maximum current of 3 A;
  • high efficiency, even over 85-90%;
  • built-in charger for LiPo single cells;
  • can switch from battery-powered to another source without interruption;
  • 5 V output with high stability when load varies and low ripple;
  • possibility to turn off the only output leaving the step-down converter and the charger active;
  • possibility to automatically deactivate the output if power supply comes from the USB connector which is limited to 500 mA current by the specs; if there is a battery, power supply is granted by that;
  • status LEDs indicating charge, the power supply used, output activation and so on.


Circuit diagram



Let’s start off by saying that, unlike the first version of Torpedo, this new one is not based on the SEPIC architecture for the converter, but we opted for a more common step-up + step-down couple. But why? The main reason is the automatic input source commutation. In the previous model, this took place before the converter using, for efficiency reasons, a MOSFET on the only battery line, in order to avoid voltage drop on a simpler diode circuit. Even the MOSFET shows a voltage drop, which however is not fixed but it depends on its internal resistance (Rdson) and the circulating current. In Torpedo, which is designed for a maximum output current of around 800 mA, the MOSFET current could be estimated with:



Which, considering the values in the circuit, would become:



It was a manageable value, although not negligible. In case of Torpedo 2, things are changing, since we want a maximum of 3 A for the output current, which brings the MOSFET currents to:



That would require a MOSFET characterized by an elevated drain current and low Rdson resistance. On the other hand, by increasing the battery voltage before the selection through a more common step-up converter, we can execute the commutation later, on the 5 V of the output and with a current of 3 A, by using a normal Schottky diode.

So, let’s start our description right from the step-up section used to increase voltage coming from the LiPo battery (protected by the F1 fuse) of 3.7 V up to the 5 V required. This stage is based on an IC by Texas, a TPS5530 with some interesting features, such as an integrated 5 A MOSFET, the possibility to adjust operating frequencies between 100 kHz and 1.2 MHz, a current limitation to protect from overcharges and a complete thermal protection.

The converter works in PWM mode, which frequency is fixed thanks to an external resistance on the FREQ pin; in our circuit, we chose to work on the higher spectrum of the range available, in order to limit dimensions of passive components (inductors and capacitors); work frequency can be obtained with:



With the value of 47 kΩ (R4) used we get a frequency of around 993 kHz, so almost 1 MHz.

The output voltage is regulated by comparing it to an internal reference of 1.229 V; a voltage divider is then used to take that value back to the FB input with the two precision resistances R9 and R10. With the selected values, we find:



Components connected to the COMP input (R5, C12 and C13) are used for compensating the feedback loop and ensure stability of the converter under any load condition.

C7 capacitor on the SS input is used to take advantage of the soft start features of the IC, which allows it to gradually start without unwanted current spikes when it is powered on.

As you can see from the circuit, the high commutation frequency allows to use quite small components, with a small 1.5 µH inductor and tiny, 22 µF ceramic capacitors which are connected in parallel in order to obtain a total of 66 µF with an extremely low ESR capable of providing an excellent voltage leveling on the output.

The last point about the step-up converter is the EN (enable) input that activates it when it is on level high, connected to the UPEN line of our circuit that we will analyze later on.

For a more detailed description of the switching converters functioning in general and step-ups in particular, please see the article in which we introduced Torpedo, published on issue #203.

Now, let’s take a look at the step-down converter used to lower the voltage coming from the input plug Vin through the F2 fuse, which can vary from 6.5 to 18 V (max).

We notice right away the D1 Schottky diode separating Vin line from Vin2 line; it is used to avoid a “return” of voltage found on Vin2 coming from other supply voltages, through the related regulators, up to the Vin input that is also used, as we’ll see later, for automatic source selection.

The converter is based on an IC from Maxim, a NCP3170B, capable of supplying a continuous output current of 3 A and operate at a frequency of around 1 MHz, once again allowing us to use extremely small components. Beware, the model you want to use is the one with the final “B”; the similar NCP3170A works at half the frequency (500 kHz) therefore is not suitable for the passive components we are employing.

In this IC, the control voltage is 0.8 V; we then the voltage divider made of the precision resistors R7 and R8, and using their values we have an output voltage equal to:




In this stage do we see the usual compensation network composed of R2 and C8 related to the COMP input that assures converter stability every under usage conditions.

The converter activation through the EN line (active on level high) is supplied by the VINVALID line that we will see later when discussing the control logics part.

As a final input stage, we see the stage coming from the USB port; the voltage, protected by the 750 mA F3 fuse, flows into VUSBIN line used by the commutation stage that we’ll see later. In order to avoid a return that would invalidate its functioning, we have used once again a Schottky diode (D6) before the commutation MOSFET Q2; this because the MOSFET integrates the usual diode to protect from polarity inversion that allows current to pass between drain and source, therefore the VOUT voltage “returns” on the inputs.

Unfortunately, the diode causes a voltage drop of around 300 mV, which is however negligible in terms of functioning and causes limited losses thanks to the small currents; in fact, let’s not forget that the USB line allows a maximum power absorption of 500 mA by the devices supplied. The commutation MOSFET is controlled by the USBEN line, which also comes from the logic stage we are going to see shortly.

If you’re wondering “how is it possible that a power supply designed to output 3 A use a USB port as a power source?” We can answer that this is possible thanks to a little trick, the USB input is – actually – used only when the current required is not over 500 mA (if correctly activated) or only to recharge the LiPo battery.

Under normal functioning conditions, when the output is activated, the USB source, in fact, is not activated and we switch to the first available one based on “convenience”, i.e. Vin if available or the LiPo battery through the converter.

Only if we are going to use the Torpedo t2o for currents of around 500 mA we’ll be able, thanks to a dedicated bridge, to activate its functioning through the USB line. This may seem a useless feature, but we wanted it in order to allow it to use Torpedo 2 also for small devices in a way similar to Torpedo, by making use of the USB power source.


Logic section

Before taking a look at the actual control section let’s analyze the small linear regulator NCP1117ST50; it is used to provide a low current (a few milliamps) power source for the logics section, and he has to supply it regardless of the power source available.

In order to do so, we are using a linear regulator on Vin2 line, and we take a possible voltage coming from the Vout output or the USB port through the Vusbin we have seen earlier, connected by a power OR gate composed by D2 and D3 diets. Of course, we don’t have high currencies and/or efficiency issues here, therefore the circuit is particularly simple.

Now, here we go with the actual logics section, which is a bit against the flow because it uses discrete components and not a microcontroller that we thought was wasted for this purpose.

As you can see from the scheme, we have used a first part, composed of 6 logic inverters grouped by 2, used for “cleaning up” signals coming from various power sources and the OUT ENABLE bridge, and to obtain the negated values necessary for the commutation logics.

The first 2 inverters work on the VUSBIN line, they control the USBLED LED showing the presence of a USB connection and provide the 2 signals USBVALID e USBVALID as output (one is direct and one is negated) which indicate the presence of a power supply on the USB port. R12 resistor prevents the input from fluctuating, bringing it to ground when the USB cable is disconnected.

The second two inverters work on VIN line, which is capable of reaching 18 V and therefore must be limited to values that can be accepted by the ICs (0-5 Volt), and this limitation takes place through the D5 diode that discharge a possible excess on the power source, and which current is limited by the R11 resistor.

The 3 resistances R11, R13 and R21 also make, combined with the inverters, a simple Schmitt trigger that “switches on” when the input voltage exceeds circa 6.5 V; this in order to avoid that a present voltage although insufficient (< 6 volt) is interpreted as a valid power source. Here, we also have a signal LED, VINLED, and the two phase-opposed outputs VINVALID and VINVALID, required for the next logics section.

A third couple of inverters is not connected to an input but to the OUTEN bridge, which is used to activate or deactivate the power supply output. It can be used, for instance, to insert a power switch that turns off connected devices but leaves the Torpedo on and capable of charging up a possible connected battery. Here, the signal LED can be deactivated through a bridge; it might be superfluous, but in the case of battery power source it allows to save a good 10 mA of consumption.

Now we come to the actual logics section, composed of 4 NAND gates and, in order to save an IC, 2 diode OR gates.



First of all, Let’s see the activation part of the step-up converter, the one related to the U5A and U5B ports and to the D9 and D10 diodes. The converter must be activated, of course, only when there is no alternative power supply voltage available and we want to activate the output. Therefore OUTEN must be at logic level high, VINVALID at level low and USBEN at level low, i.e. their negated values (VINVALID and USBEN) must be at level high. U5A port provides then a low output (UPEN) when OUTEN is high in VINVALID and USBEN are low (or better, when there negated values are high), and a high output in the opposite case. U5B port is used as a simple inverter to obtain the non-negated UPEN value. The LIPOLED LED, which can also be deactivated via a bridge, lights on when the step-up converter is on and when the battery is used as power source.

We can now move on to the second section, the one including the U5C and D7 and D8 diodes; these section’s functioning is quite complicated (as if the previous one was easy, some might say!) And it is used to commutate the USB port power supply. This, as we said when talking about the correlated input stage, must be limited to 500 mA, so in theory Torpedo 2 could not use it. For the same above-mentioned reasons though, we included the possibility to make an exception to that limit using the USBPROT bridge; by closing that, we briefly activate the USB lines’ “protection”, which deactivates it when output is activated, in order to avoid excessive absorption; if you are sure the user will consume more than 500 mA we can open the bridge thus obtaining a functioning which is similar to the previous Torpedo, therefore allowing the load to be powered also through the USB.

Let’s now get back to the circuit functioning, when the output is activated (OUTEN high, OUTEN low), if the USBPROT bridge is closed the USB power source is deactivated, while if the bridge is open the source is activated, provided that (USBVALID is high) and there is no (VINVALID low, or VINVALID).

Next, let’s take a look at the activation section for charging the battery, which is activated only when there is a Vin input voltage (VINVALID high, or VINVALID low) or when the USB source is activated (USBEN high, or USBEN low). In this case too we have a status LED, CHGENLED, indicating if the charge is activated, last but not least, we take a look at the charger, which should be by now quite familiar for us since we have already seen it in the Fishino and Torpedo models, and is based on the ordinary MCP73831. Here with inserted the usual bridge to select charge current (100 mA when open, 500 mA when close) and the recharge LED, CHARGELED, which lights on during recharge and turns off when charging is complete, unlike the previous one (CHGENLED) which is always on when charging is activated, regardless if it’s complete or not.

The Q1 MOSFET is used to activate the charger through the CHGEN we have previously seen. As we have seen, using discrete logics instead of a microcontroller doesn’t make the circuit easier to understand in the very least but it allows anyhow to create interesting functionalities with just “normal” components with no need for programming!




In order to activate it we have to:

  • insert a bridge on the OUTEN connector to activate the output;
  • insert two bridges on the OUTLEDEN and LIPOLEDEN connectors to activate the corresponding status LEDs;
  • insert a bridge on the USBPROT connector (recommended) or not if you want to use Torpedo 2 only for loads that require less than 500 mA;
  • select charge current of the LiPo battery through the 500 mA bridge, that will have to be short-circuited in order to obtain quicker charging;
  • connect one or more power sources to the inputs.


One very last thing: as you can see from the PCB, there are some additional headers, inserted for ease of connection; among these, there is one header for the LiPo battery, if you have a model without the dedicated connector, and output for the same, which can be used to measure voltage through a microcontroller and one Vin header for an alternative connection for the input voltage without using the plot connector.

Watch out for clarity of the LiPo battery, connectors are not standardized and some manufacturers follow a wiring scheme which is opposite of what required by Torpedo 2, therefore… before connecting it, make sure the batteries connector is properly wired, otherwise, your will have to rewire it.

Connecting the battery with inverted polarity inevitably means destroying the integrated step-up and probably some other components too!

With that said, we finish our presentation of our small but powerful switching power supply Torpedo 2, which can be used for various devices, even power-hungry devices like Raspberry Pi, and it will allow you to make those devices portable by taking the power supply from a portable battery pack. Enjoy!


From openstore

Torpedo2 – Universal Switching 3A

About Boris Landoni

Boris Landoni is the technical manager of Skilled in the GSM field, embraces the Open Source philosophy and its projects are available to the community.