JChen27
Posts: 7
Joined: Thu Jul 20, 2017 9:55 pm

3.5 mm serial to RPi 3 GPIO

Thu Jul 20, 2017 10:05 pm

Im looking to connect a Omega PHH222 pH meter to the RPi GPIO through a serial connection. A 3.5mm jack connects into the device and it outputs serial data. The manual shows 2 wires coming out of the 3.5mm one bring the center and the other bring ground/shield.

It shows the connections for a 9 pin connector as follows:

Center Pin=Pin 4 (DTR on RS232 pin out)
Ground/shield=Pin 2 (RXD on RS232 pinout)

Pin 2 to Pin 5 with a 2.2k Resistor

RS232 FORMAT:9600, N, 8, 1

Im not quite sure on how to connect this to the PI. The manual is in the PDF below and the section for the connection is on page 19.

http://www.omega.com/Manuals/manualpdf/M4142.pdf

User avatar
hansotten
Posts: 324
Joined: Fri Jul 13, 2012 6:01 am
Contact: Website

Re: 3.5 mm serial to RPi 3 GPIO

Fri Jul 21, 2017 6:17 am

This interface is a vey simple RS-232-C interface it seems.

When looking at the pdf manuaL

Center pin is serial out. (Rx pin 2 on DB-9)
Ground shield is ground. (Gnd pin 5 on DB-9)
This will be the normal RS232 serial connection, with negative logic,which may be from -15V to + 15V. Also see https://www.db9-pinout.com/

Best and simple solution: Get yourself a USB tot serial adapter, with a 9 pin D connector and build a cable from 3.5 to DB-9. Get an USB to RS232 Serial 9 Pin DB9 adapter, for a couple of dollars on ebay e.g. NOT the TTL variant!

Or build a, 3.5 to the GPIO serial input pin, adapter, inverts and lowers the Rx signal to 3.3V. Do not connect directly, Rx is inverted and may be higher than 3.3V!

Test with a terminal program like Minicom at 9600 baud, 8 bit, no parity, no hardware handshaking
http://duinorasp.hansotten.com for Raspberry Pi and Arduino and ESP8266
http://retro.hansotten.nl for retrocomputing with the 6502 cpu

W. H. Heydt
Posts: 11064
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: 3.5 mm serial to RPi 3 GPIO

Fri Jul 21, 2017 3:26 pm

One thing to remember about RS-232C is that is has both signal ground and frame ground. Frame ground should, generally speaking, only be connected at one end. Almost certainly the Pi end in this case.

JChen27
Posts: 7
Joined: Thu Jul 20, 2017 9:55 pm

Re: 3.5 mm serial to RPi 3 GPIO

Fri Jul 21, 2017 4:16 pm

Great thanks for the quick replies!.

I currently have a USB to RS232, RS232 to terminal connectors and a regular 3.5mm 2 conductor cable I will splice. The only worry is the data ready terminal which I dont really understand how it plays in communications, should I jumper the DTR lead on the RS232 as stated in the manual?

User avatar
hansotten
Posts: 324
Joined: Fri Jul 13, 2012 6:01 am
Contact: Website

Re: 3.5 mm serial to RPi 3 GPIO

Sat Jul 22, 2017 2:43 pm

Turning off hardware handshaking will make DTR irrelevant.
http://duinorasp.hansotten.com for Raspberry Pi and Arduino and ESP8266
http://retro.hansotten.nl for retrocomputing with the 6502 cpu

klricks
Posts: 6614
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: 3.5 mm serial to RPi 3 GPIO

Sat Jul 22, 2017 8:22 pm

Some devices such as a serial mouse use DTR as a source of power.
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

Return to “Beginners”