-1

As a project for my summer holidays am working on a system which will detect faces , depending on which it will either switch on or off the bulb connected to the system (USB preferred). I have successfully implemented the face detection part . Now am working on the bulb control part where I need help because I have no idea in this field .

to tell you in depth:

  1. I plan to have a normal florescent bulb of general volts to be connected to system from the usb.

  2. I want to control the power output from the usb , to control that bulb to either switch it on off.

Can any please guide my in these point? I am very new to this field so please dont mind if I have asked stupid question

Adithya
  • 103
  • 2

1 Answers1

1

Since this involves switching mains voltage, and Mains Voltage can kill, a beginner should not try to make one from scratch. Either go with a ready made commercial Usb Controlled Outlet, use a X-10 outlet designed for inductive loads with a X-10 Usb controller, or use a wireless remote controlled system that's used for outdoor lights (like they sell at christmas), with a USB GPIO module hacked to the remote control.

Alternatively, use a Led light bulb, not a CFL/Florescent light. Much easier. Some can even be controlled by iphones/android.

Passerby
  • 72,580
  • 7
  • 90
  • 202
  • I am not planning to connect to mains . I just want to connect the bulb to the wire which is coming out from the usb. – Adithya Apr 16 '13 at 05:28
  • The reason why I have to start from the scratch is that I am from INDIA and most of the things which you have mentioned are not available in the shops or are just too damn expensive. Just out of my curosity , cant i get a wire which is having usb plug on one end and cut the other end to connect to an open bulb? Also can you help me out with a link for x-10 outlet ? Thanks a lot – Adithya Apr 16 '13 at 05:34
  • @Adithya When most people say, Florescent bulbs, they are pretty much always talking about 120v/240v bulbs, which is Mains. If you are talking about a 12v CFL bulb, then you could use a `USB relay Module`. – Passerby Apr 16 '13 at 05:36
  • @Adithya USB is 5v, 500mA only, and 90% of the time you cannot control the USB supply from a computer. You would NEED a module or controller that communicates over USB, which then controls a relay to the bulb and a power source. You cannot just hook up a light bulb to usb and control it that way. – Passerby Apr 16 '13 at 05:39
  • thanks for the info . I have to send command from my program to manually switch on and off the USB relay module . Is there any API through which I can code it or control the relay? – Adithya Apr 16 '13 at 05:46
  • @Adithya each usb relay module is different. Which ever you get would have software or instructions on how to operate it. Some use simple serial communication. Others require specific drivers and api. – Passerby Apr 16 '13 at 06:09