Use usb power as an input

Hi!

I'm currently making a motorized projector screen and i'm looking to trigger the screen to go down when i'm powering on the projector.

Since the USB port of my projector isn't energized when the projector is turned off, i was thinking to use that as a trigger.

My question is: Can i hook up the 5v Vcc output of the USB port to a pin as an input for the arduino to trigger an action?

Thanks! Marc

If the projector has a power led, you can detect when it is on without tampering with the USB connect or projector.

Yes, but what's powering the Arduino? If it's coming from a different source with a different ground then connecting the grounds through the USB cable may be harmful. Like burst-into-flames harmful.

If you're not sure then an optocoupler will allow the USB to be detected without connecting the ground. That probably explains the recommendation above.

so basically you want the projector screen to roll down when you switch the projector on ?

can't you just connect the power switches together ?

is there anything else you want the projector screen to do that would require a microcontroller ?

GoForSmoke:
If the projector has a power led, you can detect when it is on without tampering with the USB connect or projector.

It does have one, but since my projector is still under warrenty, I would prefer to not modify the projector it self.

BabyGeezer:
so basically you want the projector screen to roll down when you switch the projector on ?

can’t you just connect the power switches together ?

is there anything else you want the projector screen to do that would require a microcontroller ?

That’s exacly what i want to do (sorry if i was not clear, english is not my first language). I can’t use the same switch becose i’m using my multi-function remote to power up my projector and accesories.

The arduino will also trigger an stepper motor and the two micro-switch will act down and up limit.

MorganS:
Yes, but what’s powering the Arduino? If it’s coming from a different source with a different ground then connecting the grounds through the USB cable may be harmful. Like burst-into-flames harmful.

If you’re not sure then an optocoupler will allow the USB to be detected without connecting the ground. That probably explains the recommendation above.

The cummon ground and different source is also my concern. I’m relatively new to electronic and that’s why i was asking. :slight_smile:

I also cheked and i do have an octocoupler (4N35 645Q), i’ll chek how this thing work. But after a quick reserch, those thing look awsome!

I’ve join a schematic of the basic setup that i had in mind, dou you guy thik it woulf work or i’m playing with fire? If so, i’ll chek if an octocoupler work, as you said.

Thanks!
Marc

You don't need to touch the projector to detect the power light. What you do is put a phototransistor at the back end of a small diameter tube (flat black inside) to restrict its view and aim it at the power light. The restricted view keeps other light sources from triggering the detector. If the aim is good and the tube long enough, this can detect from not-close at all..

This works for light beam break systems, the beam is light that enters the detector and can be any bright enough source. The detector circuit can be tuned to cut out weak light by adding a resistor.

xiloti:
My question is: Can i hook up the 5v Vcc output of the USB port to a pin as an input for the arduino to trigger an action?

Thanks!
Marc

Sure, you could do that. You have to have a common ground connection between the Arduino and the projector, and it would be wise to have a series resistor in the signal path to prevent damage to either device in case voltages in excess of 5V, when the Arduino is turned off, or for other unpredictable reasons. The optocoupler circuit is a good idea, just more complicated.

aarg: Sure, you could do that. You have to have a common ground connection between the Arduino and the projector, and it would be wise to have a series resistor in the signal path to prevent damage to either device in case voltages in excess of 5V, when the Arduino is turned off, or for other unpredictable reasons. The optocoupler circuit is a good idea, just more complicated.

Would this arrengement of the octocoupler work?

See image

If I direcly connect the USB to the arduino, how many ohm resistor would be the best?

You need a current limiting resistor on the input side of the 4N35. You can enable the internal pullup resistor on pin 2 of the Arduino. Please add the diagram as an attachment because the forum software appears to be rejecting the link when I try to inline it.

OP,

I imagine that you want to turn on the projector and drop down the screen at the same time. Then do you also want to turn off the projector and pull up the screen at the same time?

If yes, then you should have an arduino telling the projector to turn on and the screen to drop down, not how you described it, turning on projector and letting arduino detect the projector is on.

We have these systems in classrooms and conference rooms. There is a central control panel that turns on the projector via an IR emitter stuck to the projector's IR receiver and possibly microcontroller to operate the motors.

For your projector, does it have some control port such as a serial port? If not, you can still use the IR method.

Sorry to warm things up. But why not using the 5V USB power to trigger a relais? You don't need an Arduino at all for that. This might be helpful for those, who also want to trigger their motorized screen.

here's what I did:

|500x239

I used a relais from Weidmueller, which can operate 230V and be triggered by 5V (the only one I found so far). The screen's motor "down" is connected to the NO port of the relais, the motor "down" to the NC port. I added a 850mA fuse (nonunit protection) on the feed side. So by turning on the projector, the screen loweres and as soon as the projector turns off, the screen winds back up.

With an usual USB 5V recharge cable you don't even have to bother with too many wires after stripping the cable ;)