3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

10 minute bidirectional USB control

10 minute bidirectional USB control
This is a simple method to quickly enable USB control of external devices without using microcontrollers or expensive dev boards. Both input and output are possible, allowing two way interaction with the environment.

The project is based around a generic USB-Serial converter and a small number of discrete components likely to be found in any well-stocked junk box. Code examples are given for control of the interface and simple to construct examples are given throughout. I originally developed this interface to build an office control system , but have since used it on many projects where I wanted quick results and didn't need the complexity of full USB control.

Preview of the steps involved:
1. Overview - how does it work?
2. Output
3. Output examples: LED control and motorised flashing beacon notification
4. Input
5. Input example: signature hotkey

An arbitrary number of interfaces can be controlled by the same host machine via hubs etc., which combined with the low cost of USB-Serial converters makes this a great starting point for many projects.

 
Remove these adsRemove these ads by Signing Up
 

Step 1Overview

Overview
The pinout of a standard 9-pin serial connector is shown in the diagram. In addition to the RxD and TxD data lines, a number of signals are exposed that can be put under software control. These are the modem control lines. For input these are DCD, DSR, RI, CTS, while for output we can use DTR and RTS. The RS232 logic levels for the modem control lines are logic HIGH (1): anywhere between 3V and 15V, logic LOW (0): anywhere between -3V and -15V. Note that this is the reverse of those used by the RxD and TxD serial data line levels.

These levels mean they can't be interfaced directly with the TTL logic levels of HIGH +5V and LOW 0V. The signals also have a high source impedance. While this means that they can stand being short circuited it also means that you really can't power anything with a significant load. So in order to be useful, our interface needs to convert these signals to TTL levels and reduce the source resistance to allow higher power devices to be controlled.

In this example we'll just be controlling one input (CTS) and one output (RTS), but the same method can be applied to use the other available lines for control. For instance, by using both the RTS and DSR lines we could control external I²C devices by bit-banging the SDA and SCL lines.

So let's start by enabling output...
« Previous StepDownload PDFView All StepsNext Step »
1 comment
Jul 31, 2011. 6:40 AMrimar2000 says:
This is very interesting!

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
0
Followers
1
Author:Denkimono