Design: Test Plan

7) Create another post in Galileo/Perf. Task called “Design: Test Plan”.

    Type out a plan to test your device. How else will you know if you’ve succeeded?
  • What action will demonstrate the success of your device?
  • As a simple test plan we want to see the device move its mechanical hand up and down and to hold the marker and make a mark on the paper and then lift its hand from the paper when we click on the button.
  • In what units will that action be measured? inches or feet driven by a car? milliliters of water sprayed by a pump? 
  • Writings or marks made on the paper by the device.
  • Who will measure or witness a successful demonstration? 
  • My partner and I as well as our teacher.
  • How will you document the success of your device? Pictures? A video? A data report?
  • We will document the success of our device with pictures and a video.

Before we start with testing out our device, we need to complete the different parts like the software parts first to give the servo the commands to make the device work, and then we have to complete the electronic parts where this is the inside of the device. Then we finally need to work on the mechanical parts of the device, which will show how the device actually works, outwardly.

TEST PLAN:

For our test plan I think it should go along this way…

If there is not enough time we will have to just finish the electronic parts.

  • Get all the coding into the arduino for the servo to function.

Then set up the device mechanically.

  • Make the mechanical hand for the marker to move and write.

If we are able to do more…

We could make the device work more based on its own efforts, rather than us moving the paper.

 

Design:Prototype Day 2

drawcar2drawcar3

The pictures above are from Day 2 of working on the prototype. Our DrawCar as you can see in the picture on the left has the marker attached to the servo, like a mechanical hand. This allows the device to draw when the servo moves. What we had to do in order to help the device move was one person needed to press the switch to make the marker go down onto the paper, and then another person needed to pull the paper so that while its being pulled and the switch is being pressed, the device makes lines on the paper.

Below is the code for our DrawCar. If you look in the code where it says if (penPos == 1) { // if pen control pin is getting power
outputValue = 60; // set the servo to draw position) here for the output value we changed it from 0 to 60 in order to get the marker on the paper correctly.

#include <Wire.h>
#include <Servo.h>
int penPos = 0; // pen position 0 is up, not drawing
int penControl = 4; // senses draw button
int outputValue = 90;

Servo servo;
void setup() {
// initialize serial communications at 9600 bps:
Serial.begin(9600);
servo.attach(9);
}

void loop() {
penPos = digitalRead(penControl);

if (penPos == 1) { // if pen control pin is getting power
outputValue = 60; // set the servo to draw position
}
else { // if pen control pin is not getting power
outputValue = 90; // set the servo to non-draw position
}

servo.write(outputValue); // change the servo position:
delay(100); // wait for the servo to move
}

Discover

DISCOVER

2) Think about what would be a fun thing to make your Galileo do.
  • Are you interested in sound? In motion? In light? We’re interested in motion because we want to make our motor that’s connected within the Galileo.
  • What kinds of objects would it be fun to connect to the Galileo? A car? A fan? A stuffed animal?
  • The kind of objects we are going to add is writing utensils
3) Search on the Internet for Arduino projects others have done. Which ones would you like to do? 
4) Create a post in your Galileo/Perf. Task category called “Discover”.
     A] In the post, type out all your thoughts on what you would like to make.
We came up with the idea of making  something that can move ” The Draw Car “around and make it write.
     B] Include links to web pages showing projects that are inspiring to you or similar to what you would like to make.
   Explain what it will be and what it will do.
We want our car to write down or draw something on a piece of paper used by our motor car
    • Include a working name for your device.
    • Our working name for our device is  “The Draw Car “

Design: Prototype Day 1

8) Make a prototype, a testable 1st attempt at a solution.

  • The mechanical, electronic and software parts of the device all have particular jobs to do.
  • The mechanical, electronic and software parts of the device must all work together.
  • Document your prototype on your blog as you build it.
    • Use many posts, at least 1 for each day you work on it.
    • Call the 1st post “Design: Prototype Day 1”.
    • A picture can be worth many, many words!
    • Any new code you write should be pasted into the post with its internal comments.

Name each post for the number of days you have worked on the prototype.

IMG_2822 IMG_2824IMG_2821

Below is the coding for the servo in our device. This is considered the software part of the device creation process. So, on the first day of working on making the device I finished this part of the plan.

 

#include <Wire.h>
#include <Servo.h>
int penPos = 0; // pen position 0 is up, not drawing
int penControl = 4; // senses draw button
int outputValue = 90;

Servo servo;
void setup() {
// initialize serial communications at 9600 bps:
Serial.begin(9600);
servo.attach(9);
}

void loop() {
penPos = digitalRead(penControl);

if (penPos == 1) { // if pen control pin is getting power
outputValue = 0; // set the servo to draw position
}
else { // if pen control pin is not getting power
outputValue = 90; // set the servo to non-draw position
}

servo.write(outputValue); // change the servo position:
delay(100); // wait for the servo to move
}

Design: Device Plan

DESIGN
6) Create a new post in Galileo/Perf. Task called “Design: Device Plan”.
    Type out your plan to make this device. Consider the following:
  • How much time do you have?
  • One period.
  • How many of the parts that you need are really possible to get in this time?
  • We can get everything except the toy car in time.
  • Which skills required to build the device do you or others in the room have?
  • We have enough skills to build our device along with our teacher.
  • What is the best order in which to build the device? Mechanical 1st? Electronics 1st?
  • The best order would be to do the Electronics 1st and then the Mechanical part.
  • Which parts can be worked on at the same time by teammates? What will each teammate do?
  • Both parts can be worked on at the same time with my teammate and I. One of us could do the electronic part and then the other one could do the mechanical part.

 

Define

DEFINE
“DrawCar”
     A] MECHANICAL
    • What will your device do in the real world?
    • In the real world our device can be used to write or draw and it can also be used as  device that brings amusement to people because of how it will work. People may not necessarily be able to use it because the device might only draw scribbles and shapes, but who know maybe the devices drawings will be considered abstract paintings or something.
    • Will it light up? Will it move? Will it speak? Will it listen?
    • It will move and write.

In the Mechanical List, write down all the things your device needs to interact with the real world.

         Does it need lights? Motors? A microphone? A speaker? Wheels? Arms? Legs? List it all!
     * 2 Motors
     * Toy Car
     * A mechanical hand that raises and lowers hand
     * Paper
     * Writing utensils
 
B] ELECTRONIC
    • What parts will make your device work under the hood?
    • The codes and motors will make our device work under the hood.  The code gives the command to the device, which needs to follow it. The motors inside the device need to be working in order to make the device move.
    • Which of our electronic parts will you need?
  • 2 motors
  • Galileo
  • LEDs
  • Arduino

In the Electronic List, write down all those parts you will need to complete the circuits for your device.

    • Just the beginning: power supply, jumpers, switch, resistor, LEDs, sensors, relays, capacitors, etc.
    • Check the websites of projects similar to yours. They should list the parts you need for different abilities.
    • Remember: the most important electronic part is the circuit diagram!

C] SOFTWARE

    • What does your device need to know?
    • How to follow the codes and to move its mechanical hand and write and move it. The device should also know how to move around.
    • What kind of input does it need to understand?
    • The device needs to understand the code for both the stepper part of the device and it also needs to understand the servo part of the code and this will enable the device to do each parts purpose. 
    • What kinds of situations will it face?
    • The device will face situations such as being controlled to write something with the controller and the device should be able to follow these instructions and write what is said.
    • What sorts of responses does it need to have?
    • Start writing or drawing. 

In the Software List, write down everything the Arduino code for your device will be able to do.

    • Don’t think about the code itself or how it will work.
    • Just write down what the code will be able to do.
    • One code for the stepper to let the car move and another for the servo to make the mechanical hand go up and down so that it could write.

myBlink

myblink1myblink2

 

Code of myBlink Sketch:

void setup() {
// initialize digital pin 13 as an output.
pinMode(13, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(2000); // wait for a second
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
delay(4000); // wait for a second
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(6000); // wait for a second
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
delay(8000); // wait for a second
}