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

Thread Starter

Neil.Smith

Joined Jan 9, 2015
2
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
 

tshuck

Joined Oct 18, 2012
3,534
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.
 

Thread Starter

Neil.Smith

Joined Jan 9, 2015
2
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.
It must be wired as this is the challenge. Wireless solutions are widely common.
Any example to something similar that I can learn from?
 

sirch2

Joined Jan 21, 2013
1,037
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.
 
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.
 
Top