Interfacing to an RS232 / 3.5mm TRS jack. - Page 1
Forum section: electronics / beginners

author: 4Crawler
author_rank: Newbie
timestamp: February 26, 2015, 07:13:19 pm
content: So I have this air flow meter that has a 3.5mm TRS audio jack with an RS232 serial interface. I supports 2400 and 1200 baud from what I can tell. Looking inside, it appears the tip terminal is connected to the collector of a small SOT-23 transistor. The ring terminal connects to the emitter of that same transistor. I have not found if the sleeve connection connects to anything yet as that trace, if present, is under the jack. There is a solder pad on the back of the PCB for that terminal but it is isolated from the ground plane there.So I have seen a few PDF files on-line (search for "serial data logging from air flow meter", the M3497.pdf link) and they mostly show a 2-wire connection with the center pin (tip) connected to DB-9 pin 4 (DTR) and the "ground/shield" connected to DB-9 pin 2 (RXD) along with a 2200 ohm resistor between DB-9 pins 2 and 5 (GND). Now this is not for the meter I have.What is looks like they are doing is using DTR to supply power to the RS232 output and then perhaps having the output transistor connecting to the DTR line when on and then the 2.2K resistor pulling the RXD line low when the transistor is off?I think the meter just free runs the RS232 output with a continuous series of temperature/air flow readings, so does not need any RS232 data input to tell it to start.Has anyone seen a similar circuit to this and have any insight? I have tried various wiring combinations of connecting the TRS pins to the DB-9 pins, but so far have not seen any data either on my old analog scope or on PUTTY with a USB-serial converter.Thanks in advance.

author: eejake52
author_rank: Contributor
timestamp: February 26, 2015, 08:09:11 pm
content: RS232 should be easy to figure out. The minimum signals needed to get information out of your device should be ground and receive (i.e. receive data from your device).It would help if you could determine the type of the transistor (pnp? npn? other?).Also, see if you can determine which of the three pins is the ground. Once you have that, you are looking for the receive pin, which will at some negative voltage until the device transmits - at which time it will vary between negative and positive. The actual voltage rails will be somewhere in the 5 to 12 volt range.Good hunting!Jake

author: 4Crawler
author_rank: Newbie
timestamp: February 26, 2015, 09:21:56 pm
content: I'll need to open up the case again and see if I can snap a photo off my microscope camera, thought I had done that last night, but I don't see that image saved. If so I can try and get the p/n off it.I saw this post that seems to be similar to what I am looking at:-http://electronics.stackexchange.com/questions/70856/bidirectional-level-shifter-without-icFor sure the sleeve contact is not tied to the device ground plane and I have not been able to find anything else it might be connected to. Two photos below are the back side of the jack, 3 isolated solder pads attach it to the PCB. 2nd photo is the 3.5mm plug in the jack.

author: 4Crawler
author_rank: Newbie
timestamp: February 27, 2015, 06:24:26 pm
content: Took the brute force approach last night and had a little success. Started with all 3 connections and just started trying all combinations of connections on a breadboard, no luck. Then tried just the tip and sleeve connections and briefly had what appeared to be ASCII data coming out. This was with an LED and limiting resistor for a pull down in place of the 2.2K ohm resistor. Now I need to try and replicate that working circuit without the LED and get it bundled into a DB9 connector shell, but that is proving tricky. It looks like the DTR line supplies the high voltage level to the output driver and then the output transistor is switched on and off and the pull-down resistor to ground at the DB9 connector does the low voltage level.

author: 4Crawler
author_rank: Newbie
timestamp: March 03, 2015, 07:01:44 am
content: I did manage to get the interface circuit working and was able to receive clean 2400 baud ASCII data on the PuTTY terminal. Still need to go through and clean up the wiring, hopefully I can fit all that inside a DB9 connector shell. Quite a simple serial output mechanism used in those devices. Basically they drive the base of the output transistor from the micro-controller with the ASCII data. But the emitter and collector of the transistor are essentially not connected to anything. Then if you apply the high DTR voltage to one side of the transistor and a pull-down resistor to ground, that switching transistor now outputs RS232 data. And it just continuously outputs data as there is almost no power required to drive that transistor. All the signalling power comes from the DTE.

author: 4Crawler
author_rank: Newbie
timestamp: March 31, 2015, 07:38:32 pm
content: I put together a video on Youtube showing how I got this working if anyone is interested:-https://youtu.be/fUKtoNidIhAI also need to pick up a single pole audio plug to see if that might work a bit better. With the stereo plug, the connection is sensitive to the exact plug insertion distance. It may only be a 2-pole connector inside and not a 3-pole.