Introduction: 3D Printed Motorized Dalek

Picture of 3D Printed Motorized Dalek

Hi guys, in this instructables i will show you how to create a 3D printed motorized dalek with cheap and simple electronics.

First of all, i have to say that the 3D file that i use are not mine. They were designed by Audrey2 on thingiverse. Aaaannd an instructable already exist on how to print and assemble this design ( it can be found here and i recommand to read it). Why this instructable you will ask? 'Cause i added some motors to make it move,to make its head rotate and some lights. So if you are interested and ready. Allons-y.

CAUTION i try to take some pictures during the whole process but it won't be a fully step-by-step tutorial

Tools required:

-3D Printer or via shapeways (but more expensive)

- Double faced foam tape

-Sand Paper

-A spray of primer

-Paint (acrylic or spray you choose)

-Arduino uno or clone

-Jumper wires

-1 cheap servo like this

-2 DC motor with rubber wheels like this

-1 switch

- IR remote and its sensor like this

-9V battery

The link i provided are just exemples, i think the best way to do it is by grabbing stuff you already have in order to make it cheaper.

Step 1: Print Everything!

Picture of Print Everything!

The 3D files can be found on thingiverse and again thanks to Audrey2 who did an amazing job!

All the files should be printed at 150% scale except the ones i modified in order to make it easier to add electronics inside. These ones can be printed at their original scale.

Here are the files that you should print and will replace respectively.

Be careful the light file should be printed two times and they are really fragile.

Also the weapons are not originally provided so i add some in the file.

I recommand to not start painting until you test everything fit properly.

Step 2: Electronics : the Dome

Picture of Electronics : the Dome

Here we start the tricky part.

I'm quite new to electronics so if you are like me i recommand to test the components with some basics examples from arduino librairies in order to fully understand what you are doing and to no destroy anything.

So for the dome it's really basic you just need to glue the servo fixation in the center of the dome.

Then with the example provided by arduino (servo/sweep) test if you are happy with the rotation.

Here go for the led. They are just basic 5mm led with 220 ohm resistors that fit (nearly) in the head's holes. Add some glue to secure everything and you can also glue the "lights" on the head.

In order to fix the servo body i've print a square that fit in the hole of the neck and i drilled inside to make the servo slide into it. Then i secured it with hot glue.

Note: be careful with the LED the ground wire will go on the pin and the positive one will receive the power (basic rule to protect the arduino)

Here is the code of the definitive version of the robot.

#include
#include // moteur 1 int in1 = 13; int in2 = 8; int enA = 6; // moteur 2 int in3 = 7; int in4 = 2; int enB = 5; // RECEVEUR IR int RECV_PIN = 11; IRrecv irrecv(RECV_PIN); decode_results results;

Servo myservo; // create servo object to control a servo int pos = 0; // variable to store the servo position //LED int led1 = 3; int led2 = 12; int a = 0;

void setup() { pinMode (enA, OUTPUT); pinMode (enB, OUTPUT); pinMode (in1, OUTPUT); pinMode (in2, OUTPUT); pinMode (in3, OUTPUT); pinMode (in4, OUTPUT); Serial.begin(9600); irrecv.enableIRIn(); // Start the receiver myservo.attach(9); // attaches the servo on pin 9 to the servo object

}

void forward() { //function to go forward //initialization of left motor with speed of 200 on 255 digitalWrite(in1, HIGH); digitalWrite(in2,LOW); analogWrite(enA,200); //initialization of right motor with speed of 200 on 255 digitalWrite(in3, HIGH); digitalWrite(in4,LOW); analogWrite(enB,200); }

void back() { //function to go backward //initialization of left motor with speed of 200 on 255 digitalWrite(in1, LOW); digitalWrite(in2,HIGH); analogWrite(enA,200); //initialization of right motor with speed of 200 on 255 digitalWrite(in3, LOW); digitalWrite(in4,HIGH); analogWrite(enB,200); }

void right() { //function to go right //STOP the right motor digitalWrite(in1, LOW); digitalWrite(in2,LOW); //initialization of right motor with speed of 200 on 255 digitalWrite(in3, HIGH); digitalWrite(in4,LOW); analogWrite(enB,200); }

void left() { //function to go left //initialization of left motor with speed of 200 on 255 digitalWrite(in1, HIGH); digitalWrite(in2,LOW); analogWrite(enA,200); //STOP the right motor digitalWrite(in3, LOW); digitalWrite(in4,LOW);

} void arret() { //function to stop both motors //STOP left motor digitalWrite(in1, LOW); digitalWrite(in2,LOW);

//STOP right motor digitalWrite(in3, LOW); digitalWrite(in4,LOW);

}

void ledon() { pinMode (led1, OUTPUT); pinMode (led2, OUTPUT); digitalWrite(led1, LOW); // turn the LED on (HIGH is the voltage level) digitalWrite (led2, LOW); } void ledoff() { pinMode (led1, OUTPUT); pinMode (led2, OUTPUT); digitalWrite(led1, HIGH); digitalWrite(led2, HIGH);// turn the LED off by making the voltage LOW }

void servo() { for (pos = 0; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees // in steps of 1 degree myservo.write(pos); // tell servo to go to position in variable 'pos' delay(15); // waits 15ms for the servo to reach the position } for (pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees myservo.write(pos); // tell servo to go to position in variable 'pos' delay(15); // waits 15ms for the servo to reach the position } }

void loop() { if (irrecv.decode(&results)) { Serial.println(results.value, HEX); irrecv.resume(); // Receive the next value }

if(results.value==0xFFA25D) { forward(); } if(results.value==0xFF629D) { back(); } if(results.value==0xFFE21D) { left(); } if(results.value==0xFF22DD) { right(); } //bot stops if(results.value==0xFF02FD) { arret(); } if(results.value==0xFFE01F) { servo(); } if(results.value==0xFFA857) { ledon(); } if(results.value==0xFF906F) { ledoff(); }

}

Step 3: Electronics: the Motors and IR

As you can see on the picture you have to cut some of plastic in order to make it fit in the base. Once it done i temporary attach both motor with double side foam tape and hot glued them on the print. Be sure to make the wheels touch the ground but not to much to leave the base close to the ground.

Then connect the cable on the motor controller (here a L298N) you have an excellent tutorial that explain how you should wire it here.

At this step i think it's a good time to test your IR sensor and remote. I assume that you already know the mapping of your remote. If not, i recommend this instructable where you can find a guide to fully understand the IR rules and learn how to control things with infra-red.

Upload the code in the instructable and test it. If your motors turn well done if not check your wires, your arduino and open the serial monitor on the arduino software to see if the signal you send with your remote correspond to the one in the code you uploaded.

Step 4: Electronics: Wiring

Picture of Electronics: Wiring

Now everything is in place let's get ready for the wiring and testing the code *tension increasing*.

You have the whole details of which cables is supposed to go on the arduino in the "setup" part in the code

Add the switch and a 9v battery to easy turn on/off your robot ( i glued my switch in the base )

* The code works fine for me but sometimes the head won't stop so you just need to turn off the arduino and to back on ( i'm currently working on this problem, if you have suggestions... :D )

IMPORTANT: This project use the library of servo and IRremote so some pins are deactivated or specially devoted to some components so be sure to respect the pins labelling

Step 5: Assembly

You can know sand your print ( i use sand paper with 80 grain then 400), prime them ( 2 ou 3 coats depending of the quality of your print) and paint them in the color you want. (I use a bronze acrylic paint for the body and gold for the shinny parts). Be sure to follow the instrucable for the whole assembly if you need help.

Before glue everything i again use some double faced foam tape to fix the big parts together.

You have to drill a small hole in the back of your new awesome robot to make the IR sensor accesible.

Once everything is in place, cross your fingers and Tadaaaaa

Comments

Voltrex085 (author)2017-06-19

How long did it take for you to make this? Also what instructable did you use to make the "wheel buggy" part of this project?

Glo0my (author)Voltrex0852017-06-21

Hi ! It's hard to say how long it takes me to build it because i had to failure during the design and the electronic programmation. But i would say, 20h of print, 2h of post processing, 10h for the electronic and the assembly. For the "wheel buggy" part i follow the instructable cited in the tutorial for the "code" part that's all after it's handmade ^^

Voltrex085 (author)Glo0my2017-06-26

Thanks and sorry I probably don't understand what you said, but how do I build the robot part. I couldn't find a description of it in any of the tutorials. could you link it in your reply?

Glo0my (author)Voltrex0852017-06-28

And also i have issues to understand what you ask.

For the electronic part : if you want to control the motor for the base you have to follow the step 2. How to wire everything is explained in the tutorial linked in the step ( https://www.instructables.com/id/Control-DC-and-stepper-motors-with-L298N-Dual-Moto/). If you want to make them remotable with IR you have to continue with the step 2 and follow the instructable : https://www.instructables.com/id/Arduino-Infrared-Remote-tutorial/. To know which wire is connected to which pin of the arduino everything is explained in the code core. Code part i notice while writing this answer that is no longer visible on the instructable ( i will change it !). Then for the dome, which involved servo control everything is again explained in step 3. I think it will be easier with the code that i will add (again) in this instructable. Hope it will help

natfoo (author)2017-02-05

pretty cool

Glo0my (author)natfoo2017-02-05

Thanks it was a real pleasure to built it. And the 3D files created by Audrey2 are amazing!

About This Instructable

1,409views

34favorites

License:

More by Glo0my:3D Printed Motorized DalekWooden stormtrooper head
Add instructable to: