waking computer from a relay signal

Discussion in 'Off-Topic Forum' started by priscus, Feb 19, 2017.

  1. priscus

    priscus

    Joined:
    Jun 1, 2016
    Messages:
    396
    Likes Received:
    152
    I am thinking of re purposing a laptop (if I find suitable cheapy on ebay) to act as an always on (24/7) monitoring device. Intend to run it headless, ie no keyboard or screen.

    It had been my original intention to use a microcontroller for this, but a sleeping laptop, drawing about 1mW, and with standby battery provision already incorporated has prompted me to consider this alternative.

    So to my question:

    Laptops employ a 'lid closed' sensor, which I understand sends an 'APIC (Advanced Programmable Interrupt Controller) signal to sleep/hibernate/shut down/do nothing according to preference selected in BIOS.

    Can I wake the laptop from sleep using a similar simple event detector?

    ie detecting an external relay operation rather than a bus state.

    Any help greatly appreciated.
     
    priscus, Feb 19, 2017
    #1
  2. priscus

    tienkhoanguyen

    Joined:
    Oct 30, 2016
    Messages:
    69
    Likes Received:
    4
    If you are an engineer you could design a simple gateway to turn on or off the computer. The power button is a two state signal. When you push it an electrical signal is sent to switch to the electronic to on position. So you could divert that button to your purpose. Just my humble thoughts from my limited understanding.
     
    tienkhoanguyen, Feb 20, 2017
    #2
  3. priscus

    priscus

    Joined:
    Jun 1, 2016
    Messages:
    396
    Likes Received:
    152
    No, I do not want to turn it on and off.

    I do not want to boot the machine.

    I want the machine poised ready to deal with the event which wakes it.
     
    priscus, Feb 20, 2017
    #3
  4. priscus

    priscus

    Joined:
    Jun 1, 2016
    Messages:
    396
    Likes Received:
    152
    Sorry, just in case I am not making myself clear. This machine to be ALWAYS ON.

    The action that I wish to implement is that it transitions between two states:

    1 The low power (sleep state)

    2 Active state in response to a trigger event.

    I can use the 'lid closed ' sensor to switch it to state 1.

    I am seeking a simple way to switch it to state 2.

    It must perform the latter WITHOUT rebooting the operating system.
     
    priscus, Feb 20, 2017
    #4
  5. priscus

    Elizabeth23

    Joined:
    Dec 10, 2012
    Messages:
    5,844
    Likes Received:
    754
    Location:
    Florida
    @priscus, my ethernet adapter has a section where I can set it to Wake on Lan after shutdown, I have it disabled as I am not sure what it does and I do not want anything turning on my pc if I turn it off, which I do not do mine is on 24/7. :)

    ===========

    http://windowssecrets.com/forums/sh...chedule-task-does-not-wake-windows-from-sleep

    in the above thread the poster is trying to do the same thing and everyone is saying use task scheduler and you may or may not need to have a password for your account to run it with task scheduler.

    you can read through several threads at the below search page, you just have to weed out the ones that are for win7 and up.:

    https://www.google.com/#q=how+can+I+make+my+laptop+wake+up+at+a+certain+event,+xp
     
    Elizabeth23, Feb 20, 2017
    #5
  6. priscus

    tienkhoanguyen

    Joined:
    Oct 30, 2016
    Messages:
    69
    Likes Received:
    4
    I'm sorry. My English comprehension could be better. If only I read clear like I seem to be able to write some to an extent. haha Anyways, the sleep state is also a 2 position situation. When the lid is closed the signal is given and when it is open it is given again. If you would like to open a thrown out computer you will notice that it is one of two possible ways to do this. If it is a mechanical design then you are in luck if you know engineering. If it is an infrared sensor then it is an easier task but you need an object that moves the sensor of the infrared from one point to another from eBay. It sounds easier than it appears at times unless you are experienced with it.

    I am working on my studies in assembly language and the reference book makes it sound so easy then I go and try to implement it in my program and it is a fail! haha So much for my big "I am a King of Programming!" ego.
     
    tienkhoanguyen, Feb 20, 2017
    #6
  7. priscus

    priscus

    Joined:
    Jun 1, 2016
    Messages:
    396
    Likes Received:
    152
    In older laptops a micro switch.
    Currently usually a magnet and 'HALL-Effect' sensor.

    My first intention had been to relocate both magnet and sensor, and lengthen the wire to place sensor where I could arrange equipment to remotely trigger it.

    Experiments thus far, reveal that I can reliably put machine to low power states (sleep, suspend, or whatever), but it does not seem reliable at waking machine to active state, and has caused a re-boot on occasions.

    I need to avoid re-boot. Even if I were to have my desired action run as program in start-up, the latency, and opportunity for stalling would defeat my purposes. Similar if I replicate by other means an activating of the power-on button.

    The 'Wake on LAN' feature starts the machine when a packet of data (known as a magic packet) is recognised by the machine as the appropriate key to trigger it. If I had translated my trigger event into a magic package, I would have already performed the detection which this exercise is attempting to create.

    Wondering if I can use the keyboard connector to inject a wake up signal?

    More experiments called for..............
     
    priscus, Feb 20, 2017
    #7
  8. priscus

    priscus

    Joined:
    Jun 1, 2016
    Messages:
    396
    Likes Received:
    152
    PS I purchase very cheap second-hand machines on FleabBay, on which to experiment, so it is not the end of the world if my experiment knackers the device and renders it u/s.
     
    priscus, Feb 20, 2017
    #8
  9. priscus

    Elizabeth23

    Joined:
    Dec 10, 2012
    Messages:
    5,844
    Likes Received:
    754
    Location:
    Florida
    did you try the task scheduler?? or is this not what you are trying to do??
     
    Elizabeth23, Feb 20, 2017
    #9
  10. priscus

    tienkhoanguyen

    Joined:
    Oct 30, 2016
    Messages:
    69
    Likes Received:
    4
    Also, I had taken a keyboard open and looked at it from the inside. What a key does is there is a metal on the roof of a bubble. When you press down the key the bubble goes down and connects two polarities. That sends that signal that that key has been pressed. So you could make it go to sleep then send the signal to the key that way.
     
    tienkhoanguyen, Feb 20, 2017
    #10
  11. priscus

    tienkhoanguyen

    Joined:
    Oct 30, 2016
    Messages:
    69
    Likes Received:
    4
    A little selfish on my end, however, thank you for FleabBay. I might need one (a real one).
     
    tienkhoanguyen, Feb 20, 2017
    #11
  12. priscus

    priscus

    Joined:
    Jun 1, 2016
    Messages:
    396
    Likes Received:
    152
    Task scheduler will wake machine at pre-determined time, but I cannot see a way to make it respond to an external event.

    Keyboard operation is slightly more complex than switch closure sending a signal to processor.

    To avoid the necessity to monitor some ninety connections, the keys are arranged in an array, and scanning of array columns is combined with data identifying which row had been activated when scan performed. A key which has been depressed is thus identified. Usually this is then translated in a look-up table to something the software can utilise . Hence the keyboard connector ribbon cable only requires a dozen or so conductors.

    It may be possible to make use of the keyboard input, but I do not anticipate it being simple.
     
    priscus, Feb 20, 2017
    #12
  13. priscus

    tienkhoanguyen

    Joined:
    Oct 30, 2016
    Messages:
    69
    Likes Received:
    4
    Sorry priscus,

    My engineering knowledge is limited to an electronics booklet that my dad (a helicopter pilot) gave to me when I was a little kid. I was told by my dad to program since you are not going to be an engineer! However thank you for teaching me a little more about how the keys work. I had noticed the ribbon with 21 or so wires in an IDE and other areas being so small yet vague remember somehow carrying so much information like you have mentioned.
     
    tienkhoanguyen, Feb 20, 2017
    #13
  14. priscus

    tienkhoanguyen

    Joined:
    Oct 30, 2016
    Messages:
    69
    Likes Received:
    4
    JESUS!

    Now this is a little dangerous. So wear infrared goggles. If you utilize the keyboards you could have an infrared beam pass to connect one polarity to the other for the key that is sensed. So if you have 100 states you would need an elaborate 100 beams set up ready to send so the key signal is send.

    You mentioned you want to make the wires longer so you would be able to work with it easier from a distant. For instance without a wire you need to connect right on top of the key being worked on. However with an extended wire you can work from 20 feets away. So the beams would not hit you if something would happen. And you could pull the plug.

    You would also need to be a programmer if you wish to make something special happen. For instance you write your own program to keep monitoring the keys. When it is triggered from the distance the software would perform a task for instance tell that an intruder has entered the home? One trigger per key (ie garage door etc.) You might even include a key for an on alarm and off alarm. Your software would also make a sound.

    Just something to think about since you seem to have some advance knowledge.

    Sorry for my English once again. Thank you for accomodating an immigrant in USA.
     
    tienkhoanguyen, Feb 20, 2017
    #14
  15. priscus

    tienkhoanguyen

    Joined:
    Oct 30, 2016
    Messages:
    69
    Likes Received:
    4
    http://www.mediafire.com/file/owz131880cr1n9l/CMPST.EXE

    Here is a generic mainly assembly language program. It is not that hard to do all in assembly either albeit a little more work. It monitors an array and tells the signal on or off. So you would have to put each key in an appropriate array. For instance A goes in array 1, B in 2, etc. Once the A is pressed 1 goes in array 1. The cmpst is a simulation program that is just a model and a prototype to be worked out. It analyze and says 3 states. 0 for on 1 for off. And maybe 3 for suspend.

    I'm just practicing my programming in honour of my two parents.
     
    tienkhoanguyen, Feb 20, 2017
    #15
  16. priscus

    tienkhoanguyen

    Joined:
    Oct 30, 2016
    Messages:
    69
    Likes Received:
    4
    Added:

    The values where arranged ahead of time for 3 arrays. It has been tested to work however I have not knowledge about an outside signal yet. So sorry my friend.
     
    tienkhoanguyen, Feb 20, 2017
    #16
  17. priscus

    tienkhoanguyen

    Joined:
    Oct 30, 2016
    Messages:
    69
    Likes Received:
    4
    Depending on the programming language it may contain sensors to program. I am not advance enough to program in pure Windows. So I cannot do that. However for MS-DOS and older hardwares that would be feasible. Besides electronics with the use of old hardware I am familiar. And I know it is doable with the designs discussed so far.
     
    tienkhoanguyen, Feb 20, 2017
    #17
  18. priscus

    tienkhoanguyen

    Joined:
    Oct 30, 2016
    Messages:
    69
    Likes Received:
    4
    You can do everything you want in MS-DOS that you can do in XP from my experiences. The only difference is the speed and the resolution and color. However MS-DOS performs at minimum 4.77 MHz per second and for 100 keys that is a drop in the bucket or a wink of the eye timeframe!
     
    tienkhoanguyen, Feb 20, 2017
    #18
  19. priscus

    tienkhoanguyen

    Joined:
    Oct 30, 2016
    Messages:
    69
    Likes Received:
    4
    Depending on how old you are. A usual course in Engineering is 4 years and the same goes for computer programming. If you specialize you will reach your mark all by yourself within 8 years. Plus you'll need 1 helper (preferably your wife) to take care of the kids and the housework and little details. You get all the credits for your family.

    Jesus Christ! Bless GOD, Jesus Christ, Mary, and The Holy Spirit# Then bless my real mom Vu Thi Thuyen Huong. Honours to my real mom Vu Thi Thuyen Huong and my real dad Nguyen Binh Thuy. Congratulations to my real two sisters Nguyen Khoa Thuyen and Nguyen Khoa Thi.
     
    tienkhoanguyen, Feb 20, 2017
    #19
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.