Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to calculate heart pulse?

Status
Not open for further replies.

sakurarandom

Junior Member level 3
Joined
Mar 26, 2011
Messages
30
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,500
I am currently working on Heart Beat Monitoring System using finger clip sensor and PIC18F4550 and using USB to connect to PC. My finger clip is using high intensity LED and LDR with LM358. I am trying to write the coding on calculating the heart pulse in PIC using MPLAB C language. I dono how to write the coding or calculate. Can anyone help me on this?
 

I am currently working on Heart Beat Monitoring System using finger clip sensor and PIC18F4550 and using USB to connect to PC. My finger clip is using high intensity LED and LDR with LM358. I am trying to write the coding on calculating the heart pulse in PIC using MPLAB C language. I dono how to write the coding or calculate. Can anyone help me on this?

the intensity of received light drops when the blood is pumped in to the finger. So you have to check for a stiff drop in intensity received by ldr.
if you count the drops in a minute then you can say number of beats per minute.

alternatively continuously check and interpolate the number of beats per minutes.

For additional information:: Even the resistance of the skin changes with blood flow, But it is generally used for ECG.
 

in MPLAB..how do I write in C language in PIC? How do i calculate in PIC program?
 

Why did you select the PIC18F4550?
Are you going to do the SW development in assembler or in C? Why ?
Do you have a development environment for this PIC?
Give us more detail on the requirements of you project
 

Why did you select the PIC18F4550?
Are you going to do the SW development in assembler or in C? Why ?
Do you have a development environment for this PIC?
Give us more detail on the requirements of you project

I choosed PIC18F4550 because it has USB feature. I am going to use MPLAB write the coding in C to program the PIC. This is the first time I using PIC therefore I am not proficient in C language yet. My project is Heart Beat Monitoring System. My sensor should connect to PIC, then using USB connect to PC and show the output on PC.This is my circuit but there is some error on PIC part circuit.jpg.
Currently, my group have come out the finger clip sensor on breadboard. The LED is blinking when finger is connect to the finger clip. However, there is always need to trigger the circuit in order to get desire output. For my PIC, I have burned bootloader in it. I also designed my Window Form using Microsoft visual Studio 2008 in C++ language. Now, I am facing problem how to calculate the heart beat using MPLAB for my PIC.
 

Why? I am new on using PIC.

I hope you are not new to C?

C is a bit high-level language than assempler. Hence you should have no problem in coding.
Only problem is you have to know the compiler you are using (e.g How it defines different pins/ports)
rest is normal C.

This is why i was surprised why you bother if it is PIC or your PC. If you are using C it is the C language constructs and your logic matters. The intricacies of the underlying architecture is taken care of by your Toolchain.

I guess I have described it properly.
 

I hope you are not new to C?

C is a bit high-level language than assempler. Hence you should have no problem in coding.
Only problem is you have to know the compiler you are using (e.g How it defines different pins/ports)
rest is normal C.

This is why i was surprised why you bother if it is PIC or your PC. If you are using C it is the C language constructs and your logic matters. The intricacies of the underlying architecture is taken care of by your Toolchain.

I guess I have described it properly.

Thanks ya. Well I am new C language but not C++. I guess they quite alike? Well for the pin assignment..I just need one input for analog input pin in PIC as shown in the figure I attached before. The problem I am facing is like..for instance my friend groups having analog temperature input to same PIC. There is 10 bits for the input. I don't know mine one how many bits..just I dono what form it is. I had tested my sensor output which is about the shape as shown in Calculating the heart rate - data logging experiment results but the peak to peak voltage is 53micro second. Kind of weird..
Thanks for your patient understanding my problem and your help. I deeply appreciate it

---------- Post added at 04:48 ---------- Previous post was at 04:45 ----------

hi this is a simple heart monitor project
you can check it may help you

Heart Rate Display LED T-Shirt

Thanks you so much..I will try read on it..
 

Thanks ya. Well I am new C language but not C++. I guess they quite alike? Well for the pin assignment..I just need one input for analog input pin in PIC as shown in the figure I attached before. The problem I am facing is like..for instance my friend groups having analog temperature input to same PIC. There is 10 bits for the input. I don't know mine one how many bits..just I dono what form it is. I had tested my sensor output which is about the shape as shown in Calculating the heart rate - data logging experiment results but the peak to peak voltage is 53micro second. Kind of weird..
Thanks for your patient understanding my problem and your help. I deeply appreciate it

53 micro second=18867 pulses a second, man Human heart rate is from 72 to 90 pulses per minute.
if we consider 90 pulses(higher side) then the time period for one pulse is 666.667 ms (mili second) approx.

Please recheck your sensor with a good Oscilloscope I am sure you have done a wrong setting somewhere.
 

May I know is anyone have any or know any software that can convert assembly source code to C language?
 

For PIC I don't know but there are few. you can consult REC Boomerang too. From the source you can get a feel how difficult it is.
All those are for x86 architecture.
 

For PIC I don't know but there are few. you can consult REC Boomerang too. From the source you can get a feel how difficult it is.
All those are for x86 architecture.

Thanks you for always quick reply my question. I deeply appreciate it. I tried Boomerang decompiler from this website Boomerang Decompiler .
However, it can convert. Did I use correct software? I installed MikroC but I only know how to use it convert C to assembly. Is it possible use MikroC convert assembly to C? How?
 

I installed MikroC but I only know how to use it convert C to assembly. Is it possible use MikroC convert assembly to C? How?

MicroC is a compiler so it converts C->assembly. reverse compiler or decompiler generally converts bin->asm->C.

search for a decompiler for your targeted architecture.
 

Thank you all. My project was successfully down. ^^
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top