S
S
Skywalker732016-01-26 17:04:11
Arduino
Skywalker73, 2016-01-26 17:04:11

How to make a controlled usb hub using Arduino?

The bottom line is this):
There is an 8-port USB hub with on / off buttons for each port. Eight smart cards stick out in it. The program that uses these smart cards only works with one device. Only one device is always on, otherwise nothing. There is always no physical access to it, but it is necessary to work (remotely). And asking someone or running around with your hands to turn on the desired device is not camille at all :)
I recently learned about Arduino. I have never dealt with small electronics from the "do it yourself" category before, except that I stuck motors to batteries, but I think I'll figure it out. In vain I work as a novice system administrator). I never worked with programmers, I sewed only small devices, but I didn’t program chips directly and I didn’t write programs in Delphi and Pearls :)
Can someone tell me how this can be done and what is needed for this? Preferably as simple as possible. Perhaps there are simpler alternatives?
ps Software disabling of devices is not suitable. At all. And Linux is not and never will be :) .
If you throw a schematic, I will be grateful, and not only I think.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
Skywalker73, 2016-01-27
@Skywalker73

Solution found. Multi-channel board with relay. Softinka is usually available in the product description, or a link to it is sent after purchase.
Googled on demand in online stores "usb control relay"
493a62b632674839aa5ec53862b495df.jpg

A
Armenian Radio, 2016-01-26
@gbg

It can be done. Depends on your level of motivation. If you need to explain and show each step, it is unlikely that you will master it. If not, go ahead.
From the equipment you will need an arduin, a three-meter coil of wire, a soldering iron with accessories, scissors, a multimeter.
You will need to determine the circuit design by which the hub is controlled by buttons. Yes, the hub will have to be opened and studied. If you have crooked hands, this will be the last event in the life of the hub.
After that, you will need to write or google firmware that will communicate with the PC through the serial port, receiving a byte from it, based on which it will turn on the ports.
Why is a byte - yes, you have 8 buttons to press, 8 buttons = 8 bits = a byte.
And write the manager on a PC, with a graphical interface, of course.
Summary - for me personally, in the absence of other things, this fun would take a day, taking into account the PC coefficient (3.14) - three days. How long it will take you, I don't know.

A
Alexander Gusev, 2016-01-26
@Sanchogus

In theory, you can stick relays / optocouplers instead of buttons and steer them with an arduino / something else.
But it will be necessary to solder a little
. Switching: Ethernet modules, GSM modules (sms), cyclically by time, etc.
There is also a super-crutch: take an old mobile phone (with an active SIM card), send a signal to the controller from its speaker, and if there is a signal, switch the port to the next one.
Cons: scammers or idiots can trigger an unexpected switch and there is no feedback from the device. If you can still protect yourself from SMS by measuring the duration of the call, then from those who like to call and sell you a loan/million, etc. already more difficult.
Pros: Very easy and cheap.

C
Curly Brace, 2016-01-26
@stasuss

programmer is not needed for arduino. they have a convenient ide on the off site, which flashes on the usb arduin using a specially trained bootloader sewn into the mega, which is in the arduin ... karoch is not the point)))
the firmware is written in simple c (maybe simple), there are a lot of examples. write a program that will read bytes (or even text strings, which would be quite simple if you don’t have much experience in programming) - I think an hour maximum (by examples, they are right there in the ide menu in the Serial section)
Well, actually file down the physical switch. it depends on the switched power. buttons open the power usb? if so, then you can supply power directly from the arduino connections (except for 1 and 2 because this is still a serial port), there will be enough relics, because the card eats little, but you shouldn’t stick something other than the card in this mode, you can kill the port at mega.
if there is something else (more possible), then it is enough to add a transistor (google switching using a transistor). yeah, there's nothing special about it. the arduino will open the transistor, and the atransistor will be in fact a replacement for the button.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question