Arduino Controlled 7.4V Li-Po Power Supply Design

Yes, of course you can turn off the power. My point about being able to detect the state of the switch is that if you can, that switch can be pressed to do or mean… anything, up to and including turning the whole thing off. By informing the software to drop the power hold line.

The new circuit does not allow a push-on push-off interpretation of the button, nor any other function the button might play during operation.

Like: press to turn on the light, press briefly to increase brightness step by step to max and similarly in steps to minimum, press and hold the button to turn off the light.

I can't think what it was now, but I did do a power on button with a latch of some kind and was challenged (and failed) to figure out how to also get the button to be useful during.

a7

But it does, you've seen it work here
The code is here.
This uses the button feedback pin and the circuit in 220 minus 1 resistor to preform a function while the button is held down on boot and again to shut it all down when the button is held for a second.

Please forgive me if I've misunderstood and needlessly repeated something that you already knew.

Haha, likewise!

You raised the issue. It seems you were saying that the newer circuit #218 lost an ability the older circuit had.

Examining the newer circuit #218, it does seems like when the MOSFET is conducting, it is impossible to determine the state of the pushbutton, as it in parallel.

So I don't see how you retain push-off behaviour from that pushbutton, nor how it could be used as an input between power on and power off, no matter how those two operations are preformed.

So I was agreeing with you, and lamenting, and wanting to be sure you did have the full use of the pushbutton as might have been exploited in my light control with but one pushbutton all functions example.

a7

Cool. It's fun when it takes 3 or 4 comments to figure out we're in agreement.

Now I'll finish the schematic and start tinkering with the PCB layout.

Down the road I want to make this in 2 different layouts for the 2S and 4S models. On the 4S I want to add pads and terminals for a 2nd buck converter and a few basic 3 digit volt meter readouts. Do they make a single unit package that I can buy for this?
I have some of the 3 wire models from ebay, they will do if nothing better exists.

If you mean the crisp little 3 digit LED units, all the ones I have are either two wire or three wire, but…

the two wire models just have the red wire supplying the operating voltage as well as the voltage to be measured.

So one can be converted to the other. With two wires, you can only measure down to a certain voltage; in your circuit no problem powering the unit(s) from Vbatt and sticking the measurement wire wherever.

I use a stack of three as an instant read field tester for lipos, I like not needing a battery to power it, but of course can’t read the voltage of cells below a certain voltage I shouldn’t be j def anyway, that’s when I know to start hoping I haven’t killed a battery. Naturally plugging in the tester backwards on the balance leads gives me a brief heart attack too often, uhoh, tots dead battery, not!

a7

Goodmorning guys. :grinning:

Damn, I missed that omitting the two diode would make the button switch unreadable during arduino powering! :rofl:

Thanks to @alto777 and @er_name_not_found

EDIT:
If you got DPST button switch eliminates the both diodes.

I have these 12x12 switches, and too many of them.


I get what you're saying by throwing 2 with a single click they only time they meet is at ground, so no diodes.

I agree.
I choose 6mm button, but there are a lot of them with different heights.
They also have a collection of colorful hats. Yeah, they are so cute.
They have four legs, but they are SPST. :expressionless:

1 Like

That’s like cheating. :expressionless:

a7

:roll_eyes:
  

I have 50 LED lit switches on a slow boat.
Future projects await them.

I think it deserves something like this:

I have one somewhere

a7

That is a beautiful addition.
I think I can add some overlapped landing pads so one of a couple button types can be selected.

I have those red/green LEDs and I've been itching to use them.

I'm looking at some clear arcade buttons because I want buttons with RGB LEDs and I think I can build a neopixel into them and coat the inside of the button cap with a diffusion coating, but those are for games.

Edit: I'm probably going to get those too.

I've still got to add the buck converter and to reassign the references so the flow better.

The capacitor is the one recommended by @thehardwareman, I still have to test the circuit with and without it. I got a blip when connecting the battery, hopefully this helps that.

Edit: I keep thinking about the blip. Is it possible that power manages to make it through Q2 before R2 can pull the gate high?
If so, would a capacitor parallel to R2 pull the power long enough to allow the gate to be pulled high?
.

I'd like to figure out how much current the PCB can handle and see if I need a resettable breaker on the board, or some other current limiting circuitry.

It looks very good.

PCB copper is basically very thin, so traces that carry large currents will generate heat.
You can take measures such as widening the trace width.
Or to that trace made without solder mask, and put solder-trace it.

image

Very nice looking board.

The solder-trace option is offered by PCB manufacturers? Is that a relatively inexpensive upgrade?
Is there a calculator for this? 84W and 168W

Did you get a chance to read my edit of 235, about the blip?

If there is no solder mask on the PCB trace and HASL is selected for the surface finish, it will be produced in like this picture.
If you want to use ENIG as the surface finish, add the solder yourself after installing the components.

I think it came with KiCAD.
Do you have a button like a calculator at main menu?
A set of several useful calculators for PCB.
And it is use for calculate A instead of W.

Which state transition do you envision?
It means when the gate to which the R2 is connected switches to HIGH, that is, when the Arduino kill itself?

Very cool. I just want to mount the components when the boards arrive.

Looks like it did
Yes, I do
Looks like I've got a bit to learn but I get the navigation and operation, the use I'll learn as I go.

The moment you connect the battery to the connector. The blip manifests as a flash of the green power hold indicator LED. That means it's gone all the way through the buck converter and through Q3 to light the LED.
Q3 might be floating like Q2 or it may be pulled low by the Arduino.
Happens with a wall converter too.

Doesn't happen that much, but well more than once.

Could also have been a previous model.

I need to test this more before I make changes and magnify any potential issue.

Yep, I got it clearly.
Since the gate of the MOSFET is isolated, it is essentially a capacitor and the VGS rising with charging voltage ramp.
There are also parasitic capacitors elsewhere, which carry current until they are charged.

image
An additional capacitor in parallel with R2 is equivalent to increasing the gate capacitance and increasing the blip.
I think it's bit difficult to deal with this easily.

Here's where we are:
When the board remains energized the system works perfectly.
When the board is becomes energized from some states it blips.

I agree and I understand that this can be dangerous too. Kind of like modifying a circuit breaker, which is always a bad idea.

Instead I propose some sort of widget between the battery connector and Q2 that delays power until that gate is properly pulled up.