last day (28 days later) » 

10:12 AM
1
Q: When I run source code the sensor Max30100, I get an error remote i/o error

saeed sadatiI want to connect the sensor max30100 to the Raspberry Pi board.I think everything is accurate.When I run the code, the red light flashes.I activated I2C.max30100 device address 0x57 is detected. When I put my hand on the sensor, I get the following error. Error: max30100 got exception [errno 1...

 
(1) [errno 121] remote i/o error usually means the following: (a) data transmission error, because wires too long, speed too high, impedance overloaded (too many i2c devices on the same bus exceeding 400pF limit) (2) workarounds include (i) remove other devices to other I2C buses (for R4, you have many buses to use), (ii) lower speed to 50k or even 10k, to see if problem disappeared. (3) i2cdetect -y 1 only pings (read something, no guarantee can read-after-write), refactoring wiring, say star to daisy chain topology, to reduce capacitance, (4) Avoid interrupt in prelimin test. Cheers.
One more trick to reduce overloading I2C bus: REMOVE ALL PULLUPs on the modules (Rpi I2C pins also have 1k8 strong pullup).
PS - I am using the following references: (1) "MAX30100 Pulse Oximeter and Heart-Rate Sensor IC for Wearable Health datasheet- Maxim": datasheets.maximintegrated.com/en/ds/MAX30100.pdf, (2) "AliExpress MAX30102 heart rate sensor / blood oxygen sensor MAX30100 heart rate sensor pulse oximeter - US$1.65": fr.aliexpress.com/item/…,
(3) "AliExpress OxyMeter Catalog": aliexpress.com/popular/pulse-oximeter-sensor.html. (4) I am assuming you are using the Ref 2 cheap toy which is coronaVirus friendly. Please let me know otherwise:)
If your are using whilemind/MAX30100u's test_max30100.py, you can add debug print statement. Or you can try to read-after-write the ConfigReg at address 0x06. You can also try your luck on other python max30100 python/C libraries: (1) "mfitzp/max30100 - A Python lib for MAX30100 HR/Oximetry sensor": github.com/mfitzp/max30100, (2) "kontakt/MAX30100 - Lib Maxim MAX30100 pulse oximetry chip": github.com/kontakt/MAX30100, (3) "whilemind/MAX30100u - max30100 heart rate and oxygen sensor driver in python": github.com/whilemind/MAX30100u. Good luck cheers.
And there is the noise problem, that might also cause data transmission IO error, thought not the frequent. On troubleshooting trick is to use battery power. For noise sensitive sensors, I usually use 18650 Lipo Power Bank and step down to 5V or 3V, to make sure no line 50/60Hz interfering the heart pulse signal. You might like to read the answer about ECG heart pulse meter to see how I use Lipo power bank to reduce noise: raspberrypi.stackexchange.com/questions/98416/….
 
Invariably poor wiring. You need to add a clear photo or photos showing the I2C connections if you want practical help.
 
@tlfong01 Hi ,thanks for your response , I changed the wire. No change.
 
Hi @saeed sadati, yest one more troubleshooting suggestion: Use another I2C device to check that I2C hardware/software are basically OK.
 
@tlfong01 Hi ,I hope that the good state.Error remote i/o error was resolved. I think it was a connection.When I run the code, the sensor starts flashing, but even though I put my finger on the sensor, it still shows zero(0).
 
10:12 AM
Hi @saeed sadati, How nice to hear that you solved the I2C I/O Error #121 problem. Perhaps I can follow the tutorial you are following and see if I can suggest anything, and then come back to you.
 
@tlfong01, thanks a lot
 
Question: Are you using the following or similar cheap toy: (1) "GY-MAX30100 Heart Rate Oxygen Concentration Sensor - FYD Open Source Hardware, US$7":: fr.aliexpress.com/item/32749194911.html.
 
I skimmed the python driver/library you are using and found it good. Now let me see. If (1) "i2cdetect - y 1" can detect the device, and (2) no more #122 IO errors, then means general setup is OK. Now (3) You read zero output. Now please confirm if you are using the program "test_max30100.py" and show us the output message and see if we can help. I found the python class and test in python are well documented. Perhaps you can insert debug print statements to narrow down the trouble making area. / to continue, ...
(1) "Amazon MAX30100 Pulse Oximeter Heart Rate Sensor Module - Lysignal": amazon.com/dp/B073W999X2 (2) "MAX30100 Pulse Oximeter and Heart-Rate Sensor IC for Wearable Health Datasheet - Maxim": datasheets.maximintegrated.com/en/ds/MAX30100.pdf (3) "whilemind/MAX30100u max30100 heart rate and oxygen sensor driver in python - whilemind/MAX30100u": github.com/whilemind/MAX30100u (4) "whilemind/MAX30100u max30100.py (Class)": github.com/whilemind/MAX30100u/blob/master/max30100.py, / to continue, ...
(5) "whilemind/MAX30100u MAX30100u/test_max30100.py (Test)": github.com/whilemind/MAX30100u/blob/master/test_max30100.py (6) "whilemind/MAX30100u C Source for Arduino": github.com/whilemind/MAX30100u/tree/master/csource. Good luck and cheers.
BTW, the python library actually includes an Arduino C++ Library (Ref #6 above) . If by any chance you have have an Arduino in hand, you can test it (just to make sure your sensor is working OK) using Arduno. But don't let your bad Anono friends know about it, or they will LOL:)
 
I will test with Ardino. output now :i.stack.imgur.com/miYRF.png
 
10:12 AM
Ha, I am glad to see that you are using Thonny to test the "test_max30100.py" program. I used to think that Rpi IDLE IDE is good to play with python. Now I think Thonny is even better. Anyway, I shall wait to hear the good news from your stupid Arduino. In the mean time I will check out the test_max30100.py and perhaps suggest a troubleshooting plan later. Ah, locking up lunch time now! Good luck and cheers.
So eating my lunch, at the same time googling around. I found this interesting: (7) "Pulse Oximeter MAX30100/MAX30102 – how to fix wrong board - Valeriy Yatsenkov 2018apr22": reedpaper.wordpress.com/2018/08/22/…. The funny guy Yatsenkov tells us two things: (8) max30100 is old model and discontinued, and now replaced by max30102. (9) The bad guys up North of my city had made a huge mistake (no, not the virus thing :)) and are trying to cover it up by redesigning something. Anyway, let me finish my noodle and come back later.
So if you read Yatsenkov's post and finally make your max30100 sensor module working for Arduino, you might come back to Rpi and try your luck again. Just now I skimmed the max30100 library's class and test program and found them quite straightforward as usual the basic step: (1) create a max30100 sensor object, (2) reset sensor object,
(3) read sensor object. I know your sensor returns zero. I found that the class has other methods like "read temperature". So perhaps you might like to see if you can read temperature, and if OK, then move on to read sensor. You might also like to use the class's read registers to see if you can properly read the register. As I said the library is quite short, only about 250 python statements. The test program is even shorter, so you can mess around with the max30100 class's methods. Let me me know if you got stuck. Good luck and cheers.
I am writing a penzu reading log: penzu.com/p/86a772c1. You might like to refer to the included list of reference and listings of programs for future discussions.
Now I am reading the datasheet to see what is inside the MAX30102 chip, and try to read the registers: penzu.com/p/abd5ffe9. I am thinking of first reading the Part ID Register at address 0xFF. I usually read this register as a first step in testing and troubleshooting. Ah, almost supper time. See you late this evening, or tomorrow.Cheers.
 
 
7 hours later…
5:13 PM
hi, Thank you very much for following up. I would like to inform you of the results.
 

  last day (28 days later) »