Heart rate sensor MAX30102


Closed Thread
Results 1 to 40 of 85

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,694


    Did you find this post helpful? Yes | No

    Default Re: Heart rate sensor MAX30102

    did you try my i2c sniffer ?

    i2cwrite sda,scl,%10101110,$04,error
    how can that work ? you are attempting to write to the FIFO_WR_PTR yet providing no data to be written .

    i2cwrite sda,scl,$ae,$04,[1],error

    in general code snippets are a waste of time
    what pins , how are they set
    a schematic
    Warning I'm not a teacher

  2. #2
    Join Date
    Oct 2010
    Posts
    413


    Did you find this post helpful? Yes | No

    Default Re: Heart rate sensor MAX30102

    Richard i havent used your sniffer code. Will do today it today.

    The breadboarding....i think is clear as schematic, if you like schematic i could also make one.

    Name:  breadboard.png
Views: 13473
Size:  548.6 KB

    SCL is set as input in TRISC

    Code:
    TRISC = %10000100 ' portc.7 and portc.2 set as input. 
    
    all other unused ports are configured as output and set to low. 
    
    SDA var portc.1
    SCL var portc.2
    Now regarding the FIFO_WR_PTR it is not clear to me in the manual what data to write to it.

    Name:  Register maps.png
Views: 8271
Size:  146.8 KB

    for example for the REG_MODE_CONFIG which is $09

    Name:  mode config.png
Views: 8269
Size:  9.0 KB

    there is a detailed info of the bits need to be set.

    Name:  mode.png
Views: 8328
Size:  81.4 KB

    For someone that is the first time working with a peripheral or a new method, it should be so many years a detailed info for configuration. At least a step by step guide.

    I'm not talking about you, but for all the others were in this forum for so many years. There were few guys were really helping. We lost a chief who was really made detailed explanations like talking to a baby.

    If we need to keep PBP alive, we need to start from 0. Here is not a plave to learn from skratch, and i agree. But if anyone loves PBP, we need to do that. Attract newbies like me, that would like to learn.

    Anyway, i will get in focus on this project, because it matters to me. If anyone would like to get involved and have in house a MAX30102, i would be really happy if could help me out as well.

    Richard i understand that you have no time and you have really other things to focus. Really appreciate your help, and i think you are one of the persons help in here.

    Many thanks.

  3. #3
    Join Date
    May 2013
    Location
    australia
    Posts
    2,694


    Did you find this post helpful? Yes | No

    Default Re: Heart rate sensor MAX30102

    The breadboarding....i think is clear as schematic, if you like schematic i could also make one
    not really , i looked at 3 modules the mikroe one is 3.3v only .the one mouser/e14 sell is 3.3 or 5v and has a logic level converter on board
    another provides no schematic and only vague spec no schema, i cannot identify your module

    by the look of your cro traces you are belting 5v in on the scl,sda pins , better hope its 5v tolerant

    TRISC = %10000100 ' portc.7 and portc.2 set as input.
    is wrong both must be input , the routine will switch tris as req
    if the module have 3.3 v pull ups might be better to use the open collector/drain method for i2c command
    [edit] forget that ,its open collecter by default.


    all other unused ports are configured as output and set to low.
    unnecessary


    SDA var portc.1
    SCL var portc.2
    conflicts with your tris statement anyway


    Now regarding the FIFO_WR_PTR it is not clear to me in the manual what data to write to it.
    me either but it will do something if everything else is correct
    Last edited by richard; - 21st August 2020 at 11:20.
    Warning I'm not a teacher

  4. #4
    Join Date
    Oct 2010
    Posts
    413


    Did you find this post helpful? Yes | No

    Default Re: Heart rate sensor MAX30102

    Changed to input both portc.1 and portc.2

    This is the module.

    https://reedpaper.wordpress.com/2018...x-wrong-board/

    I have also following the "fix". Well module is 3.3V but i have never seen in all of the Arduino connections any note.

    I have changed the connections and used the 3.3V output from the Display to power the rest of the circuit.

    I dont beleive that i have burned the module as this is the result before i change the voltage supply from 5V to 3.3V.

    Code:
    i2cwrite sda,scl,$AE,$04
    pause 100
    This is the proof of ACK in 9th bit. As from the data sheet if the Id is the right one, the module pulls down the SDA during 9th bit to acknowledge receipt of data.

    Name:  ACK correct.png
Views: 8193
Size:  648.2 KB
    Last edited by astanapane; - 21st August 2020 at 13:16.

  5. #5
    Join Date
    May 2013
    Location
    australia
    Posts
    2,694


    Did you find this post helpful? Yes | No

    Default Re: Heart rate sensor MAX30102

    i2cwrite sda,scl,$AE,$04
    i see you're still torturing the device sending incomplete write resister i2c control messages at it
    Warning I'm not a teacher

  6. #6
    Join Date
    Oct 2010
    Posts
    413


    Did you find this post helpful? Yes | No

    Default Re: Heart rate sensor MAX30102

    yes i havent send any data yet as i'm searching in the i2c how to do that corresponds to the max30102 manual.

    At least i know sensor is responded by pulling SDA down on 9th bit. This is something for me.

  7. #7
    Join Date
    Oct 2010
    Posts
    413


    Did you find this post helpful? Yes | No

    Default Re: Heart rate sensor MAX30102

    i've done many tries. I just want to see if the red LED inside the sensor is alive. At least by sending a command to activate it.

    Code:
    This is as from the pseudo code the first step. I really do not know if that is the right way to send Device ID + write mode
    Then send the FIFO_WR_PTR (i still dont know what are the bits needs to be configured)
    REPEAT START
    
    addr = $04   ; FIFO WRITE POINTER REG ADDR IS 0X04
    i2cwrite  SDA,scl,contwr
    i2cwrite  SDA,scl,contwr,addr
    i2cwrite  SDA,scl,contwr
    i2cwrite  SDA,scl,contwr,addr
    
    Apart from pseudo code in the datasheet, Next i tried to send mode for the heart rate mode only
    
    addr = $09   ' mode configuration 
    i2cwrite  SDA,scl,contwr,addr,[modled],error ' ModLED = $02 as per data sheet heart rate mode only
    
    In the end i tried to send the led pulse amplitute. 
    
    addr = $0C   ' led pulse amplitute
    i2cwrite  SDA,scl,contwr,addr,[led1_pa],error' LED1_PA = $3F  , 12.6 mA
    no luck......keep walking.

  8. #8
    Join Date
    May 2013
    Location
    australia
    Posts
    2,694


    Did you find this post helpful? Yes | No

    Default Re: Heart rate sensor MAX30102

    For someone that is the first time working with a peripheral or a new method, it should be so many years a detailed info for configuration. At least a step by step guide.


    I'm not talking about you, but for all the others were in this forum for so many years. There were few guys were really helping. We lost a chief who was really made detailed explanations like talking to a baby.


    If we need to keep PBP alive, we need to start from 0. Here is not a plave to learn from skratch, and i agree. But if anyone loves PBP, we need to do that. Attract newbies like me, that would like to learn
    if you are familiar with i2c protocol and the vagaries of the device you have studied and intend to use then the pbp manual
    tells you everything you need to know to communicate with your device with pbp's i2c commands.
    the pbp manual is not there to teach i2c protocol to a novice , its raison d'etre is to explain usage of pbp implementation.

    having said that you can always ask questions on forums but really the onus is on you to do the ground work. its your project.
    its a pretty tall order to expect a complete novice tutorial for every device you can pluck out of the air from unpaid volunteers
    there are still few here willing to have a go at helping but don't forget dt was paid support , that resource has never been replaced.
    leo will usually help but he has not ventured onto this forum for years and years afaik.
    Last edited by richard; - 21st August 2020 at 12:01.
    Warning I'm not a teacher

Similar Threads

  1. New PIC failure rate
    By timmers in forum General
    Replies: 5
    Last Post: - 26th March 2009, 13:11
  2. Rf module baud rate
    By tazntex in forum Serial
    Replies: 4
    Last Post: - 5th August 2008, 19:47
  3. Replies: 6
    Last Post: - 18th January 2008, 09:17
  4. SHIFTOUT Clock rate
    By Brock in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 9th July 2006, 00:42
  5. Detect baud rate
    By Dick M in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 2nd July 2005, 22:10

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts