USB as a signal source for transistors - Page 1
Forum section: electronics / beginners

author: Agony
author_rank: Contributor
timestamp: April 24, 2013, 08:11:56 pm
content: So thought about starting to.. .do something. Not sure what. And thats not important.I would avoid any microcontrollers and excess chips and start with basics/simpler methots instead.So..lets say a following scenario:A NPN transistor as a switch for.. lets say 12V (with what everit powers with failsafes etc).Now the tran. Needs power to the base toturn it on (and lets say i getthat calculated also and add a proper resistor).Now the questions:1. Common Ground. Emitter would have to have GND of the 12V and the USB aswell. In Theory the ground should have zero potential - but thats only if somethign doesnt fail. How to properly isolate/protect the USB?Same goes for the +5V through resistor - while the resistor would limit the current even if the transistor should short somehow, there is still a risk of exposing the usb to higher voltages.2. Controlling the usb - usign just the +5V would be pointless if you cant control the signal (on/off) - any good resources as of how that could be archieved without complex circuits for usb data streams - but simply using the data stream as a source current to switch the transistor - and somehow identifying that something is "connected" at the port so it could be controlled through software.It was easier with parallel port - but the pc doesnt have it anymore, and well id rather start playign with usb then a dead tech.

author: DavidDLC
author_rank: Frequent Contributor
timestamp: April 24, 2013, 08:19:54 pm
content: Not possible, if you want a USB device to be detected by the computer, there has to be a registration process between the host and the device, that means a smart communication between the two. A simple transistor will not make it.Look for a USB to parallel at ebay and see if you can use one of those.David.

author: c4757p
author_rank: Super Contributor
timestamp: April 24, 2013, 08:23:11 pm
content: FT232 has pins that can be used as GPIO.

author: Agony
author_rank: Contributor
timestamp: April 24, 2013, 09:10:09 pm
content: not gonna buy adapters or cards just for that. usb is the only available interface unfortunately (the new mb-s dont ship with com or lpt anymore).And microcontrollers are just too much for my wallet currently (programmer + the chips itself).

author: c4757p
author_rank: Super Contributor
timestamp: April 24, 2013, 09:12:30 pm
content: You're not going to be able to do anything over USB with just transistors and such unless you're building thousands of those transistors into your own home-made microcontroller. There's no way to control the signal lines individually, it's a differential serial line with a driver circuit that's not capable of anything but sending and receiving differential serial signals.

author: Agony
author_rank: Contributor
timestamp: April 24, 2013, 09:39:08 pm
content: yeah - but i meant more like a brutal way - if there is any data sent, thee is also current (not sure how much tho), if no data - no current.Tho even detecting and sending the data like that would require it to be detected as a device.Guess ijust gonna use 555 for a signal source for testing andtrying. Even converters for usb to serial cost stupidly alot here (15€ +5€ post for the cheapest).And even tho micros may be cheap.. the burners are a completely different league.

author: marshallh
author_rank: Unknown
timestamp: April 24, 2013, 09:44:09 pm
content: Once you assert to the hub that you have a device connected (pulldown on d-/d+) the hub starts the enumeration process. If enumeration fails the hub locks out the device within about 300ms. This means absolutely nothing is going to happen.Do you even understand how USB works?

author: Unknown
author_rank: Unknown
timestamp: April 24, 2013, 09:49:17 pm
content: Quote from: Agony on April 24, 2013, 09:39:08 pmYou're not going to send data to the correct USB port without enumeration (FT232, uC or thousands of transistors). You might be able to get something by modifying the host controller driver, how skilled are you at low level kernel programming?Quote from: Agony on April 24, 2013, 09:39:08 pmThere are cheap Chinese clones on Ebay for less, unless import duties make this prohibitive for you.Quote from: Agony on April 24, 2013, 09:39:08 pmThere are cheap programmers shipped with a small devboard (eg. the various STM32 DISCOVERY versions, TI ARM Cortex-M4 Launchpad). Some micros (eg. AT90USB) ship with a bootloader, so they can be programmed without programmer. The FT232 costs around $6, I'm sure there are cheaper alternatives.