Week 14

/ /
Today is Industry day, so all students who take fyp 2 need to present their project in Gemilang Hall. I was given table number 10 and my accessors is Madam Afifah and Sir Azmi. Alhamdulillah everything is fine, I won 2nd place for Industry Day 2012.

Figure 1: Full specification Pedometer

Figure 2: Front View

Figure 3: Before presentation

Figure 4: Preparation for 2nd presentation

Figure 5: I won the 2nd place

Special thanks to Mr Zubir (advisor) and Mr Adib for guide and give support to me to complete this project.    thanks also to Ali, Akmal, Hariz and who help me to complete this project.

Week 13

/ /
This week will be last preparation and testing for the project. Alhamdulillah, this pedometer function well and fully function. So since the presentation is next week, this week task is to complete the poster and testing project. 

Figure 1: Pedometer poster

Figure 2: Switch ON/OFF

Figure 2: LED power indicator

Figure 3: complete pedometer


Figure 4: Video demonstrate the pedometer



Week 12

/ /
This week I had done my hardware part. The hardware part include soldering, design protype and drill PCB board. In this protype, I had made 2 design which is normal size and small size. For small size, it has problem because battery drain too fast. So, i had change plan to build to a normal size. For normal size, it used two battery 9V, each battery for Arduino and bluetooth device. I had combine 9V battery to power up Arduino and bluetooth device but it seems no support because when running, the bluetooth sometimes not send the data to the android. This can be no enough power to power up the bluetooth. So I had to used 2  9V battery to power up Arduino and Bluetooth.  For Bluetooth, I had made regulator to 5V since the operating for bluetooth is 5V.

Figure 1: soldering components 

Figure 2: Soldering the sensor and connect to the circuit

Figure 3: Screw the casing of pedometer

Figure 4: Make a hole for LED power indicator

Figure 5: 2 9V battery is connect

Figure 6: sewing the strap on ankle band

Figure 7: Pedometer small size 

Figure 8: Pedometer normal size


Week 11

/ /
After complete my software which is application on Android, I move to another part to complete my project.  This week I spend my time to complete circuit part which is PCB board and testing. The PCB board etching was done at BMI lab.

Here is the step for beginning to the end of process to do in PCB board.

1.Sketch the circuit in software and print on OHP paper.

    Figure 1: Design using Fritzing software
    Figure 2: Printed on OHP paper

2.Expose in UV lamp
    Figure 3: set expose for 72 seconds

    Figure 4: Put the UV board into UV box

3. Remove the green layer
   Figure 5: shake the box until the green layer disappear

    Figure 6: The green layer disappear and only line for circuit left


4. Remove the gold layer by put the circuit into ecthing machine
Figure 7: run the machine 2~3 times until fully disappear

5. When all complete, using thinner to clear the PCB board and only copper line left .










Week 10

/ /
This week i had complete my apps on Android. I had research and study Java language in YouTube and other blog in order to complete on application part on Android. This is not easy, but trust me, put more effort and never give up to learn and try & error in Eclipse software. Then you can create your application yourself.

Here is the program and interface for my apps.

figure 1: The Eclipse software with my complete apps

Figure 2: Simulator Android run the apps

Figure 3: The icon shoes (pedometer) as my apps




----------------------------------------------------------------------------------------------------
Coding for pedometer apps (Fadzli)
----------------------------------------------------------------------------------------------------

/*
  SensorGraph - Example to use with Amarino 2.0
   

*/
package edu.mit.media.hlt.sensorgraph;

import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Chronometer;
import android.widget.TextView;
import at.abraxas.amarino.Amarino;
import at.abraxas.amarino.AmarinoIntent;

/**
 * <h3>Application that receives sensor readings from Arduino displaying it graphically.</h3>
 * 
 * This example demonstrates how to catch data sent from Arduino forwarded by Amarino 2.0.
 * SensorGraph registers a BroadcastReceiver to catch Intents with action string: <b>AmarinoIntent.ACTION_RECEIVED</b>
 * 
 *
 *
 */
public class SensorGraph extends Activity {
private static final String TAG = "SensorGraph";
// change this to your Bluetooth device address 
private static final String DEVICE_ADDRESS =  "00:12:04:20:51:76"; //"00:06:66:03:73:7B";
double myElapsedMillis;
double distance;
double calory;
private TextView mValueTV;
private TextView mValueDS;
private TextView mValueCL;
private ArduinoReceiver arduinoReceiver = new ArduinoReceiver();

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
         
        setContentView(R.layout.main);
        
        // get handles to Views defined in our layout file
     
        mValueTV = (TextView) findViewById(R.id.value);
        mValueDS = (TextView) findViewById(R.id.distance);
        mValueCL = (TextView) findViewById(R.id.calories);
        final Chronometer myChronometer = (Chronometer)findViewById(R.id.chronometer1);

        Button buttonStart = (Button)findViewById(R.id.button1);
        
        buttonStart.setOnClickListener(new Button.OnClickListener(){

@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
myChronometer.start();
}});
       
       
        }
        
    
    
@Override
protected void onStart() {
super.onStart();
// in order to receive broadcasted intents we need to register our receiver
registerReceiver(arduinoReceiver, new IntentFilter(AmarinoIntent.ACTION_RECEIVED));
// this is how you tell Amarino to connect to a specific BT device from within your own code
Amarino.connect(this, DEVICE_ADDRESS);
}


@Override
protected void onStop() {
super.onStop();
// if you connect in onStart() you must not forget to disconnect when your app is closed
Amarino.disconnect(this, DEVICE_ADDRESS);
// do never forget to unregister a registered receiver
unregisterReceiver(arduinoReceiver);
}

/**
* ArduinoReceiver is responsible for catching broadcasted Amarino
* events.
* It extracts data from the intent and updates the graph accordingly.
*/
public class ArduinoReceiver extends BroadcastReceiver {

@Override
public void onReceive(Context context, Intent intent) {
String data = null;
// the device address from which the data was sent, we don't need it here but to demonstrate how you retrieve it
final String address = intent.getStringExtra(AmarinoIntent.EXTRA_DEVICE_ADDRESS);
// the type of data which is added to the intent
final int dataType = intent.getIntExtra(AmarinoIntent.EXTRA_DATA_TYPE, -1);
// we only expect String data though, but it is better to check if really string was sent
// later Amarino will support differnt data types, so far data comes always as string and
// you have to parse the data to the type you have sent from Arduino, like it is shown below
if (dataType == AmarinoIntent.STRING_EXTRA){
data = intent.getStringExtra(AmarinoIntent.EXTRA_DATA);
if (data != null){
mValueTV.setText(data + " steps");
try {
// since we know that our string value is an int number we can parse it to an integer
final int sensorReading = Integer.parseInt(data);
distance = sensorReading * 0.762;
mValueDS.setText(distance + " m");
calory = sensorReading * 0.05;
mValueCL.setText(calory + " kcal");
catch (NumberFormatException e) { /* oh data was not an integer */ }
}
}
}
}

}



Week 9

/ /
Android meets Arduino : Communication between Android and Arduino

Today i work with Android part, which i had to create a software in android to communicate with Android smartphone. I start with example which found on internet called "Amarino". In Amarino web, i try the example "sensor graph". Software i use is Eclipse, where to develop my apps.

Figure 1: The interface of Eclipse software

Figure 2: The programming for my apps

Figure 3: Simulator Android in PC


So, this week must be busy day because I had to study Java language and need to develop Android apps for my project. 





Week 8

/ /
Last week the bluetooth cannot connect with arduino Uno because the Uno version is no longer support Bluetooth connection. I had try many times and still the same result ( cannot connect). I had done my research on this problem and found that the Arduino Nano can support the bluetooth. So i decide to buy this Arduino nano from myduino and cost about RM 75.00 only. The problem with this arduino is the ATMEGA is mounted to the board, so i cannot make a new circuit to this arduino. I had to use the NANO in my circuit.


Features of Arduino NANO

  • Automatic reset during program download
  • Power LED
  • Green (TX), red (RX) and orange (L) LED
  • Auto sensing/switching power input
  • Small mini-B USB for programming and serial monitor
  • ICSP header for direct program download
  • Standard 0.1” spacing DIP (breadboard friendly)
  • Manual reset switch

Figure 1 : Arduino NANO


Figure 2: Arduino NANO and Blutooth

Figure 3: Connection of NANO and Bluetooth

Using method last session, the connection was succesful.  Android pairs and starts sending data with the help of Test Event which was configured earlier. Now every 5 seconds a random number is forward to Arduino and it flashes LED for 1 sec and this continues for ever till one disconnects Android from Arduino. 

This testing was successful and function well as expected. So next step is prepare to play with this Bluetooth and Android application.  





 
Copyright © 2010 Pedometer, All rights reserved
Design by DZignine. Powered by Blogger