1
\$\begingroup\$

TL;DR: Looking for all kinds of advice :-) Especially related to pushing "backwards" power into a MC34063 based step-up switching controller at times.

I'm building a device with an AVR microcontroller, some I/O (rotary encoder, button, LED digits and a buzzer,) a wall wart power in, and a 18650 LiPo cell for unconnected power.

I want the device to run well on connected wall wart, as well as charge the LiPo battery. The AVR will disconnect the charge voltage when the LiPo voltage gets to 4.1V. (Data sheet says to charge to at most 4.2V, so that leaves a little safety margin -- the cell also has built-in protection)

The chain is something like "jack in -> linear regulator -> switch -> battery -> switching step-up -> AVR" with a diode from linear regulator to AVR to run on wall power even when the battery charging is switched off.

I built a version of this that used a 5V 1117 regulator and a depletion mode MOSFET for the switch. Sadly, the MOSFET had a Rdson of about 3 ohm, which significantly limited the charging current once it got above 3.7 volts or so. This made it take forever to charge. The regulator also runs hot, but I have a heat sink on that, and on the MOSFET.

For a second try, I'm thinking of using the variable 1117, set to 6V out (with a 0.85V rectifier drop that to 5.15V for the AVR) and a P-channel MOSFET as a switch. This will not stay "on by default" as the depletion mode did, but with the shunt diode to the AVR, it will come on with wall wart power only anyway. Initially, I did not have that diode, so power "on by default" was important. The P-channel MOSFET has an Rdson of about 0.2 ohms at -4V, so it probably won't even need a heat sink.

I will then depend on the current limiting built into the 1117 to not deliver more than one amp into the battery while charging. While this is going on (voltage < 5V) the switching step-up controller will actually power the AVR, in parallel with the battery being charged. Further, even when the battery charge switch is turned off, the battery will be in-line with the step-up converter, although that converter will be running "idle." (It's a mc34063 based converter) I imagine I'll need hysteresis in the charge on/off switch -- say, charge to 4.1V, discharge to 4.0V, repeat. Hopefully, that cycle is long with this design while plugged in. The device will be un-plugged every day and recharged overnight, generally.

Finally, I'm enclosing both the schematic and the layout. The biggest annoyance with the lay-out is that the inductors I have are laying down, and thus take up a square inch of the board :-/ That also makes the traces from the switcher to the inductor longer than needs be. On the final board, I will overlay a ground polygon on both sides of the board (2-sided only, no real "planes," sorry :-)

Please be gentle but firm!

Schematic of the board

Layout of the board

https://watte.net/timer-schematic-revB.png

https://watte.net/timer-board-revB.png

\$\endgroup\$
4
  • 2
    \$\begingroup\$ Did you use autorouting? \$\endgroup\$
    – clabacchio
    Mar 6, 2012 at 8:49
  • 1
    \$\begingroup\$ I don't know why you said "TL;DR", but that's appropriate for me. Really, you can't distill your question down into a few succinct sentences? And then there is your schematic. What a mess! No thanks. I'll spend the limited time I have here helping people as efficiently as I can with questions I can understand. \$\endgroup\$ Mar 6, 2012 at 13:23
  • \$\begingroup\$ @Kortuk: OK, see electronics.stackexchange.com/q/28251/4512 \$\endgroup\$ Mar 17, 2012 at 19:50
  • \$\begingroup\$ @OlinLathrop, Love it. I appreciate you taking the time ALOT. Cleaning up my comments. \$\endgroup\$
    – Kortuk
    Mar 18, 2012 at 10:55

1 Answer 1

2
\$\begingroup\$

I started this as a comment but the diagram was needed and you asked for critique as part of the answer

  1. Place a ban on Olin coming within 10 miles of your diagram or he will kill you/it.

  2. Your circuit diagram has much unnecessary non-functional mess on it that makes it much harder to read than is necessary. There are little marks and annotations everywhere that have no meaning to most readers and no place on a diagram that is meant for others to inspect for circuit design analysis purposes.

Consider this extract. Most messy stuff is marked. R25 value is very hard to read/ Large circles at component ends are very detrimental to appearance. Dot where vertical line from C3 meets grounds is OK and others should be like that or disabled for presentation purpises. It is fine for a drawing to look like this when you are working with it as long as it is not allowed to escape from captivity.

enter image description here


Depletion mode FETs have their place but it is very uncommon to need them and you should try hard not to do so. They are relatively old tech in most cases and have poor specs (as you found). As you note, a P Channel FET will do what you want about as well in most cases and biasing an N Channel on at all times as its default setting via a whisper of gate drive is acceptable if needed.

A boost converter may never have Vin > Vout + 1 diode drop unless you are happy for Vin to flow to Vout via the output diode. You may be.

If you rely on a processor to terminate a LiPo charge cycle, when the uC crashes the battery will too in due course.

Using a regulator's inbuilt current limit as a max chg regulator for a LiPo is OK only if allowable max I is >> Ireg max as reg max I out varies widely.
1A charge - what size cells?

More can be said.
Olin may choose to say some of it. Flame suits on :-).

\$\endgroup\$
2
  • \$\begingroup\$ Thanks for the comments on how to make the schematic more acceptable for review. Olin's comments were unfortunately lost on me, as I can find no concrete, actionable suggestions in them. \$\endgroup\$
    – Jon Watte
    Mar 6, 2012 at 18:00
  • \$\begingroup\$ Most important follow-up question: What else is "unnecessary for review" and how could I make it easier to read for others? I much appreciate your comments and advice! \$\endgroup\$
    – Jon Watte
    Mar 6, 2012 at 18:00

Your Answer

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

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