diy momentary switch - Page 1
Forum section: electronics / beginners

author: andrewlapham
author_rank: Contributor
timestamp: June 05, 2019, 12:02:05 pm
content: I'm looking for a way to power a small form factor pc using the car ignition. As the power button on the device is momentary I will need a solution that only makes continuity for a short time. I know my options are using momentary relays and or microcontrollers but I would like a more hands on solution only using standard components. I have plenty of regular relays, transistors and many other basic componants, any ideas?

author: ledtester
author_rank: Super Contributor
timestamp: June 05, 2019, 08:07:17 pm
content: What kind of operating logic do you want? Will the PC be connected to the car's battery all the time or only when the engine is running? Do you need to be able to sense when the engine is running and when it is turned off?Are you just looking for a simple RC timer circuit which will generate a digital pulse after power is applied? If so search for "monostable multivibrator" or "one-shot multivibrator".A quick Google search for "car pc power supply" brought up commercial products like this one:http://www.mini-box.com/M4-ATXThe "survives vehicle engine cranks" feature is noteworthy as the automotive electrical environment can be very noisy.Update 2... (removed the youtube video since it uses relay) this circuit is probably more what you want:https://daycounter.com/Circuits/Pulse-Circuits/Pulse-Circuits.phtml

author: andrewlapham
author_rank: Contributor
timestamp: June 06, 2019, 02:02:34 am
content: Hey, thanks for the reply.So I want the PC to receive the power on signal when the car is turned on. I'm not too worried about a graceful shutdown as I can send shutdown commands via SSH.Can the transistors in this example be replaced with general purpose componants like 2n222?

author: ledtester
author_rank: Super Contributor
timestamp: June 06, 2019, 07:48:57 am
content: Yes - any general purpose NPN and PNP transistors (note there is one of each) should work.

author: andrewlapham
author_rank: Contributor
timestamp: June 06, 2019, 09:16:06 am
content: hey i love this design and am going to put it together tomorrow. have you got any suggestions on how i can keep the circuit safe from spikes and general car electrical noise?

author: andrewlapham
author_rank: Contributor
timestamp: June 06, 2019, 10:59:43 am
content: OK so I've done a bit more googling on this and i came across a a page that details a schematic for everything i need, haha. but it seems it is very different to the one you supplied and this new one seem a lot more complicated. are these the same in terms of function?Here is the link:http://solorb.com/elect/bootcirc/PCautoboot/

author: ledtester
author_rank: Super Contributor
timestamp: June 06, 2019, 04:33:36 pm
content: That web page has a very through description of what the circuit does and how it works. It's more complicated because it sequences two control lines and takes great pains to make sure things are done in the right order with the right timings.You haven't said much about how your car PC is powered, so it's impossible to assess whether this circuit will work for you. When the engine is off will the PC be powered but in standby mode, or will it be powered off, or ...Is it powered from the car's battery or does it have its own power source? The more information you can give the more help you can get.

author: andrewlapham
author_rank: Contributor
timestamp: June 06, 2019, 11:58:55 pm
content: Ok, the PC is a small form factor NUC that runs off 5v, I have wired a step down converter into the car as a high current PSU is needed for the device. To turn it on you just have to press the small momentary switch on the case for it to boot. I have desoldered said switch and replaced it with two floathing wires.

author: Mr.B
author_rank: Unknown
timestamp: June 07, 2019, 12:05:58 am
content: Could you connect the step down supply via a relay to the car.Turn the relay on when the car ignition comes on.Change the NUC BIOS settings to "Always power up when power resumes".Momentary power switch now no longer required...

author: andrewlapham
author_rank: Contributor
timestamp: June 07, 2019, 12:07:30 am
content: The buck converter is wired directly in the accessory line converting the 12 - 14.5v from the line down to the 5v needed. And I'm guessing this curciut will need to be placed before the buck converter? Or could it be placed after if the caps and resistor values are changed?

author: Mr.B
author_rank: Unknown
timestamp: June 07, 2019, 01:16:04 am
content: I would place the relay before the buck converter.This eliminates any draining of the battery from the buck converters idle current.Additional thought...If you want to prevent the NUC from encountering a blackout when the ignition is turned off:Use the NUC to keep itself alive using the USB 5v. (As long as the BIOS turns off the USB 5v after the operating systems shuts down.)Use the following example circuit:

author: andrewlapham
author_rank: Contributor
timestamp: June 07, 2019, 01:57:21 am
content: Perfect, cheers mate.