need help for a project "HEART BEAT MONITORING"

Go To Last Post
21 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i have bought a Grove - Chest Strap Heart Rate Sensor
and i want to interface it with my microcontroller atmega32.
how to interface it..?
kindly also tell me the c code for displaying the heart rate in the lcd through microcontroller atmega 32?
thanks in advance :idea:

Last Edited: Sat. Jul 15, 2017 - 01:17 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I just pasted the words "Grove - Chest Strap Heart Rate Sensor" into Google. The very top hit was:

http://www.seeedstudio.com/wiki/...

That even includes Arduino code for an AVR - admittedly not a mega32 so you have two options: (1) convert the Arduino for use with your mega32 or (2) forget the mega32 and use an Arduino (mega328) instead.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:

That even includes Arduino code for an AVR - admittedly not a mega32 so you have two options: (1) convert the Arduino for use with your mega32 instead.

well how to do that?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i need to know the interfacing between the sensor belt and the atmega 32 and also the c code to to display heart rate in lcd...so kindly tell me this

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well the timing diagram it shows on that Wiki just show a high pulse every time it detects a heart-beat so it looks like you'd just run the active signal to an IO pin of the AVR and either sit in a loop waiting to see a low->high transition or perhaps set up an interrupting pin to interrupt your code every time that occurs. If the aim is to show heart rate on an LCD you also need something that can measure passing seconds/minutes and then you just count how many pules you get each minute or whatever (as you don't want to wait a whole minute to start showing an output you actually probably time between two pulses and then use the reciprocal over 60 seconds to work out the rate).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ok but how can i interface it with atmel atmega168 ?
how to interface can u please tell me?
kindly also tell me the c code for measuring the heart rate..
and kindly also tell is it possible to show the heart rate on pc?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, I don't think you'll find anybody willing to do the project for you, but it seems to me Clawson's shown you a pretty detailed how-to.

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

but it seems to me Clawson's shown you a pretty detailed how-to.

Well I don't know about that but if you look at the picture on that wiki:

It looks to me that the white "AM receiver pack" has three wires. I would be very surprised if the red and black were not for 5V and Ground which leaves the yellow wire as a signal wire. That's the one you'd connect to an input pin on the micro. Then say you had connected it to bit 4 of PORTD you could do something like:

while (1) {
  if (PIND & (1<<4)) {
    // remember current time to measure from now to next pulse
  }
}

I would try to verify my understanding of the wire colours/purpose by further googling (I spent literally 3 seconds googling the first link!). I'd also use a scope or meter to get a better idea of the signal shape (though that wiki has a quite telling picture).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

well thats a great hel clawson!!!
can u pls provide me the complete code?
on how to show the heart rate of the person wearing sensor on the lcd using atmega168

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

can u pls provide me the complete code?

Nope I would hate to deprive you of the fun and sense of achievement you will get learning all about this sensor and how to interface it yourself. Where would be the "fun" if I just gave you a complete solution? ;-)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

well i know clawson what you are talking about..but since i am a naive in c coding i dont really think i wll enjoy coding anyways.....well it will be a great help if uyou epitomize the complete code for me...just an abbreviation is enough for me!!!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

School project?

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

nope...university project

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ankit0916 wrote:
nope...university project

Wow. With that work ethic you'll be a highly sought after hire. :wink:

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Maybe you can post this on Rent A Programmer and let some grad students grovel for the crumbs? Hardly anyone wants to work for free except Linus Torvalds and Richard Stallman. I don't think any software should be free. At least until I get my mortgage paid off.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Don't they give you 'free' sample code for the Arduino that you can compile with the 'free' Arduino IDE that loads into a Mega168 or Mega328?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Hardly anyone wants to work for free except Linus Torvalds and Richard Stallman.

They both have salaries for (at least much of) their work.

Quote:
I don't think any software should be free.

That would rule out any attempt to port e.g. FatFS from avr-gcc to another compiler then, right?

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Perhaps he's a business major and the real lesson is how to talk some geek into doing it for him without pay

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sorry guys xpo10 has his own thread https://www.avrfreaks.net/forum/c...

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It looks like there is a digital signal [Vcc:Ground] coming out of the receiver module.  Possibly the yellow wire since other two colors are usually reserved for Vcc (red) and Ground (black,brown).  In the demo code, this digital signal is connected to INT0.  An interrupt happens with every heartbeat.

 

If you want to experiment with heart rate sensing, I suggest this Maxim Heart Rate/ Oximeter IC break out board:

http://www.ebay.com/itm/36190987...

Last Edited: Fri. Jul 14, 2017 - 11:40 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Simonetta this is an old thread and the guy asking the new question can continue on the thread I linked to above. I will lock this thread to avoid further confusion.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

Topic locked