Introduction: Spinningball (fablab) and Stuff That You Need

We got a school project to make something. I wanted to make a ball that was spinning with light inside. I made a drawing in tinkercad. I used a 3d printer to print it out.


Stuff that you need:

Wood for the lasercutter. (and a lasercutter)
A 3D printer.

A motor ( I used a stepper motor so you need an arduino too and a special chip for it.)

And some wires.

Step 1: Electronic Circuit

This is how I made the electronic circuit. I used a steppermotor (this is what I used for my steppermotor https://www.instructables.com/id/BYJ48-Stepper-Moto...). You can use every motor you like, if it's strong enough.

The circuit I got it from https://www.instructables.com/id/BYJ48-Stepper-Moto... so check this page.
And the code I got it from him too.

Here is the code: (I uploaded the file too here it's called met_led.ino but in that one you can use pin 7 for a LED.)
/*

BYJ48 Stepper motor code Connect : IN1 >> D8 IN2 >> D9 IN3 >> D10 IN4 >> D11 VCC ... 5V Prefer to use external 5V Source Gnd written By :Mohannad Rawashdeh https://www.instructables.com/member/Mohannad+Rawashdeh/ 28/9/2013 */

#define IN1 8 #define IN2 9 #define IN3 10 #define IN4 11 int Steps = 0; boolean Direction = true;// gre unsigned long last_time; unsigned long currentMillis ; int steps_left=4095; long time; void setup() { Serial.begin(115200); pinMode(IN1, OUTPUT); pinMode(IN2, OUTPUT); pinMode(IN3, OUTPUT); pinMode(IN4, OUTPUT); // delay(1000);

} void loop() { while(steps_left>0){ currentMillis = micros(); if(currentMillis-last_time>=1000){ stepper(1); time=time+micros()-last_time; last_time=micros(); steps_left--; } } Serial.println(time); Serial.println("Wait...!"); delay(2000); Direction=!Direction; steps_left=4095; }

void stepper(int xw){ for (int x=0;x7){Steps=0;} if(Steps<0){Steps=7; } }

Step 2: The Ball

I just 3D printed a small ball with a flat bottom.

Step 3: The Case

I used a lasercutter to cut out the case (used this site http://www.makercase.com). It was easy to use you can make the case how you liked, but pat a hole in the top and have enough space inside. I have als a hole on the side for the adapter in my arduino. I didn't glued one side so I can put the hardware in it and change it later. I uploaded a picture how it should look like and one with a hole the holes are 12.7 mm in diameter. I prefer the one with holes so you don't have to make the holes by yourself.

Step 4: Final Step

Put everything inside the motor in the top hol. You can change it how you like it. You can put lights in it you don't have to use a ball as top you can use a plate to put everything on it what you want. I have some lights inside it so I can see when it's on.

EDIT: I added a cardboard plate instead of glueing the ball on the motor, so I can switch between objects.