logo elektroda
logo elektroda
X
logo elektroda

Small 12v Auto circuit for on/off switch – Newbie help

297 49
Best answers

How can I build a 12V pushbutton circuit that latches a car sensor feed on/off, lights the button LED in the off state, and resets automatically when power is removed?

A 12V pushbutton that latches the load and drives the LED can be built as a holding circuit or a toggle flip-flop using a relay or a 555 timer. One suggested solution is a 12V DPDT relay: wire one contact pair in parallel with the momentary pushbutton so the relay holds itself on after the first press, and use the second contact pair to switch the external load and any LED status indication [#21664026] For a single-button on/off function, the thread also points to simple toggle circuits, including a relay toggle built around a 555 timer [#21664027] To make the circuit come up in a predictable state after power loss, add a reset delay on the 555 reset pin with about 15 kΩ to +12 V and 0.047 µF to ground [#21664030]
Generated by the language model.
ADVERTISEMENT
  • #31 21664048
    Mark Harrington
    Anonymous  
  • ADVERTISEMENT
  • #32 21664049
    Peter Owens
    Anonymous  
  • #33 21664050
    Mark Harrington
    Anonymous  
  • ADVERTISEMENT
  • #34 21664051
    Mark Harrington
    Anonymous  
  • #35 21664052
    mark Munday
    Anonymous  
  • #36 21664053
    Mark Harrington
    Anonymous  
  • #37 21664054
    Mark Harrington
    Anonymous  
  • ADVERTISEMENT
  • #38 21664055
    mark Munday
    Anonymous  
  • #39 21664056
    mark Munday
    Anonymous  
  • #40 21664057
    Steve Lawson
    Anonymous  
  • #41 21664058
    Mark Harrington
    Anonymous  
  • #42 21664059
    mark Munday
    Anonymous  
  • #43 21664060
    Mark Harrington
    Anonymous  
  • #44 21664061
    mark Munday
    Anonymous  
  • #45 21664062
    Mark Harrington
    Anonymous  
  • #46 21664063
    mark Munday
    Anonymous  
  • ADVERTISEMENT
  • #47 21664064
    Mark Harrington
    Anonymous  
  • #48 21664065
    Mark Harrington
    Anonymous  
  • #49 21664066
    Steve Lawson
    Anonymous  
  • #50 21664067
    mark Munday
    Anonymous  

Topic summary

✨ The discussion centers on designing a small 12V automotive toggle circuit using a momentary press-button switch with an integrated LED, intended to control power to front parking sensors in a vehicle. The switch has four wires: two for the input/output power feed and two for the LED circuit. The user requires a circuit that toggles the 12V output on/off with each button press, illuminating the LED when power is cut off, and automatically resets to the off state when vehicle power is cycled or speed exceeds a threshold (around 6-10 km/h), as the CAN bus feed controlling the sensors cuts out above this speed. The switch itself is momentary and not a latching type, so a relay-based holding or toggle circuit is needed to maintain state after button release. Solutions discussed include using a 12V DPDT relay with a holding circuit, or a 555 timer-based toggle circuit with reset delay to ensure predictable startup state. The LED indication can be wired to show the relay state or power cutoff. The circuit must integrate with the vehicle's CAN bus speed-triggered output and ignition feed to manage auto-reset and override functions. The user shared OEM switch details (part number 13315847) and wiring challenges, including tracing multiple wires and understanding negative versus positive switching pulses. The final solution involves a custom-designed PCB with microcontroller code to handle toggle logic, LED control, and CAN bus speed input, allowing for future firmware modifications such as timing adjustments or remote control features. The PCB is hand-fabricated and programmed by the designer, with full schematics, Gerber files, and source code made available for download. The discussion also touched on intellectual property concerns regarding circuit design and code copyright. Overall, the project delivers a tailored automotive toggle switch circuit with LED feedback and CAN bus integration for parking sensor control.
Generated by the language model.

FAQ

TL;DR: Use a momentary OEM button to toggle a relay via a 555-based flip‑flop; add a 15 kΩ/0.047 µF power‑up reset so it starts predictably. “The ‘Relay Toggle Circuit Using a 555 Timer’ should do what you want.” [Elektroda, Steve Lawson, post #21664030] Why it matters: This lets car owners add a clean on/off control with an LED indicator that resets correctly after power cycles.

Quick Facts

How do I make a momentary car switch act like a latching on/off?

Add a toggle circuit. A 555 timer in toggle configuration drives a relay. Each press switches state and holds it until the next press. This matches the OEM momentary button and gives a stable on/off output for accessories. [Elektroda, Steve Lawson, post #21664030]

What is a relay holding (latching) circuit and why would I use it?

A holding circuit keeps a relay energized after a brief trigger. One relay pole feeds its own coil path to maintain state; another pole switches your load. It enables push-to-on and push-to-off behavior using simple switches. “This is known as a holding circuit, or set & reset.” [Elektroda, Earl Albin, post #21664026]

How can I wire an OEM button so the LED lights when power is cut or passed?

Use separate LED leads from the switch. Drive the LED from the logic state: LED ON when the toggle or relay is in the selected state (e.g., output enabled). The thread confirms distinct pairs for switch and LED wiring. [Elektroda, mark Munday, post #21664018]

How do I avoid the switch coming up in the wrong state after the car is restarted?

Add a timed reset to your 555. Tie RESET to +12 V through about 15 kΩ and to ground via 0.047 µF. This creates a brief delay that forces a known startup state after power cycles, improving predictability. [Elektroda, Steve Lawson, post #21664030]

My speed-based feed drops above 10 km/h and the PCB resets. How do I keep state?

Power the control PCB from ignition and use the speed line only as a logic input. That way, the module retains its last state while the car is on, instead of resetting whenever the speed output cuts. [Elektroda, mark Munday, post #21664056]

What is CAN bus in this context?

Here, a CAN-interface module reads vehicle speed and provides a trigger output. Below about 10 km/h, it outputs a control signal used to enable front sensors. The discussion focuses on using that output to drive your toggle logic. [Elektroda, mark Munday, post #21664059]

Can I remove the negative-to-positive converter relay from the CAN output?

Yes. The designer proposed sensing the CAN module’s native negative pulse directly and handling polarity in code or logic. That eliminates the extra relay stage and simplifies wiring. [Elektroda, Mark Harrington, post #21664062]

How should the system behave below and above 10 km/h?

Below 10 km/h, enable the front sensors and illuminate the switch LED to show active state. Above 10 km/h, disable the sensors, yet you can keep the LED logic consistent with your chosen UX if ignition powers the control board. [Elektroda, mark Munday, post #21664063]

What if the button only has momentary continuity when pressed?

That’s expected with OEM buttons. Feed it into a toggle (flip‑flop) circuit to turn momentary presses into latched states. Link the LED to the latched output so the indicator reflects the true system state. [Elektroda, mark Munday, post #21664023]

Is a 555 toggle the only way to do this?

No. You can implement a transistor or CMOS flip‑flop, or a microcontroller. A 555 is simple and available; code-based designs add flexibility for future features like remote control or timing changes. [Elektroda, Earl Albin, post #21664027]

Three-step: how do I add a predictable power‑up reset to my 555 toggle?

  1. Connect RESET to +12 V through about 15 kΩ.
  2. Connect RESET to ground with a 0.047 µF capacitor.
  3. Power cycle and verify the same startup state every time. [Elektroda, Steve Lawson, post #21664030]

Can the PCB drive the OEM switch LED instead of an on‑board LED?

Yes. Replace the board LED with two leads routed to the switch’s LED pins. This was requested and accepted during the design, keeping the OEM look and feel inside the cabin. [Elektroda, mark Munday, post #21664055]

What happens at around 6 mph (≈10 km/h) in some cars, and why does it matter?

Certain vehicles cut the accessory feed near 6 mph, which can reset add‑on electronics. Power control logic from ignition and sense speed separately to prevent unintended resets and state loss. [Elektroda, mark Munday, post #21664023]

I discovered six traced wires on the OEM switch—did I do something wrong?

No. OEM switches can include separate lines for button contacts, LED indicator, and backlight, sometimes with negative-driven logic. Identify each pair by continuity and isolate LED polarity before wiring. [Elektroda, mark Munday, post #21664067]

Is there a ready project with PCB, code, and documents to start from?

Yes. A contributor produced Gerbers, parts list, notes, and code for a working board. It was built, tested, and documented for this application, easing replication. [Elektroda, Mark Harrington, post #21664051]
Generated by the language model.
ADVERTISEMENT