USB LED project

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
Todd_Z
Forum Regular
Posts: 708
Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan

USB LED project

Post by Todd_Z »

It's been a while folks, good to be back.

I'm trying to create a minimalist program which will make an led blink through the usb port. I have found that usb cables have two power (5v) which are always on and two data cables.

I am looking to eventually tie a website peripherals - but first I must make baby steps.

Does anyone know how I would go about sending such a "signal" across the data cables so as to get a voltage? Anyone know of any good reads to learn about this?

Thanks!
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Post by Oren »

As a start, what programming language you are going to use?

P.S

5V is too much for a simple LED. 1.5V is optimal, so you will have to use a resistor and connect it in a series to the LED.
V = I * R, source is 5V and we want 1.5V to go to the LED, so we want the other 3.5V to fall on the resistor. Also, 20mA is optimal current for a LED, so we get:

R = V / I = 3.5 / 20mA = 3.5 / (20 * (10^-3)) = 175 Ohm
175 Ohm is not a standard resistor I believe, so in practice you'll want to use a 200 Ohm resistor.
You can also use a 100 Ohm resistor if you want the LED to emit more light.
User avatar
Todd_Z
Forum Regular
Posts: 708
Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan

Post by Todd_Z »

In the 200-level physics course on electronics here at umich.

Got myself a 220 ohm resistor in the mix.

I would like to use php since I am so comfortable with it - but i'll use anything if I can get it to work. C, perl, whatever.
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Post by Oren »

Well I've never done this before with USB to be honest, but I did such things with LEDs, C/Assembler 8086 and the parallel connector. I'm sure it's very easy though... just google it. I do have some old notebook with info about the USB connector from Assembler 8085 class, but my guess is that you won't be using Assembler, am I right?
User avatar
Todd_Z
Forum Regular
Posts: 708
Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan

Post by Todd_Z »

probably not asm - too hardcore for me at this point.
Post Reply