Author Topic: diy momentary switch  (Read 1535 times)

0 Members and 1 Guest are viewing this topic.

Offline andrewlaphamTopic starter

  • Contributor
  • Posts: 48
diy momentary switch
« on: June 05, 2019, 12:02:05 pm »
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?
 

Online ledtester

  • Super Contributor
  • ***
  • Posts: 3280
  • Country: us
Re: diy momentary switch
« Reply #1 on: June 05, 2019, 08:07:17 pm »
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-ATX

The "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

« Last Edit: June 05, 2019, 08:35:10 pm by ledtester »
 

Offline andrewlaphamTopic starter

  • Contributor
  • Posts: 48
Re: diy momentary switch
« Reply #2 on: June 06, 2019, 02:02:34 am »
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?
 

Online ledtester

  • Super Contributor
  • ***
  • Posts: 3280
  • Country: us
Re: diy momentary switch
« Reply #3 on: June 06, 2019, 07:48:57 am »
Yes - any general purpose NPN and PNP transistors (note there is one of each) should work.
 

Offline andrewlaphamTopic starter

  • Contributor
  • Posts: 48
Re: diy momentary switch
« Reply #4 on: June 06, 2019, 09:16:06 am »
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? 
 

Offline andrewlaphamTopic starter

  • Contributor
  • Posts: 48
Re: diy momentary switch
« Reply #5 on: June 06, 2019, 10:59:43 am »
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/

 

Online ledtester

  • Super Contributor
  • ***
  • Posts: 3280
  • Country: us
Re: diy momentary switch
« Reply #6 on: June 06, 2019, 04:33:36 pm »
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.
 

Offline andrewlaphamTopic starter

  • Contributor
  • Posts: 48
Re: diy momentary switch
« Reply #7 on: June 06, 2019, 11:58:55 pm »
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.
 

Offline Mr.B

  • Supporter
  • ****
  • Posts: 1249
  • Country: nz
Re: diy momentary switch
« Reply #8 on: June 07, 2019, 12:05:58 am »
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...
Where are we going, and why are we in a handbasket?
 

Offline andrewlaphamTopic starter

  • Contributor
  • Posts: 48
Re: diy momentary switch
« Reply #9 on: June 07, 2019, 12:07:30 am »
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?
 

Offline Mr.B

  • Supporter
  • ****
  • Posts: 1249
  • Country: nz
Re: diy momentary switch
« Reply #10 on: June 07, 2019, 01:16:04 am »
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:
Where are we going, and why are we in a handbasket?
 

Offline andrewlaphamTopic starter

  • Contributor
  • Posts: 48
Re: diy momentary switch
« Reply #11 on: June 07, 2019, 01:57:21 am »
Perfect, cheers mate.   :-+
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf