+ Post New Thread
Results 1 to 13 of 13
  1. #1
    Advanced Member level 2
    Points: 2,573, Level: 11
    baileychic's Avatar
    Join Date
    Aug 2017
    Posts
    501
    Helped
    46 / 46
    Points
    2,573
    Level
    11

    How to interface BP Transducer to PIC18F?

    How to interface BP Transducer to PIC16F?

    I need to use these and interface BP transducer and Analog Stimulator to PIC16F Mic rocontroller.

    BP transducer needs to connect to PIC16F ADC input and Analog Stimulator needs to connect to DAC output of PIC18F.

    I will be using PIC16F1779 which has both 10-bit ADC and DAC.

    Find attached file.

    This is for a lab experiment.

    Also fins attached flowchart.

  2. #2
    Super Moderator
    Points: 254,930, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    44,424
    Helped
    13527 / 13527
    Points
    254,930
    Level
    100

    Re: How to interface BP Transducer to PIC18F?

    Do you want to use the pressure transducer with its dedicated amplifier, or include the amplifier function in your design? In the latter case, does your design need to provide fully galvanic isolation like the shown bp amp?

    The stimulation waveform generation and respective control algorithms are apparently beyond the scope of this thread. Nevertheless they have to be designed by someone and compiled into the PIC.



  3. #3
    Advanced Member level 2
    Points: 2,573, Level: 11
    baileychic's Avatar
    Join Date
    Aug 2017
    Posts
    501
    Helped
    46 / 46
    Points
    2,573
    Level
    11

    Re: How to interface BP Transducer to PIC18F?

    I will try both methods that are:

    1. Using a dedicated amplifier and
    2. Custom amplifier

    I want to implement Galvanic isolation if required.

    Regarding the algorithm, the student said that ADC needs to be used to read the sensor and the vale should be sent to DAC to get a voltage and amplified if required and fed into Stimulator.
    Is there a requirement of a special algorithm?



    •   AltAdvertisment

        
       

  4. #4
    Super Moderator
    Points: 254,930, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    44,424
    Helped
    13527 / 13527
    Points
    254,930
    Level
    100

    Re: How to interface BP Transducer to PIC18F?

    I can't read a sense into sending the blood pressure signal to stimulation amplifier. What should be the purpose?



  5. #5
    Advanced Member level 2
    Points: 2,573, Level: 11
    baileychic's Avatar
    Join Date
    Aug 2017
    Posts
    501
    Helped
    46 / 46
    Points
    2,573
    Level
    11

    Re: How to interface BP Transducer to PIC18F?

    @FvM

    The student had only given nformation that ADC reads the sensor/transducer and the raw ADC value will be scaled and converted to suitable voltage using internal DAC of PIC and DAC output voltage is given to Stimulator.

    If more information is needed then please tell what are the requirements and I will ask the Student and will update.

    - - - Updated - - -

    @FvM

    This is the Flowchart that the Student's Professor has given. She (I) have to implement it using PIC?
    Show what is the method?

    Just read the transducer using ADC and then scale the raw ADC value and feed it to get DAC output voltage and then use an OpAmp to get the required stimulus voltage for Analog Stimulator?



  6. #6
    Super Moderator
    Points: 254,930, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    44,424
    Helped
    13527 / 13527
    Points
    254,930
    Level
    100

    Re: How to interface BP Transducer to PIC18F?

    I don't understand the exact purpose of the stimulator part, but I really don't need to know. You should however understand it if you are doing any srious support work for the project.

    There should be a detailed experiment description supplementing the "flowchart". Without it, one might guess that the student neither understands the project purpose.



    •   AltAdvertisment

        
       

  7. #7
    Advanced Member level 2
    Points: 2,573, Level: 11
    baileychic's Avatar
    Join Date
    Aug 2017
    Posts
    501
    Helped
    46 / 46
    Points
    2,573
    Level
    11

    Re: How to interface BP Transducer to PIC18F?

    I will give a detailed report to the student (the student has only provided me the PDFs which I have attached in this thread).

    I just want to know whether I can use a 5V excitation voltage for the transducer/sensor same as PICs power supply and read the sensor using ADC and feed the 10-bit ADC result to internal DAC of PIC and get a DAC output voltage and then amplify it if needed using an OpAmp (MCP6001) and feed it to Analog Stimulator?

    I have to design the PIC interface circuit for the BP transducer and Analog Stimulator to conduct the experiment.

    Should I use an Instrumentation Amplifier to get the stimulator voltage?



  8. #8
    Advanced Member level 2
    Points: 2,573, Level: 11
    baileychic's Avatar
    Join Date
    Aug 2017
    Posts
    501
    Helped
    46 / 46
    Points
    2,573
    Level
    11

    Re: How to interface BP Transducer to PIC16F?

    @FvM

    I guess the setup should be like this:

    Provide say 5V excitation voltage to transducer/sensor.
    Put an OpAmp between transducer output and PIC's ADC input
    Read transducer output using ADC and get the raw ADC value of 10-bit
    Scale this reading if required for the internal DAC of PIC
    Then feed the DAC output to Analog Stimulator
    Analog Stimulator output is connected to the transducer for control

    What do you say?

    The professor needs solution for both methods that are using the BP Amp instrument and also external OpAmp.

    So, If the above method is correct then I will use the chosen PIC's internal OpAmp to amplify the transducer's output for ADC.

    Note: I have never used these instruments and this also applies for the student.


    This is what is mentioned in the transducer's datasheet.

    Operating range: –50 to +300 mmHg
    Excitation voltage: 2 to 10 V DC
    Sensitivity (full range): 5 ĩV/V/mmHg

    So, If my excitation voltage is 5V DC then I get

    5uV * 5 = 25uV for 5V and it is equal to 1 mmHg?

    If yes, then range is -50 to 300 mmHg = 350

    So, 25uV * 350 = 8750 uV = 8.75mV?

    So, I need to amplify this value to 5V for ADC input?
    Last edited by baileychic; 23rd April 2019 at 06:30.



  9. #9
    Super Moderator
    Points: 73,692, Level: 66
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    14,955
    Helped
    3403 / 3403
    Points
    73,692
    Level
    66

    Re: How to interface BP Transducer to PIC18F?

    Hi,

    Operating range: –50 to +300 mmHg
    Excitation voltage: 2 to 10 V DC
    Sensitivity (full range): 5 ĩV/V/mmHg

    So, If my excitation voltage is 5V DC then I get

    5uV * 5 = 25uV for 5V and it is equal to 1 mmHg?

    If yes, then range is -50 to 300 mmHg = 350

    So, 25uV * 350 = 8750 uV = 8.75mV?

    So, I need to amplify this value to 5V for ADC input?
    If you take the units correctly with your calculations:

    5uV/V/mmHg * 5V = 25uV/mmHg

    25uV/mmHg * 350mmHg = 8750 uV = 8.75mV

    While these calculations are basically correct...In reality I'd expect problems because of:
    * output offset of the sensor
    * gain variation of the sensor
    * reference voltage error
    * amplifier gain and offset error
    * no headrom to be able to detect "out of range"

    At this stage it's time to consider about
    * the measurement method: absolute or ratiometric
    * schematic
    * error calculations

    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



  10. #10
    Advanced Member level 2
    Points: 2,573, Level: 11
    baileychic's Avatar
    Join Date
    Aug 2017
    Posts
    501
    Helped
    46 / 46
    Points
    2,573
    Level
    11

    Re: How to interface BP Transducer to PIC18F?

    Human BP doesn't exceed 250 mmHg and transducer can measure up to 300 mmHg. So, will there be an out of range reading?



    •   AltAdvertisment

        
       

  11. #11
    Super Moderator
    Points: 73,692, Level: 66
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    14,955
    Helped
    3403 / 3403
    Points
    73,692
    Level
    66

    Re: How to interface BP Transducer to PIC18F?

    Hi,

    I didnīt go through the datasheets, thus I donīt know about the sensor errors...

    So itīs just a reminder to consider worst case scenarios not to get in trouble later...

    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



  12. #12
    Advanced Member level 2
    Points: 2,573, Level: 11
    baileychic's Avatar
    Join Date
    Aug 2017
    Posts
    501
    Helped
    46 / 46
    Points
    2,573
    Level
    11

    Re: How to interface BP Transducer to PIC18F?

    The student discussed with the professor and the new requirement is as below.

    The BP transducer gives voltage output and also can connect to BP AMP I2C Input. BP AMP also gives direct mmHg data at its I2C output connector but the professor doesn't want to use it.
    He wants the student to use the voltage output of the BP sensor (transducer) and use ADC of MCU and convert it into a voltage level between 0 and 10V and a pulse of 20 Hz to 100 Hz that is single output to input into stimulator.

    The pulse voltage level should be between 0 and 10V and 20 Hz to 100 Hz based on sensor (ADC) value.

    How can this be achieved using PIC16F1779?

    I can use a DAC to get a voltage and a digital output pin to get pulse output but need to get both on one pin.

    I can use additional transistors, N-Mosfet, OpAmps with PIC if required to get the required output.

    - - - Updated - - -

    Can I use PIC16F1779's internal DAC to get the pulse output signal that is:

    I will update the DAC value in Timer ISR which can give 20 Hz to 100 Hz max 5V output pulse and I will use an external OPAMP with +10V supply for it to get the amplified pulse output which can vary between 20 Hz to 100 Hz with voltage level 10V max.

    Will this work?

    If it works then I am thinking about using ti.com OPA743 (12V rail-to-rail opamp).



  13. #13
    Advanced Member level 2
    Points: 2,573, Level: 11
    baileychic's Avatar
    Join Date
    Aug 2017
    Posts
    501
    Helped
    46 / 46
    Points
    2,573
    Level
    11

    Re: How to interface BP Transducer to PIC18F?

    My hardware setup will be like this.

    I will not be using BP AMP and BP STIMULATOR.

    I will be using just BP sensor (Professor's requirement to use just that)
    The BP sensor is connected to internal OPAMP of PIC16F1779 and OPAMP's output is fed to ADC input.
    ADC reading is taken and converted to DAC value and based on the DAC value (or ADC value) then timer interrupt period is selected between 20 Hz to 100 Hz.
    The DAC will output a pulsed DC between 0-5V and 20 Hz to 100 Hz.
    This is amplified to 20V max pulsed using external 36V Rail-to-Rail OPAMP.
    The external OPAMP acts as the stimulator.

    So, How should I write the c code that is to get Systolic and Diastolic BP readings in mmHg for displaying on LCD?



--[[ ]]--