BUS4TN007-3 / tehtävä 3 (assignment 3)

This assignment was to make Parallax FlexiForce to work on Arduino Mega 2560. This was a bit trickier to build. The items you will need for this are

– 3 or 4 jumper wires
– Resistor (red, red orange, gold)  = 22,000 ohms ± 5%
– Arduino Mega 2560
– Parallax Flexiforce
– Arduino/computer USB connector
– Breadboard

Now before you start, please take a look at my previous assignments to be able to install the environment needed for the code and look up the logic behind Arduino functions. I also suggest to look up for the color codes for the resistors and the Flexiforce’s datasheet. Another thing I suggest you to search, is the symbols used in electronics and what they mean so you will easily understand what is going on when you read a map like the one I have posted below.

d

The logic behind the Flexiforce is the above picture. You might always see different tutorials in electronics but I always recommend you to look for the original data sheet and recommendation because I have always noticed that even if the tutorials had the working version of the electronic, a lot of them had problems in their wiring  Even I have some illegal wiring’s in my electronics every now and then.

Now in the Flexiforce you might see three pins but the middle pin under the Flexiforce is useless, because it is only used to keep the sensor down and steady. The sensor does not really have fixed GND/Ground and electricity input and output pins so use your common sense when making wiring. The picture is below.

IMG_0102[1]IMG_0103[1]

UPDATE: I have to add that in the upper pictures the wiring is a bit silly because in the Flexiforce sensor there is only two pins that are usable. As you can see, for some reason my group wired the middle pin to Arduino. A good reason to use common sense, because there was nothing on the Flexiforce itself that would have indicated that the middle pin is in use, as you can see on the datasheets. There is nothing connected to the pin.

IMG_0105[1]

So the sensor as I mention before (The tall tower like figure) is Flexiforce where by pinching the head of the sensor, the sensor will give values based on your wiring meaning that it will either have values starting from 0 to up or the other way around. If you look at the datasheet, you will see that by what logic does the sensor work.

The code is below

int sensor;

void setup()
{

Serial.begin(9600);

}

void loop()
{

sensor = analogRead(0);

Serial.print(“Sensor = “);
Serial.println(sensor);

delay(500);

}

Sources:

Make: Arduino Bots and Gadgets by Tero Karvinen
http://web.mit.edu/rec/Handouts/resistors.pdf
http://en.wikipedia.org/wiki/Electronic_color_code

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s