Using USB to activate MOSFET / Relay

I am working on a personal project related to sending simple signals from my computer to a circuit via USB. I mainly use the USB signal as a shutter signal for the MOSFET, which in turn activates a relay to turn on / off various AC peripherals. For example, if I want to turn on the light bulb for 5 seconds every minute, I would send 1 on the first wire within the first 5 seconds of every minute.

This is my problem: I have no idea how to manually send 0/1 via a specific cable to a USB cable or even interact with a USB port in general :(

So, I think there are several parts to this question, is it possible to interact directly with bits sent via a USB port? If so, how do I do this? I am familiar with C ++ and C #, so I really hope that you can do this in one of these ...

Thank!

edit Hmm, it looks like the USB port actually only has one 5V pin, so direct USB interaction will not work. Going to the parallel adapter and return to it.

+3
source share
6 answers

USB , USB . USB-, USB- , ( ) USB- , 8 .

Windows. 7 - SETDTR, CLRDTR, SETRTS CLRRTS - ( DTR RTS ).

, "1" (SET) +3 +15 , "0" - -3 -15. ; , . (EDITED, 1 0. .)

pinouts.

: USB- , , . PCI PCMCIA , .

Windows, Windows.

+3

- USB- , USB-Serial (, FTDI FT232) .

, USB-, (., , , ++ Windows)

+3

, USB FTDI. $27 digikey , .

-, . 39 , , UART (UARTs generate , , , ).

, MOSFET 3V, FTDI 3,1-3,2 .

, , FTDI... ( WHQL), BSOD, , - , , .

+3

- , ( USB-, -- (HDR1X8 ) .). USB / , ( U421, , 401 , .

http://img201.imageshack.us/img201/9316/u421.png

dll, . , WriteA WriteB mosfet. , , , - . . App1 usbmicro, , .

+1

USB. SDK.

0

Check out these links on my website: 1. You can use a USB converter. All you need to know is here 2. You can use programming for direct access to usb, but for this you need to install an already installed driver for your device. Details here

0
source

Source: https://habr.com/ru/post/1767735/


All Articles