Thursday, 15 November 2012

Microcontroller


An 8-bit microcontroller was chosen to process the output signal produced by the amplification stage. The Microchip PIC16F877A was selected due to its additional output and processing power, and also its onboard 10-bit analogue to digital converter and in-circuit debugging features. Using this highly integrated microcontroller allowed for a simpler design and trouble shooting debugging process. Due to the use of a microcontroller to calculate the beats per minute (BPM), it was decided that a liquid crystal display (LCD) module would be the most flexible way of displaying this numerical output. It was originally planned that several seven segment displays could be used, but again it was deemed worthwhile to integrate the display unit together and limit the number of components required. In addition, the information which the LCD could convey was greater. Below is a block diagram of the microcontroller and LCD process:

 

Regarding the actual BPM calculation (assuming that it was possible to translate each R part (the blip/spike peak) into singular events occurring in a timely fashion of course) it was originally going to be done by measuring the total number of spikes within a certain amount of time and then multiplying this count by a factor (as it is done when using a clock and your hand). With the use of the microcontroller however more precise measurements were able to be made resulting in an output of greater accuracy and speed.