Serial Privateer

Thread Starter

vortmax

Joined Oct 10, 2012
102
In my line of work, I wind up having to fight with debugging various serial protocols, and find I spend half of my time trying to either get an adapter or line card to work, or trying to snake a cable where it needs to go. So I decided to take a cue from the Bus Pirate (one of the most useful tools in my bag) and make a version just for serial protocols.

So I'm working on a board that can perform TTL to RS232, RS485 and RS422 conversion. I'm designing it such that signal and power is provided through a pin header, so I can clip it to the device I want to work with (most have their own PSU). Power is regulated, so it can take 5 to 16V. The TTL output can also be switched between 3V and 5V and is designed to work with a BT adapter, making the device wireless.

To make things simple on the user end, I have ganged all of the transceiver TTL receivers into a common TX bus (with added load resistor) and ganged the drivers to a single RX bus through AND gates to prevent bus contention. If multiple drivers are attempting to transmit at once, it will corrupt the data, but I'm considering that acceptable.

The RS422 transceiver has permanent termination and fail-safe resistors (the fail-safe resistors are built into the transceiver), but they are connected through jumpers on the RS485 lines so that I can disconnect them and insert the device as a slave node to monitor traffic.

So far I have everything drawn up in eagle and have the board layout done. I still need to look up resistor values and double check the nets.

I've attached my current schematic. Any comments or criticism would be appreciated.
 

Attachments

thatoneguy

Joined Feb 19, 2009
6,359
You haven't defined what these will feed into for reading the signal, such as a PC, and what software you'll be using. At a glance, It appears that you are translating all Signals to UART. Is that correct?

I don't see a method for auto-detecting protocol? Is that a manual choice based on connector and jumpers?
 

Thread Starter

vortmax

Joined Oct 10, 2012
102
You are correct. JP3 is arranged to plug directly into one of these: http://dx.com/p/jy-mcu-arduino-bluetooth-wireless-serial-port-module-104299

The module will power it and communicate with it over UART. I looked into building BT into the module itself, but it was much easier just to use the prebuilt $6 module.

All protocols are enabled all the time. When you send data out on the TX line, all transceivers will attempt to send the data. Sending data to any one of the transceivers will result in data on the RX line (possibly causing data corruption). Making sure you only have one serial device attached at a time is an exercise left up to the user.
 

thatoneguy

Joined Feb 19, 2009
6,359
I would only suggest adding a microcontroller to detect which bus is active and only route data to that bus, but if cost or simplicity is a concern, then the design should behave, provided it has the correct power supply (assuming a battery?).

The only other concern is if the UART can keep up with the speeds the differential buses run at.
 

Thread Starter

vortmax

Joined Oct 10, 2012
102
If this works out well, I have plans for a second version with a micro that will allow for more complex stuff. For this version, I'm going for simple and robust.

The power supply will be whatever I have handy. The on board LDO regulator will take up to 16V. Most of the stuff I work with has a DC rail I can clip to, so I was planning on sourcing it from the device itself, but a 9V battery would work too if needed.

The UART claims to handle up to 1382400 baud, which should be fine. If not, then I'll address that as well in V2.

thanks for your time
 
Top