# need help wiring a switch to go from 5v to 12v

So essentially I have a 12v constant, a 12v switch power, and ground. I am powering LEDS with it. Essentially, I put a 12v to 6v step down to power the leds at 6v. However, I want the 12v switch to power them when the switch is applied, (the switch in this case is the brake pedal of a car). So it will increase the voltage then from 6v to 12v to increase LED brightness.. What is the best way to wire this with manual components? I'd like to not need an arduino.

Thank you!

• What LED are you using, and how do you get them to run at both 6V and 12V without burning out at the higher voltage? Also what are you using to step the voltage down? Jun 6, 2021 at 7:12
• Please share with us your Schematic. Jun 6, 2021 at 13:56

Assuming this is the average brake light in a vehicle, the diodes will need to be chosen for the required current and the resistor value calculated to give the required dimming on the lamp

simulate this circuit – Schematic created using CircuitLab

• BRILLIANT! Very simple and this will get the job done! Thank you so much! Jun 6, 2021 at 22:11
• Just to note that the diodes are required, otherwise you can get weird issues with backfeeding and ‘sneek circuits’ (unintentional circuit paths). Jun 6, 2021 at 23:37
• definitely! I had this same idea but didn't know what was required to prevent the back feeding issue. Thank you for helping me solve this! Jun 7, 2021 at 0:18

You could have the pedal activate a relay...

simulate this circuit – Schematic created using CircuitLab

The relay should be a 12 volt relay. For the diode a 1N4007 would do the job. You can read more about selecting flyback diodes in this question:

How to choose a flyback diode for a relay?

One drawback is that the 6-volt buck regulator is running all the time, even when the pedal is pressed, but it seems that the pedal is pressed only infrequently, so the +6V power supply is needed most of the time anyway.

• Also brilliant and exactly what I had in mind! But I think Kartmans version is a little more simple and easier to mass produce! Thank you so much for your time and input Jun 6, 2021 at 22:11