Using USB voltage as trigger

Morning everyone!

I'm modding my monitor and need a motor to start when the PC turns on (monitor moves into working position) and when it turns off (return to resting position).

My plan was to read the USB voltage. When the PCs mainborad gets power, the USB port gets power. That in turn switches a relay which adds a 9V power source on Vin (USB alone doesn't provide stable enough current).

This ist the first problem. How do I detect that the PC is powering up to start the motor? I need no communication at this point, just a "Ah! PC has power!" type thing.

Second problem is moving the monitor back. If I wait for the PC power to turn off, the monitor won't start returning to resting position until after shutdown (which is too long and not cool), but I would like it to be simultaneous. Best idea I've had to far was a sending a signal to the Arduino to shut down by adding an .exe file to the Windows shutdown batch. I'd write the file in C++ or java (I know, java and USB...).

Upon getting said signal from the computer the monitor should move to resting position, then switch off the relay to the 9V source, powering down the Arduino completely.

Is that even possible? Is there (as usual) a much smarter idea I haven't thought of?

I hope the question is understandable. I can gladly provide code and wiring, but I figured this is more of a general question not only referring to my particular setup.

Thaks a bunch,
M

Do you use your PC in sleep mode? Many PCs wake on keyboard or mouse, so USB power is not turned off in sleep mode.

Other than that, sensing USB power is not at all difficult but you may wish to find a "Y" cable so that the USB port can still be used by an actual USB device.

You are of course going to power the motor from a separate supply.

What if anything does this have to do with Arduinox?

I do not use my PC in sleep mode.

What does it have to do with Arduino? I don't understnd, I want to know how to sense the USB power. The code for the Arduino. Will Serial.available() do the trick?

Unless I switch my PC off with the power switch on the back, my USB power stays on after a Windows shutdown.

I've noticed that when I left an Arduino connected.

The USB on my laptop goes away when the "screen saver" blanks the screen. Had to disable the power saving setting.
Paul

flice:
I'm modding my monitor and need a motor to start when the PC turns on

"Green powerboards" are designed to do that.
Leo..

An optocoupler connected to the monitor power indicator comes to mind ...

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.