PROJECT DEVELOPMENT
PROJECT DEVELOPMENT
What tasks have been completed, and what tasks remain?
What has worked? what hasn't?
ASSIGNMENT :
What questions need to be resolved?
What will happen when?
I have scheduled my work as below :
What have you learned?
My final project development progression
ELECTRONICS DESIGN AND PRODUCTION
PROGRAMMING OF BOARD
int m1 = 4;
int m2 = 3;
int h1 = 7;
int h2 = 6;
int h3 = 5;
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
#include "thermistor.h"
#include "HardwareSerial.h"
// Analog pin used to read the NTC
#define NTC_PIN A0
// Thermistor object
THERMISTOR thermistor(NTC_PIN, // Analog pin
10000, // Nominal resistance at 25 ºC
3950, // thermistor's beta coefficient
10000); // Value of the series resistor
// Global temperature reading
uint16_t temp;
void setup()
{
Serial.begin(9600);
mySerial.begin(9600);
for(int i=3;i<8;i++)
{
pinMode(i, OUTPUT);
}
}
void loop()
{
digitalWrite(4,HIGH);
digitalWrite(3,LOW);
digitalWrite(h1,HIGH);
digitalWrite(h2,HIGH);
digitalWrite(h3,HIGH);
temp = thermistor.read(); // Read temperature
Serial.print("Temp in 1/10 ºC : ");
Serial.println(temp);
mySerial.print("Temp in 1/10 ºC : ");
mySerial.println(temp);
//delay(5000);
}
#include <PID_v1.h>
#include "thermistor.h"
#include "HardwareSerial.h"
// Analog output pin
#define outputPin 5
#define outputPin2 6
// Motor pin
#define m1 3
#define m2 4
// thermistor analog pin
//#define THERMISTORPIN A0
#define NTC_PIN A0
THERMISTOR thermistor(NTC_PIN, // Analog pin
10000, // Nominal resistance at 25 ºC
3950, // thermistor's beta coefficient
10000); // Value of the series resistor
// Global temperature reading
uint16_t temp;
// how many samples to take and average
#define NUMSAMPLES 5
// how long between pid/sampling
#define SAMPLETIME 1000
//Define Variables we'll be connecting to
double Setpoint, currentTemp, Output;
//Specify the links and initial tuning parameters
PID myPID(¤tTemp, &Output, &Setpoint,15,.3,0, DIRECT);
void setup()
{
Serial.begin(9600);
analogReference(EXTERNAL);
pinMode(outputPin, OUTPUT);
pinMode(outputPin2, OUTPUT);
pinMode(m1, OUTPUT);
pinMode(m1, OUTPUT);
//initialize PID setpoint *C
Setpoint = 190;
//turn the PID on
myPID.SetMode(AUTOMATIC);
myPID.SetSampleTime(SAMPLETIME);
//pid Autotuner
}
void loop()
{
digitalWrite(m1,HIGH);
digitalWrite(m2,LOW);
if (Serial.available() > 0)
{
// get incoming byte:
Setpoint = Serial.parseFloat();
}
uint8_t i;
double average = 0;
// take N samples in a row, with a slight delay
for (i = 0; i < NUMSAMPLES; i++)
{
temp = thermistor.read();
average += temp;
delay(10);
}
average /= NUMSAMPLES;
currentTemp=resistanceToC(inputToResistance(average));
myPID.Compute();
analogWrite(outputPin, Output);
analogWrite(outputPin2, Output);
Serial.print("Set Point: ");
Serial.print(Setpoint);
Serial.println(" *C)");
Serial.print("Temperature: ");
Serial.print(currentTemp);
Serial.println(" *C)");
Serial.print("PID output ");
Serial.println(Output);
delay(SAMPLETIME);
}
double inputToResistance(double input) {
// funtion to convert the input value to resistance
// the value of the 'other' resistor
double SERIESRESISTOR = 10000;
input = 1023 / input - 1;
return SERIESRESISTOR / input;
}
double resistanceToC(double resistance) {
// funtion to convert resistance to c
// temp/resistance for nominal
double THERMISTORNOMINAL = 118000;
double TEMPERATURENOMINAL = 25;
// beta coefficent
double BCOEFFICIENT = 3950;
double steinhart;
steinhart = resistance / THERMISTORNOMINAL; // (R/Ro)
steinhart = log(steinhart); // ln(R/Ro)
steinhart /= BCOEFFICIENT; // 1/B * ln(R/Ro)
steinhart += 1.0 / (TEMPERATURENOMINAL + 273.15); // + (1/To)
steinhart = 1.0 / steinhart; // Invert
steinhart -= 273.15; // convert to C
return steinhart;
}
Structure parts CAD design and Fabrication
3D Printing of pipe clamp
Design & Fabrication of motor mount
Design of heater and nozzle element & Aluminum casting
Laser cutting casing 2D CAD design
3D CAD design of complete final project
Assembly and Integration
Material feeding test before final run
Fila X extrusion test
Observation and future scope
Observation and future scope
Go to Final Project page
Go to Weekly work page
2018 | Tanvir Khorajiya