EP1000
Digital Fabrication & Prototyping Fundamental
OVERVIEW

In this module i learnt how to use Digital Fabrication techniques in designing and creating prototypes. During the process i have also learnt how to document and publish my work continously and this can be found under the Assignments tab. I used Computer Aided Design techniques, 3D printing and laser cutting methods to develop my prototypes and complete my assignments.

ABOUT ME

Hello, my name is Razin Fahmi and I'm currently in my final year in Singapore Polytechnic studying under the Diploma of Mechanical Engineering. My current class is DME/FT/3A/01 and I'm specilising in Aerospace Engineering.

Email: razinfahmi12.19@ichat.sp.edu.sg

Telegram: @fahmibinhaizad

I've been leaning more towards the fabrication and manufacturing side of engineering, thus making me choose this elective module. Through EP1000, I was able to learn the basics of fabrication and prototyping through ways such as laser cutting, and hopefully, I can proudly apply these softskills in the future. I hope that through these efforts, I can widen my skillset and be a better Engineer.

ASSIGNMENTS
FINAL PROJECT
Final Project Idea

As I was searching for ideas online on the things I can do for my final project, I came across a table lamp that looks like it was levitating. This caught my attention especially due to its intriguing light that was used to amplify its 'levitating' idea.



Instead of having the spherical object to be placed at the top, I wanted it to function such that when something is placed on the top platform, the colour changes. When thought thoroughly, I tought it was best for its purpose to be a phone holder when the phone is charging. The light will then change to red colour to indicate that the phone is charging, and stay red even if it is fully charged. To change the colours, I just have to remove the phone from the top platform.

For it to function, I decided to use a HC-SR04 Ultrasonic Distance Sensor for the sensor, and Neopixels for the actuators. It will work by activating the Neopixels to red in colour when the measured distance is lesser than 60mm. When the measured distance is more than 60mm, the Neopixels will be in in rainbowish colours, indicating nothing is on the top platform. The HC-SR04 Ultrasonic Distance Sensor would be orientated facing upwards on the top platform. The top platform was made with two holes to allow the HC-SR04 to work well and not disrupt the phone's placement on the top platform. I also wanted to implement a button which changes the colour between rainbow, blue, green and yellow when the measured distance is more than 60mm. On this note, the colour red for when the measured distance is lesser than 60mm will not be affected by the press of the button.

Bill of Materials

This is the list of materials I would need to make this project.



Designing

Using Fusion 360, I digitally made my own model design for the final project. I wanted to have the top platform to be bigger than the bottom part of the built, so I kept that in mind. For my first attempt, this was how it turned out.







From the first 3D model that I made, I found it to be too big and some parts are irrelevant, and changes could be done to make my final project better. After some fine tuning, I ended up with the following 3D model for printing.






Fusion 360 Moody Lamp 3D Model (f3d file)

With most of the built being made from the 5mm thick wood, the support for the top platform (blue in colour in the photos above), was 3D printed with the help of the Ultimaker 2+.





Fusion 360 Support 3D Printing Model (f3d file)

Printing

After designing, the models were converted into dxf files and stl files to be sent for laser cutting and 3D printing respectively. Following was how the final cut and 3D print turned out.



Fusion 360 Top Platform (dxf file)

Fusion 360 Top Cover (dxf file)

Fusion 360 Bottom Cover (dxf file)

Fusion 360 Left and Right Walls (dxf file)

Fusion 360 Front and Back Walls (dxf file)

Fusion 360 Leg Stands (dxf file)

With the help of hot glue and four M5 x 12 screw and nuts, the wooden pieces and printed support were then assembled together. Holes were also drilled onto one of the sides of the wooden pieces to allow way for the cable and the button to access the electronics inside.






Electronics

As mentioned before, I would be using the HC-SR04 Ultrasonic Distance Sensor, Neopixel and toggle button to help make this project work. This was all readily available in SP FabLab for students to use.





With reference to my online research, I was able to come up with the following Arduino code which was able to make the electronics chosen to work well together.

//**Project Distance**//
//**Objectives:**//
//**1.Use Ultrasonic Sensor to Detect Distance**//
//**2.If Obstacle is within 60mm,Turn NeoPixel Strip Red**//
//**3.If Obstacle is more than 60mm, Activate Rainbow. Upon Button Press Change to individual color**//

//**Include Adafruit NeoPixel Library**//
#include Adafruit_NeoPixel.h

//**Define Trig and Echo Pins**//
#define echoPin 2
#define trigPin 4
#define PushButton 6

//**Define Led Pin and Number of NeoPixels**//
#define LED_PIN 7
#define LED_COUNT 8

//**Define Variables for distance and duration for Ultrasonic**//
long duration;
int distance;

//**Define Button State**//
int ButtonState;


//**Declare our NeoPixel strip object**//
Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);

void setup() {
//**Initialize Serial Monitor at a baud rate of 9600**//
Serial.begin(9600);
//**Initialize NeoPixel strip object**//
strip.begin();
//**Turn OFF All Pixels**//
strip.show();
//**Set Brightness to 50 due to Low Current**//
strip.setBrightness(200);
//**Declare Push Button as Input**//
pinMode(PushButton,INPUT_PULLUP);
}

void loop() {
//**Call CheckPath to get Ultrasonic Sensor Reading**//
CheckPath();
}

void CheckPath() {
//**Clears the trigPin condition**//
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
//**Sets the trigPin HIGH (ACTIVE) for 10 microseconds**//
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
//**Reads the echoPin, returns the sound wave travel time in microseconds**//
duration = pulseIn(echoPin, HIGH);
//**Calculating the distance**//
//**Speed of sound wave divided by 2(back&forth)**//
distance = duration * 0.034 / 2;
//**Displays the distance on the Serial Monitor**//
Serial.print("Distance: ");
Serial.print(distance);
Serial.println(" cm");
//**If Distance is Less than equal to 2 turn neopixel red**//
if (distance <= 6) {
RedWarning();
}
if (distance > 6){
RainbowEffect();
}
}

void RedWarning(){
//**Set ButtonState to 0**//
ButtonState = 0;
//**RGB(255,0,0) is RED**//
colorWipe(strip.Color(255, 0, 0), 0);
}

void RainbowEffect(){
//**Check For Button Pushes and Set Appropriate Color according to ButtonState**//
//**Break out of the loop if button is Pressed**//
Serial.print(ButtonState);
if(digitalRead(PushButton)==LOW && ButtonState==3){
//RainbowEffect();
ButtonState = 0;
delay(500);
}
if(digitalRead(PushButton)==LOW && ButtonState==2){
ShowYellow();
delay(2000);
ButtonState = ButtonState + 1;
}
if(digitalRead(PushButton)==LOW && ButtonState==1){
ShowGreen();
delay(2000);
ButtonState = ButtonState + 1;
}
if(digitalRead(PushButton)==LOW && ButtonState==0){
ShowBlue();
delay(2000);
ButtonState = ButtonState + 1;
}
if(ButtonState == 0){
for(long firstPixelHue = 0; firstPixelHue < 5*65536; firstPixelHue += 256) {
for(int i=0; i strip.numPixels(); i++) {
int pixelHue = firstPixelHue + (i * 65536L / strip.numPixels());
strip.setPixelColor(i, strip.gamma32(strip.ColorHSV(pixelHue)));
}
strip.show();
delay(1);
}
}
}

void colorWipe(uint32_t color, int wait) {
//**Set Color of Each Pixel with assigned delay**//
for(int i=0; i strip.numPixels(); i++) {
strip.setPixelColor(i, color);
strip.show();
delay(wait);
}
}

void ShowGreen(){
//**RGB(0,255,0) is Green**//
colorWipe(strip.Color(0, 255, 0), 0);
}

void ShowBlue(){
//**RGB(0,0,255) is Blue**//
colorWipe(strip.Color(0, 0, 255), 0);
}

void ShowYellow(){
//**RGB(255,255,0) is Yellow**//
colorWipe(strip.Color(255, 255, 0), 0);
}

Arduino Moody Lamp Distance Sensor Code (ino file)

With all the wirings plugged into the respective ports, this was how it looked like.


Results

1- Minute Video



Presentation Slide



Ownership Card



In all, it was an enjoyable and fulfilling experience for my first Digital Fabrication and Prototyping project, especially since it works as intended. Despite the problems faced completing the project, it was very achievable until the very end. Given another opportunity to redo my workpiece into a better one, I am sure to improve it in ways such as enlarging the space to store the wirings, or reducing the stand heights to make the object smaller, or many more.

Special thanks to Mr Rodney for his patience and guidance throughout the entire 20 weeks of learning something brand new and useful to me for my engineering journey.