Low-side switching of buck converter?

I've been trying to help on another thread, but have come up with nothing. It's a timelapse controller for a DSLR. The Arduino GPIO controls an N-channel mosfet, which in turn connects the low side of an adjustable buck converter module to ground. It's a 12V supply regulated down to 7.5V. The output of the module connects to the power jack on the camera. The shutter is triggered through an optical isolator, and seems to work fine. The buck converter module and timelapse circuit schematics are shown below.

The circuit seems to work fine for a while, but then just stops working. Or the module stays on all the time. It works better, but still flakes out eventually, when set up on a breadboard - as opposed to a PC board where everything is closer together. I believe he confirmed that if he replaces the module with an LED and resistor, there's no problem. So I think the code is ok.

Well to cut this short - I have no experience with low-side switching of a buck converter. Is that something that shouldn't be done? Why would that be?

If you switch the low side you are disconnecting the ground, the input voltage is then free to appear at the output and the result will be unpredictable.

What do you think pin 5 on the LM2596 does?

Well, he has a module, and I'm not sure he can get to pin 5. Maybe he could lift the pin.

I still don't understand about the low side switching. I understand that the module will drift up to 12V if ground is disconnected, but it's not really referenced to anything, so I'm not sure why it matters. I've never tried to do this, but as I understand it, N-channels have much lower RDS values than the P-channels I'm used to, and that's the appeal of low-side switching.

I think he's planning to use an adjustable linear regulator with enable, and do away with the mosfet. But if he can get to pin5 of the LM2596, that would be the easiest solution. Thanks for pointing that out.

Of course it's referenced to something, all voltage is with reference to something; usually 0V unless specifically stated otherwise.

My point is that if you have 12V into the converter but 0V is not connected then the output will be undefined. You have to ask if it matters in this case, which I leave you to think about. Is there a route back for any current flowing into the 12V input of the buck converter, through to its output then the load? Is it a dead end or is there a circuit somewhere?

The camera is connected to the module output pins, but the output low terminal is not connected to the Arduino 5V ground, which is also the 12V ground, so as far as I can tell there's no return path, so no harm done. But then when the mosfet does connect the ground, it doesn't work, or it just stays on when the gate voltage goes back low. Well, I knew there was a reason why I've always used high-side switching. But it still seems to me that the low-side switch should work.

I think the answer for him is to use something, even a linear regulator, that has an enable. Then he doesn't need the mosfet at all, and he won't have these problems.

I think part of the problem with our discussion is that you asked a generic question about low side switching of a buck converter and I gave my generic answer. Generic answers will always be wrong or inappropriate in some circumstances. I would not use a low side switch like this, but that doesn't mean it can't work. In this case maybe it's ok, it just wouldn't be my choice. If it's failing after some time then something is failing, maybe the MOSFET for some reason. Me, I'd build my own buck converter and control pin 5.

I don't think any of this helps you much!

Undefined? Why? With a bit of simplification the outputs will drift to 12V. It does not really matter as long as there is no other connection between the powered and unpowered circuit. In fact the unpowered circuit even cannot "know" which of the power lines were disconnected.
There must be some other problem hidden in the mysterious "stop working". My guess is the module do not like quick hard turn on and the large inrush current eventually damages something in the module and/or the MOSFET. If the "stop working" is a soft error (fixed by reset or power cycle) it may be caused by a brown-out or a noise spike during the inrush condition. Neither of this will be fixed by high side switching if the switching speed is comparable.

Good question.
When I originally answered @ShermanP I was concentrating more on his generic question:

Rather than on the specifics of this particular case that prompted the question. I was thinking that in the generic case you don't know what is hanging off the end of the buck converter, maybe there are other paths to ground or to other voltages. If there are then the voltage will be undefined as it depends on those paths, how much current they draw, how much current the buck converter allows to leak through.

In this specific case, as far as I can see, it will be 12V references to the 0V the converter has been disconnected from.

Having slept on it I don't think this is the origin of the problem he's asking about.

Yes, I think there's something goofy about the converter module. The OP of the other thread reports that when the Arduino power is off, and therefore the mosfet is also off, but 12V is active, he measures 10V across the module's input pins, and the negative input terminal is 1.5V above ground. It seems to me that the module's negative terminal should be a lot higher than that. So I suspect that something else is going on that isn't reflected in the schematic, but i don't have it at hand to test.

But back to the theory, it seems to me that there may be a reason not to use low-side switching in a case like this. Assuming the low side of the module has drifted up to near 12V when the negative terminal is switched off, then when it is suddenly grounded, the module finds itself in an "overvoltage" situation, with its output terminals also near 12V. Of course that comes down very quickly, but it just seems to not be a good idea. So what I'm saying is that if you switch the high side, then when that terminal switch is closed, the module is all at 0V, from which it comes up to 7.5V or whatever. But if you switch the low side, it comes up at 12V, from which it has to fall back down to 7.5V, which the camera may not like either.

I'm not formally trained, so maybe all of that is complete BS. Anyway, it would be nice to know when I can switch the low side and when I can't. I mean, if I were switching an LED it obviously wouldn't matter what I switched. But maybe it doesn matter with complex circuits involving inductors and mosfets and such.

Edit: He reports that he successfully lifted pin 5, and a test sketch shows everything works fine. So I think his problem is solved. Thanks for pointing that out, Perry.

I don't think there is an answer anyone can give you that will apply in any situation you might encounter. My simple rule of thumb answer is don't do it unless there is a good justification for doing it and if you do then carefully consider the consequences. A dislike of high side switching isn't a good enough reason!

1 Like

So far as I know, the only advantage of low side switching is the use of an N-channel mosfet, which will have lower Rds values than a P-channel used on the high side. But most of the time, it doesn't make any difference.

Do you have any data sheets on the mosfet? What is the required gate-source voltage, if the duty cycle makes the gate source voltage fall below, the mosfet will get hot and start to function the way you describe.

You may want to use an optoisolator to switch the 12V positive signal to the mosfet to turn it on through a 10k tied to ground

I'm starting late but:

I believe it is very likely the issue is noise from the system itself causing the processor to go to an unintended program address (or some other similar issue).

The first thing I would do is to enable the WDT timer, which in the 328P requires a different bootloader than the "std" supplied version. I used the optiboot bootloader.

I question the need for the switching regulator. Does the camera consume that much power? I would think the camera will draw minimal power until you take a photo then the power draw will spike for a short period while writing the data. Could a simple low dropout linear regulator be sufficient?

What is the purpose of the Camera Power Override? Is the regulator enable/disable line not doing what the designer wants?

I agree that the switching regulator isn't necessary. He could use an adjustable linear regulator with enable, and control it directly from a GPIO pin. The camera needs at most 400mA, and is on only briefly when a picture is taken. Anyway, if it were me, I'd go the linear route and do away with the mosfet entirely. But he has an investment in the boards and parts, so if driving the module's On/Off pin will work, he will probably use that. But there still may be a noise problem. He will just have to do extensive testing and see how it goes.

The manual bypass switch is just in case he wants to scroll through the pictures.

The mosfet is the IRL540N, which is only moderately logic level, but probably good enough for the 5V Arduino.

That is not important for a hobbyist IMHO - if you pay slightly more you can get equally good P-channel MOSFET. The real advantage of low side switching is the simplicity when you are switching voltage higher than MCU supply. Direct connection to the pin vs level shifter.

It's not, you need to drive it 10v minimum.

Please see my previous post, and post the data sheets on which IRF540N you have

For the noise they need to put bypass capacitors on all the chips 0.1µF with short leads.

Add bypass on the DC/DC converter (input and output)

Have them follow the ground on the board to see if there are long paths between the grounds.

Add WDT so if the processor does get lost it can recover.

Why are you switching the ground instead of the positive side ?
That makes no sense.
If you need to switch the positive voltage you can use a HIGH SIDE P-channel Mosfet.
Leave the grounds permanently connected.
There is no reason why this wouldn't work.

Sorry, But you definitely can switch the ground. Its called low side vs high side switching. Both work, I prefer to switch the low side usually unless its the battery

In many situations low-side switching is a problem as the ground is continuous (its the chassis of the equipment perhaps, or its a safety requirement). So high-side switching is often needed. Also if there is a protective fuse in the power line, you'll want the switching to be done in series with the fuse.

Things get complicated when signal interconnect busses use pull-ups or pull-downs, and issues of phantom powering arise.