Reverse Toggle Switch polarity

Thread Starter

DJ_AA

Joined Aug 6, 2021
490
Hi all,
I have a 5V power regulator that provides power to my entire circuit. The regulator has an enable pin with a pull-up resistor. When this net is pulled down, the entire system shuts off as expected.

I am using the following toggle switch on my enclosure. In its ON position, it shorts to GND, and in its OFF position, it opens. Therefore, when I toggle it to ON, my system turns off, and when I toggle it to OFF, my system turns on.

I am working on a new PCB that will require the same switching option. What can I do in my circuit to reverse this logic? I am thinking a simple transistor circuit should be sufficient.

HUAREW Rocker Switch ON/Off KCD1 Mini Round Toggle Switch SPST 2Pin Snap-in Latching with Wires Pre-Wired AC 6A/250V 10A/125V,for car Boat(10Pcs) : Amazon.co.uk: Automotive
 

Thread Starter

DJ_AA

Joined Aug 6, 2021
490
Connect the pullup resistor to ground, and the switch between the enable pin and +5V.

When the switch is open, the enable pin is pulled low. When the switch is closed, the enable pin is high.

The 5V is the output of DC-DC. The input will be 12V.

Ok so as a default the DC-DC needs to off by the pull down. And once 12v is supplied to ENB pin it switches on.

So the switch pass 12V
 

MisterBill2

Joined Jan 23, 2018
27,186
I suggest that IF the toggle switch can be reversed, THAT would be the way to go.

Really, I do not understand the reason for the reversal. So can the TS explain in more detail the reason for the requested change??
 

Thread Starter

DJ_AA

Joined Aug 6, 2021
490
This is my circuit below, which includes a module.

Unfortunately, I have purchased a large quantity of toggle switches and would prefer not to return them as they are already wired for a custom setup.The switches short the circuit when set to the ON position and remain open when set to the OFF position. Therefore, I need to reverse the operation to match the power supply's behavior according to the switch symbol; otherwise, it would function opposite to expectations.

I am considering removing R2 and replacing it with a 47kΩ pull-down resistor. Then, I could use the switch to provide 12V to the ENB port, possibly through a 10kΩ resistor in series.

1734204392445.png
 

Thread Starter

DJ_AA

Joined Aug 6, 2021
490
Ok, should I also keep a series resistor between Vcc and Enb? I am trying to limit current to the Enb pin.
 

MisterBill2

Joined Jan 23, 2018
27,186
I advise reading and understanding the data sheet for the regulator IC, and learn what voltage and current are required to enable and disable the regulator. And now I understand that the switch is a PCB mounted device, and not one that can simply be inverted. So the scheme suggested in post #2 should work. BUT, to verify that it is OK, you need to read the data sheet.
 

Tonyr1084

Joined Sep 24, 2015
9,744
Would need to connect the Enable pin to the Vcc pin for that to work.
I suppose the switch can't handle the load.
OK, yeah, I did get that backwards. Connect enable to positive and use the switch to turn the whole thing on and off. IF the switch can handle 10A @ 120VAC it can handle 3A @ 12VDC. I can't see that chip requiring or handling that much amperage. But one would have to investigate the circuit amperage. And yes, I know the switch doesn't say it can handle X amps at DC volts. 12 volts doesn't seem like it's going to arc across the contacts with less than 50 amps.
 

Jon Chandler

Joined Jun 12, 2008
1,560
Connect the pullup resistor to ground, and the switch between the enable pin and +5V.

When the switch is open, the enable pin is pulled low. When the switch is closed, the enable pin is high.
When I made this reply, the regulator type had not been disclosed. I see it has been now.

My answer in post #2 is correct... but it's even easier than I stated. The chip has a weak pull down. If no connection is made to the EN pin, the output is off. If the EN pin is connected to Vcc (the input voltage), the output is on. The maximum voltage on EN is the same as the maximum Vin voltage.

The EN pin is a logic-level input. There's no worry connecting it directly to Vin – it will draw insignificant current.

There's no need to complicate this. Connect the switch between EN and Vin to achieve the desired result. Connecting the power switch to control Vin is undesirable for two reasons:

● The switch has to carry the full load current (sure, it's rated for it, but why stress it?)

● Switching Vin may cause transients on the output voltage as the regulator starts up.

The simple solution is to use the chip as designed, which makes the switch markings correct.
 

MisterBill2

Joined Jan 23, 2018
27,186
J.C. Is totally correct!!
IN ADDITION, the switch is evidently a PCB solder-in mount type, and the PCB it is on does not carry the mains power. So the very simple circuit revision is the way to go!!

If the TS is not able to interpret such a straight forward explanation, Oh Well..
There is no reason to make such a simple change into a complex "KLUDGE".
 
Top