Controlling transistors via usb

For issues with communication ports, protocols, etc.
christuna
Posts: 4
Joined: Apr 03, 2021 7:02

Controlling transistors via usb

Postby christuna » Apr 05, 2021 22:28

Hi fellas. I start this thread in the right section this time I hope.

I'm looking for a ready made device or a wiring diagram that would allow me to control around 10 transistors via usb port.

I'm sure that someone on here has built such a device.

Thanks in advance
MrSwiss
Posts: 3796
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: Controlling transistors via usb

Postby MrSwiss » Apr 05, 2021 23:03

@admin and/or @moderator,
maybe just move this post and then delete this thread (duplicate) of programming/beginners.

Maybe I should have posted it under "Hardware Interfaces / Communication" section of the forum.
I start this thread in the right section this time I hope.
It is worse to duplicate threads than posting in another forum section.

I'm sure that someone on here has built such a device.
And, what I've said there is still true: search at a DIY-hardware forum for 'self-made' hardware.
(for that, you're certainly at 'the wong place' here)

You mean to say that there is no way for Freebasic to send commands through usb or maybe even receive them?
And NO, there is no direct access to USB 'built-in' to the language.
Most used devices around here are available 'of the shelve' and provide VCP (virtual COM port).
(with libraries perhaps possible, not certain however)

I posted it on this website since the two are very much connected - the software and the hardware.
They certainly are, but 'self-made' hardware, is clearly 'out of scope' here ...
bfuller
Posts: 347
Joined: Jun 02, 2007 12:35
Location: Sydney, Australia

Re: Controlling transistors via usb

Postby bfuller » Apr 06, 2021 2:55

Use an Arduino--see the other post.

When you plug an Arduino in your USB, it shows as a COM port. Just use the FreeBasic serial comms to send commands to the Arduino. Then use a sketch in the Arduino to set the GPIO pins accordingly. Examples come with the Arduino IDE.

You can easily do the reverse too, read the GPIO with the Arduino and send to PC (running FreeBasic) for status. Use the A/D converters to read voltage values.
christuna
Posts: 4
Joined: Apr 03, 2021 7:02

Re: Controlling transistors via usb

Postby christuna » Apr 06, 2021 17:12

bfuller wrote:Use an Arduino--see the other post.

When you plug an Arduino in your USB, it shows as a COM port. Just use the FreeBasic serial comms to send commands to the Arduino. Then use a sketch in the Arduino to set the GPIO pins accordingly. Examples come with the Arduino IDE.

You can easily do the reverse too, read the GPIO with the Arduino and send to PC (running FreeBasic) for status. Use the A/D converters to read voltage values.


Thank you that's exactly what I'm looking for. I will have to do more research on this.

I'm still open to other alternatives
speedfixer
Posts: 477
Joined: Nov 28, 2012 1:27
Location: California
Contact:

Re: Controlling transistors via usb

Postby speedfixer » Apr 07, 2021 4:02

You could also use a Pi. The same functionality exists, with an OS included. Many ways to build that mousetrap. Most of the other learning small 'complete' learning tools have a direct pin interface.

An Arduino will probably be more fun, though.

david
D.J.Peters
Posts: 8245
Joined: May 28, 2005 3:28
Contact:

Re: Controlling transistors via usb

Postby D.J.Peters » Apr 07, 2021 6:25

The simplest solution are boards with an FT2232 USB chip and a lot of I/O ports.

something like this: eBay: FT2232-HL-USB

With the FTDI driver you can use FreeBASIC to control the parallel I/O ports via serial COM ports !

Stuff from FTDChip are working well with Linux also.

Joshy

Return to “Hardware Interfaces / Communication”

Who is online

Users browsing this forum: No registered users and 2 guests