HDPrime_Conveyor_2015
Monday, October 12, 2015
new ideas
In these past weeks there has been discussion of designing the parts that will be used for the new moving parts of the new conveyer, we will begin designing in solidworks and printed using a 3d printer. We have been watching videos that show us how to use solidworks as well as design ideas.
Thursday, June 11, 2015
Day 17
The last few days, Tim and I have been doing our best to figure out to control the motors using the Arduino board connected to the rep-rap board. Our starting point was the example code in the Arduino software to move the MotorKnob of a stepper. The example code was only for one stepper, and after some research we figured out ways of plugging in all 3 motors to the Arduino board which will be used to move the X, Y and Z axises in the platform for the HDPrime.
We were able to move the motors using the Arduino board. However there were a few limitations in moving the motors. First, Arduino code used a loop function called 'void loop()' which was needed to move the motor. This would continuously move the motor until there was no power in the Board or a different code was uploaded to the board. Second of, every time we need to change the amount of movement in the motor, we need to go through the Arduino code and change the value of the amount of movement. The method was not practical, so we needed an interface to interact with the Arduino board in order to input the values we needed.
After a briefly brainstorming, we decided to use RaspberryPi as an interface to send signals to the Arduino board. When we were learning Arduino code previously, when I barely stumbled upon a relationship between Arduino and RaspberryPi, so I knew it as a possibility. I had previous knowledge of RaspberryPi and Perl language beforehand, so Tim and I decided to give it a chance. Next day, we had thorough research of RaspberryPi and Arduino in internet. This was challenging, because we used Perl language and had to initialize the connection between Arduino and RaspberryPi from the scratch. Initializing the connection between the boards was exhausting, because we found different instructions on each website we looked into. It was something that nobody had tried before. After spending quite some time on it, we came to a better understanding. We realized that we can actually send the values of the amount we need the motors to move, from the RaspberryPi to the Arduino board. So, through the code that we wrote, and is already uploaded, in the Arduino board, it will receive these values and then move the motors. However, the values Arduino receives from the RaspberryPi are in the ASCII format. Hence, after Dr McColgan's advice, we started calibrating the movement of the motors with ASCII and decimal values that the Arduino receives.
While doing so, we came across another issue. The motor did not receive enough power to provide the toque that is needed to move a pulley/belt which makes the platform move. So we are in process of searching suitable power sources to provide enough power to move the 3 motors.
Following is the code that was uploaded to Arduino board to test the connection between the RaspberryPi and the Arduino board.
/*
Mega multple serial test
Receives from the main serial port, sends to the others.
Receives from serial port 1, sends to the main serial (Serial 0).
This example works only on the Arduino Mega
The circuit:
* Any serial device attached to Serial port 1
* Serial monitor open on Serial port 0:
created 30 Dec. 2008
modified 20 May 2012
by Tom Igoe & Jed Roach
This example code is in the public domain.
*/
void setup() {
// initialize both serial ports:
Serial.begin(9600);
Serial1.begin(9600);
}
void loop() {
// read from port 1, send to port 0:
if (Serial1.available()) {
byte inByte = Serial1.read();
Serial1.print("I received p1: ");
Serial1.println(inByte, DEC);
}
// read from port 0, send to port 1:
if (Serial.available()) {
byte inByte = Serial.read();
Serial.print("I received p2: ");
Serial.println(inByte);
}
}
The last few days, Tim and I have been doing our best to figure out to control the motors using the Arduino board connected to the rep-rap board. Our starting point was the example code in the Arduino software to move the MotorKnob of a stepper. The example code was only for one stepper, and after some research we figured out ways of plugging in all 3 motors to the Arduino board which will be used to move the X, Y and Z axises in the platform for the HDPrime.
We were able to move the motors using the Arduino board. However there were a few limitations in moving the motors. First, Arduino code used a loop function called 'void loop()' which was needed to move the motor. This would continuously move the motor until there was no power in the Board or a different code was uploaded to the board. Second of, every time we need to change the amount of movement in the motor, we need to go through the Arduino code and change the value of the amount of movement. The method was not practical, so we needed an interface to interact with the Arduino board in order to input the values we needed.
After a briefly brainstorming, we decided to use RaspberryPi as an interface to send signals to the Arduino board. When we were learning Arduino code previously, when I barely stumbled upon a relationship between Arduino and RaspberryPi, so I knew it as a possibility. I had previous knowledge of RaspberryPi and Perl language beforehand, so Tim and I decided to give it a chance. Next day, we had thorough research of RaspberryPi and Arduino in internet. This was challenging, because we used Perl language and had to initialize the connection between Arduino and RaspberryPi from the scratch. Initializing the connection between the boards was exhausting, because we found different instructions on each website we looked into. It was something that nobody had tried before. After spending quite some time on it, we came to a better understanding. We realized that we can actually send the values of the amount we need the motors to move, from the RaspberryPi to the Arduino board. So, through the code that we wrote, and is already uploaded, in the Arduino board, it will receive these values and then move the motors. However, the values Arduino receives from the RaspberryPi are in the ASCII format. Hence, after Dr McColgan's advice, we started calibrating the movement of the motors with ASCII and decimal values that the Arduino receives.
While doing so, we came across another issue. The motor did not receive enough power to provide the toque that is needed to move a pulley/belt which makes the platform move. So we are in process of searching suitable power sources to provide enough power to move the 3 motors.
Following is the code that was uploaded to Arduino board to test the connection between the RaspberryPi and the Arduino board.
/*
Mega multple serial test
Receives from the main serial port, sends to the others.
Receives from serial port 1, sends to the main serial (Serial 0).
This example works only on the Arduino Mega
The circuit:
* Any serial device attached to Serial port 1
* Serial monitor open on Serial port 0:
created 30 Dec. 2008
modified 20 May 2012
by Tom Igoe & Jed Roach
This example code is in the public domain.
*/
void setup() {
// initialize both serial ports:
Serial.begin(9600);
Serial1.begin(9600);
}
void loop() {
// read from port 1, send to port 0:
if (Serial1.available()) {
byte inByte = Serial1.read();
Serial1.print("I received p1: ");
Serial1.println(inByte, DEC);
}
// read from port 0, send to port 1:
if (Serial.available()) {
byte inByte = Serial.read();
Serial.print("I received p2: ");
Serial.println(inByte);
}
}
It WORKS! we received the transmitted data...
Following is the Perl code that we used to set the connection in RaspberryPi with the Arduino Board. We used this code to send data values to the Arduino.
#!/usr/bin/perl
# MoveMotor.pl
use Device::SerialPort;
my $port = Device::SerialPort->new("/dev/ttyACM0");
$port->baudrate(9600);
$port->databits(8);
$port->parity("none");
$port->stopbits(1);
$port->handshake("xoff");
$port->write_settings;
$port->dtr_active(0);
#$port->write('include <Stepper.h>');
#$port->write('define STEPS 100');
#my $motorX = $port->write('Stepper stepperX(STEPS, 10,11,12,13));
#my $motorY = $port->write('Stepper stepperY(STEPS, 6,7,8,9));
#my $motorZ = $port->write('Stepper stepperZ(STEPS, 2,3,4,5));
#my $sx = 30;
#my $sy = 30;
#my $sz = 30;
#while (1) {
# $port->write('$sx');
# $port->write('$sy');
# $port->write('$sz');
# print($port->receive(), "\n");
# sleep(1);
#}
while (1) {
print "Move in X Direction: ";
my $x = <STDIN>;
chomp($x);
print "Sending $x...\n";
print "Move in Y Direction: ";
my $y = <STDIN>;
chomp($y);
print "Sending $y...\n";
print "Move in Z Direction: ";
my $z = <STDIN>;
chomp($z);
print "Sending $z...\n\n\n";
$port->write("$x");
$port->write("$y");
$port->write("$z");
}
$port->close();
Perl language: '#' lines are comments that are not effected to overall program execution.
They were several approaches we used.
Following is the Arduino code that we used to move the motors. This is the code that reads data from RaspberryPi and hence moves the motors.
#include <Stepper.h>
#define STEPS 200
Stepper stepperX(STEPS, 10,11,12,13);
Stepper stepperY(STEPS, 6,7,8,9);
Stepper stepperZ(STEPS, 2,3,4,5);
void setup()
{
Serial.begin(9600);
// set the speed of the motor to 30 RPMs
stepperX.setSpeed(30);
stepperY.setSpeed(30);
stepperZ.setSpeed(60);
}
//int mx = 10;
//int my = 20;
//int mz = 50;
/* void loop() {
MoveX();
MoveY();
MoveZ();
delay(12);
}
*/
void loop() {
if (Serial.available()) {
int mx = Serial.read();
Serial.print("I received mx: ");
Serial.println (mx);
stepperX.step(mx);
}
if (Serial.available()) {
int my = Serial.read();
Serial.print("I received my: ");
Serial.println (my);
stepperY.step(my);
}
if (Serial.available()) {
int mz = Serial.read();
Serial.print("I received mz: ");
Serial.println (mz);
stepperZ.step(mz);
}
}
![]() |
| Arduino Board connected to the reprap which is in link with the motors |
![]() |
| Our attempt to move the Printrbot print bed using the motors connected to the Arduino, RaspberryPi and the reprap |
![]() |
| RaspberryPi in Action |
Day- 19
June 11th 2015
These past few days have been used in an attempt to create a final configuration of our printrbot to be used for the HDPrime. Our final product is not as beautiful as we had imagined but it does move in all three directions and functions as we had anticipated. the pictures below don't even come close to revealing how many zip-ties we used in the re design. Once the end of the final week started closing in on us we decided to put the coding on the side burner and come up with a physical product. After sawing off some wooden parts we re-mounted the X-axis bed atop our structure. The printrboard still lies outside our structure and with all the wires remaining uncovered, plans for modeling a new stage to be made in the fall have been made.
| A frontal view of our reconfigured printrbot |
| side view: the bed that was originally mounted above the SD card is now placed atop our Y-axis arm allowing the bed to move in all three directions and not just one |
Wednesday, June 3, 2015
Day 13-
June 3rd
These past few days have been dedicated to understanding Arduino coding along with the Mega chip and it's sistering rep-rap board. So far we have been able to make all our motors move in a random fashion after we decimated our original 3d printrbot shown in pieces below. But not in the way we expected it to, originally, the plan was to mount the rep-rap board atop the mega Arduino board, but after running multiple tests we gave up and attempted to wire the boards together in a more crude fashion, by closely examining the board we wired the two boards together so that it would allow us to utilize the two boards together and Dr. McColgan confirmed that we could use the setup for our final product. So far the code we are using for our motors is one that Cham and I found on the example section on the Arduino website, our adapted code is as follows.
June 3rd
These past few days have been dedicated to understanding Arduino coding along with the Mega chip and it's sistering rep-rap board. So far we have been able to make all our motors move in a random fashion after we decimated our original 3d printrbot shown in pieces below. But not in the way we expected it to, originally, the plan was to mount the rep-rap board atop the mega Arduino board, but after running multiple tests we gave up and attempted to wire the boards together in a more crude fashion, by closely examining the board we wired the two boards together so that it would allow us to utilize the two boards together and Dr. McColgan confirmed that we could use the setup for our final product. So far the code we are using for our motors is one that Cham and I found on the example section on the Arduino website, our adapted code is as follows.
/*
* MotorKnob
*
* A stepper motor follows the turns of a potentiometer
* (or other sensor) on analog input 0.
*
* This example code is in the public domain.
*/
#include <Stepper.h>
// change this to the number of steps on your motor
#define STEPS 100
// create an instance of the stepper class, specifying
// the number of steps of the motor and the pins it's
// attached to
Stepper stepperX(STEPS, 10,11,12,13);
Stepper stepperY(STEPS, 6,7,8,9);
Stepper stepperZ(STEPS, 2,3,4,5);
// the previous reading from the analog input
int previous = 0;
void setup()
{
Serial.begin(9600);
// set the speed of the motor to 30 RPMs
stepperX.setSpeed(30);
stepperY.setSpeed(30);
stepperZ.setSpeed(30);
}
void loop()
{
// get the sensor value
int val = analogRead(0);
Serial.print(val); Serial.print(" "); Serial.println(previous);
// move a number of steps equal to the change in the
// sensor reading
stepperX.step(20);
stepperY.step(-20);
stepperZ.step(30);
// remember the previous value of the sensor
previous = val;
}
Thursday, May 28, 2015
This week, Tim and I, started analyzing the results for soil samples from the HD prime in depth. We analyzed a soil sample changing the type of the substrate we had been using through the HD prime keeping the soil sample consistent. The substrate that was used to analyze all the other soil samples through the HD prime was 'bulk paint'. Other substrates available were metal, wood, textile, plastic, leather, glass. This required us to compile all the data to one file for sake of comparison and presentation. We tried different presentation approaches including individual bar charts for each substrate with the corresponding elements and one bar chart with all the substrates and their elements. Then after Dr. Kolonko explained to me and Tim how bubble charts can be used to present the data we collected. He showed us an example of such via research poster by the Chemistry department regarding Chromatography. Hence we decided to present the results through a bubble chart, such that our x-axis is the substrate, y-axis is the atomic number of the element and the size of each bubble would represent the concentration of the corresponding element the HDPrime recorded.
We started out doing bubble charts in Excel, with the atomic number of the element in the x-axis, the concentration of the element in the y-axis and the color of the bubble to be the substrate. The size of the bubble represented the uncertainty of each concentration of element.
To continue with our original idea for the bubble chart, Dr. McColgan suggested to do the plotting in MatLab. MATLAB was new to me and Tim had some past experience with regards to it. We spent a couple of hours figuring it out and trying to familiarize the coding.
With help from Dr. McColgan regarding the code, Tim and I plotted the bubble graph of Substrate vs Atomic number with the size of the bubble to be the concentration. The color of the bubbles represented the substrate. Later, to obtain more clarity on the subject, we changed the color of the bubble for each color to represent a different element, which required a finger breaking amount of time re-working the code.
![]() |
| Concentration of each element for one substrate [wood] |
![]() |
| Attempt for a Bubble graph with all substrates in one graph |
![]() |
| Atomic number vs Concentration bubble chart with the size of the bubble the uncertainity |
Data Collected through the HD prime for different substrate
| Atomic Number | metal | wood | textile | plastic | leather | glass | bulk paint |
| 14 | 23567 | 22818 | 21506 | 19798 | 23443 | 22527 | 21466 |
| 17 | 0 | 217 | 288 | 0 | 211 | 204 | 237 |
| 19 | 8143 | 5523 | 5409 | 4608 | 5624 | 5582 | 5603 |
| 20 | 4035 | 4034 | 4097 | 4646 | 3903 | 3989 | 4029 |
| 22 | 1334 | 1231 | 1211 | 1151 | 1233 | 1274 | 1219 |
| 23 | 47.9 | 0 | 0 | 0 | 0 | 0 | 0 |
| 24 | 35.5 | 32.4 | 40.6 | 34.3 | 38.8 | 38.1 | 35.2 |
| 25 | 297 | 288 | 289 | 221 | 290 | 286 | 286 |
| 26 | 34140 | 34586 | 34595 | 10082 | 34543 | 34165 | 34340 |
| 29 | 74.1 | 78.7 | 79.2 | 44.3 | 78.6 | 77.6 | 78.3 |
| 30 | 664 | 695 | 701 | 350 | 692 | 683 | 695 |
| 31 | 0 | 0 | 8.2 | 6 | 9.2 | 0 | 8.5 |
| 33 | 22.2 | 48.2 | 63.9 | 0 | 62.8 | 42.8 | 46.2 |
| 34 | 0 | 0 | 1.2 | 1 | 0 | 0 | 0 |
| 35 | 4.9 | 0 | 0 | 6.2 | 0 | 0 | 0 |
| 36 | 199 | 54.9 | 57.7 | 52.5 | 53.7 | 51.3 | 56.2 |
| 37 | 44.7 | 86.2 | 87.7 | 99.6 | 85.9 | 76.6 | 86.1 |
| 38 | 66.9 | 0 | 0 | 0 | 6.6 | 0 | 0 |
| 47 | 0 | 13 | 9.3 | 4.4 | 11.4 | 10 | 9.5 |
| 48 | 0 | 9.5 | 8.6 | 0 | 11.6 | 9.5 | 0 |
| 49 | 0 | 552 | 567 | 213 | 509 | 503 | 537 |
| 50 | 415 | 70.2 | 63.5 | 17 | 52.3 | 69 | 83.5 |
| 51 | 35.3 | 423 | 393 | 403 | 432 | 383 | 409 |
| 82 | 946 | 793 | 795 | 554 | 801 | 791 | 797 |
| 83 | 2 | 6.1 | 7.5 | 3.7 | 5.9 | 4.7 | 7.6 |
![]() |
| Substrate vs Atomic number bubble chart with the size of the bubble to be the concentration of the particular element. Color: particular element. |
Monday, May 25, 2015
5/22 -Day 5
Today was a shortened work day because Dr.K needed to leave early. Today Dr.K told Cham he would like him to create a protein with the 3D printer so Cham found a simple, single helix protein to print out. Soon we learned that even the most simple things aren't simple with 3D printers. Originally we made the protein lye on its side but after a couple attempts it became clear that it wasn't working. We took a break to test a soil sample with different settings on the HDPrime. After I suggested to stand up the molecule, instead of lying it down, it seemed for the first twenty minutes that it would work out great, but once the molecule was too tall for its supports the printer started ripping up the print. So we cut that and didn't have enough time in the lab to start another print but Cham came up the solution I believe. Too lean the molecule so it can have supports throughout and still be built from the ground up. Me and Cham stayed in the computer labs a little after Dr.K left to make some soil comparison graphs with error bars and that concluded our day.
Today was a shortened work day because Dr.K needed to leave early. Today Dr.K told Cham he would like him to create a protein with the 3D printer so Cham found a simple, single helix protein to print out. Soon we learned that even the most simple things aren't simple with 3D printers. Originally we made the protein lye on its side but after a couple attempts it became clear that it wasn't working. We took a break to test a soil sample with different settings on the HDPrime. After I suggested to stand up the molecule, instead of lying it down, it seemed for the first twenty minutes that it would work out great, but once the molecule was too tall for its supports the printer started ripping up the print. So we cut that and didn't have enough time in the lab to start another print but Cham came up the solution I believe. Too lean the molecule so it can have supports throughout and still be built from the ground up. Me and Cham stayed in the computer labs a little after Dr.K left to make some soil comparison graphs with error bars and that concluded our day.
5/21-Day 4
Not every day is great to be a scientist, sometimes there are walls that seem miles high. But I guess you just need to keep climbing. This happened to me and Cham when we moved the printrbot from one location to another and Cham needed to reinstall all the programs onto this new computer. That was a minor setback, nothing to bad. The next challenge that stopped us is how on the previous day we got the printer to work in less than fifteen minutes and now today no matter how many adjustments we made the printer still wouldn't make a good print. After hours of aggravation me and Cham were both equally frustrated, I decided lunch was a good idea, even though it was a bit early if me and Cham had stayed any longer it wouldn't have been pretty. After returning From lunch i made one last adjustment to the probe that detects the metal plate and of course the next print was spot on. We decided the first usable thing that we make with the printer should be the fan shroud, a cover for the fan that was suggested to be something to make after finishing the Printbot. The piece came out perfectly on our first attempt. Below are some pictures from the Fan cover being made. Even after hours of aggravation the day still ended on a good note, after I tested some of the supplements that I take from GNC.
Not every day is great to be a scientist, sometimes there are walls that seem miles high. But I guess you just need to keep climbing. This happened to me and Cham when we moved the printrbot from one location to another and Cham needed to reinstall all the programs onto this new computer. That was a minor setback, nothing to bad. The next challenge that stopped us is how on the previous day we got the printer to work in less than fifteen minutes and now today no matter how many adjustments we made the printer still wouldn't make a good print. After hours of aggravation me and Cham were both equally frustrated, I decided lunch was a good idea, even though it was a bit early if me and Cham had stayed any longer it wouldn't have been pretty. After returning From lunch i made one last adjustment to the probe that detects the metal plate and of course the next print was spot on. We decided the first usable thing that we make with the printer should be the fan shroud, a cover for the fan that was suggested to be something to make after finishing the Printbot. The piece came out perfectly on our first attempt. Below are some pictures from the Fan cover being made. Even after hours of aggravation the day still ended on a good note, after I tested some of the supplements that I take from GNC.
| The beginning of the Fan hood |
| The printbot finishing the Fan hood |
Subscribe to:
Comments (Atom)







