fredag 9 oktober 2015

Hack lab - Almost working product

We continued to try and get the Arduinos to work again and was given a new Arduino to swap out the one that broke. By updating the code with more or less the same one but in a fresh file we managed to get one of the cubes to work. The LED light in the second cube broke all colors but the blue one when we put it inside the cube. After that we put tape on all the electronics so that they wouldn't touch accidentally.

A platform was assembled made of tree and fabric to hide the Arduino and the pressure sensor and paper was put on the inside to hide the Arduinos. At the end of the session on Arduino for the cubes was working properly and the color change from green if one cube were placed and blue if two cubes were placed but the second cube didn't light up at all.


By: Car0lina, Josefine, Lennart, Julius

onsdag 7 oktober 2015

The breakdown

We started this session with assembling the cubes. The acrylic glass squares was put together with a glue gun. It was a little bit tricky to get the sides to stick on straight but we managed decently in the end.

But when we were about to try the Arduinos inside the cubes suddenly nothing was working even tough everything worked fine the day before. One of the Arduinos "exploded" and we spent the rest of the day trying to get the one that didn't break to work, without success.

By: Car0lina, Josefine, Lennart, Julius

tisdag 6 oktober 2015

Lab - Soldering and Laser cutting

With our new materials we continued to create two sets of Arduino setups. We soldered the new Arduino together and also the battery contact to an adapter so that it could be connected directly to the Arduino. This eliminates the need to connect the Arduinos to another power source and the cubes can run on the batteries without external cables.



We also wanted to cut acrylic glass with the laser cutter which we had some trouble with, but it seemed to be working toward the end of the session. We will continue working on this.

By: Carolina, Lennart, Josefine, Julius

måndag 5 oktober 2015

Crit 5/10

During the crit we had a small discussion with Mattias on how to solve the problem how the cubes should know what light to turn on. He suggested that we should use infra red. However we felt that it would be easier to till use the pressure sensor for our purposes but decided to only make use of one pressure sensor instead of one in each cube. This sensor would be placed on a mat or a platform of some kind and the cubes could only be placed on top of the pressure sensor in the prototype.

Because of these changes we had to modify the code somewhat. The cubes do not need to decide on the color of the lights anymore but only receive information from the server. The platform sends the current color to the server which passes the information on to the cubes.


Code for the Arduinos:

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 16); // RX, TX

int r = 2;
int g = 3;
int b = 4;
char light;

void setup() {

  Serial.begin(9600);
  
  pinMode(r,OUTPUT);
  pinMode(g,OUTPUT);
  pinMode(b,OUTPUT);
  
  mySerial.begin(9600);
}

void loop()
{
     while(mySerial.available()){
        light = mySerial.read();
        digitalWrite(r,LOW);
        digitalWrite(g,LOW);
        digitalWrite(b,LOW);
        Serial.println(light);
        if(light == 'r'){
          digitalWrite(r,HIGH);
          }
          else if(light == 'b'){
          digitalWrite(b,HIGH);
          }
          else if(light == 'g'){
          digitalWrite(g,HIGH);
          }        
      }
}


Code for the platform:

#include <SoftwareSerial.h>

//SoftwareSerial mySerial(8, 9); // RX, TX

int test;
char check;

void setup() {

  Serial.begin(9600);

  
  //mySerial.begin(9600);
}

void loop()
{
    int sensorValue = analogRead(A0);
    // Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
    float voltage = sensorValue * (3 / 1023.0);
    
    char test_sensor;
    if(voltage>=2){
      test_sensor = 'r';
      }
    else if(voltage>=1){
      test_sensor = 'b';
      }
    else if(voltage>=0){
      test_sensor = 'g';
      }
    //char test = mySerial.read();
    
    if(check != test_sensor){

      
    if(test_sensor == 'r')
    {
      Serial.print(test_sensor);
      check = test_sensor;
    }
    else if(test_sensor == 'b')
    {
      Serial.print(test_sensor);
      check = test_sensor;
    }
    else if(test_sensor == 'g')
    {
      Serial.print(test_sensor);
      check = test_sensor;
    }
    }
}


Code for the server:

# Imports
import time
import serial
from Tkinter import *

# Serial port parameters
serial_speed1 = 9600
serial_speed2 = 9600
serial_speed3 = 9600

serial_port1 = '/dev/tty.banana-DevB'
serial_port2 = '/dev/tty.HC-06-DevB'
serial_port3 = '/dev/tty.usbmodem1411'

ser1 = serial.Serial(serial_port1, serial_speed1, timeout=1)
ser2 = serial.Serial(serial_port2, serial_speed2, timeout=1)
ser3 = serial.Serial(serial_port3, serial_speed3, timeout=1)


colors=['r','b','g']
for i in range (3):
for j in range (3):
ser1.write(colors[j])
time.sleep(0.05)
ser2.write(colors[j])
time.sleep(0.05)

print("Ready!")

while 1:
data = ser3.read()
print(data)
ser1.write(data)
ser2.write(data)




After the crit Carolina and Lennart went to Kjell & Company to buy the rest of the material we needed to build two cubes. We bought one more Arduino Pro Micro, one RGB LED light, two 9V batteries and two batterie contacts.

By: Carolina, Lennart, Josefine, Julius

fredag 2 oktober 2015

Hack lab: Server

This hack lab we tried to get the server to work for both the Arduinos at the same time. We started off by changing the program so that the lights changes color depending on the pressure that are sent from the server, this did not work the last time.

At first we could only make use of the data from one of the Arduinos on the server. By sending the data we could use the pressure from one sensor to turn on the correct light on both Arduinos. However, when we tried to use the data from both Arduinos at the same time the program ran incredibly slow. This took some time to solve but we finally managed.

So this is how the system works:

  • The Arduinos takes the current pressure, converts it to the matching color, checks if the color has changed from before and if it has sends it to the server.
  • The server compares the data from both Arduinos and sends out the highest ranking color to both Arduinos.
  • The Arduino turns off all lights and turns on the right one if data is collected from the server.



Code for Arduino:

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 16); // RX, TX

int r = 4;
int g = 3;
int b = 2;
int test;
char check;
char light;

void setup() {

  Serial.begin(9600);
  
  pinMode(r,OUTPUT);
  pinMode(g,OUTPUT);
  pinMode(b,OUTPUT);
  
  mySerial.begin(9600);
}

void loop()
{
   int sensorValue = analogRead(A0);
    // Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
    float voltage = sensorValue * (3 / 1023.0);
    
    char test_sensor;
    if(voltage>=2){
      test_sensor = 'r';
      }
    else if(voltage>=1){
      test_sensor = 'b';
      }
    else if(voltage>=0){
      test_sensor = 'g';
      }
    //char test = mySerial.read();
    
Serial.println(voltage);
    
    if(check != test_sensor){
      
    if(test_sensor == 'r')
    {
      mySerial.print(test_sensor);
      Serial.println(voltage);
      check = test_sensor;
    }
    else if(test_sensor == 'b')
    {
      mySerial.print(test_sensor);
      Serial.println(voltage);
      check = test_sensor;
    }
    else if(test_sensor == 'g')
    {
      mySerial.print(test_sensor);
      Serial.println(voltage);
      check = test_sensor;
    }
    }
     while(mySerial.available()){
        light = mySerial.read();
        digitalWrite(r,LOW);
        digitalWrite(g,LOW);
        digitalWrite(b,LOW);
        Serial.println(light);
        if(light == 'r'){
          digitalWrite(r,HIGH);
          }
          else if(light == 'b'){
          digitalWrite(b,HIGH);
          }
          else if(light == 'g'){
          digitalWrite(g,HIGH);
          }
      }
}

Code for server:

# Imports
import time
import serial
from Tkinter import *

# Serial port parameters
serial_speed1 = 9600
serial_speed2 = 9600
serial_port1 = '/dev/tty.banana-DevB'
serial_port2 = '/dev/tty.HC-06-DevB'

# Test with USB-Serial connection
# serial_port = '/dev/tty.usbmodem1421'

ser1 = serial.Serial(serial_port1, serial_speed1, timeout=0.1)
ser2 = serial.Serial(serial_port2, serial_speed2, timeout=0.1)

colors=['r','b','g']
for i in range (3):
for j in range (3):
ser1.write(colors[j])
time.sleep(0.05)
ser2.write(colors[j])
time.sleep(0.05)

print("Ready!")

data1 = ''
data2 = ''

while 1:
#ser1.flushInput()
#ser2.flushInput()

temp1 = ser1.read()
temp2 = ser2.read()

if(temp1 != ''):
data1 = temp1

if(temp2 != ''):
data2 = temp2

#print("from1:" + data1)
#print("from2:" + data2)

if(data1 == 'r' or data2 == 'r'):
ser1.write('r')
ser2.write('r')
elif(data1 == 'b' or data2 =='b'):
ser1.write('b')
ser2.write('b')
else:
ser1.write('g')
ser2.write('g')


We have also been discussing how the cube should be constructed, we're thinking about using a 3D printer. But depending on which sensor we're going to use the cube might have to be air tight (if we use e.g. air pressure). This is the next challenge in cog process.

By: Caroline, Josefine, Lennart, Julius

torsdag 1 oktober 2015

Setting up a server

This work session started by researching how to get the Bluetooths to talk to each other. By doing this we want to compare the individual cubes color to each other in order to achieve that the color depend on the maximum pressure from both cubes. It took a long time to find how to do this. We started off by trying to find how a mobile can automatically send messages back to the Bluetooths in order to get this to work. However, we did not get it to work because the mobile could not send anything back automatically, a person needed to send something manually. 

The problem was resolved using a computer instead, which can run a server. The server was set up using python code. It received the messages from the Bluetooth and sent back the color the LED should be in, but the lights did not light up. The server was connected to only one Arduino at a time. 


Code for Arduino:

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 16); // RX, TX

int r = 4;
int g = 3;
int b = 2;
int test;
char check;
char light;

void setup() {

  Serial.begin(9600);
  
  pinMode(r,OUTPUT);
  pinMode(g,OUTPUT);
  pinMode(b,OUTPUT);
  
  mySerial.begin(9600);
}

void loop()
{
   int sensorValue = analogRead(A0);
    // Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
    float voltage = sensorValue * (3 / 1023.0);
    
    char test_sensor;
    if(voltage>=2){
      test_sensor = 'r';
      }
    else if(voltage>=1){
      test_sensor = 'b';
      }
    else if(voltage>=0){
      test_sensor = 'g';
      }
    //char test = mySerial.read();
    
Serial.println(voltage);
    
    if(check != test_sensor){

      digitalWrite(r,LOW);
      digitalWrite(g,LOW);
      digitalWrite(b,LOW);
      
    if(test_sensor == 'r')
    {
      mySerial.print(test_sensor);
      Serial.println(voltage);
      check = test_sensor;
    }
    else if(test_sensor == 'b')
    {
      mySerial.print(test_sensor);
      Serial.println(voltage);
      check = test_sensor;
    }
    else if(test_sensor == 'g')
    {
      mySerial.print(test_sensor);
      Serial.println(voltage);
      check = test_sensor;
    }
    }
      if(mySerial.available()){
        light = mySerial.read();
        digitalWrite(light,HIGH);
      }
}

Code for Server:

# Imports
import time
import serial
from Tkinter import *

# Serial port parameters
serial_speed = 9600
serial_port = '/dev/tty.banana-DevB'

# Test with USB-Serial connection
# serial_port = '/dev/tty.usbmodem1421'

ser = serial.Serial(serial_port, serial_speed, timeout=1)
while 1:
data = ser.readline()
print(data)
ser.write(data)


Written by: Josefine, Carolina, Lennart

tisdag 29 september 2015

Feedback Crit 29/9

  • We need to further explore how to make use of the pressure sensor in the best way 
    • Pressure level?
    • Air pressure?
    • Mechanical pressure?
  • Or we have to try find another way of deciding what color the cubes should display
  • If we need more materials we have to buy it our selves
  • Build two cubes in total, for financial reasons
  • The higher tower the greater visual reward
By: Carolina, Josefine, Lennart, Julius

Prototyping

We have continued working with the bluetooth connection. Currently a mobile phone acts as a serial server that can send and receive information. Our Arduino setup consists of the bluetooth, one RGB-LED light and a pressure sensor. The light can only be changed at the exact moment a command is sent from the mobile. When a command is sent the program compares the command to the pressure registered from the sensor and sets the light to the highest ranking color.

Blue: Lowest pressure
Red: Medium pressure
Green: Highest pressure



Setup before the pressure sensor was added


Code

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 16); // RX, TX

int r = 4;
int g = 3;
int b = 2;

void setup() {

  Serial.begin(9600);
  
  pinMode(r,OUTPUT);
  pinMode(g,OUTPUT);
  pinMode(b,OUTPUT);
  
  mySerial.begin(9600);
}

void loop()
{  
  while (mySerial.available()){
    int sensorValue = analogRead(A0);
    // Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
    float voltage = sensorValue * (3 / 1023.0);
    
    char test_sensor;
    if(voltage>=2){
      test_sensor = 'r';
      }
    else if(voltage>=1){
      test_sensor = 'b';
      }
    else if(voltage>=0){
      test_sensor = 'g';
      }
    char test = mySerial.read();
    digitalWrite(r,LOW);
    digitalWrite(g,LOW);
    digitalWrite(b,LOW);
    if(test=='r' or test_sensor == 'r')
    {
      digitalWrite(r,HIGH);
      Serial.println(voltage);
    }
    else if(test=='b' or test_sensor == 'b')
    {
      digitalWrite(b,HIGH);
      Serial.println(voltage);
    }
    else
    {
      digitalWrite(g,HIGH);
      Serial.println(voltage);
    }
  }
}

By: Carolina, Josefine, Lennart, Julius

fredag 25 september 2015

Hack Lab - Bluetooth

Carolina and Josefine started the hack lab with a bit of research on how to connect the bluetooth to the Arduino. We then realized that we had to solder the pins to the Arduino pro micro board so that it would connect properly. We had a bit of a problem with this because we didn't know the basics of soldering. Mattias helped us to correct our mistakes (thanx!). After the mistake the connections where tested so that the pins worked properly.

At this time Julius joined us and we started to actually connect the bluetooth. This didn't work as it should. We found a lot of different examples online, that looked a lot a like, but none worked for our equipment. We also tried with an Arduino Uno but the same issues occurred as with the pro micro. We got the program to run in the end but no flow of information were detected.


By: Carolina, Josefine 

måndag 21 september 2015

Feedback on crit 21/9


  • The kids might be able to learn how to count or different colors
  • If the idea doesn’t work maybe it’s enough that the cubes change color in any way
  • It might be enough if the cubes just go back to blue if the tower fall
  • There need to be enough light from the cubes so that they work in daylight
  • Sound that confirms the color for learning purposes
  • Put the pressure sensor diagonally inside the cubes and fill them up with something (e.g. cotton) to make the sensor detect pressure on every side
  • Magnets instead of pressure sensors
  • Make the cubes so that they only fit one way, one side convex and one concave, makes the convex like a button
  • Surface to build on and the electricity comes from beneath the blocks
  • Conductive thread through or on the edges
  • Cylinder instead of blocks to reduce the number of sides
  • Inspiration from “the tower of hanoi”


By: Carolina, Josefine, Lennart, Julius 

fredag 18 september 2015

Hack lab - Further Arduino + Mockups

Today we continued tinkering with the Arduino but this time with a more goal oriented way of trying it out. We wanted to try out how well the pressure sensor worked and with that make different LED's light up as the sensor got pressed harder, with great success as can seen in the video below.



We also made the some early mockups with some regular paper together with markers to try out the size and feel for how they turned out to be. Colors are of course not set in stone but it is interesting to just quickly get a feel for how the size of the cubes is more graspable by just making a couple of mockups. A quick Gif below shows how one scenario of the blocks could work out, with the white block at the beginning being turned off and then how the colors changes depending on how high you stack them.



By: Lennart, Carolina, Josefine

onsdag 16 september 2015

Moodboard



By: Lennart, Josefine, Carolina, Julius

Storybord


By: Carolina, Josefine, Lennart, Julius

Critique session number 2

Discussing the sketches

Different strengths in the sketches?
Because we all had almost the same overall idea, the sketches looked very alike. This makes it easy to cooperate when designing. Some aspects were however different. One of the sketches had pictures on the cubes to inspires playfulness, which we thought was a strength. Most sketches illustrated not only design but functionality as well.

Difficult aspects to illustrate?
Most of us thought that it was difficult to illustrate the flow of information in a sketch. We also had troubles with the way the cubes should work internally.

Different aspects in the sketches?
The sketches showed that we al had designed aspects different from each other. Some sketches had rounded corners, different kinds of on and off switches and sizes of the cube.

Discussing the details of the building blocks

We discussed a lot of how the blocks would work and how they will send and receive information from each other. The alternatives we came up with was using pressure sensors to detect if a cube is on top of another. We also thought of using nfc to send/receive information but it has a small range. We are looking for something that has a few decimeters long range.

Our plan B, In case we can’t make it work the way we intended, is to make the cubes change colors individually depending on the pressure level in each cube.

We also talked about different materials to make the cube in, for example plastic and rubber. We decided to test different materials to see what spreads the light the best.

By: Josefine, Carolina, Lennart and Julius

söndag 13 september 2015

Individual sketching

Sketching by Josefine


The building block tower will change color when a cube is placed on top of another. The color will be depend on the height of the tower. 




This is a scetch of an on/off button wich should exist on every cube. It can either be quite small and be placed in a corner of one of the cubes sides, or be large and occupy a whole side of a cube. It can be something to test on users to see what works the best. The button should be sunken in to the side to avoid pressing it while stacking blocks. 

Sketching by Carolina


The building blocks will change color depending on how many layers built, the width of the construction does not affect the colors. The sketches shows three layers but this could go on for as many layers that are desired. Reasonably there will be as many colors as there are blocks in the set so that all of them in a single tower would still have a color.



The blocks would be build out of see through plastic so that a colored light would shine through. They would also have to run on batteries and use a slide on/off button so that the blocks would not be turned off when put on top of each other.



Sketching by Lennart

The building blocks has a transparent material around the edges in a non-edgy shape of the blocks to make them smoother. The inner square of the cubes are of a solid material to create the light go through the material around the edges instead of the middle. Some small thoughts on sensors around the inside of the cube to sense other cubes and aswell as a way to implement charging for the parents when the cubes go out of power.




Sketching by Julius


The interactive building blocks has a simple feature that they can detect how many layers are formed by the connected blocks and change the color of themselves according to this information. For example, if the building blocks built one layer, all of them will be green. If one of them is moved to the second layer, all blocks will turn red. Children can explore different colors by building the blocks differently, which is the way that the blocks interact with children.


Each block has six facets of the same structure. The sensors on each facets can detect whether the block is connected to other ones, as well as receive other information from nearby blocks. Inside each block there will be a circuit including a microcontroller, a battery, a height sensor and LEDs in different colors. The microcontroller processes the data of height as well as the information from nearby blocks, according to which it will control the LEDs, thus showing different colors or special effects.

P50914-000806.jpg

fredag 11 september 2015

Hack lab - Arduino

We choose to start tinkering with the Arduino instead of the Phidgets. After installing the program and finding all the components we needed we looked at the examples in the program. We managed to control a LED light with a button and later tried to add another LED light controlled by a pressure sensor. This didn't work exactly like we wanted it to tough so we tried to switch the sensor to a light sensitive one. However we did't manage to make it work before the hack session was over.



By: Carolina, Lennart, Julius

måndag 7 september 2015

Brainstorming / Crit Session

Some simple brainstorming

We would like to make a simple design that is aimed for 1-2 year old toddlers. So we thought about making building blocks shaped as cubes with illuminate color changing in regards to how high of a tower that is built or calculating how stable the tower is at the building moments.

With this in mind we said that the cubes doesn't have to be shaped as cubes but could be other shapes as well but we want to start with the cube shape building blocks. 

Do toddlers enjoy breaking towers they have built and create massive havoc? Maybe, its a good question for what kind of material we will decide to build the blocks in.



Some sketches during brainstorming 


Crit session questions

Formulate design ideals that guide your design?
Simple design, Easy to use, Colors, Safe, Fun, Eye catching, On/off switch.
We want the kid to explore what happens when they put the blocks in different ways.

Good examples to take inspirations from, bad examples what to avoid?
Interactive blocks with help of projector to project images.
Principle is good but too complicated with a projector for a child to play with, since the blocks has to be shaped in a special way and also has to be in front of the projector all the time.

Some aspects that you disagree on?
We had some disagreements on how the colors should change, we should test this.

Are there some technical challenges?
Making the blocks “feel” and interact with each other. How to charge it/change the batteries.
What kind of material should we use (plastics/rubber). How to illuminate in different colors.

Inspiration from Tsumiki

By: Carolina, Josefine, Lennart, Julius

fredag 4 september 2015

Field study

On the field

We visited the BR toy store in Gallerian to research what kind of toys kids in the age group of 1-4 is using. 

By looking at the toys available in the store we found that they were both in soft and hard materials. The softer ones were mostly for the younger kids. Many of them had bright colours and resembled real thing e.g. keys, parking lots, telephones etc. Most toys for that age group were made out of large pieces, presumably so that the kids won't swallow the toys. 

Specifically for toys in our category, building blocks, there were a lot of different shapes and colours some with pictures on them and some without. This is for the children to be able build a lot of different creations. 

The aspects that we find important when designing for small children is that the toys should be safe and that the toys are colourful and changeable to make them more interesting. We think its import and to recognise that toddlers put their toys in the mouth which means that the design would have to be big enough for the children not to swallow it. They will also probably not be that careful with their toys which means that they shouldn't break easily. 

Building blocks for 1+ toddlers

Building blocks for slightly older than 1+ toddlers


We then asked a couple of parents about what their kids normally played with.

Interview 1

The first parent had a 4 year old daughter she played mostly with Duplo lego and dolls. She didn't feel like the child wanted any technical enhancements to her toys but thought that if se had a boy that might have wanted it. Regarding the safety of toys she used to think about it when her child was younger but not any longer because she felt that her child was old enough to handle the toys. 

Interview 2

The second parent had to children one 2 year old and one 5 year old, both boys. The almost exclusively played with Lego and other building blocks. Their attention span for other toys were very short and they always returned to the Lego. They often tried to recreate what they saw on television with their Lego and building blocks. He wasn't very concerned about safety because he found that the kids learn very quickly that they shouldn't eat certain things. He was also sceptic about adding technology to Lego and building blocks because he thought it was more important that the kids use their imagination.

Conclusion

When designing toys for toddlers it seems that the ability to create from imagination is important to keep the kids entertained for longer times than just a few minutes. From our observation at the store almost every toy was brightly coloured, which could be important to the toddlers for grabbing their attention. Also the size of each piece is large which could have different meanings, like if it is too small it's hard to handle and is easier to swallow. Regarding safety the parents of the toddlers did not think about it that much. Perhaps they trust the toy companies to create safe toys, which makes it important for us to create toys which are safe for toddlers to play with.

By: Carolina, Josefine, Lennart, Julius



Hack lab disassembling

The assignment today was to disassemble an electrical item. Our group took apart a digital camera and we learned a lot about the cameras inside structure. This assignment was to learn a common language between the group members and to find the material brief of the camera.

The camera was build of for example image sensors, button sensors, circuits, microphone, speaker, buttons, shell, lens, micro controller, screen, cogwheel and a lot of screws. 



The design of the camera small because it should be easy to be held in one hand and be easy to bring with you. There is a strap to attach to the hand that holds it, to prevent damage when accidentaly dropping it. The strap, the trigger and the other buttons is on the right and the objective is on the left. Most people are right handed and therefore will not block the camera view while holding it. 

There are a speaker and a microphone which implies that the camera is capable of recording sounds which probably means that the camera can record videos. 

The battery is small and exchangeable. This is so that you would be able to carry the camera with you and not have to plug it in the wall and to buy a new battery if necessary.

There is a screen on the back of the camera so that you can see the picture both while taking it and after it's bee taken.



By: Carolina, Josefine, Lennart, Julius