Completion

I can happily say that after 4 weeks of working on this project, it is finally finished!

A special thank you to Glenn Alexander, the technical officer from the Innovation Campus of UOW for all the help, effort and time he has given me!

                         Front                                                                                   Back

IMG_1679 IMG_1676

Advertisements

Coding

I anticipated that this would be the hardest part of this assignment due to my zero knowledge and background of the subject. I had only spent two tutorials (6 hours) learning about this subject and even then I could only manage the basics such as how to set up a wire circuit and alter some coding which together could make function a very small LED light bulb.

Thankfully the internet has an endless supply of knowledge on every topic ever and provided me with some highly useful sources which made my life a lot easier!

My top 5 web pages when learning how to code:

1. Arduino For Dummies

This article clearly explains the process in how motion sensors and Arduino’s are able to be used in conjunction and it provides a guide on how a circuit can be formulated. I found this article vital for my foundation knowledge on how to create a functioning movement sensor reactive Arduino but a drawback of this piece is that it is written for the most basic functions and so it doesn’t explain coding to manipulate variants such as speed.

2. Learning about Electronics 

This website successfully teaches how to create an Arduino motion detector circuit through its clear, labelled, diagrams and accompanying tutorial video. It is written by a website whose purpose is electronics education so I deem this source highly reliable.

3.  Motion Sensor Arduino Tutorial

This visual and audible medium allowed for an easy to follow tutorial in creating an Arduino motion sensor circuit and the visuals helped clarify any issues I had.

4. Tutorial: How to control a Stepper Motor with Arduino and Easy Driver

Garage Lab has a publicised a video tutorial on how to make a stepper motor function through an Arduino and this is greatly advantageous in helping create my circuit. As a primary source and its proven success in being able to make a stepper motor function, I consider this source dependable.

5. Sweep tutorial

This website provides a clear explanation and diagrams which teach on how to make a servo (stepper) motor make a sweeping motion. It also provides detailed coding which is greatly appreciated and due to its highly specific nature, I have found it extremely valuable and cannot find any limitations.

Below is the initial code I used for a distance sensor version of single servo motor with a brief explanation of what each line means after the end // :

#include <Servo.h>

int distance = 0;  // how far away from the sensor we are

Servo myservo;  // create servo object to control a servo
// a maximum of eight servo objects can be created

void setup()   // this is the first thing that runs when the arduino powers on or is reset
{ pinMode(2,INPUT);   // set pin 2 to be an input
myservo.attach(9);  // attaches the servo on pin 9 to the servo object
Serial.begin(9600);  // initialize serial communications at 9600 bps
}

void loop() // this runs repeatedly after ‘setup’ is finished
{
distance = analogRead(A0);  // read value from analog pin 0 – value is approximately 1 inch per unit
Serial.print(“sensor = ” );   // print some text to the serial monitor
Serial.println(distance);     // print the value of ‘distance’ to the serial monitor

if(distance > 20)
{ myservo.write(90);  // set servo to 90deg
}
else
{ myservo.write(0);  // set servo to 0deg
}
delay(100);  // wait 100 miliseconds
}

———————————————————————————————————

Here is the final code I used with the exact variants for distance, speed and range of movement. Once again I have included a brief explanation.

#include <Servo.h> 
 
const int threshold = 120;    // range of sensor to activate at
const int frontAngle = 160;    // stepper angle at which mirrors face front
const int upAngle = 110;       // stepper angle at which mirrors face up
 
 
 
int sensorPin = A0;    // select the input pin for the potentiometer
int sensorValue = 0;   // value read from the sensor
 
Servo myservo[16];  // create servo object to contxrol a servo 
 
int pos[16];    // variables to store the servo positions 
 
void setup() 
  Serial.begin(9600); 
  for(int i = 0 ; i < 16 ; i++)
  {  myservo[i].attach(i*2 + 22);
     pos[i] = frontAngle;
     myservo[i].write(pos[i]);         // tell servo to go to its set position
  }
 
 
void loop() 
  sensorValue = analogRead(sensorPin); 
  Serial.print(“sensor = ” );                       
  Serial.println(sensorValue);      
 
  
  if(sensorValue < threshold)
  { for(int i = 0; i < 15; i++)         // goes from servo 0 to 15 
    {
      if(random(sensorValue*4) < (threshold – sensorValue) )
      {
        pos[i]=(upAngle);
        myservo[i].write(pos[i]);         // tell servo to go to its set position
      }
      delay(60);                        // waits 60ms for the servo to reach the position 
    }
  } 
  else
  { for(int i = 0 ; i < 16 ; i++)
    {  
      pos[i] = frontAngle;
      myservo[i].write(pos[i]);         // tell servo to go to its set position
    }
  }
  delay(250);
  
} ​

Construction

Materials needed for a 16 squared, 50 x 50 cm grid: 

  • MDF (medium density fibre board)- box frame, grid slots
  • 16 Micro Servo 9g Motors
  • Arduino Mega + connective wires
  • 16 mirror tiles 10x10cm
  • 2mm wire (to mount tiles to grid and attach tiles to motor)
  • 6 Gauge screws 40mm long
  • Wood to mount motors 4x2x2.5cm
  • Cable ties 2.5mm
  • Double sided foam tape
  • PVA glue
  • Hot glue gun
  • Breadboard pinhead connectors

IMG_1589
16 Micro Servo 9g Motors

IMGP3338

2mm wire and pliers

Equipment needed:

  • drill + various sized drill bits
  • pliers
  • drill press
  • smoldering iron

IMG_1599

Cost of materials:

  • MDF $100
  • Micro Servo 9g Motors $50
  • Mirrors $40
  • Accessories (wires, screws, small cable ties) $20

Materials sourced from:

  1. The place where I bought the MDF material was Joes DIY Unanderra. When I first explained what I wanted to them they all laughed and thought I was crazy! They have the most helpful staff which collaborated with me on the design of the frame and grid which they then proceeded to cut for me.  I did have to wait 3 days for it to be ready but the wait was definitely worth it. They cut not only the pieces of wood to size but also created holes which indicated where needed to be drilled, cut out the slots ready for it to slide into each other and even created indents where the wood would sit into itself when constructed. This was lucky for me because I do not possess the tools to do all this and it also saved me A LOT of time!

IMG_1592

IMG_1591

2. The mirror tiles were cut by Langson Glass. I told them that I would like 16 tiles, all 10 x 10cm each and made from a glass mirror and they said no worries and within the hour they were ready for me. A highly professional and efficient business!

3. Bunnings Wollongong provided me with a one stop shop for all other goods such as wiring, screws and cable ties.

4. My tutor linked me to Deal Extreme, the website where he purchases his electronic parts from. I found the price of the individual motors $4.85, to be decent and the shipping was a lot faster than excepted. It ships from China and it said to expect up to 3 weeks for shipping but mine arrived within 7 days. This is the link for which exact motors I bought.

Process:

Before I bought anything, I first made a prototype to ensure that the movements and everything were suitable to the materials and measurements in mind.  At first I played with an electro-magnetic pully system whereby an electrically charged current (programmed into the Arduino) would go through magnets on the tiles to push and pull the tiles but there was not enough charge on the wire coil. This could have been over come by wrapping more wire around but A LOT more was needed and therefore I deemed this way of moving the tiles to be redundant.

IMG_0689

Tile not attached but this is the wire coiled around a makeshift foundation to hold the tile.

From this grew the idea of using a solid wire to connect the motor and the tile. It would ask as a push and pull hook and it proved to be very successful!

Next:

Motor stands:

  • Get your 4x2x2.5cm wood and drill a hole halfway through the wood. Drill the the 2×2.5cm bottom so a screw can connect it with the backing (should be vertical from the bottom)
  • Also drill a hole completely through the 4x2cm side (it should be horizontal)
  • Use double sided foam tape to make sure the motors stay in position and use small cable ties to secure them in place.
  • Use PVA glue to position stands and use a screw to secure.

 

Tiles:

  • So this part was a time of trial and error!!!
  • My first attempt I bent wires and used a hot glue gun to attach them to the back of the mirror tiles.
  • I created a dent in the wire so the wire used to push and pull the wires could connect but due to human error, I couldn’t get all the dents the same and so the push and pull wires would slip behind out of place and therefore it was consistent and reliable.
  •  After this I tried using wooden clothes pegs broken in half. They already had a pivot out of them perfect for the wire to sit in and then I just drilled another small hole below for the push and pull wires to sit in. I used super glue to attach the wood to the tile and after trying this out with the motors moving the tiles, I found it to be a lot smoother and reliable in the long term function.
  • The tiles are connected to the grid via a wire that goes across the entire length of one row (4×4)

IMGP3341.JPG

Construct frame:

  • Because Joe’s DIY in Unanderra had cut all my wood to size and shaped it for easy construction, putting the grid and frame together were no hassle at all. The issue in this section lies in the intricacies of the individual boxes.
    IMG_1583
  • Before you slot the grid pieces together, I’ve learnt that the best approach is the attach the motors prior, as well as the connector wire which attaches the tiles/motors – this lessens the fiddly handy work later on

IMG_1666

Wiring:

  • The next step looked daunting due to the amount of wires used but really it is one simple task done 16 times.
  • First decide which side you would like them all to come to one – the side where your Arduino will sit – for me it was the top so I turned the structure upside down so it was easier to slot the motor wires through the drilled holes in the frame. When upright, my Arduino was sitting on top at the back and then my motion sensor was attach with double sided tape to the front of the top row.

IMG_1672

  • Next attach all the servo motor wires in one vertical column together by the same 3 colours. Just make sure that each yellow is connected to the other yellows of the same column otherwise it won’t work. For this I smoldered individual wires on to rows of breadboard pinheads which I cut into sections of 4.

IMG_1679

  • Next I smoldered the ends of the coloured wires onto a row of 16 breadboard pinheads. This part will fit into the breadboard of the Arduino and ultimately give the servo motors signals to move. When choosing which wire the grid connects to goes to which of the 16 pins, I did it randomly because I wanted my tiles to move in a random pattern. If you want to program which tile exactly moves individually, then make sure you smolder the wires in the order the grids are.

 

Attach Arduino:

  • Final step in construction is to attach the Arduino!!!
  • Put the 16 row breadboard pinheads into the ‘Digital’ pin section of the Arduino Mega.
  • Connect the motion sensor pins (red and grey twisted wires) in the same row as the red and black signal wires.

IMG_1683

Commencement

So, I had finally settled on my idea and then began the time for intense research!

IMG_0520

I began by researching what exactly an Arduino was to get some background into its capabilities and functions. A highly valuable website to check out is Arduino. It is a one stop destination for all things Arduino, ranging from being able to purchase one through them to learning the codes for particular actions. It details the foundations of the open-source prototyping platform and only confirmed it necessity for my work.

Another great page to visit it Spark FunThis page defines what an Arduino is and how it functions in great detail and clearly explains the capabilities of different styled boards. This was extremely useful in determining which board is most compatible with the size of my work and the power required.

From these pages I was able to determine that the Arduino Mega would be most suited to my work as it can power up to 48 servo motors. My first thought was to use the Arduino Leonardo but its maximum capability was 12 servo motors and my work requires 16. A great introduction into the Arduino Mega can be found on Arduino.
IMG_1677

~

I spent a lot of consultation time with my tutors, ascertaining the best approach to this project. They gave me direction in terms of:

  • The architectural design: such as having slots in the grid pieces so they could just slot together in construction
  • The most appropriate materials to use: 10mm MDF was be strong enough to hold everything together but also easy to drill into without causing splits in the wood unlike my original thought of ply wood

I also conversed with my peers and this helped develop my aesthetic decisions such as having the mirrored tiles flip randomly randomly rather than in linear lines as it creates more intrigue.

FB FC

This research period was a laborious time as I knew nothing logistically about how it would work. I only had visions of how I wanted the finished product to be like and so I literally started from ground zero.

Conception: How to create Interactive Art with an Arduino.

This is a documentation of my completion of an interactive art piece which is based around a motion sensor powered by an Arduino. My aims for this public documentation is to bridge the gap between the intrigue and intimidation around foreign subjects such as electronics and show that Arduinos are not as daunting as they seem. To make basic capabilities function in an Arduino, it only requires simple coding which can be done by students, artists and literally anyone. It only takes a little bit of time to create something which is fun to complete and will surpass your own expectations of yourself. Hopefully this sparks interest around electronics and also creates action whereby people chose to take on their own projects!

CONCEPTION

Daniel Rozin is a contemporary artist renowned for his interactive pieces which closely resemble a mirror and the actions of a mirror. Upon viewing ‘Pom Pom Mirror’ scrolling through my tumblr feed, I was immediately drawn to it, the concept and its execution. I thought it was extremely fascinating and intricate and I was left wanting to know more! What were the materials? How did it work?

P1 P2

The art gods were on my side as I found this work just as the topic of Arduino was the theme of one of my university classes and I soon realised that the two were very much so linked. Upon further research, it turns out that this particular work of Rozin’s consists of over 900 individual motors and the movements of the pom poms passing through each other was far too advanced for my limited mechanical knowledge. Despite this, I still wanted to pursue creating a replica of Rozin’s concept of reflection as a reaction but through the use of tiles which were mirrored on one side and black on the other and would flip 180 degrees according to a distance sensor detecting movement’s close by.

After talking with a university tutor, I was informed that the entire cost of material would be over $500 and would also be a very time consuming and laborious task so I soon discarded the idea. Still wanting to work with motion-sensored reactive mirrored tiles, I considered the idea of lines or geometric structures to create a mirror. I then decided on the simple grid layout as it would replicate a real standard shaped mirror and would be most effective in creating wonderment as it is the most life like.

I had many questions regarding the functionality of it:

  • What kind of motors were needed to make the tiles move?
  • What range of motion did they possess?
  • Were these movements able to perform in the desired way?
  • How many motors were needed?
  • Would the size of the tiles would be influenced by the motion of the motors?
  • HOW DO I USE AN ARDUINO?!