Arduino Project-Love-O-Meter

I am starting new project called love-o-meter from Arduino project book number 3. There is a component called temperature sensor that will meter how warm  your skin is. The sensor output and use it to red LED turn on and off based on how warm you are. There will be a arduino code to activate response of body temperature.The code will be coded in celsius degrees. The temperature sensor is like a thermometer.

Materials needed

3 LED red    IMG_2186

 

220 OHM resistor  (3)  IMG_2183

click on the image it will show circle of what type of resistor we are using and how many bands.

jumper wire (8)IMG_2185

temperature sensor (TMP36)   IMG_2181             IMG_2180

Picture show the flat side and rounded side of temperature sensor

Arduino breadboard IMG_2187

Arduino uno

step 1: layer out the material you may onto a white printing paper so that you do not misplace anything. Line up the Arduino uno and breadboard side by side parallel to each other. Wire up breadboard so it connect to ground and power. Red jumper wire (Power connection) will go from 5v (arduino uno) to plus symbol on breadboard. Black jumper wire will go from ground (arduino uno) to negative symbol on arduino breadboard.you can see that the negative color black and positive color red. In addition the breadboard should say at the bottom +- abcde etc..

Step 2: Attach the LEDs. THe cathode (GND connection) (short leg) of each of the leds  go to ground through 220-ohm resistor. Connnect the anodes (power conection) (long leg) of led to pins 2 through 4.

The in between steps: connect jumper wire to breadboard on number 6 and + sign, Connect jumper wire to 7 on boardboard and A0 on arduino uno. Jumper wire to 20 (breadboard) and 4 on uno, 2nd jumper wire on 24 (board) to uno (-3). 3rd jumper wire 28 on (breadboard) to 2(uno). oops there more there would be a shortage if there was no resistors. one 220 ohms resistor connect to b-21 across to a negative,b-25 across,b-28 to negative. negative is ground.

Step 3: place the TMP36 on the breadboard with round part facing away from arduino (PLEASE NOTE: the order if pins is important) connect the left pin of the flat facing side to power. The right pin to ground and connect center pin-pin A) on your arduino board. This is analog input pin 0.

Final step: code the program on arduino free source application and  plug in usb to arduino one and upload the program to the circuit.

conclusion: the love-o-meter project for me did not work. I could not figure out why but it would have been cool if it did.

IMG_2182SAMSUNG

Love-o-meter code

const int sensorPin = A0;
const float baselineTemp = 20.0;
void setup (){
Serial.begin(9600); //opens the serial port
for (int pinNumber =2; pinNumber <5; pinNumber++){
pinMode(pinNumber,OUTPUT);
digitalWrite(pinNumber, LOW);
}
}
void loop (){
int sensorVal = analogRead(sensorPin);
Serial.print (“Sensor Value: “);
Serial.print (sensorVal);
//convert the Analog to digital converter ADC
float voltage = (sensorVal/1024.0) * 5.0;
Serial.print (“, Volts: “);
Serial.print (voltage);
Serial.print (“degree C: “);
//convert the voltage to temperature in degrees
float temperature = (voltage – .5) * 100;
Serial.println(temperature);
if (temperature <baselineTemp){
digitalWrite(2, LOW);
digitalWrite(3, LOW);
digitalWrite(4, LOW);
}else if (temperature >= baselineTemp+2 && temperature < baselineTemp+4){
digitalWrite(2, HIGH);
digitalWrite(3, HIGH);
digitalWrite(4, LOW);
}else if (temperature >= baselineTemp+4 && temperature < baselineTemp+6){
digitalWrite(2, HIGH);
digitalWrite(3, HIGH);
digitalWrite(4, HIGH);
}
delay (1);
}

Advertisements

Arduino Uno Spaceship interface project

SAMSUNGToday I am starting a new project called Arduino Project. The actual project is called “spaceship interface” and in this project I will be using arduino board(look like more board from pc) and bread board(white). in addition component are 1 green and 2 red led’s, 4 resistors, switch (button) and jumper wires. I will be building a circuit and there will be video to show the arduino code interacting with the arduino board.

SAMSUNGSAMSUNGSAMSUNG

The first in the arduino book

The one red LED suppose light up on breadboard automatically but I had to unplug usb and troubleshoot. The middle picture has three leds 2 red and 1 green. I put the resistors in the wrong way on breadboard.the last picture show the right way when the code is upload to the board the red led is automatically turn on then when button is press the signal go to green then back to red and it going until release the button.

SAMSUNGSAMSUNGSAMSUNG

int switchState=0;

void setup(){
pinMode(3,OUTPUT);
pinMode(4,OUTPUT);
pinMode(5,OUTPUT);
pinMode(2,INPUT);
}

void loop(){
switchState = digitalRead(2);
//if switchState is LOW. turn the green LED on and turn red LED off.
if (switchState == LOW) { //the button is not pressed
digitalWrite(3, HIGH); //green LED
digitalWrite(4, LOW); //red LED
digitalWrite(5, LOW); //red LED
}
else { //the button proceed
digitalWrite(3, LOW);
digitalWrite(4, LOW);
digitalWrite(5, HIGH);

delay(250); //wait for quarter second
// toogle the LEDs
digitalWrite(4, HIGH);
digitalWrite(5, LOW);
delay(250); //wait for quarter second
}

} // go back to the beginning of the loop

revise code

this program keep the middle red Led light on and only light up red and green on turn on when button is press.

SAMSUNG

int switchState=0;

void setup(){

pinMode(3,OUTPUT);
pinMode(4,OUTPUT);
pinMode(5,OUTPUT);
pinMode(2,INPUT);
}

void loop(){
switchState = digitalRead(2);
//if switchState is LOW. turn the green LED on and turn red LED off.
if (switchState == LOW) { //the button is not pressed
digitalWrite(3, LOW); //green LED
digitalWrite(4, HIGH); //red LED
digitalWrite(5, LOW); //red LED
}
else { //the button proceed
digitalWrite(3, LOW);
digitalWrite(4, LOW);
digitalWrite(5, HIGH);

delay(255); //wait for quarter second
// toogle the LEDs
digitalWrite(4, HIGH);
digitalWrite(5, LOW);
delay(300); //wait for quarter second
}

} // go back to the beginning of the loop

another revise code

When button is press the midddle red light led goes off for a second

SAMSUNG

int switchState=0;

void setup(){
pinMode(3,OUTPUT);
pinMode(4,OUTPUT);
pinMode(5,OUTPUT);
pinMode(2,INPUT);
}

void loop(){
switchState = digitalRead(2);
//if switchState is LOW. turn the green LED on and turn red LED off.
if (switchState == LOW) { //the button is not pressed
digitalWrite(3, HIGH); //green LED
digitalWrite(4, HIGH); //red LED
digitalWrite(5, LOW); //red LED
}
else { //the button proceed
digitalWrite(3, HIGH);
digitalWrite(4, HIGH);
digitalWrite(5, LOW);

delay(1255); //wait for quarter second
// toogle the LEDs
digitalWrite(4, LOW);
digitalWrite(5, LOW);
delay(2000); //wait for quarter second
}

} // go back to the beginning of the loop

 

ProtoSnap Pro Mini on Sparkfun

CAM00221 A new project I am working on is from sparkfun.com called Protosnap pro mini.First, I would like to say I do not like program but I am doing this project with open mind and love to adventure new ideas. I will be programming Protosnap pro mini to light in different color,make noise or break components apart to use for something else.  As of today I am entering into open source software of arduino programing. What is arduino? It’s an open-source physical computing platform based on a simple microcontroller board, and a development environment for writing software for the board. In other word, arduino is programming language that is written in java and similar to c++, however this program was created for certain type of hardware like Protosnap pro mini. Arduino was design to teach basic programming. Programmer experiment with arduino to do various commands to control switches, sensors and various other lights or motors.

The image below show Protosnap pro mini.

CAM00226 CAM00224

Breakdown of what in shown in the 2 images

the FTDI board is the section where you plug into computer it has standard mini B to usb cable

button that is connected to pin 7 as well as UCC(power source) and GND(ground)

Light sensors that connected to GND(ground), A0 (analog pins), and UCC(power)

RGB LED connected various pins, pin 5= G(green),pin 6=B(blue), pin 3=R(red) lately UCC

they call this pin the pin to annoy your roommate the buzzer =pin 2 and GND

Last but not least the proto boardsection the circles next to buzzor, allow you to solder additional sensors or anything else onto the protosnap pro mini

If you turn over the device you can trace where everything connected and see how communication works between various senors and outputs to the mircrocontroller. The program is delivered pre programmed if you press a button it will make noise or if you cover your finger over light sensor, the RED LED display various colors.

Here the start of program process in arduino. I use sample from the website to guide me through the progress of program the Protosnap pro mini. The following was coded to activate button when it is press. int buttonPin = 7 which mean button is connected to pin 7. The program input and output is through electronically, if it reads high (5V), then that means the button is not being pressed. While a low (0V) indicates that the button is being pressed. The program is coded in conditions of if or else statement to activate the Protosnap pro mini to make sound on low voltage which mean button is being press and when no button being press it is high voltage and LED is off.

int buttonPin = 7; // button is connected to pin 7
int ledPin = 13; // LED’s connected to pin 13
int buttonStatus; // variable we’ll use to store the button’s status

void setup() {
pinMode(buttonPin, INPUT); // Initialize the buttonPin as input
pinMode(ledPin, OUTPUT); // The LED is an output
}

void loop() {
/* First read the status of the button
HIGH = button is NOT pressed
LOW = button IS pressed */
buttonStatus = digitalRead(buttonPin);

if (buttonStatus == LOW) {
digitalWrite(ledPin, HIGH); // If the button’s pressed turn the LED on
}
else {
digitalWrite(ledPin, LOW); // Otherwise, turn the LED off
}
}

int button = 7;
int buzzer = 2;
int light = A0;
int red = 3;
int blue = 6;
int green = 5;


void setup() 
{    
Serial.begin(9600);
  
pinMode(buzzer, OUTPUT);  
pinMode(red, OUTPUT);  
pinMode(green, OUTPUT);  
pinMode(blue, OUTPUT);

pinMode(button, INPUT);
 Serial.println("I am a protosnap, waiting to hear space bar:");
}

void loop() 
{
 
  if(Serial.available() > 0)
    {
    if(Serial.read() == 32)
    Serial.println("I HEARD THAT, OH SNAP!");
    }
    
while(digitalRead(button) == LOW)
{
digitalWrite(buzzer, HIGH);
delayMicroseconds(400);
digitalWrite(buzzer, LOW);
delayMicroseconds(50);
}


int temp = analogRead(light);
if(temp > 100)
{
  digitalWrite(red, HIGH);
  digitalWrite(green, HIGH);
  digitalWrite(blue, HIGH);
}
else 
{
  digitalWrite(red, LOW);
  digitalWrite(green, HIGH);
  digitalWrite(blue, HIGH);
  delay(500);
    digitalWrite(red, HIGH);
  digitalWrite(green, LOW);
  digitalWrite(blue, HIGH);
  delay(500);
    digitalWrite(red, HIGH);
  digitalWrite(green, HIGH);
  digitalWrite(blue, LOW);
  delay(500);
}
}

My program that I have put together

int variableColor;                                         // declare the light pins
void setup(){
pinMode(7,INPUT);                                      //declare button connected to pin 7
digitalWrite(7,HIGH);                                    //setting internal pull up resistor to off when set to HIGH 0 voltage
pinMode(3,OUTPUT);                                   //declare the RGB LED pins
pinMode(5,OUTPUT);
pinMode(6,OUTPUT);
}
void loop() {
variableColor= analogRead (A0);                     //read light sensor

//when button is press provided a path to GND(ground) setting voltage to low to display color of choice declared

digitalWrite(6,LOW);                              //signal the buzzer to display color blue when turn on
digitalWrite(3,HIGH);                             //signal the controller to turn off red when buzzer press
digitalWrite(5,HIGH);                             //signal the controller to turn off green when buzzer press
tone (2,1100,1000);        //control sound of buzzer, allow the buzzor to be active when press for 1 second (duration)
delay (1000);                                        //after 1 second sound from buzzer stops
}

super feature

What kind of super-feature you wish your phone, clothing, home or furniture offered?Cell phone these days can do a lot of things. Apple phone has siri, Android have google talk but a couple things I have notice that cell phone do not have is extra super freature. A super feature that I wish my phone had was to be able to respond to my request in sleep mode, for example be able to turn off or on from my phone with my voice or when I clip my hands twice.Another feature could be my phone on charger on my dresser and I am laying down on my bed, someone is calling, to be able to tell my phone ignore call, send to voice mail or send a text “I will call back, I am taking a nap”. To make the cell phone feature would probably require customize siri more or google talk to the phone to respond to certain command however this feature may become a major battery drainer.I am sure apple or samsung probably trying to develop similar feature right now but it will come out within a year with there new phone launch. A feature I wish my couch had was physical hands install and with a remote I can customize what type of message I would like and where, this feature probably could be made with fake rubber shape hands and rewire electronic component and remote that is compatible. I wish there was special clothing for different season like for example in winter a sweater that give heat or in summer cooler inside the shirt. I do not have a clue what would required to make that feature but it would be cool.this idea make be similar to how they made sweat shirt and hoodie with headphone installed it is sold at kmart, oldnavy or sears.

Drawdio

I am starting my new project called drawdio from learn.adafruit.com/drawdio. The drawdio is a pencil that let you draw with music. It is a amazing idea. My first guide step by step on how me and my partner put together the drawdio. The first step I took was to learn how to solder. It is not the best soldering but it was my first try I thought it was pretty descent.

CAM00190

The drawdio kit v1.1 come with inside the package included PCB printed circuit board,IC1 TLC551 timer kit,Q1 PNP transistor EBC pinout, C1 680pF ceramic capacitor,C3 0.1uF ceramic capacitor (104), C2 100uF capacitor, R1 1/4W 5% 20 MEGAohm resistor, Battery holder 3’As,Copper foil tape,Thumbtack, pencil zip tie and wire.

The following photo displayed show R1 1/4W 5% 20 MEGAohm resistor one set of colors is red,black, blue and gold another set that is brown, black, blue, gold. the resistor are being pin into the circuit board which show in picture 1 and 3. The middle picture show something blue being pin into the circuit board that is C1 680pF ceramic capacitor

CAM00191CAM00193CAM001922

The next picture show IC1 TLC551 timer kit being pin to the circuit board (black square box).

CAM00194

this picture pin the C3 0.1uF ceramic capacitor(yellow) across from  C1 680pF ceramic capacitor , Q2 PNP transistor EBC pinout (black piece).The piece is bent to a specific angle picture number 2 show the transistor being bent from different angle from different camera view.

CAM00196CAM00197

shows the Q1 NPNP N2222 or 2N3904 transistor EBC pinout (black piece) being added to the picture it bent going northward. It is the bigger transistor.

CAM00198

 

 

This is the ending project that my partner finished however the pencil that was suppose to make sound when you write on paper did not work.

CAM00205CAM00206

 

Toubleshooting method we use

1.we use the digital mult meter to diagnosis that battery.

2. we replace the copper around the pencil

3.we tried to desolder, maybe there was to much solder and it could have defected the communication.

conclusion: we was unable to find out why the pencil did not work

 

 

Story telling project

I started a hacking and building class at my college. The idea of this story telling project is to create a story about an object that was strip apart. I decide to take apart my dell keyboard and this story will be based on life and its ups and downs. Using the keyboard to show how stress can mess up your day. Some of my photography idea came from http://www.theatlantic.com/technology/archive/2013/05/me-and-sad-keanu-a-3d-printing-story/276256/ and Todd Mclellan book things come apart.

When life is going good all your pieces are put together. The image look like a fully functional keyboard.

800px-Dell_L100_keyboard

When we have a problem one piece fall off. Removing the alt key to demonstrate a problem has occurred.

CAM00162

If the problem is never fix and it continue to get worse all the piece fall off and it start to get real messy.All the keys are moved in the first image and second image shows the key (black square pieces scattered),microprocessor and controller circuitry (brown square irregular object), the key matrix(white clear with line going through it),rubber dume switches(white flexible piece). In addition, the usb connector and front and back of keyboard. All the piece are everywhere what do you do?

CAM00163 IMG_2169IMG_2168

When our back is against the wall and we do not know what to do, we sometimes go to get fresh air and spend alone time to think.

IMG_2160IMG_2162

If we do not know what to about certain situations, the first step that we take to resolve an issue is to go to our love ones family and friends for advice. The back and inside piece which separate the keys from the rubber dume switch which allow the keys to bounce when you type something on pc which form letter L, usb connector and rubber dume switches form O, the key matrix, loose screws and piece clip from microprocessor and controller circuitry form V and microprocessor and controller circuitry itself and alphabet key,Fn key and control key form letter E.

IMG_2164IMG_2166

After we receive advice from our love ones we start to try to fix the situation. We put things in order.

IMG_2173IMG_2172

In the end we try to put the piece back together and be happy again. The arrow show the piece trying to be put back together inside the keyboard to look like original eventually.

IMG_2174IMG_2177

About me

Hi my name is Shateya and in addition my major is information system. I am apart of a hacking and building class. This class is new to me, I had a different idea of what this class was going to be about however I like the unexpected surprise of the idea of taking something apart and making the object do something it was not design to do.