Punkt.Fizen – Android and Arduino powered Bike Navigation

How does one orient oneself while biking, for example as a tourist? You certainly will read traffic signs, ask people for direction or use a tourist-map. But at least the last example will force you to stop the bike. How could we provide a navigation, where the flow remains undisturbed?
The user will need a very unimposing feedback where to go.

Punkt.Fizn is an Android and Arduino powered bike navigation system. Unlike most navigation systems we didn’t focus on a display. Instead directions will be given only through vibrations in the handlebars. Riding a bike with Punkt.Fizn is like knowing your way already.


How does it work?
1. Choose a route from openrouteservice
2. Download the route XML
3. Upload it here
4. Start the android app and enjoy your bike ride…

Every time you have to turn, gentle vibrations in the handlebars will show you the way.

Material research:
We tried different materials in order to compare its conductibility of vibration. At first we used “Thermoplast”, plastic-granulate which melts on 60Celsius.
Its mold able, when still warm and gets very strong and quite flexible when cooled.
Unfortunately you can’t sanding it very good and it has a poor grind ability.

So we decided to try a soft industrial-design-foam which was good to work with.
The conductibility of the vibration was very good. One draw back with this material was its indurabilty.

Finally we used a more durable foam. Its has a good vibra-conductabilty and its workability lead to a smooth surface.

Coding:
To create a relatively simple but working navigation we wrote an Android application. We used Bluetooth to communicate between Android and Arduino..
Our code is based on the Bluetooth Chat Example from Android.com.
There are two Android Examples available:
1. Navigation System
2. Demo Example (can be a good starting point if you want to build your own Android 2 Arduino Example)

PHP Script
To get the routing we used OpenRouteService. Since the OpenRouteService XML data could not directly addressed over an API, we had to build a small PHP script that allows to simplify the desired route of OpenRouteService.org and load it up in the right format to a webserver. To parse and rebuild the XML we used SimpleXML from PHP. The current state of the navigation system is a prototype. Therefore only one device can access it at the time.
Here is the sourcecode of this script:

		Routeuploader
 
<h1>Bike-Navigation</h1>
 
 
<a id="link" href="http://openrouteservice.org/">download openrouteservice-xml here</a>
	<!-- The data encoding type, enctype, MUST be specified as below -->
<form enctype="multipart/form-data" method="POST"><input type="hidden" name="phpMyAdmin" value="3qaPcWk7TqTEf77hyhNmbFFoa%2C1" />
    		<!-- MAX_FILE_SIZE must precede the file input field -->
 
   			 <!-- Name of input element determines name in $_FILES array -->
			 Send this file:
</form>

Arduino
The Arduino microcontroller recieves the sent values from the Android application and starts a vibrations pattern for the handlebars. For each direction we have two different patterns.
Here is the code:

// This Code Reads the Serial Data whoch comes from Android
 
char incomingByte = 0;	// for incoming serial data
 
// ------ DIRECTION PINS INIT ---------------------
 
int pinArrayLeft[] = {12, 13, 14};
int pinArrayLittleLeft[] = {12, 13};
int pinArrayRight[] = {2, 3, 4};
int pinArrayLittleRight[] = {2, 3};
// ------------------------------------------------
int timer = 100;
int timerLittle =400;
int count = 0;
 
void setup() {
  // Start serial communication
  Serial1.begin(115200);
  Serial.begin(57600);
 
  for (count=0;count&lt;3;count++) {     //////////////// LINKS     pinMode(pinArrayLeft[count], OUTPUT);     pinMode(pinArrayLittleLeft[count], OUTPUT);     //////////////// RECHTS     pinMode(pinArrayRight[count], OUTPUT);     pinMode(pinArrayLittleRight[count], OUTPUT);   } } void loop() {   while (Serial1.available() &gt; 0)
  {
 
    byte serialreadbytevalue = Serial1.read();
    Serial.println(serialreadbytevalue);
 
    switch(serialreadbytevalue)
    {
      case 49:
        goLeft();
        break;
      case 50:
        goLittleLeft();
        break;
      case 51:
        goRight();
        break;
      case 52:
        goLittleRight();
        break;
    }
  }
 
}
 
void goLeft() {
 
  for (count=0;count&lt;3;count++) {
   digitalWrite(pinArrayLeft[count], HIGH);
   delay(timer);
   digitalWrite(pinArrayLeft[count], LOW);
   delay(timer);
  }
 
}
 
void goRight() {
  for (count=0;count&lt;3;count++) {
   digitalWrite(pinArrayRight[count], HIGH);
   delay(timer);
   digitalWrite(pinArrayRight[count], LOW);
   delay(timer);
  }
}
void goLittleLeft() {
  for (count=0;count&lt;2;count++) {
   digitalWrite(pinArrayLittleLeft[count], HIGH);
   delay(timerLittle);
   digitalWrite(pinArrayLittleLeft[count], LOW);
   delay(timerLittle);
 
  }
}
 
void goLittleRight() {
  for (count=0;count&lt;2;count++) {
   digitalWrite(pinArrayLittleRight[count], HIGH);
   delay(timerLittle);
   digitalWrite(pinArrayLittleRight[count], LOW);
   delay(timerLittle);
 
  }
}

Next Steps
The next step would be integrate OSMAND for the navigation. This way the hole navigation process would be easier.

Team
Alain Groeneweg | Danny Arielli | Michael Fretz

Links to site or magazines that mention us
androidportal.hu
androidpolice.com
http://techup.ch/105/40th-swiss-flash-user-group-meeting
http://iad.zhdk.ch/de/stories/11/01/embodied-interaction-press
Weave, interactive design, konzeption & development 02.11 April/Mai Page 16
http://www.androimeda.com/2011/12/punkt-fizen-android-and-arduino-powered-bike-navigation
http://blog.alexandrecazaux.fr/2012/07/26/le-guidage-en-velo-par-gps-sans-ecran

This project was part of Embodied Interacion Modul at the Interaction Design Programm from the university of the arts in Zurich. All infos about this course http://blogs.iad.zhdk.ch/embodied-interaction/bike-navigatio/
Teachers: Max Rheiner and Karmen Franinovic