2
\$\begingroup\$

I am an absolute beginner when it comes to electronics and this is my first circuit, so please excuse my ignorance and thank you for your patience and help.

I am trying to build a circuit which provides 3.3V power to a micro-controller (Nordic Semi nRF52840). Absolute maximum range of voltage should be 1.8V to 3.6V. Maximum power consumption would be 140mA. It should use battery power when USB is not connected and use USB power when connected (ideally without resetting). Efficiency is not super critical because I am planning to use a recharging circuit for LiPo battery if this works, but it would be ideal to get 2 weeks standby time.

I used the design in this earlier stackoverflow question by Russell McMahon and built the circuit. It worked fine when I tested with bigger components, but with a huge voltage drop. I thought using SMD components rated for lower voltages would reduce the voltage drop. But the input voltage is oscillating all over the place if I use Q2 P-mosfet (Q3 in the linked answer). If I bridge the battery Vcc directly to the buck-boost converter, I am getting a 0.95V output steady, where it is supposed to output 3.3V.

Here is the schematic of the circuit:

KiCAD schematic for USB Battery power switching and regulation with LTC3531ES6-3_3

And here are the components used (external sites linked):

  1. [R1,R2,R4] 1M 5% 0805 SMD Resistor
  2. [R3] 10K 5% 0805 SMD Resistor
  3. [R5] 100K 1% 0805 SMD Resistor
  4. [Q1] BC807-40LT1G - 45V 500mA PNP Bipolar Transistor SMD
  5. [Q2] SI2333CDS-T1-GE3 - 12V 2.5W P-Channel Power Mosfet SMD
  6. [Q3] BC817-40LT1G - 45V 500mA NPN Silicon Bipolar Transistor SMD
  7. [D33] SS34-E3/57T - 40V 3A Schottky Barrier Rectifier
  8. [C_PWR1] 2.2 uF 25V 0805 SMD Ceramic Capacitor
  9. [C_PWR2] 10 uF 25V 0805 SMD Ceramic Capacitor
  10. [L1] 10 uH 0603 Ferrite Chip Inductor
  11. [U_PWR1] LTC3531ES6-3_3 (also used the circuit mentioned in the datasheet)

And here is the PCB design

KiCAD PCB design for USB Battery power switching and regulation with LTC3531ES6-3_3

A picture of the PCB (sorry about the blurry shot):

Picture of the PCB's power conversion area

The breadboard components I used were, without the voltage regulator,

  1. [Q1] 2N2907A PNP Switching Transistor
  2. [Q2] IRF9530 MOSFET- 100V 14A P-Channel Power MOSFET
  3. [Q3] 2N2222A NPN Bipolar Transistor
  4. [D33] 1N4007 - The large voltage drop was probably because of this.

I am looking for help on the following points:

  1. Where am I going wrong in this circuit, why and how can I fix it? If possible, with the same PCB as I have already bought it (at 3x the cost, because of the import laws in my country).
  2. If the circuit cannot be salvaged and I have to make a new PCB, is there any way I can supply between 1.8V and 3.6V to the micro-controller with the current PCB so that I can continue developing and testing the other parts of the circuit while I wait for the new PCBs? I do have the AMS1117-3.3V but I doubt it can manage 3.3V from a 3.7V LiPo battery (drop voltage is 1V if I read the specs correctly). I guess I could use 3 alkaline batteries as a stop-gap.

Getting very specialized parts might also be a problem because again, importing and getting parts across customs is a painful and drawn out process. But I can still try if it helps me salvage the board.

Sorry about the long post, but I wanted to be absolutely sure I am conveying exactly what I am doing. Please help me finish this project, as I am completely out of my depth and have no idea what is wrong. It has been 3 months in the going and this is a very disappointing block. Thank you for any help you can provide!

\$\endgroup\$
19
  • 1
    \$\begingroup\$ Friendly note: You can use a circuit simulator like LTspice if you want to simulate before you build. Other than that, Why dont you use a N-ch mosfet Depletion type (which turns on when pulled low, so you can use it on high side) instead of a P-ch? P-ch have greater internal Resistance than N-ch. I would also suggest you add more decoupling capacitors, is 2.2uF there enough? 10uF of small smd size, the smaller you can get should help \$\endgroup\$ – Christianidis Vasileios Apr 2 at 8:35
  • \$\begingroup\$ @ChristianidisVasileios Thank you for your suggestions! I had some difficulty with getting spice models for the components, so I used a simpler online simulator. That simulator said the circuit will work, so I went with it. In retrospect, you are right, I should have made the time to learn the LTspice simulator and tried the circuit with it. \$\endgroup\$ – Uday Apr 2 at 8:48
  • \$\begingroup\$ @ChristianidisVasileios I am not sure whether the 2.2uF capacitor is enough. I just went with the recommendation in the datasheet. I could try 10uF capacitor, as I have some and they are the same footprint as the 2.2uF capacitor. Do you think it would help with the power output? I thought it was there only to prevent ripples in the switching circuit. \$\endgroup\$ – Uday Apr 2 at 8:50
  • \$\begingroup\$ Sure. The larger the circuit (the more the components and connections) you ask help for, the harder it is for someone to sit and analyze it. So try simulations to minimize the part you need help with. Yes the capacitor is for the ripple (decoupling). For decoupling, try to use larger values from the ones the datasheet recommends. Datasheet's recommendations are minimum values. \$\endgroup\$ – Christianidis Vasileios Apr 2 at 8:51
  • \$\begingroup\$ If your getting only .95V out when you power only the regulator, then your issue seems to be the regulator. Are you measuring under load? And the ams1117 dropout is 1.1v up to 800 mA. \$\endgroup\$ – Passerby Apr 2 at 8:53
0
\$\begingroup\$

am trying to build a circuit which provides 3.3V power to a micro-controller (Nordic Semi nRF52840). Absolute maximum range of voltage should be 1.8V to 3.6V. Maximum power consumption would be 140mA. It should use battery power when USB is not connected and use USB power when connected (ideally without resetting). Efficiency is not super critical because I am planning to use a recharging circuit for LiPo battery if this works, but it would be ideal to get 2 weeks standby time.

Pretty much any Low Drop-Out Regulator should work to regulate the 3.8V nominal voltage of a Lipo battery. The AMS1117 is not really a good match because it is not an LDO. Try the AP2112K. You don't need a buck boost converter, since your current consumption is also not that high, hence your power loss is negligible. Here is an example from a previous project I had, that I know works. enter image description here

When it comes to auto voltage selection it is less intuitive if you are new to electronics but this circuit should work for that purpose.

enter image description here

You don't need D2 and the 5V rail if you don't want an external 5V input pin other than the USB port. The Switch-In would be is your Regulator input.

Also you may want to use polarized tantalum capacitors instead of ceramic ones for C9 and C11.

If you want to trouble shoot the design you provided above:

  1. Try running a spice simulation, it helps a lot

  2. If you have an oscilloscope try monitoring what is going on individual nets. Compare what you see to how it should look like and try to identify the problem step by step.

Edit to explain how the auto select circuit works:

The way my Auto select circuit works is like this:

  1. Ubat: not connected ; VBus: 5V : the current flows through D1 to Vin, other components can be ignored.
  2. Ubat: 3,8V, VBus not connected: Q3 is on, because its gate is connected to ground through R14. So it can supply Vin of the regulator
  3. Ubat 3,8V; VBus: 5V; the gate of Q3 is pulled high so it doesn't conduct, Current flows through D1 again as in (1).

The circuit you provided works pretty much the same way. I am not sure as to why he also used the bipolar transistors. I am sure someone else can explain why he did that.

Edit that comes after edit:

It appears he made a mistake wiring the PMOS in his design, mixing the drain and the source pins. Otherwise the design that he provided should work fine according to the Spice simulation that I made.

\$\endgroup\$
20
  • \$\begingroup\$ Thank you very much for your inputs! Sorry about my late reply as I was traveling over the weekend. I could not find LD1117533CTR. Do you mean LD1117S33CTR? If yes, I am confused about the difference between this and the AMS1117, as both seem to have a drop out voltage of 1.1V. As for AP2112K, I could not find it in my country and it costs 10x the price to import. Would any LDO, like lds3985 with a dropout voltage of 300mV and max voltage of 6V, suffice? (I have a fuse for max 6V for the USB anyway) \$\endgroup\$ – Uday Apr 5 at 3:15
  • \$\begingroup\$ I have been able to find AO3415, but it is from a store I haven't heard of. It is cheap enough so I guess it doesn't matter much. I have also been trying to understand the difference between AO3415 and Si2333CDS (the one I used). I have been thinking the Vgs(th) is the important spec to consider for this circuit, but I see only a difference of 0.1V between the two MOSFETs. Is there parameter I am missing that makes the AO3415 the correct choice over Si2333CDS? Once again, thank you for your inputs and time. \$\endgroup\$ – Uday Apr 5 at 3:45
  • \$\begingroup\$ The parts aren't that important, any ldo or p-mosfet should do. \$\endgroup\$ – Emre Mutlu Apr 5 at 9:24
  • \$\begingroup\$ @Uday but seriously you should read the part "parts selection" on the datasheet of the ldo that you will choose. The performance will be affected if you choose a ceramic one where it says use an electrolytic one. Also read the datasheet of your MCU carefully. It must state what kind of decoupling capacitor you should place at the Vin. \$\endgroup\$ – Emre Mutlu Apr 5 at 10:52
  • 1
    \$\begingroup\$ The good news is that the AMS1117 is able to supply 3.27V because my LG HG2 battery is supplying 4.11V. So I am able to continue testing the rest of the circuit. Unfortunately, I seem to have roasted the MCU USB connections, so I am not able to test that part. I will still have to use an LDO with a lower dropout voltage if I am to use a flat LiPo battery pack, as they are rated for 3.7V. I will try ordering the AO3415 to see if that will make the switch circuit work. It should reach me in 4 days. I will keep you updated on any progress on this issue. Thank you for all your help. \$\endgroup\$ – Uday Apr 6 at 5:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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