0
\$\begingroup\$

Sorry if this is a dumb question, I am new to electronics and was looking at diagrams of USB cables and wondered,

"Could you use the low voltage data wires on a usb and a MOSFET or something to control the voltage from the higher voltage wires to make an LED blink on and off?"

I have been searching online and could not find much (maybe that's a bad sign) I have a cable that splits the 4 usb wires and connected them to a bread board and can turn on the LED with the +5V and -5V wires, but I'd like to know if I can use the other wires to control it?

Any advice is appreciated! Thank you

\$\endgroup\$
2
  • \$\begingroup\$ No. You can't. I can't just write "no" because my comment has to be 15 characters. \$\endgroup\$
    – user253751
    Aug 27, 2018 at 1:01
  • \$\begingroup\$ So what would I need to control an LED with usb data? I know I can do it with a PI or an Arduino, but are there any options that just use simple components on a bread board? \$\endgroup\$ Aug 27, 2018 at 1:17

2 Answers 2

1
\$\begingroup\$

No, you can't do this. You need a chip of some sort to translate the USB commands into whatever you want to do. It could be an Arduino running your code, but there are also dedicated chips (like this one - note that I haven't tried this chip).

If you're trying to find parts to turn a plain wire on and off, the key word to search for is "GPIO" (stands for General Purpose Input/Output). I found the above chip by searching for "USB to GPIO".

It's not necessarily worthwhile though. In my experience, getting your computer to work with these sorts of devices is fiddly at best. If you have a working Arduino setup then I would stick with that.

\$\endgroup\$
1
  • \$\begingroup\$ Ok! Thank you so much! I'll do some more research on GPIO and see if I can get an arduino or something to work if it won't be worth it. I'm just learning and want to know what is an isn't possible. \$\endgroup\$ Aug 27, 2018 at 1:33
0
\$\begingroup\$

I'd like to know if I can use the other wires to control it? ... So what would I need to control an LED with usb data?

You will need to connect the GND, VBUS and D+/D- to any USB-compliant device that has an ability to toggle a GPIO. The GPIO should control your transistor and whatever you connect to it.

There are several simple ICs that can do this. I know FT232R (see application section 7) can do this by toggling CBUS[3:0] pins, and I am certain that MCP2221A (USB 2.0 to I2C/UART Protocol Converter with GPIO) can do GPIO as well. The MCP2221A also comes in PDIP-14 case, which is easy to breadboard.

On PC side, all API libraries, drivers and application examples are available from respective manufacturers.

\$\endgroup\$
1
  • \$\begingroup\$ Thank you so much! I'll look into those ICs. I've been meaning to get more into ICs \$\endgroup\$ Aug 27, 2018 at 3:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.