GMU:Dataflow/Jam session/Ayla Güney: Difference between revisions

From Medien Wiki
No edit summary
 
(30 intermediate revisions by 2 users not shown)
Line 1: Line 1:
(new text)
==SLIGHT MOVEMENTS==
An unremarkable continuous event in public space caused by passing cars in Weimar triggers an equal- ly mundane event in the exhibition space in Berlin. A distance sensor sends measurements of slight movements over the Internet while a servo motor translates these measurements back into another type of movement.




Technical aspects
[[File:WP_20170401_003.mp4]]


Hardware
==technical setup==
a) 2 microcontrollers with wifi
b) distance sensor
c) servo motor




Software
a) 2 microcontrollers with wifi (2 x mini USB, 2 x Powerbank (5V), jumperwire, 330 ohm +  470 ohm resistors)<br>
d) Codes for distance sensor and servo motor
b) distance sensor (hardware + software)<br>
e) web-hoster for data transfer
c) servo motor (hardware + software) <br>
d) web-hoster for data transfer <br>






a) There are several possibilities for microcontrollers. Instead of using a expansive arduino wifi module I decided to go first with a SIM 800L (http://www.ayomaonline.com/programming/quickstart-sim800-sim800l-with-arduino/) as I was coming across with hardware failures of that module, I decided to try out WEMOS D1 mini ([https://www.wemos.cc/product/d1-mini-pro.html#]). This module has great functions as you can directly hook up sensors on it (but also you can do a lot of different stuff with it, see here:[https://www.youtube.com/watch?v=G73fiaOpUAc]). The great thing about them is that they are easy to use because you can work with the Arduino IDE on it, they are small, they come with wifi (ESP 8266 chip) and they are cheap (check out aliexpress.com).
a) There are several types of microcontrollers that could be used for the purpose of sending realtime data over the Internet. Instead of using an expansive arduino wifi module I decided to try first the SIM 800L ([http://www.ayomaonline.com/programming/quickstart-sim800-sim800l-with-arduino/]). As I was coming across with hardware failures of that module, I decided to try out WEMOS D1 mini ([https://www.wemos.cc/product/d1-mini-pro.html#]). This module has great functions as you can directly hook up sensors on it (but also you can do a lot of different stuff with it, see here:[https://www.youtube.com/watch?v=G73fiaOpUAc]). The great thing about them is that they are easy to use because you can work with the Arduino IDE on it, they are small, they come with wifi (ESP 8266 chip) and they are cheap (check out aliexpress.com).
So I used two of these modules: One on the sensing and one on the retrieving site.
So I used two of these modules: One on the sensing and one on the retrieving site.


b)
b) distance meassuring part (Weimar)
microcontroller 1 was connected with the Hc-Sr04 distance sensor (http://www.micropik.com/PDF/HCSR04.pdf). It was meassuring the movement of the metal plate that was created whenever there was a car passing by. The code below contains already the hosting information for the data transfer. More information on that under e)
microcontroller 1 was connected with the HC-SR04 distance sensor ([http://www.micropik.com/PDF/HCSR04.pdf]). It was meassuring the movement of a metal plate that was created whenever there was a car passing by. The code below contains already the hosting information for the data transfer. More information on that topic can be found on d)<br>


Here the arduino code:
<br>wiring<br>


#include <ESP8266WiFi.h>
<br>[[File:distance sensor and code_Steckplatine.jpg|400px]]<br>
#include <FirebaseArduino.h>


// Set these to run example.
arduino code:<br>
#define FIREBASE_HOST "xxxxxxxxx.firebaseio.com" // firebase host site
[[:File:Sending Distance Sensor Meassurements.txt]]<br>
#define FIREBASE_AUTH "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" // firbase authentification code


#define WIFI_SSID  "pipapowifi" // wifi name
#define WIFI_PASSWORD "xxxxxxxx"  // wifi password


#define echoPin  D7 // Echo Pin
c) retrieving part with servo motor (Berlin)<br>
#define trigPin D6 // Trigger Pin


long duration, distance; // Duration used to calculate distance
<br>wiring<br>


<br>[[File:Servo motor and receiving site.jpg|400px]]<br>


void setup() {
  Serial.begin(115200);


  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);


  // connect to wifi.
arduino code:<br>
  WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
  Serial.print("connecting");
  while (WiFi.status() != WL_CONNECTED) {
    Serial.print(".");
    delay(500);
  }
 
  Serial.println();
  Serial.print("connected: ");
  Serial.println(WiFi.localIP());


  Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
[[:File:move servo to firebase data.txt]]<br>


}




void loop() {


digitalWrite(trigPin, LOW);
<br>wiring<br>d) webhost FIREBASE<br>
delayMicroseconds(2);
data from the distance sensor in Weimar was sent in real-time to the webhost [https://firebase.google.com/] and from there to the servo motor in Berlin<br>
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
//Calculate the distance (in cm) based on the speed of sound.
float distance = duration*0.0343/2;
Serial.println(distance);
Serial.println ( " cm");
delay (200);


digitalWrite(echoPin, HIGH);
view of host site<br>
<br>[[File:Firebase.JPG|400px]]


//send data to firebase
you have to register under firebase.google.com and follow a couple of easy steps in order to create a channel where the data from the distance sensor is saved and also read to be used. this video might help: https://www.youtube.com/watch?v=lya8Ng72QOo
Firebase.setFloat("dist", distance);


  digitalWrite(echoPin, LOW);
 
  delay(1000);
 
}
==last version==
 
In a next step I would like to meassure the movements of 5 different plates and turn the signal into a installation you can enter. The idea is to double the number of the metal plates in the second environment so the effect of the movement is stronger in visual and audible respects and might create an musical scope in the form of an installation.
 
Possible exhibition setup:
[[:File:exhibition setup.jpg]]
 
==Photos==
<gallery>
File:P4010500.JPG
File:P4010502.JPG
File:P4010504.JPG
File:Maria_IMG_1122.JPG
File:Maria_IMG_1123.JPG
</gallery>

Latest revision as of 13:10, 3 July 2017

SLIGHT MOVEMENTS

An unremarkable continuous event in public space caused by passing cars in Weimar triggers an equal- ly mundane event in the exhibition space in Berlin. A distance sensor sends measurements of slight movements over the Internet while a servo motor translates these measurements back into another type of movement.


technical setup

a) 2 microcontrollers with wifi (2 x mini USB, 2 x Powerbank (5V), jumperwire, 330 ohm + 470 ohm resistors)
b) distance sensor (hardware + software)
c) servo motor (hardware + software)
d) web-hoster for data transfer


a) There are several types of microcontrollers that could be used for the purpose of sending realtime data over the Internet. Instead of using an expansive arduino wifi module I decided to try first the SIM 800L ([1]). As I was coming across with hardware failures of that module, I decided to try out WEMOS D1 mini ([2]). This module has great functions as you can directly hook up sensors on it (but also you can do a lot of different stuff with it, see here:[3]). The great thing about them is that they are easy to use because you can work with the Arduino IDE on it, they are small, they come with wifi (ESP 8266 chip) and they are cheap (check out aliexpress.com). So I used two of these modules: One on the sensing and one on the retrieving site.

b) distance meassuring part (Weimar) microcontroller 1 was connected with the HC-SR04 distance sensor ([4]). It was meassuring the movement of a metal plate that was created whenever there was a car passing by. The code below contains already the hosting information for the data transfer. More information on that topic can be found on d)


wiring


Distance sensor and code Steckplatine.jpg

arduino code:
File:Sending Distance Sensor Meassurements.txt


c) retrieving part with servo motor (Berlin)


wiring


Servo motor and receiving site.jpg


arduino code:

File:move servo to firebase data.txt




wiring
d) webhost FIREBASE
data from the distance sensor in Weimar was sent in real-time to the webhost [5] and from there to the servo motor in Berlin

view of host site

Firebase.JPG

you have to register under firebase.google.com and follow a couple of easy steps in order to create a channel where the data from the distance sensor is saved and also read to be used. this video might help: https://www.youtube.com/watch?v=lya8Ng72QOo


last version

In a next step I would like to meassure the movements of 5 different plates and turn the signal into a installation you can enter. The idea is to double the number of the metal plates in the second environment so the effect of the movement is stronger in visual and audible respects and might create an musical scope in the form of an installation.

Possible exhibition setup: File:exhibition setup.jpg

Photos