Introduction: DigiWallet - Your Smart Wallet (Intel IoT)

Ever misplaced your wallet? Or Lost your Wallet? Have a habit of forgetting it behind? Now don’t worry about losing or misplacing your wallet, coz we have come up with an idea to make your ordinary wallet SMART using Intel Edison.

1.Pair your wallet with your smart phone, using Bluetooth.
2.Get notification on your phone if your wallet is out of range.
3.Locate your wallet from your smartphone app by pressing the locate button. This will trigger the buzzer on the wallet.

This prototype was built during Intel® IoT Roadshow Bangalore, Bangalore, India in April 2015. Intel provided us with both an Edison development board and a Grove Starter Kit Plus, Intel IoT Edition.

Team members- Akshit Mahajan & Manan Vyas

Step 1: How It Works?

1. Setup an ordinary wallet with the Intel Edison Board, connected with a Buzzer and Led module.

2. DigiWallet Mobile App will do the Bluetooth pairing with Intel Edison board. Now the Smartphone and DigiWallet will be in constant connection.

3. If the wallet is out of the Bluetooth range, the DigiWallet app will send an alert to the user, that it has been lost.

4. If the wallet is misplaced within the range, the user can use Locate feature to trigger the buzzer alarm and led on the DigiWallet.

Step 2: Required Components

1. Intel Edison

2. Arduino Extension Board

3. Grove LED

4. Grove Buzzer Sensor

5. Grove - Base Shield V1.3

6. Software components - Android Studio for Developing Android Application, Arduino IDE, Python Script

7. An ordinary Wallet

8. Android smartphone

Step 3: Connection & Circuit Setup

Before starting you need to setup computer with Intel Edison & configure Ethernet over USB. If you attend an Intel hackathon they will walk you through setting up and testing your Intel Edison. If you are doing this on your own you will find instructions on their IoT website.

Once you have your Edison up and running you should remove the Grove base shield from the Starter Kit and place it on your Edison board.

Next attach the Grove sensors to the board as follows:

  • Grove LED to Pin 12
  • Grove Buzzer to socket D6

Screw up the hinges in the 4 corners (as shown in the image) and keep it over the Wallet. This completes the connection & circuit setup.

Step 4: Upgrading Your Firmware

During the hackathon we came to know that inbuilt bluetooth in edison does not work properly in versions prior to 120. To get it working, we had to upgrade the firmware. Please check your firmware version as instructed below:

- Connect to edison using Serial COM Port in putty, use the instruction 'configure_edison --version' if the version is less than 120, upgrade your firmware.

We updated to edison-image-ww05-15. Please follow the attached guide to update the firmware of Intel Edison.

Step 5: Bluetooth Configuration & Commands

We used Intel Edison's inbuilt bluetooth 4.0.

There are 4 activities in bluetooth configuration :

  1. Scan
  2. Discovery
  3. Pair
  4. Connect

Establish connection with android device:

  • Login to edison using Serial COM Port @ speed 115200 through putty
  • Unblock bluetooth 'rfkill unblock bluetooth'
  • Log into bluetooth controller utility 'bluetoothctl'
  • View the configurations 'show'
  • Scan the devices 'scan on'
  • Make your edison discoverable 'discoverable on'
  • Pair the device which you need to connect using unique bluetooth id 'pair 98:4F:EE:01:FD:D6'
  • Trust the device which you are about to connect to 'trust 98:4F:EE:01:FD:D6'
  • Connect to the paired device 'connect 98:4F:EE:01:FD:D6'

Step 6: Loopback Python Script

For Activating the detection alarm, we need to write a python script which will run as a service or background thread on the Intel Edison board.

  • Login into the Edison using Serial COM Port in putty for this task.
  • Create a python file in edison /home/root & write the code or copy the attached python script at this location.
  • Before running the script, notice that the bluetoothctl utility does not display the serial profile
  • Then execute this script using command 'python ./ -C 22'Check whether the script is running in the processes using 'top' command.
  • After you run the script on your Intel Edison device, the serial port does display(see the screenshots)

Step 7: Android Application Code


import android.os.Bundle; import; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.content.BroadcastReceiver; import android.content.Context; import java.util.Set; import android.content.Intent; import android.content.IntentFilter; import android.view.View; import android.view.View.OnClickListener; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; import;

public class MainActivity extends Activity {

private static final int REQUEST_ENABLE_BT = 1; private Button onBtn; private Button offBtn; private Button listBtn; private Button findBtn; private TextView text; private BluetoothAdapter myBluetoothAdapter; private Set pairedDevices; private ListView myListView; private ArrayAdapter BTArrayAdapter;

NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this);

@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main);

IntentFilter filter1 = new IntentFilter(BluetoothDevice.ACTION_ACL_CONNECTED); IntentFilter filter2 = new IntentFilter(BluetoothDevice.ACTION_ACL_DISCONNECT_REQUESTED); IntentFilter filter3 = new IntentFilter(BluetoothDevice.ACTION_ACL_DISCONNECTED); this.registerReceiver(bReceiver, filter1); this.registerReceiver(bReceiver, filter2); this.registerReceiver(bReceiver, filter3);

// take an instance of BluetoothAdapter - Bluetooth radio myBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); if(myBluetoothAdapter == null) { onBtn.setEnabled(false); offBtn.setEnabled(false); listBtn.setEnabled(false); findBtn.setEnabled(false); text.setText("Status: not supported"); Toast.makeText(getApplicationContext(),"Your device does not support Bluetooth", Toast.LENGTH_LONG).show(); } else { text = (TextView) findViewById(; onBtn = (Button)findViewById(; onBtn.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub on(v); } }); offBtn = (Button)findViewById(; offBtn.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub off(v); } }); listBtn = (Button)findViewById(; listBtn.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub list(v); } }); findBtn = (Button)findViewById(; findBtn.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub find(v); } }); myListView = (ListView)findViewById(; // create the arrayAdapter that contains the BTDevices, and set it to the ListView BTArrayAdapter = new ArrayAdapter(this, android.R.layout.simple_list_item_1); myListView.setAdapter(BTArrayAdapter); } }

public void on(View view){ if (!myBluetoothAdapter.isEnabled()) { Intent turnOnIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE); startActivityForResult(turnOnIntent, REQUEST_ENABLE_BT);

Toast.makeText(getApplicationContext(),"Bluetooth turned on" , Toast.LENGTH_LONG).show(); } else{ Toast.makeText(getApplicationContext(),"Bluetooth is already on", Toast.LENGTH_LONG).show(); } } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { // TODO Auto-generated method stub if(requestCode == REQUEST_ENABLE_BT){ if(myBluetoothAdapter.isEnabled()) { text.setText("Status: Enabled"); } else { text.setText("Status: Disabled"); } } } public void list(View view){ // get paired devices pairedDevices = myBluetoothAdapter.getBondedDevices(); // put it's one to the adapter for(BluetoothDevice device : pairedDevices) BTArrayAdapter.add(device.getName()+ "\n" + device.getAddress());

Toast.makeText(getApplicationContext(),"Show Paired Devices", Toast.LENGTH_SHORT).show(); } final BroadcastReceiver bReceiver = new BroadcastReceiver() { public void onReceive(Context context, Intent intent) { String action = intent.getAction(); // When discovery finds a device if (BluetoothDevice.ACTION_FOUND.equals(action)) { // Get the BluetoothDevice object from the Intent BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); // add the name and the MAC address of the object to the arrayAdapter BTArrayAdapter.add(device.getName() + "\n" + device.getAddress()); BTArrayAdapter.notifyDataSetChanged(); } if (BluetoothDevice.ACTION_ACL_CONNECTED.equals(action)) { // Device is now connected // BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); Toast.makeText(getApplicationContext(),"Device is now connected", Toast.LENGTH_SHORT).show();


mBuilder.setContentTitle("DigiWallet: Alert"); mBuilder.setContentText("Your wallet connected to your device!"); NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);

} if (BluetoothAdapter.ACTION_DISCOVERY_FINISHED.equals(action)) { // Done searching Toast.makeText(getApplicationContext(),"Done searching", Toast.LENGTH_SHORT).show(); } if (BluetoothDevice.ACTION_ACL_DISCONNECT_REQUESTED.equals(action)) { // Device is about to disconnect Toast.makeText(getApplicationContext(),"Device is about to disconnect", Toast.LENGTH_SHORT).show(); } if (BluetoothDevice.ACTION_ACL_DISCONNECTED.equals(action)) { // Device has disconnected Toast.makeText(getApplicationContext(),"Device has disconnected", Toast.LENGTH_SHORT).show();

mBuilder.setSmallIcon(R.drawable.abc_ic_menu_cut_mtrl_alpha); mBuilder.setContentTitle("DigiWallet: Alert"); mBuilder.setContentText("Your wallet seems to be out of reach!! Please check your surroundings");

NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);

// notificationID allows you to update the notification later on. mNotificationManager.notify(1,; } } }; public void find(View view) { if (myBluetoothAdapter.isDiscovering()) { // the button is pressed when it discovers, so cancel the discovery myBluetoothAdapter.cancelDiscovery(); } else { BTArrayAdapter.clear(); myBluetoothAdapter.startDiscovery();

registerReceiver(bReceiver, new IntentFilter(BluetoothDevice.ACTION_FOUND)); } } public void off(View view){ myBluetoothAdapter.disable(); text.setText("Status: Disconnected"); Toast.makeText(getApplicationContext(),"Bluetooth turned off", Toast.LENGTH_LONG).show(); } @Override protected void onDestroy() { // TODO Auto-generated method stub super.onDestroy(); unregisterReceiver(bReceiver); } }

This class checks the connection and send notification alert if the wallet goes out of range or comes back in range.

Step 8: Testing & Screenshots

  1. Install the bundled android application to android device. Launch the app & connect to Edison.
  2. Take the device beyond the bluetooth range of edison, you will receive an Alert in your device's notification bar saying "Your wallet seems to be out of reach!! Please check your surroundings"
  3. When you come back in the bluetooth range, you will get the notification saying "Your wallet connected to your device!"
  4. Once you are in the range and you misplace the wallet, you can locate the wallet by pressing the locate button. This will trigger the buzzer & led on the wallet through

Step 9: Mission Accomplished!

This concluded our hack. End of the day, our project got shortlisted in Top 15 projects at Intel IoT Roadshow.


dharun1996 made it!(author)2017-02-10

Did you make a paper for this project?

akshitm made it!(author)2017-02-25

No, I haven't published a paper for this. But most of the information is available on this instructable. If you need any specific info, please let me know.


CharismaB made it!(author)2016-08-21

where is source power?

akshitm made it!(author)2016-08-26

Hi, for prototyping, we used a power bank to power edison board. But that could be replaced with some miniaturized power source.

CharismaB made it!(author)2016-08-26

thanks a lot, its something cool

JyothinM made it!(author)2015-07-15

Interesting project.

seamster made it!(author)2015-05-12

Very clever work. This is a great idea!

akshitm made it!(author)2015-05-13

Thanks :)