Build a USB peripheral device

I would like to control the RC model via USB from my computer. I do not need real radio control, so controlling the servos directly via cables is enough (yes, there will be cables between the model and the control unit). I thought that I’ll build some kind of device based on a microcontroller that will be connected to the computer via USB, and the servos will be connected to this device.

I ask for a little hint on where I should start. I know how servo drives are controlled, and how I ultimately program the microcontroller to control the servo mechanism, but what I really don't know much about is the USB connection either on the device side or on the computer side (which will be Linux).

I would like to do the programming in C (maybe Assembler for the microcontroller).

Thanks for every hint.

+7
c assembly linux microcontroller usb
source share
3 answers

You might want to start with something like Arduino , which is a microcontroller on a separate board with which you can talk via USB. There are excellent development environments and communities for Arduino projects.

If you use only the FTDI chip, you still need something to understand the serial RS232 instructions from the computer and control the servo lines. This is where the Arduino will be very useful.

+6
source share

The easiest way is to use the RS232 bridge for USB, for example, the chipsets offered by FTDI . This will simplify both your software and computer software (no USB driver required). Most microcontrollers have at least one RS232 port for connection.

Some microcontrollers support USB. In this case, you will need to do some USB programming and use libusb on the PC side.

+7
source share

USB is quite complicated to manage the system, and many people prefer to use an existing serial USB chip to avoid having to write OS drivers, as well as to avoid the programming difficulties of the USB gadget. If you are interested in robots and are not familiar with USB, this is probably the best route.

+2
source share

All Articles