OD LAB / Arduino Uno / Experiments / Applications

Ilkintasdelen
11 min readSep 5, 2021

Arduino is an open source platform supported with hardware and software which can easily be used and operated by makers all around the world. I had a chance to play with it thanks to OD LAB conference offered by a joint degree master program, Master of Open Design, which is being held by UBA and HU Berlin.

Arduino is a type of a microcontroller which enables to be programmed. The electronic products work in the axis of “command” and “action”. So basically, we connect Arduino to our computers, we program it for a certain job, that means we create commands, and connect it to the device to implement the algorithm of the action.

Arduino board includes;

Arduino Uno

-analog and digital outputs, (you can also program whether it is going to be an input or output),

-arithmetic and logic unit (ALU) to do the calculations,

-a processor, to organize the algorithm and process the information,

-a memory unit to store the codes and commands.

Since it is a little computer, it operates by itself in a loop as long as it is connected to a power source.

Arduino has both analog and digital outputs. One of the best examples that explain the difference between analog and digital is listening music from a vinyl players or computers. For analog, everything is real, a little needle touches the carvings in vinyl and produces continuous sound and it is amplified later. In computer, the sound is not continuous, it is composed of little fragments created by digits which human ear cannot sense.

analog and digital signals

LIGHTING A LED

LED & LDR

LED (light emissive diode) is a light source which has a positive and a negative leg. Shorter leg is negative and it should be connected to the circuit in the right way. The current goes from negative charge to positive charge, that’s why shorter leg should be connected closer to the negative charge with a serial connection.

LDR is a “light depending resistance” as you will get, its resistance depends on the amount of light caught by LDR sensor. If there is more light, the resistance will increase, and if there is less light, it will decrease accordingly.

In a safe circuit everything should be calculated and excess voltage should be balanced with resistors. Resistor is kind of swallows extra voltage and protects other equipments from burns or damages by excess voltage. I had 33o ohms, 1 kohms and 10 kohms resistors for OD Lab. Resistors can also be combined to create other resistors in desired values. When connected serially, we simply add values to each other and calculate the sum, which is used for increasing the resistance. When they are connected parallel on the other hand, the value decreases.

serial: R1 + R2 = R3

parallel: 1/R1 + 1/R2 = 1/R3

A basic knowledge of circuits and electronic design is necessary to work with Arduino effectively and safely.

We have downloaded Arduino software before connecting it to computer and creating a circuit with Arduino Uno. We need to select our board and port after connecting the board. First mission was lighting a LED and then we played with the parameters to create different light emissions.

A circuit with a red led and a 330 ohm resistance

To create this circuit, I have used GND output (black jumper) and transferred the power to the blue line below, with another jumper cable, (brown jumper) I transferred it to the leg of the resistor, resistor reduces and transmits the power that goes to the negative leg of LED, and lastly, I have connected positive leg of LED (red jumper) to A5 output to be able to define my LED as an output of Arduino board and give commands with the software. I have realized that color coding is really essential, I use darkest colors for GND and it makes things easier.

Normally, we can connect everything together without a protoboard, but the advantages of using one are many, such as keeping the circuit tidy and easing the process of assemble and disassemble. Since we are working with relatively small voltages, protoboards are making sure that every element is connected with each other properly. Still, sometimes there can be disconnections.

As you will notice above, I connected GND to the blue line on protoboard which is indicated as negative. Red and blue lines are not connected to each other, although 5 letters in each raw are connected.

on the left, smaller version of my protoboard, on the right Joaquin’s protoboard ; one has segmented and the other has continuous main power lines.

There are basically metal sticks in a protoboard and when we plug a LED, its legs touch these metal sticks. Therefore, it is good to know the structure of your protoboard to avoid short circuit or any kind of damage that can affect your electronic pieces, your Arduino and sometimes even your computer.

I have also seen different protoboards belong to my friends in group and one example was quite challenging because Joaquin had to connect 30 and 31 together which I didn’t have to do. It did took us long figuring this out.

T_ON=1. T_OFF=10 mili seconds.

-funny capture through a samsung camera, normally the light they emit is more segmented, but camera softens the light like that I guess-

INCLUDING LDR TO THE CIRCUIT

LDR is connected to the circuit serially but unlike LED, its legs are identical. LDR also needs to be connected to an output of Arduino board. In the left, my LDR is connected to A0 (red cable). With this connection we were able to monitor change in resistance value in time. However, for better results, LDR and LED should be in a dark environment. Daylight affects the results considerably.

BUILDING & TESTING THE BALANCE

I worked with the 3d printing studio which I usually send my CAD models to be printed. It took one day and the model which was given to me was in high standards. I have just sanded the pieces as Heidi instructed and I used a little bit glue for some parts to give it more stability.

I used the small slit to have more precision, attached the LED and the LDR as instructed. When building the balance, some knowledge about soldering helps a lot. We created the circuit on protoboard however Legs of the LED and the LDR are supposed to be extended with wires. Again, I used color coding for the LED connection because it has polarized legs. I used a neutral color for negative leg and a bright color for positive one. It would have been so hard to decide the negative leg if it would all be wrapped up.

I wrapped all open parts with insulation tape and fixed the sensor and light source to the balance.

The idea of building a scale by using LED and LDR seems interesting at first. How can we measure weight of an object by using light?

In order to understand this, we need to identify mobile and fixed elements of the scale. The weight of the object creates pressure on the balance and directly on the LED. Since LDR is fixed, when LED moves down the amount of light that is captured by LDR reduces. Heavier objects pushes down the LED more, and therefore the light captured by the LDR is lesser than the lightweight objects. This is the technique behind the idea.

However, we do need a software like “INO”(arduino software) or “Processing” to be able to do the testing, calculations and calibration.

ARDUINO INO & PROCESSING

ino code for 3 colored LEDs above

INO: This is the code for lighting three LEDs from the section above “lighting a led”.

In the code, there are some lines start with “//” These are the comments or info and is not used by ino. So instead of deleting a piece of code, we simply can make it a comment.

We also need to put “;“ at the end of every line. Every code group also should be defined inside “{}”

Knowing these basic info gives one to read and understand a code even if one cannot write one. When coding in ino, first we need to create our constants, and define our outputs. This basically means that you need to inform ino to which output you have connected your element. it could be LED, LDR or any kind of sensor.

In this example, data is inserted with “int” command. “define” command can also be used for givıng name to any element. As you see we have 3 LEDs on protoboard which are connected to A0, A1 and A2.

Then we need to do void setup. Pinmode decides that it is going to be an input or output. In this case we want our LEDs shine. So it is an output.

“DigitalWrite” assign High or Low value to an output. When the LED is on, it is High, when the LED is off, it is Low. “Delay” command indicates time passed in this action in miliseconds. (1000 miliseconds make 1 second)

digitalWrite(LED_0, HIGH);

delay(2000);

digitalWrite(LED_0, LOW);

delay(2000)

Void loop defines how the LEDs going to behave for the entire process. (until a new code uploaded to the board or the board is unplugged from power source) For instance, in this code, LED0 will shine and it will last for 2 seconds, and then it will go off and stays like that for 2 more seconds.

After writing the code, it needs to be checked and uploaded to Arduino board which is possible with a click.

The code for creating a scale is more complicated than that because we have an LDR and it is an input that brings information to the computer. In ino, we can monitor this information in serial plotter. We have also defined the baudrate value, (38400 - picture below) and it should be consistent with the one in serial plotter. It is a pre defined series of values used for serial communication.

my serial display on ino

This is my serial display on ino. Normally, Arduino operates with two different voltages. 3.3V and 5V and the highest resolution on the plotter we get is 1023. For this project we have rearranged this value with a reference on the protoboard. As you see above, my highest value is 300 instead of 1023. This is because of reference voltage.

reference resistors from right to left: 330 ohms, 1kohms, 10kohms

The green jumper in the middle connects between resistors goes directly to AREF which is a pin used for reference. Black jumper carries negative power and yellow carries positive. By doing this, we reduce the fixed voltage to nearly 0.8V.

PROCESSING:

We used processing for calibration because its ability to do the calculations is more faster than ino. Here is my first attempt to calibration:

I used couple of 1 Turkish Liras to do the calibration. One weighs 8.3 grams. In this code, we have built a little screen to monitor the value of LED moving downwards. For instance, if the value is 7330, it means the scale is empty. when I put a coin on the scale, which makes 8.3 grams in fact, it becomes 7500. If I put 5 coins on it, the value is 8540. Calibration means that we are correcting code according to our own conditions. We change the code and we run it. For doing the calibration, we need to wait for some time after plugging Arduino to find its balance, and we need to do the calibration quickly.

In this calibration I get closer values. You may see the change in weight as I remove coins one by one.

Although I got really close results to what I predicted, (for two coins it should be 16,6 and in the window it is 15,6) the scale was still losing its calibration when I start to testing the other day. So, I decided to attach some lightweight coins on the plate because the plastic was too lightweight to do the calibration. Then I repeated the calibration one by one.

EXPERIMENTING WITH PNEUMATIC ACTUATORS

Pneumatic actuators can be designed as “open” and “close” systems. in open systems pressure is changed by an outer pump which means we are pumping more air to the system which naturally increases the pressure inside. However, in closed systems the pressure is changed by temperature.

This is a closed system and we are changing the pressure inside by using temperature, in this case, it means touching the bottle with our hands.This is the calculation of my estimation when touching the bottle with one or two hands. According to the calculations, 1 hand should make 16.5 grams on the scale. In monitor, it was 10.7 grams.

EXPERIMENTING WITH CODED OBJECTS

Coded objects are predefined or mappable objects. If we have a code for an object we can do preliminary estimations about it. Here, in this image, you can see the test results which is done by measuring the force that axis can carry and the deformation of the product.

I have also wrote a code and created an object according to it. I get really interesting results because I was expecting to get a circular object. However then I realized that my code includes two closed loops, one inside of the other.

I find creating a design object with a code is always helpful because one can make estimations just by examining the code itself.

Overall, Arduino is fun to learn and we can make many things experimenting with it. What experimental design means so far to me is, experimenting, not constructing or imagining the design first but trying to unlock its possibilities and letting the nature itself reveals the perfect form for the object. For doing this one must develop an idea step by step, by adding one thing or removing one thing from the design, and if the idea is not good enough, one should feel free to jump another related one, go to the previous phase and think it again further from a different point of view.

I am glad that this course contributed me a lot on the subjects that I want to explore further. Thanks for the opportunity!

--

--

Ilkintasdelen

a dreamscout, a designer, and a committed traveller