Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > General Electronics Chat


General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion?

Reply
 
Tools
Old 5th November 2009, 12:39 AM   #1
Default How to check if a laptop is on (in standby)?

Hi to all,

Maybe this is a simple thing to do but I can't figure out how to do it.

I thought checking if the USB ports had power would work but they stay powered even in standby! So any ideas would be appreciated.

Al
__________________
Founder member of the Campaign to do Something about the nonexistent word "Somethink"
bigal_scorpio is offline  
Old 5th November 2009, 07:25 PM   #2
Default Come on guys I am really stuck here. :(

Hi again,

I really need to find some way of detecting if a laptop is running or in standby, I tried USB as I said and there is no serial port to test.

The only options I can see are the LAN port or modem port, but I don't know if any would be viable in the different states.

Any ideas?

Al
__________________
Founder member of the Campaign to do Something about the nonexistent word "Somethink"
bigal_scorpio is offline  
Old 5th November 2009, 08:10 PM   #3
Default

I don't know anything for sure. Try pinging your Ethernet port.

What exactly are you trying to accomplish and for what purpose?
DSGarcia is offline  
Old 5th November 2009, 08:38 PM   #4
Default

You can go into device manager and set the USB root hub power management properties to allow the computer to turn off the USB power to save power.
Dale
DSGarcia is offline  
Old 5th November 2009, 09:33 PM   #5
Default

Some machines support "wake on lan" and by sending it a "magic packet" you can wake the machine up. Easiest way is to ping the machine and it you don't get a reply assume it's asleep. If you want to wake it up send the magic packet.
gabeNC is offline  
Old 6th November 2009, 12:07 AM   #6
Default

I unusually check for the little LED light that turns on when it's in standby =)
__________________
"Because I be what I be. I would tell you what you want to know if I
could, mum, but I be a cat, and no cat anywhere ever gave anyone a
straight answer, har har."
Sceadwian is offline  
Old 6th November 2009, 10:51 AM   #7
Default

Hi guys,

My problem is that I am using the laptop as a carputer, its in the back of the car running my touchscreen in the front.

What I need is the laptop to come out of sleep when the ignition is on and go to sleep when its off. This was easy enough to do with a PIC and works ok until the ignition is switched on and off quickly (if the car doesn't start first turn for instance) and then because the waking/standby cycle takes about 10 seconds the whole thing can get out of sequence.

I tried the USB solution at first but even when the box that says "allow windows to turn off this device" is ticked the USB power remains ON during standby, I'm guessing that the actual device is sent a shutdown code, as ALL the laptops I have tried still have the power on even when in standby!

So I need something I can phisically measure which changes in standby.

Pinging and such is out of my scope I,m afraid and there is no light that comes on during standby on my laptop! The green power light simply flashes instead of being on steady.

There is a Firewire port on the laptop but I have never used this and don't know if this would be any different from USB in the way it is powered and there is a TV out mini din port I can access.

What I need is to somehow interface one of these outputs (if there is one) with my PIC to stop the on off sequence getting out of step.

Keep the suggestions coming guys...........Al
__________________
Founder member of the Campaign to do Something about the nonexistent word "Somethink"
bigal_scorpio is offline  
Old 6th November 2009, 06:52 PM   #8
Default

Quote:
Originally Posted by bigal_scorpio View Post
What I need is the laptop to come out of sleep when the ignition is on and go to sleep when its off. This was easy enough to do with a PIC and works ok until the ignition is switched on and off quickly (if the car doesn't start first turn for instance) and then because the waking/standby cycle takes about 10 seconds the whole thing can get out of sequence.
How about programming your PIC with a delay time greater than the amount of time it takes your laptop to go into/out of sleep mode. When the ignition is turned on, have the PIC take the laptop out of sleep, but then it will wait at least 10 seconds before attempting to put the laptop back into sleep. Same for ignition off going back to sleep.

Maybe also have a pre-change delay, so that:

1. If you turn ignition on and then off quickly (e.g. to roll up/down your windows without starting the car), the laptop stays asleep.

2. If you turn the car off and on quickly (say you drive a stick and stalled it and need to restart), the laptop stays awake.

3. Once the ignition has been on for 10 seconds, the laptop comes out of sleep. If the ignition is then shut off, the PIC will wait an additional 10 seconds to ensure the laptop is out of sleep before it goes back to sleep.

3. Once the ignition has been off for 10 seconds, the laptop goes into sleep. If the ignition is then switched back on, the PIC will wait an additional 10 seconds to ensure the laptop is asleep before it wakes it back up.
Quote:
Originally Posted by bigal_scorpio View Post
The green power light simply flashes instead of being on steady.
There you go. Wire the power LED to an input on your PIC, or use a photodiode/phototransistor/LDR taped over the LED, and have it sense the laptop's state that way. If the light is on steady, the laptop is awake. If it's flashing, it's on standby. If it's off, it's shut down. Then you can send whatever signal is appropriate to wake it up/put it to sleep/power it up.

Last edited by kpatz; 6th November 2009 at 06:55 PM.
kpatz is offline  
Old 6th November 2009, 11:41 PM   #9
Default

Hi kpatz,

Quote:
There you go. Wire the power LED to an input on your PIC, or use a photodiode/phototransistor/LDR taped over the LED, and have it sense the laptop's state that way. If the light is on steady, the laptop is awake. If it's flashing, it's on standby. If it's off, it's shut down. Then you can send whatever signal is appropriate to wake it up/put it to sleep/power it up.
I like that idea very much! But I am unsure how to get the PIC to know the difference between the flashing which is about 1 second on then 1 second off etc and steady on?

I am no genius with programming and just scrape by with the basics, which coincidentally is what I use (MikroBasic) and I think that is beyond me, can you or anyone else point me in the right direction code wise to do it?

Thanks Al
__________________
Founder member of the Campaign to do Something about the nonexistent word "Somethink"
bigal_scorpio is offline  
Old 7th November 2009, 12:03 AM   #10
Default

It should be pretty simple, feed the LED output from the laptop into a PIC input line, poll the I/O line say 5 times a second, if you get 10 I/O port readings that are all high (2 seconds with the LED on) you know the laptop is on. It'd be pretty easy to do.
__________________
"Because I be what I be. I would tell you what you want to know if I
could, mum, but I be a cat, and no cat anywhere ever gave anyone a
straight answer, har har."
Sceadwian is offline  
Old 7th November 2009, 12:53 PM   #11
Default

Quote:
Originally Posted by Sceadwian View Post
It should be pretty simple, feed the LED output from the laptop into a PIC input line, poll the I/O line say 5 times a second, if you get 10 I/O port readings that are all high (2 seconds with the LED on) you know the laptop is on. It'd be pretty easy to do.
Hi mate,

Yes that sounds just the job, my trouble is I never can think of these simple methods, I'm more of a solder and components type and the programming is hard to follow sometimes.

Anyway I'm off to give it a go now, thanks..............Al
__________________
Founder member of the Campaign to do Something about the nonexistent word "Somethink"
bigal_scorpio is offline  
Old 7th November 2009, 05:06 PM   #12
Default

Little code projects like this are perfect opportunities for you to learn to code better. It should be very simple and if you have trouble people will gladly help.
__________________
"Because I be what I be. I would tell you what you want to know if I
could, mum, but I be a cat, and no cat anywhere ever gave anyone a
straight answer, har har."
Sceadwian is offline  
Reply

Tags
check, laptop, standby

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
PID to start up a pc from standby Ciaran85 Electronic Projects Design/Ideas/Reviews 3 7th October 2008 12:40 PM
Ammeter for Standby Generator jwnetsource Electronic Projects Design/Ideas/Reviews 1 26th March 2008 12:40 AM
Entertainment equipment on standby SimonW General Electronics Chat 2 27th April 2007 12:12 PM
Receiver in standby mode micael General Electronics Chat 6 10th August 2006 10:45 AM
standby power supply mahinda jayasinghe General Electronics Chat 1 13th July 2004 09:47 AM



All times are GMT. The time now is 01:06 PM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker