Need help with a school project: LED-USB-SMARTPHONE

Discussion in 'The Projects Forum' started by Neil.Smith, Jan 9, 2015.

  1. Neil.Smith

    Thread Starter New Member

    Jan 9, 2015
    2
    0
    Hi All,

    I took upon myself a project and it seems I'm way over my head.

    I want to connect an LED lamp to my Samsung Galaxy Note 3 using an OTG adapter (wired connection required only) and to be able to turn on/off the lamp and hopefully to be able to dim it as well.

    I tried many methods but can't seem to toggle the smartphone's USB port.
    I then found this USB control switch relay that is suppose to toggle the LED lamp but still, how do I connect it to my smartphone using cable and control it?

    All the guides I found explain how to control via wirelessy using a smartphone and I need it via a wired cable.

    Any suggestions?
    Is there a ready made solution I can look at?

    Thanks in advance!
    Neil
     
  2. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    I've never seen a 30-bit system...

    There is a pretty easy way to do it with Bluetooth, is there any reason it needs to be wired?

    You may want to check on the android developer site for USB OTG support in the SDK.
     
  3. Neil.Smith

    Thread Starter New Member

    Jan 9, 2015
    2
    0
    It must be wired as this is the challenge. Wireless solutions are widely common.
    Any example to something similar that I can learn from?
     
  4. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    The Android developer website has a lot of information for the Android side of things. Have a look here for some information on USB OTG.
     
  5. sirch2

    Well-Known Member

    Jan 21, 2013
    1,008
    351
    USB devices have a "type" which lets the controller know what sort of device is connected, this is how your PC knows if the USB device you just connected is a camera or a keyboard or a pen drive.

    The relay you linked to says it "Adopts HID technology". HID means Human Interface Device and is the USB class of things such as keyboards and mice. Google "Android HID API" for some info, there is also a link to Arduino source on the relay page you linked which may give you some clue as to what the relay expects as input.
     
  6. Marcos Martinez

    New Member

    Mar 6, 2015
    4
    0
    You could possibly take a pair of headphones and cut it where the wires split and take the + and - and send that to an LED.. (I haven't tested this) The power should LED and turning the volume up and down would possibly dim it.. (again i haven't tested this!!!) If when you connect the + and - the LED doesn't turn on try turning on a song to see if that works.
     
Loading...