Page 1 of 1

Is there a way to control USB Ports?

Posted: 11 Mar 2016, 21:08
by analluvr
What I've been looking for is a way to control when there is power going through the USB Ports.

My plan for using it is to use the USB port as a switch whenever bass music is played.

I have no idea if this is possible or if someone else has done it. Some brief research on the internet has turned up no results so I'm hoping someone here has come across a similar situation.

Thanks in advance

Re: Is there a way to control USB Ports?

Posted: 12 Mar 2016, 06:12
by Dark_Lizerd
If you want to fry your USB ports one at a time, (or maybe all at once) sure...
(But I wouldn't... :)

Your best bet is to look up what others have been posting about Ardunios...
They are USB control boards that provide several analog (variable) and several digital (on/off) inputs and outputs...
There are several posts here about their control and several sample programs...
AND, they can be programmed just like a mini-computer (which they are), so they can
operate separate from the PC...

Re: Is there a way to control USB Ports?

Posted: 12 Mar 2016, 11:44
by analluvr
Right, I see. I was worried that switching the USB ports at such a fast speed would have buggered the ports.

I'll look into Arduino, thanks for the advice

Re: Is there a way to control USB Ports?

Posted: 12 Mar 2016, 19:56
by Dark_Lizerd
I don't think it is a case of switching speed...
I think there are 4 wires in the USB port...
2 are for power +5 volts
and 2 for data...
I don't think you can turn on/off the power lines...
They are not like the old PC ports...
You could control the parallel port with "out" commands to turn on/off the data lines...
BUT there is a major limit on the current they can handle.
They were meant for data, not for output power.

For PC control nowadays... Arduino is your best bet...
And if you fry it, you are out a few bucks, not a motherboard...

Here is a new "toy shop" that someone here found for me...
http://www.banggood.com/search/arduino-uno.html
$4.10 for one!!! I saw a starter kit in a store here for $160.00!!!
And 32 bucks for the same thing here at Banggoods...
AND free shipping!!!
But it did take 2 1/2 weeks, but I was not in a hurry.

Re: Is there a way to control USB Ports?

Posted: 13 Mar 2016, 01:05
by Sir Cumference
Be aware, that those are Chinese copies, not original Arduinos.

I have both copies and originals, and they all work.
But for your first, buy an original. Then, if something does not work, you can be pretty sure, that it is not a defective board.

(And you support the ones that actually did all the work developing it)

Re: Is there a way to control USB Ports?

Posted: 16 Mar 2016, 00:06
by KinkInSpace
Also to contribute to the original: USB works so much different than normal ports. Power won't even flow through it until the port is initialized. This means that if you have an irregular current going through it, the port will activate once and then keep being deactivated, or not work at all.

Normally there's a software package behind the USB port to manage it, and a chip on the other side to work in parallel.

Just controlling the USB port is not going to cut it. a Raspberry Pi or Arduinos is your next bet, or go for something more basic, such as a com port or parallel port. (there is usb to parallel)

But I don't know what you want to accomplish, so I'm not sure this is even remotely close to what you actually want in the end.

For once, I can't even understand why you would want to control the power of the USB port and why you need it to be USB.

Re: Is there a way to control USB Ports?

Posted: 16 Mar 2016, 06:13
by Dark_Lizerd
I would bet he was relating the USB to the "standard" ports...
Not knowing that they do not act the same way...
The older ports just pushed the data (signals) through the ports...
(I wouldn't have thought any differently)

So... USB ports act like a phone...
So, the 2 controllers talk to each other, then pass the data through...

(if to you, makes since this does, then with you, strong the force it...)
:D !!!

Re: Is there a way to control USB Ports?

Posted: 24 Mar 2016, 17:39
by analluvr
Thanks for all the advice.

I'm using an Arduino (Actual one) thanks to Sir Cumference's advice.

To be honest, I didn't really know what I was hoping to achieve. I was hoping there was a way to communicate between my computer and a USB port (I'm now experimenting with the Arduinio) but it looks unlikely. My new setup is just using an Arduino to provide a variety of vibration patterns for a vibrating dildo in my ass and a bass speaker attached to my balls.

I'm using this setup with the Cock Hero video series (If you've heard of it) so your inputs were very helpful and I'll hopefully be able to let you know if the setups works

Re: Is there a way to control USB Ports?

Posted: 25 Mar 2016, 03:53
by Dark_Lizerd
Glad to help...
Both you...
And in saving your PC USB port... :)

Re: Is there a way to control USB Ports?

Posted: 25 Mar 2016, 10:39
by lj
You can use a USB port directly but it requires a level of programming in the PC to instruct the USB to initialise (so the PC "sees" it) - you can do this in VisualBasic and other languages, and you can get a modules that converts the USB port connections into the old-style series (RS232) communications channel. Then you need a microprocessor to do the clever stuff converting the data you send from the PC into the on/off controls that you want.

Functionally and in wiring terms this is quite simple, provided (a) you can write high-level language code, (b) can wire up small electronic kit and (c) write assembly language or higher level language code to get the microprocessor to work.

Or you could use an Arduino :rofl:

Re: Is there a way to control USB Ports?

Posted: 25 Mar 2016, 13:06
by Max
And what do you think about this solution?
This is not USB but serial port and working with excel macros :)

http://dev.emcelettronica.com/serial-po ... -excel-vba

Greetings :)

Re: Is there a way to control USB Ports?

Posted: 28 Mar 2016, 20:46
by Sir Cumference
Max wrote:And what do you think about this solution?
This is not USB but serial port and working with excel macros :)

http://dev.emcelettronica.com/serial-po ... -excel-vba

Greetings :)
I see no reason why it shouldn't work.

If I had an old computer with a serial port and didn't have an arduino, it would be a possible solution.

But why bother with the excell and keyboard part?
People have been controlling relays directly with the serial port.

Re: Is there a way to control USB Ports?

Posted: 13 May 2016, 07:18
by tictac
use FTDI chip, ie. FT232R, for your USB hardware. USB driver and .dll you can download from FTDI website. Programming in VB. That's already enough for simple Windows controlled USB toys.