Author Topic: Turn on laptop / push button once  (Read 2192 times)

0 Members and 1 Guest are viewing this topic.

Offline penguTopic starter

  • Newbie
  • Posts: 4
  • Country: ca
Turn on laptop / push button once
« on: November 01, 2017, 03:37:08 am »
Hey, I want to build a circuit that can turn an old laptop on once there is power, the laptop does not have an option in bios and it does not support WOL.

I've opened up the laptop and there's a tactile switch button that needs to be shorted and the circuit opened for it to turn on. I can't push it more than once otherwise the laptop will turn off.
There is a blue LED next to the button that is turned on after the button is pressed and released. There's also a 19v dc in near by I could get power from.

I don't know a lot about electronics so I'm not sure where to start, I either want to simulate a short on the button once ever and realsed once power is applied, or ideally simulate a click when the power LED is off.

Any help would be appreciated, thanks!
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12807
Re: Turn on laptop / push button once
« Reply #1 on: November 01, 2017, 07:13:03 am »
You'd start by checking if either side of the button goes to a supply rail or to ground (local 0V not Earth), and which side of the LED has the biggest voltage change between off and on.

A further complication is whether or not the LED flashes in standby - if so your circuit needs to detect that and treat it as LED on.   Another issue is battery state - assuming the battery is still functional - It is extremely undesirable to force a power-up if the battery doesn't have enough charge for an orderly startup and shutdown. 

Then you must consider the space available for your circuit and how you can mount it without blocking ventilation and possibly causing other parts to overheat.   Depending on the space available, it may be extremely challenging even for an expert in SMD circuit design and assembly,  or if there's lots of space it may be easy for any novice J. Random Hacker to assemble something to fit 'dead bug' style or even on protoboard. 

The timing and sequencing required would push most of us towards a small MCU of some sort, + a micro-power regulator to power it and various circuits to interface between the MCU's logic level I/O pins and the signals in the laptop.   Do you have any experience with the Arduino platform or any other type of MCU?    If not, although its possible to do this sort of stuff without programming, it typically requires a significantly more complex circuit, which will be much harder to design and test, and the capacitors required for longer RC delays  (e.g. to handle the blinking standby LED problem) or to delay powerup till the DC in has been stable for tens of seconds. are likely to be physically larger than one would prefer for a limited space design.
 

Offline newbrain

  • Super Contributor
  • ***
  • Posts: 1714
  • Country: se
Re: Turn on laptop / push button once
« Reply #2 on: November 01, 2017, 02:40:55 pm »
The timing and sequencing required would push most of us towards a small MCU of some sort, + a micro-power regulator to power it and various circuits to interface between the MCU's logic level I/O pins and the signals in the laptop.
Well, if the pushbutton closes a circuit with GND, maybe it's much easier.
Just use a monostable with an open collector or open drain output (in parallel to the switch), fed and triggered by the presence of the 19V (via a regulator, if needed).
After all, if I understood the OP correctly, they just just want to turn on the laptop when power comes back.
The LED is a red herring, as it would appear to be on only after the laptop is on.

A simple circuit with a couple of BJT or MOSFETs, and a handful of passives, should be just fine.
Nandemo wa shiranai wa yo, shitteru koto dake.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12807
Re: Turn on laptop / push button once
« Reply #3 on: November 01, 2017, 04:29:46 pm »
It gets a lot more complicated than that.  If the LED is off, and 19V_in is present it needs to pulse the button once X seconds after 19V_IN goes high.   

If you don't stick a longish delay in there it will try to turn on when power briefly reappears, which happens a lot if the utility linemen are trying to clear multiple faults, or the reason for the failure was a local open circuit.

Its that handful of passives that's the problem.  For any laptop worth resurrecting, at best there's physical space for a thimbleful!
 

Offline penguTopic starter

  • Newbie
  • Posts: 4
  • Country: ca
Re: Turn on laptop / push button once
« Reply #4 on: November 01, 2017, 08:40:58 pm »
I don't care about the size of the device or circuit, I could go the arduino or esp8266 route no problem. Especially if it'll be the easiest for me, I've got the programming experience but very little electronics experience. I'd prefer less overhead with a simple circuit but I'll be alright without one. I can power the device externally and then when the power is out to the laptop and device and the laptop is still running off batteries it can shut itself down.
 

Offline newbrain

  • Super Contributor
  • ***
  • Posts: 1714
  • Country: se
Re: Turn on laptop / push button once
« Reply #5 on: November 01, 2017, 09:54:20 pm »
It gets a lot more complicated than that.  If the LED is off, and 19V_in is present it needs to pulse the button once X seconds after 19V_IN goes high.   

If you don't stick a longish delay in there it will try to turn on when power briefly reappears, which happens a lot if the utility linemen are trying to clear multiple faults, or the reason for the failure was a local open circuit.
Eh, that'd be a nice implementation, but none of the motherboard BIOS I have around (a couple of NUCs and two Gigabyte) does that: there's no perceptible delay between the AC coming back and the PC starting up.

I'm usually more for digital/MCU but this time it might really be overkill...I would try something like this:

Of course, an MCU based solution is more flexible and would allow for more advanced functionality.

I don't care about the size of the device or circuit, I could go the arduino or esp8266 route no problem. Especially if it'll be the easiest for me, I've got the programming experience but very little electronics experience. I'd prefer less overhead with a simple circuit but I'll be alright without one. I can power the device externally and then when the power is out to the laptop and device and the laptop is still running off batteries it can shut itself down.
Both ESP8266 and Arduino are really too much, but a small ATtiny would fit the purpose quite well: see also this thread where a similar problem is solved, and Ian proposed a very smart fully analogue solution! :D
Nandemo wa shiranai wa yo, shitteru koto dake.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12807
Re: Turn on laptop / push button once
« Reply #6 on: November 01, 2017, 11:04:01 pm »
If you don't stick a longish delay in there it will try to turn on when power briefly reappears, ....
Eh, that'd be a nice implementation, but none of the motherboard BIOS I have around (a couple of NUCs and two Gigabyte) does that: there's no perceptible delay between the AC coming back and the PC starting up.
Yes.  Then you have to resort to stuff like enabling full POST and RAM checks to get enough delay before bootup, or if that's not enough, setting up multiple boot options for the OS (even if you need to add a dummy one) so you can set a delay before the default is chosen).

Re your proposed circuit: Add another MOSFET to hold down the gate of the button driver if the LED is on, to avoid the problem of a brief interruption of mains power causing the laptop to shut down when the mains comes back on, and you'd have something minimal, but workable, *IF* one side of the button is already connected to ground.

Its interesting to note that the O.P of the thread you just linked to ended up going with a MCU based solution in spite of several possible discrete or logic gate based solutions being offered.  Of course once you have a MCU in there, complex sequencing is essentially free, with the only cost being level translation for any extra sensing inputs, and a little development time, but more important, changes to the sequencing only need a few minutes at the keyboard + plugging in an ICSP cable, as opposed to switching on the soldering iron and changing the circuit.

@pengu,
The next step is for you to investigate the existing button and LED circuit as I asked initially:
You'd start by checking if either side of the button goes to a supply rail or to ground (local 0V not Earth), and which side of the LED has the biggest voltage change between off and on.
Post results (with voltages) here.
« Last Edit: November 01, 2017, 11:16:37 pm by Ian.M »
 
The following users thanked this post: newbrain

Offline Mr. Scram

  • Super Contributor
  • ***
  • Posts: 9810
  • Country: 00
  • Display aficionado
Re: Turn on laptop / push button once
« Reply #7 on: November 01, 2017, 11:26:41 pm »
I sounds like you are trying to run a laptop remotely. Are you trying to make one into a server?
 

Offline penguTopic starter

  • Newbie
  • Posts: 4
  • Country: ca
Re: Turn on laptop / push button once
« Reply #8 on: November 01, 2017, 11:27:25 pm »
here's an image of the location of the button, led, and power input: https://imgur.com/a/rze3j

the voltage difference between the button and the led are both 2.8v

I'm trying to have the laptop turn on when my car turns on, and it will act as a server
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12807
Re: Turn on laptop / push button once
« Reply #9 on: November 01, 2017, 11:45:43 pm »
The voltage difference between the LED and the button doesn't tell us anything useful.

Measure the voltage each side of the LED, with the laptop on, and again with it off with respect to the laptop chassis (e.g. the shell of a USB port).  Do the same with the button. If one side of either consistently reads 0V, (+/-0.1V), then with the laptop off, disconnected from power, and preferably with the battery removed, check for continuity between the 0V point and chassis using a DMM or other low output voltage meter on a low resistance range, (*NOT* an analog multimeter, Megger or other meter that uses a high test voltage).

Post the raw results here, carefully identifying each point tested and the laptop's On/Off state at that time.  There should be eight voltages, and depending on their values, up to two resistances.
« Last Edit: November 02, 2017, 12:23:25 am by Ian.M »
 

Offline newbrain

  • Super Contributor
  • ***
  • Posts: 1714
  • Country: se
Re: Turn on laptop / push button once
« Reply #10 on: November 02, 2017, 12:21:00 am »
Its interesting to note that the O.P of the thread you just linked to ended up going with a MCU based solution in spite of several possible discrete or logic gate based solutions being offered.
I happen to know him very intimately since long time, we usually (but not always) agree. :-DD

I'm trying to have the laptop turn on when my car turns on, and it will act as a server

And so we discover that:
  • Mains does not enter the picture
  • There's an available always on power source that can stand a small load (e.g. an MCU)

Given the above, a small MCU seems a good idea, one could implement a simple state machine that:
  • Tuns on the laptop when the car is turned on
  • Shuts it down when the car is turned off
  • Maybe supports its own button to override the automatism (so the laptop can be tucked away and its button needs not be reachable)

In fact, I have designed something very similar with an ATtiny, for a friend who wanted to change his iMac G5 mobo with a NUC one.
I attach the code below, if it can be of inspiration, it also understands a flashing LED for sleep mode to disable the iMAC backlighting.
The code  has been tested on target with a PSoC based rig to simulate all the surrounding HW, but not on the field, as my friend did not go through with his idea... :-//

the voltage difference between the button and the led are both 2.8v
This is not very clear, the real question is whether one side of the button (and of the LED) is connected to ground.
If not, we will need something as a small relay, or an analogue switch (CD4066?).

Edit: Missing license in the code.
« Last Edit: November 02, 2017, 12:25:24 am by newbrain »
Nandemo wa shiranai wa yo, shitteru koto dake.
 
The following users thanked this post: Ian.M, pengu

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12807
Re: Turn on laptop / push button once
« Reply #11 on: November 02, 2017, 12:27:31 am »
+1 to the above.  :-+

Its interesting to note that the O.P of the thread you just linked to ended up going with a MCU based solution in spite of several possible discrete or logic gate based solutions being offered.
I happen to know him very intimately since long time, we usually (but not always) agree. :-DD
I was being stupid  :palm: :'( I didn't remember or notice the identity of the O.P.  |O

Edit: personally, I prefer this licence
Code: [Select]
/*
 * -------------------------------------------------------------------------
 * "THE BEER-WARE LICENSE" (Revision 42):
 * "Ian.M" <https://www.eevblog.com/forum/profile/?u=104739> wrote this file.
 * As long as you retain this notice you can do whatever you want with this
 * stuff.  If we meet some day, and you think this stuff is worth it, you
 * can buy me a beer in return.     Ian.M
 * --------------------------------------------------------------------------
 */
Credits to Poul-Henning Kamp for formalising the Beer-Ware licence.
« Last Edit: November 02, 2017, 12:38:39 am by Ian.M »
 
The following users thanked this post: newbrain

Offline penguTopic starter

  • Newbie
  • Posts: 4
  • Country: ca
Re: Turn on laptop / push button once
« Reply #12 on: November 02, 2017, 12:38:11 am »
the top of the LED is -, bottom +, top of the button is -, bottom +

on: ground to led -: -0.02v, +: 0.01v
off: ground to led -: -0.09v, +: 2.96v

on: ground to button -: -0.09v, +: 2.96v
off: ground to button -: -0.001v, +: 2.8v
 

Offline Raj

  • Frequent Contributor
  • **
  • Posts: 689
  • Country: in
  • Self taught, experimenter, noob(ish)
Re: Turn on laptop / push button once
« Reply #13 on: November 05, 2017, 09:13:39 am »
Simplest method-Opto isolator also known as optocoupler

Or use a relay

When they are driven by a monostable 555 /mcu, your Job's done
« Last Edit: November 05, 2017, 09:17:59 am by Raj »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12807
Re: Turn on laptop / push button once
« Reply #14 on: November 05, 2017, 10:15:08 am »
The good news is it looks like one side of both the LED and the button goes to Ground.  Check continuity to chassis ground from the - side of each as I described earlier.  Once you've confirmed the button and LED have one side to chassis ground,  Newbrain's circuit from reply 5 should work.  To add my refinement from reply 6 that disables the circuit once the LED is on, you'll need to either use a low Vgs threshold MOSFET as the LED only gives you 3V to drive it, or you'll need to use a small signal NPN BJT  (e.g 2N2222), collector to the gate, emitter to ground  with a 100K series base resistor between it and the LED.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf