Need help understanding a low side switching circuit - Page 1
Forum section: electronics / beginners

author: EasyGoing1
author_rank: Regular Contributor
timestamp: July 04, 2025, 10:11:29 pm
content: The goal of this circuit is to use a DS3231 RTC to switch on 12 volts to a node in a circuit. The issue is that the RTCs alarm can only bring a pin (SQW) from high to low, and it's necessary to switch on the 12 volts using that pin.I got this circuit from ChatGPT ... I'm not actually going to use it, but I am a little puzzled by it. According to the AI, when pin SQW goes low, then the TIP120 turns on, sourcing the 12 volts to the load ... is this right? And if so, how does it actually work?

author: thm_w
author_rank: Super Contributor
timestamp: July 04, 2025, 10:33:33 pm
content: Thats not a low side switch, you can google "low side switch" and find some schematics:https://electronics.stackexchange.com/questions/251618/high-side-switch-and-low-side-switchWhat you describe is a high side switch.When SQW is low, 2N3904 is off its like it doesn't exist, so current can flow from 12V through 10k, 1k, into the TIP120 base and into the load.You should be able to simulate in circuitlab or falstad and verify it works as intended.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: July 04, 2025, 10:38:00 pm
content: So now you're asking real humans why the hallucinations of an AI do or do not work?

author: pqass
author_rank: Super Contributor
timestamp: July 04, 2025, 11:06:43 pm
content: Low side switch means the transistor switches the GND side of the load.But this arrangement would work; with caveat below.If SQW=HIGH=3.3V, then the 2N3904 is on.If the 2N3904 is on, then the TIP120 base is pulled to GND, which turns it off.If SQW=LOW=GND, then the 2N3904 is off.If the 2N3904 is off, then the TIP120 base is pulled to +12V, which turns it on.However, depending on the current required by Rload, less than +12V will be available at the TIP120 emitter as there will be a voltage drop due to how much base current is required to sustain that collector current. At 1A, TIP120 will drop 2.5V thus generate 2.5W. The problem is the 10K base pullup resistor. To sustain a 5A load, you'd have to put 500uA through the TIP120 base (assuming 10K gain) but 500uA over 11K is 5.5V + 1.2V for the two emitter drops= 6.7V drop from 12V, thus only about 5V appears at the emitter!See attached and play withsimulation here.See sliders on the right margin. Changing the base pullup resistor to 1K will cause less of a voltage drop across TIP120 but then the 2N3904 has to sustain more current when on (11mA).

author: Whales
author_rank: Super Contributor
timestamp: July 04, 2025, 11:16:55 pm
content: This circuit will provide about 10V to the load, dropping about 2V across the TIP120. This circuit makes no design sense, there are similar or simpler options that do it better in every way. ChatGPT has recommended you buy a car and drive it sideways on the water instead of buying a boat.Question 1: How much current do you need to turn on and off?Question 2: Do you need to turn the 12V on and off at the high-side or the low-side? Former is more compatible/safer (without seeing the rest of your circuitry I can only guess), latter is simpler & easier.

author: EasyGoing1
author_rank: Regular Contributor
timestamp: July 05, 2025, 03:56:24 am
content: Quote from: Whales on July 04, 2025, 11:16:55 pmQuestion 1: VERY LITTLE current ... the "load" in the schematic is actually this circuitSo the way it works (and I've used this circuit before), is that when 12 volts is applied to the point that says TIP120_EMITTER, it generates a voltage over to EN but because of the cap / resistor, that voltage to EN drops very quickly because when EN goes high, it turns on a buck converter which is powering an Pi Pico and once it turns on, it brings PICO_PIN high which keeps the buck converter running until it eventually turns itself off by setting PICO_PIN low... at which point we can use the SQW pin from the RTC to turn it on again ...So current requirements are minimal.That should answer Question 2 as well ...Now I said I wasn't going to use the circuit because what makes more sense to me ... when needing to use 0 volts to turn something on, a PNP transistor makes more sense, so Im currently bread boarding this circuitWhich I THINK will work ... the momentary switch circuit was originally designed for a 12 volt source, so I'm not sure if 5 volts will work, but the SQW pin is 5 volt tolerant, so I'm gonna start here and see what happens.

author: Whales
author_rank: Super Contributor
timestamp: July 05, 2025, 05:35:25 am
content: Thankyou for the extra detailThe original ChatGPT circuit _might_ work for you then, with some caveats:(1) The TIP120 is a bit big and overkill. No harm done though.(2) I think it will be inverted compared to what you want (a pulse is allowed through on the RISING edge of the SQW pin rather than falling, ie the power supply will turn on when the alarmfinishes). You will have to add another inverter stage or change it to a P-type transistor (like you have done in your last circuit).(3) You might need to divide down the output voltage to something that won't blow up the EN pin of your power supply. Some can take high voltages, some can't, depends on the model.From what I understand this is your situation, please correct anything if I'm wrong:(1) Output is 'EN', a wire that turns on a power supply if it is high (3.3V I assume).(2) Input 1 is 'SQW', the alarm output of a DS3231 RTC chip. (open-collector, tolerates up to 5.5V)(3) Input 2 is 'PICOPIN', a signal coming from a raspi pico that is powered by the power supply mentioned earlier (probably 3.3V)(4) EN = fallingedgefilter(SQW) OR PICOPINIf the above is true then I would avoid using 12V anywhere and instead stick to whatever voltage your DS3231 is running on (3.3V?); unless there is something I'm missing.I was considering drawing up my own circuit, but I think your last diagram looks goodGive it a shot. The PNP confused me because I normally draw it the other way around (mirrored on Y axis).

author: EasyGoing1
author_rank: Regular Contributor
timestamp: July 05, 2025, 10:18:31 am
content: Quote from: Whales on July 05, 2025, 05:35:25 amYeah, you've got it. The reason for 12 volts is that ultimately this whole project is about charging a 12 volt car battery, so the voltage was available, and like I said before, I've used this same circuit and same buck converter in a 12 volt vehicle application and it worked perfectly. The only difference is, in the previous application, the point labeled SQW was an actual 12 volt source comming off of a brake light switch and like I said, it worked perfectly. So in this situation, because the source is an RTC chip that would get fried if it saw 12 volts, I just needed a way to switch on 12 volts, but to add complexity, the RTC chip alarm pin stays high until the alarm triggers at which point it goes low which is why I need to switch the 12 volts using that low pin ... and in the PNP setup, when SQW goes low, it's going to see the voltage from the emitter so I can't switch 12 volts that way or I'd fry the chip.Quote from: Whales on July 05, 2025, 05:35:25 amI took a lil break from it, but I'm back at it now.

author: PGPG
author_rank: Frequent Contributor
timestamp: July 05, 2025, 11:59:19 am
content: Quote from: EasyGoing1 on July 05, 2025, 03:56:24 am200k/100k in your original circuit divides 10V at input (you loose 2V at Darlington) by 3 giving 3V3 pulse at output.Driving it from 5V if you replace 200k with 47k you will get 2/3 of 5V (=3V3) pulse at output.

author: Zero999
author_rank: Super Contributor
timestamp: July 05, 2025, 01:43:37 pm
content: What's the load current?If it's just a few hundred mA,then use a couple of BJTs.

author: PGPG
author_rank: Frequent Contributor
timestamp: July 05, 2025, 02:29:01 pm
content: Quote from: Zero999 on July 05, 2025, 01:43:37 pmIt was shown - practically 1k.Quote from: Zero999 on July 05, 2025, 01:43:37 pmYou missed that 0 at input have to give + at output.

author: Peabody
author_rank: Super Contributor
timestamp: July 05, 2025, 03:08:00 pm
content: I don't think you need the capacitor. The SQW pin will stay low until the Pico fires up and clears the alarm flag in the DS3231 via I2C (after it has asserted PICO_PIN). Edit: You don't even need PICO_PIN. You shut down by clearing the alarm flag.But you won't actually have a 5V supply in the final circuit. Is that right? So you still need SQW to switch 12V. Will the RTC have a backup coin cell?Edit: Actually, if EN is the enble pin of a regulator of some kind, it may have a very low VIH to turn it on, like 2V or something similar. Can you describe what the EN requirement is?

author: langwadt
author_rank: Super Contributor
timestamp: July 05, 2025, 03:35:33 pm
content: Quote from: Zero999 on July 05, 2025, 01:43:37 pmactive low input,

author: Peabody
author_rank: Super Contributor
timestamp: July 05, 2025, 04:18:48 pm
content: The circuit below is a bit unusual, but should work. It shows a big P-channel mosfet switching the entire load current, but you could instead use a little TP2104 mosfet driving the EN pin of the regulator, which would have a high-value pulldown resistor.The RTC runs off its coin cell until the Arduino (the Pico in this case) powers up and begins supplying power to it via a GPIO port. The coin cell also drives the N-channel's gate, but since there's no G/S resistor, no current flows out of the coin cell when SQW goes low.SQW sees no high voltage. It only ever sees a maximum of 3V less the threshold voltage of the N-channel.As mentioned earlier, SQW stays low until the alarm flag is cleared. So when the Pico is ready to shut down, as its last official act it sends the I2C command to clear the flag, and then goes into a 5-second delay, which will never complete.

author: Zero999
author_rank: Super Contributor
timestamp: July 05, 2025, 05:09:53 pm
content: Quote from: langwadt on July 05, 2025, 03:35:33 pmI'm confused. The circuit in the OP is active high, yet the text says active low. Which is it?That will work, but I prefer to put the resistor on the emitter because it results in faster switching.

author: PGPG
author_rank: Frequent Contributor
timestamp: July 05, 2025, 06:13:40 pm
content: Quote from: Zero999 on July 05, 2025, 05:09:53 pm'active' is not precision term.Circuit in first post for low at input answers with high (about 10V) at output.

author: Zero999
author_rank: Super Contributor
timestamp: July 05, 2025, 06:18:52 pm
content: Quote from: PGPG on July 05, 2025, 06:13:40 pmYou're right. I thought it should be a PNP transistor, so saw a PNP transistor, completely ignoring the fact it's NPN.

author: EasyGoing1
author_rank: Regular Contributor
timestamp: July 06, 2025, 10:52:16 am
content: Quote from: Zero999 on July 05, 2025, 05:09:53 pmForgive my ignorance ... in my mind, I was thinking that I am trying to make a circuit activate using a logic low signal ... 'active low' ... if my use of the term was incorrect, then please correct me.

author: PGPG
author_rank: Frequent Contributor
timestamp: July 06, 2025, 12:31:43 pm
content: Quote from: EasyGoing1 on July 06, 2025, 10:52:16 amYour circuit is activated by 'low' signal - it is OK.Your circuit is not 'low side switching' as switching element is at high side so it is 'high side switching'. When you do high side switching you typically don't want to lose 2V like in your Darlington transistor use so you use pnp or PMOS transistor and you loose in switch several mV only.