Highlights

Showing posts with label Tutorial. Show all posts

Tutorial: Making the ECG

By : x
This is our custom built heart beat monitor. It uses a Infra-Red(IR) emitter and detector to detect heart beat. The concept is to detect a change in Infra Red detected by the IR detector with each pulse. You can see the two led at the left corner of the circuit board. The darker one is the emitter and the transparent one is the detector. Both placed in a foam to minimize the ambient infra red detection.
The electrical signal needs to be amplified so we are using Op-Amp 741 and then its output is filtered using three stage filters to minimize the noise. This signal is then fed into a single analog input in the Arduino.

The Arduino board is programmed to read the analog data and perform a serial output every 15ms. A Processing code is written on a PC to receive this data. The Prrocessing code contains a serial listener which get the data sent by the Arduino through the serial port. This data is then plotted on to the screen. For plotting a black screen is drawn and a line is made connecting adjacent data point as they come to give a running graph.

Tag : , , ,

Concept Design: ECG

By : Lam Ho Wang
The group is planning to make our own ECG by using, an inferred LED, a photodiode, and OP amp. The sensor is based on the DIY pulse sensor posted on picture 2

Figure: ECG and Arduino Concept diagram
Figure: Circuit Diagram for the proposed ECG

Tag : , , ,

LEDs and Accelerometer

By : x
Arduino Tutorial:
This tutorial will show you how to connect LEDs into Arduino Uno, and how to extract data from accelerometer and make the LEDs react to the change.

First you need to  connect the LEDs to the Arduino board. We will be using three LEDs and bread board to setup the LEDS. You may use any port; here we use port 13, 10 and 4 for X, Y and Z direction associated LEDs respectively. Watch the video if you need help setting up the LEDs.


Now follow the tutorial by Xingyu Huang on how to program using the Arduino development environment to receive data from acclerometer and design an algorithm which effectively translate this change to LED output.

Here is how your hardware would react if everything is setup correctly.

Program: Accelerometer

By : Noctis King

The program of LEDs and Accelerator

    In this week, our group made a monitor by using LEDs to react the change of accelerator.
    Now, we will show and explain how this program work.


const int groundpin = 18;             // analog input pin 4 -- ground
const int powerpin = 19;              // analog input pin 5 -- voltage
const int xpin = A0;                  // x-axis of the accelerometer
const int ypin = A1;                  // y-axis
const int zpin = A2;                  // z-axis (only on 3-axis models)
int ledx=13;                          // the pin of x-axis LED
int ledy=10;                          // the pin of y-axis LED
int ledz=4;                           // the pin of z-axis LED

void setup()
{
  // initialize the serial communications:
  Serial.begin(9600); // set the data rate in bits per second
  
  //initialize the digital pin as an output.
  digitalWrite(groundpin, LOW); 
  digitalWrite(powerpin, HIGH); 
  pinMode(ledx, OUTPUT); 
  pinMode(ledy,OUTPUT); 
  pinMode(ledz,OUTPUT); 
}

void loop()
{
  // set the initial value of accelerator
  int ax = analogRead(xpin); // the initial value of x-axis
  int ay = analogRead(ypin); // the initial value of y-axis
  int az = analogRead(zpin); // the initial value of z-axis
  
  while (true) // loop, tracking and reacting the change 
  {
    int Tax = analogRead(xpin); // reading the x-axis value after changing
    // determining the changing margin of x-axis' value 
    // if value change bigger than 50, the LED will blink
    // if not, it will closs
    if (abs(Tax - ax) > 50)  
    {
      digitalWrite(ledx, HIGH); 
    }
    else
    {
      digitalWrite(ledx, LOW);
    }
    int Tay = analogRead(ypin);
    if (abs(Tay - ay) > 50)
    {
      digitalWrite(ledy, HIGH);
    }
    else
    {
      digitalWrite(ledy, LOW);
    }
    int Taz = analogRead(zpin);
    if (abs(Taz - az) > 50)
    {
      digitalWrite(ledz, HIGH);
    }
    else
    {
      digitalWrite(ledz, LOW);
    }
  }
  
  
  // delay before next reading:
  delay(100);
}

Getting Started with Arduino

By : x
This tutorial is a beginners guide to setting up Arduino development environment. We will be using Arduino Uno for this project. To follow the official getting started with Arduino tutorial click here.

  1. Getting the hardware: You can obtain the Arduino board from the official store or through Amazon, and also other vendors.
  2. Getting the software: Download the required software (development environment) to program the Arduino board. The supported operating system as of now are Windows, Linux and MacOS.
  3. Connecting to Arduino: After installing the software,  
    1. Connect the Arduino board to the computer with the provided USB cable.
    2. Now go to Tools>Board and select Arduino Uno.
    3. In the Tools>Serial Port select the associated COM port.(You can find this by unplugging the USB cable. The COM port that disappeared is the one.)
  4. Uploading your first program: Several example scripts are provided. For this tutorial we will be using a simple script that makes the LED 13 on the board blink.
    1. Go to File>Examples>1.Basics and open ‘Blink’. This will load the Blink script.
    2. Now click ‘Upload’ button on the development environment.
    3. If uploading is successful than you should see LED 13 blinking. If it failed make sure that the Arduino is connected and associated COM port is selected.

- Copyright © 2013 Group 106-11 - Date A Live - Powered by Blogger - Designed by Johanes Djogan -