Final Project Journal
صندوق الدنيا
صندوق الدنيا
it shows a photos from diffirent countrais with a story being telled by a the man who carring the box
I care about the idea because i have an intereset oon heritage and how to tell people and educating them about it in an interactional way.
Using fusion 360 for 3d design and simulating the overall design and mounting of the component
Using cura for Preparing 3d files for 3d printing
Using RD Works for preparing 2.5 files for laser machine.
Start a sketch on the shaft of the motor.
Draw a circle 70 Diameter
in side it draw 2 circle one its diameter 5.5mm and the other one is 10mm
Extrude the bigger circle to 4mm hight.
Extrude the other 2 circles in the oppesit direction for 1mm.
On the surface of the coupler draw a for circles to make holes for the screw.
Extrude cut the four circles.
Draw a sketch on the top plane draw a rectangle its dimensions 10x60mm
in its sides draw two rectangales thier dimensions 10x3mm.
extrude the 2 small rectangales to 10mm.
extrude the bigger rectangle to 3mm.
Draw a sketch on the sides of the bracket draw a rectangle its dimention 3x10mm
Then extrude it for 15mm
Make 2 circles thier diameter 3.5mm
Extrude cut them for 3mm
Make 1mm fillet for the edges to make them smoother.
Make a sketch on the upper surface of the stepper then project the outline of the surface and offset two times for the clearance and thickness the first offset 1mm and the other one 3 mm.
project the middle circle
extraude the sketch for 3mm.
Extraude the sketch outline and the thikness for 20mm.
draw sketch on the lower edge to extraude it one more time.
Extrude the sides edges to the bottom of the stepper.
draw on it a rectangle 3mm hight.
Etrude it for 20mm
Draw two circles two be a holes foe the screw thier diameter 3.5mm.
then extrude cut them.
Draw the base 280x280mm
make an opens for t-slot.
Extrude it for 3mm
Add the stepper holder to project the screw holes.
Project the holes and extrude cut it.
Add the stepper and the coupler.
Start a new component and on the coupler surface start a new sketch draw a circle from the coupler center its diameter 260mm. in side the circle draw anthoer one its diameter 70mm and make circular pattern for it so it will be 5 circles.
Extrude it for 3mm.
on the right plane start new component and draw sketch draw a 280x48mm rectangle with a 4 t-slots and x-slot from the two sides.
The lower slots its hight will be 5mm instead of 3mm to act as legs for the box.
Extrude the side for 3mm.
Copy the last side 3 times but in 2 of them edit the x-slot to be fro the down.
Extrude it for 3mm.
Start new component and on the upper surface of the motor holder make a sketch the sketch will be as same as the base instead of the areas for screw holes of the stepper will project the holes of the upper motor holder surface.
Then extrude it for 3mm.
Add the arduino and on the base panel project screw holes areas.
Extrude cut it
on the side panel and in a place next to arduino and breadboard add the dc powe connector and project its inner outline to make a hole so it can lay on it.
Exxtrude cut to make ahole
Add the breadboard holders.
Project the holes areas and then extrude cut it.
Make joints between wooden parts
Design the cap so make a wood panel 280x280 mm. with a hole inside its diameter 70x70mm.
and make sides panels with x and t slots
Put the cap on the enclosuer to hide all the photos excpet a one photo.
Breadboard holder fabrication process
using cura for slicing and preparing files forr 3d printer.
Design using Fusion 360.
Fabrication on Prusa mk3.
Cura for slicing
parameters is:
layer hight 0.3
Support tree
infill 10%
Enclouser fabrication using
LaserCutting machine.
Rdworks for preparing files.
Fusion 360 for design.
3mm Ply wood.
Speed for cutting 40
Min Power 30
Max Power 35
Coupler and stepper holder fabrication
using prusa mk3
Cura for slicing
parameters is:
layer hight 0.3
Support tree
infill 10%
Electronic circuits consist of
Action component
Stepper motor: which rotate the turntable.
Neo Pixel led: to light inside the box.
Input component
Pushbutton: to control the stepper motor as each press will move the stepper to a position by controlling stepper numpers.
On-Off Switch: to on - off the neo pixel.
External power source from 12v adapter
The stepper rated voltage is 12 v
https://components101.com/motors/nema17-stepper-motor
this 12 v power the arduino throw vin pin and powering the motor throw the driver.
The Neo pixel and on-off switch code.
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
Libraries: The code begins by including the necessary libraries. Adafruit_NeoPixel.h library is used for controlling the NeoPixel ring.
#define PIN 6
#define NUMPIXELS 8
#define BUTTON_PIN 7
PIN: This defines the pin to which the NeoPixels are connected. In this case, it's pin 6.
NUMPIXELS: This specifies the number of NeoPixels in the ring. Adjust it according to your setup.
BUTTON_PIN: This defines the pin to which the push button is connected. It's pin 7
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
int delayval = 500;
void setup() {
pixels.begin(); // This initializes the NeoPixel library.
// Set button pin as input
pinMode(BUTTON_PIN, INPUT_PULLUP);
}
The setup() function initializes the NeoPixel library using pixels.begin().
It sets the BUTTON_PIN as an input with the internal pull-up resistor enabled, indicating that the button is connected to ground when pressed.
void loop() {
// Check if the button is pressed
if (digitalRead(BUTTON_PIN) == LOW) {
// Open the LEDs
for(int i=0; i<NUMPIXELS; i++) {
pixels.setPixelColor(i, pixels.Color(255,255,255)); // Moderately bright green color.
}
pixels.show(); // This sends the updated pixel color to the hardware.
}
else {
// Close the LEDs
pixels.clear(); // Turn off all LEDs
pixels.show(); // Update NeoPixel ring
}
}
The loop() function continuously runs and checks if the button connected to BUTTON_PIN is pressed.
If the button is pressed (logic LOW), it lights up all the NeoPixels in white.
If the button is not pressed (logic HIGH), it turns off all the NeoPixels.
The Stepper motor and pushbutton code.
#include <Stepper.h>
Libraries: The code includes the Stepper.h library, which provides functions to control a stepper motor.
int stepsPerRevolution=100; // stepping space
Stepper myStepper(stepsPerRevolution,2,4);
int motSpeed=100; // speed
int buttonPin = 5;
Global Variables:
stepsPerRevolution: This variable defines the number of steps required for one complete revolution of the stepper motor. In this case, it's set to 100.
motSpeed: This variable sets the speed of the stepper motor. It's set to 100 steps per second.
buttonPin: This variable specifies the pin to which the push button is connected. It's set to pin 5.
void setup() {
// Set the push button pin as input
pinMode(buttonPin, INPUT_PULLUP);
// Set the speed of the stepper motor
myStepper.setSpeed(100);
}
Setup Function:
The setup() function is called once when the Arduino starts.
It sets the buttonPin as an input with the internal pull-up resistor enabled. This configuration allows the Arduino to read the state of the push button, which is connected to ground when pressed.
The speed of the stepper motor is set using myStepper.setSpeed(motSpeed).
void loop() {
// Read the state of the push button
int buttonState = digitalRead(buttonPin);
// If the button is pressed (active low), move the stepper motor
if (buttonState == LOW) {
// Move the stepper motor one step clockwise
myStepper.step(500);
delay(5); // Delay for smoother movement (adjust as needed)
}
}
It reads the state of the push button using digitalRead(buttonPin). If the button is pressed (active low), meaning it's connected to ground, buttonState will be LOW.
When the button is pressed, the if statement checks if buttonState is LOW, indicating the button is pressed.
Inside the if block, the myStepper.step(500) function is called to move the stepper motor 500 steps clockwise. This value determines the number of steps the motor will move each time the button is pressed.
A small delay of 5 milliseconds (delay(5)) is added for smoother movement of the motor.
#include <Stepper.h>
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
// Which pin on the Arduino is connected to the NeoPixels?
// On a Trinket or Gemma we suggest changing this to 1
#define PIN 6
// How many NeoPixels are attached to the Arduino?
#define NUMPIXELS 8
// Pin for the push button
#define BUTTON_PIN 7
// When we setup the NeoPixel library, we tell it how many pixels, and which pin to use to send signals.
// Note that for older NeoPixel strips you might need to change the third parameter--see the strandtest
// example for more information on possible values.
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
int delayval = 500; // delay for half a second
int stepsPerRevolution = 100; // stepping space
Stepper myStepper(stepsPerRevolution, 2, 4);
int motSpeed = 100; // speed
int buttonPin = 5;
void setup() {
// Set the push button pin as input
pinMode(buttonPin, INPUT_PULLUP);
// Set the speed of the stepper motor
myStepper.setSpeed(100);
// This is for Trinket 5V 16MHz, you can remove these three lines if you are not using a Trinket
#if defined (__AVR_ATtiny85__)
if (F_CPU == 16000000) clock_prescale_set(clock_div_1);
#endif
// End of trinket special code
pixels.begin(); // This initializes the NeoPixel library.
// Set button pin as input
pinMode(BUTTON_PIN, INPUT_PULLUP);
}
void loop() {
// Read the state of the push button
int buttonState = digitalRead(buttonPin);
// If the button is pressed (active low), move the stepper motor
if (buttonState == LOW) {
// Move the stepper motor one step clockwise
myStepper.step(500);
}
// Check if the button is pressed
if (digitalRead(BUTTON_PIN) == LOW) {
// Open the LEDs
for(int i=0; i<NUMPIXELS; i++) {
pixels.setPixelColor(i, pixels.Color(255,255,255)); // Moderately bright green color.
}
pixels.show(); // This sends the updated pixel color to the hardware.
}
else {
// Close the LEDs
pixels.clear(); // Turn off all LEDs
pixels.show(); // Update NeoPixel ring
}
}
add the rosetta to breadboard.
connect the + to arduino vin and the - to the ground arduino pin.
connect Stepper 9v pin to the + of rosetta and GND to the - and 5v pin to arduino 5vpin.
connect step pin to pin 2 on arduino and direction pin to pin 4 on arduino.
connect the neo pixel vcc pin to arduino 5v pin .
connect theneo pixel GND pin to rosetta- .
connect neo pixel in pin to pin 6 on arduino.
connect the on-off switch to pin 7 on aduino and-of the rosetta.
add the rosetta to breadboard.
connect the + to arduino vin and the - to the ground arduino pin.
connect Stepper 9v pin to the + of rosetta and GND to the - and 5v pin to arduino 5vpin.
connect step pin to pin 2 on arduino and direction pin to pin 4 on arduino.
connect the neo pixel vcc pin to arduino 5v pin .
connect theneo pixel GND pin to rosetta- .
connect neo pixel in pin to pin 6 on arduino.
connect the on-off switch to pin 7 on aduino and-of the rosetta.
Hala helped my alot speacially in coding and wiring the component she make this step more easy to me.
also Mr. Wassiem share with me a video for how to wire a stepper motor also shared with me a code for Stepper.
The stepper motor on grab cad its dimensions are not same as the real one that is make the holder is small because i used the one on grab cad as a referance.
The base dimensions is bigger than the sheet so the slots were cutting.
The first coupler design was small so it wasn't able to be put on the motor shaft.
I designed a new one with bigger dimensions.
the motor is weak to hold and rotate the turntable it is function will when it dose not hold it.
I will add a speaker told the story.