Skip to content
Snippets Groups Projects
Commit 689acf43 authored by Christian Cárdenas's avatar Christian Cárdenas
Browse files

index 1.4

parent dd53ed9f
No related branches found
No related tags found
No related merge requests found
Pipeline #
Showing
with 4338 additions and 373 deletions
This diff is collapsed.
This diff is collapsed.
......@@ -93,28 +93,50 @@
<p align="justify" padding-top="20px" style="font-size:24px; color:#91aac3" > <em><u> Assignment </u></em></p>
<ol style="font-size:18px">
<li>Design a manchine, including the end effector</li>
<li>Build the pasive parts and operate it manually</li>
<li>Design a manchiner</li>
<li>Build the mehcanical parts and operate it manually</li>
</ol>
</div>
<div class="col-lg-12 text-center">
<h1> <ins> </ins> </h1>
<!-- <hr class="star-light-blue"> -->
<div class="col-lg-12 text-center"> <br> <br>
<p align="justify" style="font-size:18px"> The initial idea was a drawing machine using two stepper motor and a fixed pen; with the ability to interpret
a gcode file and replicate a drawing in a piece of paper. We decide to use two levels for the position of the stepper motors (lower level for x-axis and
upper level for y-axis) and the pencil attached to the upper level. <br> <br>
The design was very simple, the construction and the results can be seen in the next pictures. </p>
</div>
<!-- Imagenes 1, 2, 3 y 4 =================================== -->
<div class="col-lg-6">
<section class="images" id="images">
<img src="img/Machine_design/Construction_1.jpg" class="img-responsive" alt="Atom">
</section>
</div>
<div class="col-lg-6">
<section class="images" id="images">
<img src="img/Machine_design/Construction_2.jpg" class="img-responsive" alt="Atom">
</section>
</div>
<div class="col-lg-6">
<section class="images" id="images">
<img src="img/Machine_design/Construction_3.jpg" class="img-responsive" alt="Atom">
</section>
</div>
<div class="col-lg-6">
<section class="images" id="images">
<img src="img/Machine_design/Construction_4.jpg" class="img-responsive" alt="Atom">
</section>
</div>
<!-- Imagenes 1, 2, 3 y 4 == =================================== -->
</div>
<div class="col-lg-12 text-center">
<h1> <em>Wait for it!!</em> </h1>
<!-- <hr class="star-light-blue"> -->
</div>
<!-- <div class="row">
<div class="col-lg-12 col-lg-offset-1">
<p align="justify"> Wait for it!!</p>
</div>
<div class="col-lg-5">
<p align="justify"></p>
</div>
</div> -->
</div>
</section>
......
......@@ -97,23 +97,100 @@
<li>Document the project</li>
</ol>
</div>
<div class="col-lg-12 text-center">
<h1> <ins> </ins> </h1>
<!-- <hr class="star-light-blue"> -->
<div class="col-lg-12 text-center"> <br> <br>
<p align="justify" style="font-size:18px"> To control the stepper motors we use an <a href="https://cdn-learn.adafruit.com/downloads/pdf/adafruit-motor-shield.pdf"> L293D motor shield</a> for Arduino.
With this shield is necessary to use two libraries (<a href="https://github.com/adafruit/Adafruit-Motor-Shield-library">AFMotor</a> and <a href=" https://github.com/adafruit/AccelStepper">AccelStepper</a>). <br>
The first step was to understand the code and control the motors with simple commands. </p>
</div>
</div>
<div class="col-lg-12 text-center">
<h1> <em>Wait for it!!</em> </h1>
<!-- <hr class="star-light-blue"> -->
</div>
<!-- <div class="row">
<div class="col-lg-12 col-lg-offset-1">
<p align="justify"> Wait for it!!</p>
</div>
<div class="col-lg-5">
<p align="justify"></p>
</div>
</div> -->
<!-- Imagenes 5, 6 == =================================== -->
<div class="col-lg-6">
<section class="images" id="images">
<img src="img/Machine_design/Shield_1.jpg" class="img-responsive" alt="Atom">
</section>
</div>
<div class="col-lg-6">
<section class="images" id="images">
<img src="img/Machine_design/Shield_2.jpg" class="img-responsive" alt="Atom">
</section>
</div>
<div class="col-lg-3">
</div>
<div class="col-lg-6">
<section class="images" id="images">
<img src="img/Machine_design/Shield_3.jpg" class="img-responsive" alt="Atom">
</section>
</div>
<!-- Imagenes 5, 6 == =================================== -->
<div class="col-lg-12">
<p align="justify" style="font-size:18px">As a more user friendly control of the machine is necessary to start with a Serial reading inside IDE, this way the user can set two coordinates and move the motors and start drawing simple draws,
as straight lines, diagonal, squares, etc… </p>
</div>
<div class="col-lg-6">
<section class="images" id="images">
<img src="img/Machine_design/Draw_1.jpg" class="img-responsive" alt="Atom">
</section>
</div>
<!-- Video 1 ============================== -->
<div class="col-lg-6"> <br>
<iframe class="center-block" width="560" height="315" src="https://www.youtube.com/embed/jWzSnliqV08" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
<!-- Video 1 ============================== -->
<div class="col-lg-12">
<p align="justify" padding-top="20px" style="font-size:24px; color:#91aac3" > <em><u> To Do... </u></em></p>
<ol style="font-size:18px">
<li> Improve the design to facilitate the movement of the stepper motors. </li>
<li> Calibrate the machine</li>
<li> Make a user interface</li>
<li> Read the gcode files to draw more complex sketches </li>
</ol>
</div>
<!-- Files ------------------------>
<div class="col-lg-12">
<p align="center" style="font-size:25px"><u> <br> Files </u> </p>
<p align="justify" style="font-size:18px"> <br> In this section the files generated during the development of the assignment will be available
to download. </p>
<p> <br>
<table class="table-data">
<tr>
<td>
<a href="files/Week_16/Machine_control.ino" download>
<img src="img/ico/arduino.jpg" width="100px" > </a>
</td>
</tr>
<tr>
<td> <a href="files/Week_16/Machine_control.ino" download> Machine_control.ino</a> </td>
</tr>
</table>
</p>
</div>
</div>
</section>
......
......@@ -751,13 +751,3 @@ section.success {
ul {
text-align: left;
}
#myProgress {
width: 100%;
background-color: grey;
}
#myBar {
width: 1%;
height: 30px;
background-color: green;
}
#include <OneWire.h>
#include <DallasTemperature.h>
// Pin with one Wire data
const int DQ = 9;
// Instancia a las clases OneWire y DallasTemperature
OneWire myWire(DQ);
DallasTemperature sensor(&myWire);
void setup() {
// Initiate serial communication
Serial.begin(9600);
// Initiate on wire communication
sensor.begin();
}
void loop() {
Serial.println("Reading");
sensor.requestTemperatures();
// Reading values
Serial.print("Temperature in Celsius: ");
Serial.print(sensor.getTempCByIndex(0));
Serial.println(" C");
Serial.print("Temperature in Farenheit: ");
Serial.print(sensor.getTempFByIndex(0));
Serial.println(" F");
delay(2000);
}
This diff is collapsed.
files/Week_11/ds18b20.png

10.8 KiB

This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
* Blink_RGB.c
*
* Created: 17/05/2018 05:43:24 p. m.
* Author : Christian
*/
#include <avr/io.h>
#include <util/delay.h>
#define F_CPU 1000000UL // 1 MHz
int main(void)
{
DDRB |= (1<<DDB0) | (1<<DDB1) | (1<<DDB2); // set PB0, PB1 AND PB2 as output
PORTB &= ~(1<<PB0) | (1<<PB1) | (1<<PB2); // inician todos abajo
/* Replace with your application code */
while (1)
{
PINB ^= (1<<PB0);
PINB &= ~(1<<PB1);
PINB &= ~(1<<PB2);
_delay_ms(1000);
PINB ^= (1<<PB1);
_delay_ms(1000);
PINB ^= (1<<PB2);
_delay_ms(1000);
/*PINB &= ~(1<<PB0);
PINB &= ~(1<<PB1);
PINB ^= (1<<PB2);
_delay_ms(500);*/
}
}
files/Week_12/RGB_traces.png

16.5 KiB

/*
* RGB.c
*
* Created: 17/05/2018 03:31:42 p. m.
* Author : Christian
*/
#include <avr/io.h>
#define F_CPU 1000000UL // 1 MHz
#include <util/delay.h>
int main(void)
{
DDRB |= (1<<DDB1); // PB0 set as output
/* Replace with your application code */
while (1)
{
PINB = (1<<PINB1);
_delay_ms(500);
}
}
#include <AccelStepper.h>
#include <AFMotor.h>
AF_Stepper motor1(200, 1); // Port 2 = M3 and M4
AF_Stepper motor2(200, 2); // Port 1 = M1 and M2
long distx;
long disty;
int move_finished=1; // Test if the movement is done
long stepsx;
long stepsy;
// you can change these to DOUBLE or INTERLEAVE or MICROSTEP!
// motor in x
void forwardstep1() {
motor1.onestep(BACKWARD, SINGLE);
}
void backwardstep1() {
motor1.onestep(FORWARD, SINGLE);
}
// motor in y
void forwardstep2() {
motor2.onestep(FORWARD, SINGLE);
}
void backwardstep2() {
motor2.onestep(BACKWARD, SINGLE);
}
// Motor shield has two motor ports, now we'll wrap them in an AccelStepper object
AccelStepper motorx(forwardstep1, backwardstep1);
AccelStepper motory(forwardstep2, backwardstep2);
void setup()
{
Serial.begin(9600);
Serial.println("Enter end coordinates separated by a comma: X,Y ");
Serial.print("Enter coordinates values: ");
motorx.setMaxSpeed(200.0);
motorx.setAcceleration(100.0);
//stepper1.moveTo(motor1dist);
motory.setMaxSpeed(200.0);
motory.setAcceleration(100.0);
//stepper2.moveTo(motor2dist);
}
void loop()
{
while (Serial.available()>0) {
move_finished=0; // For checking move of the Steppers
distx= Serial.parseInt(); // X coordinate
Serial.print(distx);
Serial.print(" X Travel , ");
stepsx = stepsx + distx;
disty= Serial.parseInt(); // Y coordinate
Serial.print(disty);
Serial.println(" Y Travel ");
stepsy = stepsy + disty;
motorx.moveTo(distx); // Set move to x coordinate
motory.moveTo(disty); // Set move to y coordinate
delay(1000);
Serial.print("Moving Steppers into position...");
}
if ((motorx.distanceToGo() != 0) || (motory.distanceToGo() !=0)) {
motorx.run(); // Move motor X to new coordinate
motory.run(); // Move motor Y to new coordinate
}
if ((move_finished == 0) && (motorx.distanceToGo() == 0) && (motory.distanceToGo() == 0)) {
Serial.println("COMPLETED!");
Serial.println("");
Serial.println(stepsx);
Serial.println(stepsy);
Serial.println("Enter next coordinates (0,0 to return at first position): ");
move_finished=1; // Reset move variable
}
}
img/Week_11/Atmel_1.jpg

97.5 KiB

img/Week_11/Atmel_2.jpg

48.9 KiB

img/Week_11/Eagle_1.jpg

70.5 KiB

img/Week_11/Eagle_2.jpg

81.9 KiB

img/Week_11/PBC_2.png

10.8 KiB | W: | H:

img/Week_11/PBC_2.png

19 KiB | W: | H:

img/Week_11/PBC_2.png
img/Week_11/PBC_2.png
img/Week_11/PBC_2.png
img/Week_11/PBC_2.png
  • 2-up
  • Swipe
  • Onion skin
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment