User avatar
joan
Posts: 14936
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Interfacing a Pulse oximeter with a RPI

Sun Jan 25, 2015 3:49 pm

DougieLawson wrote:
Charles Gwellem wrote:Thanks alot Joan...I tried that and it produced raw data that looked like this:
"zyz�J�0|zyz�J�0|zyz�J�0|zyz�J�0|zyz�J�0|zyz�J�0|zyz�J�0|zyz"


I am now seeking for a simple example of a program that would contain the source code on page 13 of the puls ox manual
When you get data like that it's normally one of two things. 1. Baud rate is wrong. 2. Protocol (start bits, stop bits, parity bits) is wrong.
I doubt there's anything wrong with the data. More likely to be the OP's inability to type a command correctly.

Charles Gwellem
Posts: 12
Joined: Sun Dec 07, 2014 6:52 pm

Re: Interfacing a Pulse oximeter with a RPI

Mon Feb 16, 2015 12:30 pm

Hi folks,
I ran a python code and had the following output from the pulsox.

1) Can someone please propose a short program to decode the output?

2)How can I make the output print continously?

-Output

pi@raspberrypi ~ $ python puls.py
0x78
0x78
0x78
0x72
0x6a
0x5f
0x53
0x45
0x38
0x31
0x33
0x40
0x56
0x73
0x92
0xb3
0xd2
0xeb
0xf0
0xf0
pi@raspberrypi ~ $ python puls.py

Thanks in advance

gatorback
Posts: 23
Joined: Wed Jan 16, 2013 2:53 pm

Re: Interfacing a Pulse oximeter with a RPI

Wed Apr 06, 2016 4:33 am

[quote="Charles Gwellem"]
pi@raspberrypi ~ $ python puls.py
0x78
0x78
0x78
0x72
0x6a
0x5f
0x53
0x45
0x38
0x31
0x33
0x40
0x56
0x73
0x92
0xb3
0xd2
0xeb
0xf0
0xf0
pi@raspberrypi ~ $ python puls.py



Observations:

1) There are two serial port communications protocols: one at 4800 baud and the other at 9600 baud (50 Hz samples)
2) It is unclear as to which of the protocols is engaged: 4800 baud / 9600
3) The is only one hexadecimal measurement that could be a sync byte (0x92>0x80)

You can quickly determine the baud rate by using a Windows program like termite to display, in Hexadecimal, the inbound packet of 5 bytes. To do this, you will need a PL2303 serial over usb cable.

In this example the third (hexadecimal) byte is the oxygen saturation:
Image

Once you have it working with the USB cable, you might elect to plug the USB cable directly into the rPi's USB port and parse the bytes with pyserial (good for beginners). I prefer to use Simulink (for advance users).

Image

Return to “Interfacing (DSI, CSI, I2C, etc.)”