Jurassic Park Gate Remote Control
by Fay3dlab in Workshop > 3D Printing
6358 Views, 56 Favorites, 0 Comments
Jurassic Park Gate Remote Control
Since my nephew who is 7 is a dinosaur enthusiast and toy collector.. I've always wanted to make for him the jurassic park original gate to add onto his dinosaur toy collection. And the gate has to be size accurate to the Jurassic World mattel toyline.. The unpainted dinosaur is from Jurassic World Thrash 'N Devour Tyrannosaurus Rex Figure.
But i thought just an ordinary gate was not suffice.. it needs something that will make it standout in with his dinosaur toy collections. So i designed the jurassic park gate to include LED lights as the fire torches on the tower gates and make it open and close using an app. Everything will be powered by a powerbank and rechargable for mobility so my nephew could bring the gate to wherever in the house.
I'll be using the NodeMCU ESP8266 to connect to the internet and the gate will be controlled by the blynk app on a smartphone. You'll need a wifi for the microcontroller to connect and talk to the blynk web and app
Difficulty level:
- 3D printing - Easy
- Assembly - Easy (we'll be using hot glue gun.. need to be careful of hot silicone glue)
- Wiring - Intermediate (wiring the microcontroller to the servo will take a lot of steps)
- Programming - Intermediate (Arduino IDE)
- Painting - Easy
So let's get started..
Supplies
- LED x 8 (flickering LED is also an option)
- 100Ohm resistor
- Lithium battery 18650 3.7v x 2
- Lithium battery 18650 2 cell holder
- Lithium Battery Capacity Indicator Module
- BMS Li-ion 2S Protection Board 8.4V
- DC 8.4V 1A Charger
- DC female hack terminal adapter
- LM2596 DC-DC Step-down Buck Converter
- Wires - AWG24
- Wires - AWG18
- Rocker switch 2pins - 15x10mm
- M3 screw - 12mm and 25mm
- M3 brass threaded inserts
- Soldering iron (to connect the LED & PCB to the wires)
- Silicone glue & glue gun
- NodeMCU ESP8266 microcontroller
- MicroUSB DATA cable - do not use HP charge cable
- MG955 servo x 2
- Dupont connectors
- Popsicle sticks wooden - 18mm x 150mm & 10mm x 114mm
And of course a FDM 3d printer and DLP Resin 3d printer to print all the parts..
Designing Everything With Tinkercad
The whole gate is 3d modelled using Tinkercad.. since nearly all the electronics also is available in tinkercad.. it made designing the electronic positioning easier..
https://www.tinkercad.com/things/lIWYr2Dql8Q
All the 3d printed files can be found below:
Programming - BLYNK Web
In order to control the jurassic park gate with your smartphone.. we will need to signup and register with blynk website.
Once you've registered.. go to templates and create new template.. the free version of blynk will allow you to create and connect to 2 devices for free to use.
- create a template
- in info the most important part is the firmware configuration.. we'll need it so that the microcontroller will connect to blynk web
- add an icon if you like to customize the blynk device
- go to datastream and create a datastream with virtual pin
- name the virtual pin and select V0 as controller of the pin
- go to web dashboard and drag switch to the grid box - this will create a button to control the gate
- click on the gear icon to modify its settings
- name the button and add datastream V0 to control the pin
- show label in order to label the button open and close gate
- next go to the search icon and create a new device
- select from template and add a name for the device
- once its created you will see the dashboard to control your gate..
- go to device info and you'll see the firmware configuration that is specifically made for you to control from the blynk web and app..
Programming - Arduino NodeMCU
In order to control the gate opening and closing.. we will need to program it into the NodeMCU microcontroller. Here's a few things you'll need to download to get started:
- Arduino IDE - the program we'll use to code the microcontroller
- CP210x USB to UART driver - this is so your computer can communite with the NodeMCU microcontroller with USB
- Install ESP8266 boards manager or add this link to in preference
- Once you install the arduino IDE.. you'll need to install ESP8266 boards in order for us to access and upload firmware into the microcontroller. Watch the video for easier understanding on how to install the Arduino IDE and the boards manager.
- Next we will need to install blynk library in order to link the microcontroller to the blynk app.
- You will also need to install servo library for the servo controls.
- Once you've install all the necessary libraries.. you will open an example file on Files>Examples>Blynk>Blynk.Edgent>Edgent_ESP8266
- Replace the blynk template ID and Device name to your firmware configuration from the blynk web
- Save the file and rename it.
- Now we will upload the arduino code to the NodeMCU microcontroller
- what we're doing is creating a basic "OS" on the nodeMCU microcontroller so we add all the setting on it without coding too much.
Programming - Blynk App
now we will be installing the blynk app onto your smartphone.. you'll need your wifi ssid and password ready for this
- Download Blynk IoT on your smartphone.. make sure its not Blynk Legecy.. thats the old version.. we want the new version Blynk IoT
- open the app and you will see your jurassic park gate and icon if you add it
- select your template and click on the 3 dots to open its setting
- click on the 3 dots again and select reconfigure
- choose to continue and it will search for all microcontroller in your area
- you'll find the blynk jurassic park gate microcontroller wifi
- connect to the device
- and setup your wifi network ssid and password.. this data will be imbedded into the nodeMCU microcontroller and it will connect to your wifi whenever it is powered on
- continue and the microcontroller will connect directly to your wifi.. it should say device connected
- now go back to the main page where your jurassic park gate template is and select the wrench icon
- this will link you to the developer mode
- select your template
- click on the + sign and add a button
- click on the button and add a name for the button
- select datastream gate control V0
- turn on overide high/low
- select switch mode and add in the label just like on the blynk web
- and go back to the main template in order for you to control the gate
Programming - Arduino Gate Code
- now that we have connected the nodeMCU to your wifi, blynk web and blynk app.. we'll need to send the proper code to control the gate opening and closing.
- open your file that we saved earlier to install the "OS" onto the nodeMCU
- replace the whole code in the file with the one below
// Fill-in information from your Blynk Template here #define BLYNK_TEMPLATE_ID "TMPLRqGVnVj5" #define BLYNK_DEVICE_NAME "jurassic park gates" #define BLYNK_FIRMWARE_VERSION "0.1.0" #define BLYNK_PRINT Serial #define APP_DEBUG #include "BlynkEdgent.h" #include<Servo.h> Servo servo1;// this is left gate Servo servo2;// this is right gate BLYNK_WRITE(V0) { int x = param.asInt();// this is left gate if(x == LOW) { servo1.write(120); } else { servo1.write(30); } int y = param.asInt();// this is right gate if(y == LOW) { servo2.write(1); delay(100); } else { servo2.write(100); delay(100); } } void setup() { Serial.begin(115200); servo1.write(130); servo1.attach(D4,700,2300);// this is left gate servo2.write(1); servo2.attach(D7,700,2300);// this is right gate BlynkEdgent.begin(); } void loop() { BlynkEdgent.run(); }
- dont forget to replace the ID and device name to your own that can be found on device info in blynk web
- now here's the tricky part.. you will need to modify the x and y degrees value depending on your servo motor positioning
- currently i added x starting at 0 degrees when close and goes to 100 degrees when open and y is at 125 degrees close and 20 degrees when open
- you will need to adjust the degrees of both gate depending on the position of the gears you attach to the gate
- we will need to do the modification once we assemble the gate itself
- you need to adjust the degrees every 5 degrees until you get the gate to close on both side
- just remember that right gate is the reverse of the left gate..
Downloads
Wiring NodeMCU
The battery pack uses 2 lithium 18650 batteries in serial. the BMS charger needs 3 wire to connect to the battery pack. one on +ve, one on -ve and one in between the 2 batteries. have a look at the diagram pictures.
the BMS wires are connected to the DC female jack terminal adapter and the other to the rocker switch.
the rocker switch wire is connected to a terminal block that splits to:
- LEDs of each gate tower - power the LED torch lights
- DC-DC step-down buck converter - power servo and microcontroller
- Lithium Battery Capacity Indicator Module - indicate the battery level
since im using dupont connector for all my electronics.. i design a simple PCB that wires all 4 LEDs parallel with a 100 ohm resistor from the 8v.
the PCD also connect the capacity indicater and wires to jump to the right tower where the step-down buck converter is
we set the step-down from 8v to 5v
the 5v is connected to the NodeMCU microcontroller and the 2 MG995 servos
the rigth tower also have the parallel PCB for the 4 LEDs with the 100 ohm resistor
Base on the wiring diagram.. you should have a basic understanding on how i made my PCB
test out the connections to see all the LEDs lights up and the microcontroller is able to connect to the Blynk app and move the servos
Assembly - LED Torches
I made the torch holder removable so that if one fo the LED blows it can be replace by simply removing it and replacing it with a new one. all 6 side holder are of same size and the 2 on top is also the same. so if one of the LED blows.. just throw it away and print a new holder and install the LED inside the holder.
The way we're going to make the flame for the LED is by using silicone glue. We will shape the hot silicone glue to look like fire with the LED inside.. you can see how i used silicone glue to make fire for my Balrog instructable to get the idea how to do it..
- First of we need to prep the LEDs to be inserted into the torch holder
- you'll need to measure the LED legs length to the whole on the holder
- cut it to length and solder a straight pin header male to the legs so we can connect it using dupont connectors
- once solder.. insert the LED into the torch holder and glue the header pin just at the edge of the hole
- for me i always put the anode +ve LED on the left side of the torch holder.. and just repeat it 8 times for each torch;;
- label -ve and +ve so you dont get it mix up when wiring
- test the LED with 3v power supply and fit it into the tower
- now we will add silicone glue to the LED to make the shape of a flame
- the flame should be around 20-25mm high
- repeat this for 7 more times with the other holder
Assembly - Tower Gate
For the tower gate we will need to install brass threaded inserts into each part of tower so we can screw together later on. you'll need to use a soldering iron to heat up the brass inserts and melt it into the hole.
Assembling the tower is quite simple except for the electronics inside the 2 base tower. you'll need some wiggle room to run through all the wires for the torches before assembling the towers.
Prep the wires and dupont connector for each torch hole.. to make easier use same color wires for torch LEDs and different color for servos and microcontroller.. so you wont get confuse when wiring
Wires length for LED torches:
- top above - 450mm
- top front - 400mm
- middle - 250mm
- base - 150mm
start joining the top and middle towers first and screw them together
for the right base tower.. you'll need to screw down the microcontroller and stepdown converter first.. make sure you wire and solder all the connection first before installing them..
for the left base tower.. install the lithium batteries on the side wall of the base.. this will give you a lot of room to install the other electronics.. install the female terminal connector and the rocker switch.. i'm using silicone glue to stick them..
before installing the servo.. make sure to screw the gear onto the servo first
Now we can screw the servos into the base tower and screw it tight using the M3 screws
channel all the LED wires through the base and start connecting all the wires to its 5v or 8v connections.
now we can install the center top to both side of the tower..
Carefully channel the wires through the hole in the center base and screw M3 6mm from the bottom to the tower bases.. you will need 5 wires through the center base hole.. make sure the wires are each 350mm long.. it'll give you room to play and position the wiring..
- +ve 5v servo
- -ve 5v servo
- data servo
- +ve 8v to stepdown converter
- -ve 8v to stepdown converte
once everything is screw down.. test out each LEDs and servos before closing everything up
Assembly - Gate
- Each side of the gate comes in 2 parts that need to be glued together and the gate gear screwed on with 6mm M3 screws.
- Prime paint your gate and ready to do some mini carpentry
- This is where the popsicles comes in.. we will be making the gate face using popsicle and arrange it to follow the design from the original jurassic park movie..
- before you start glueing the popsicle.. you might want to score the popsicle to make texture of wood grain. i used a flathead screwdriver to run scores vertically following the popsicle stick. this will give it a wood texture later when we paint it.
- i split the popsicle stick arrangement into 3 layers and you can look at the layout i made to follow
- the first layer is using the 10mm wide popsicle stick..
- the second and third layer uses the 18mm popsicle stick..
- use as much glue as possible. we dont want the popsicle to peel of the gate
- make sure you remember each arrangement of the popsicle and invert it on the other gate..
Gate Control Test
Now before we finalize everything on this gate.. we need to check on the angle of the gate opening since each servo screw on gear is slightly different.. we want to get the perfect close gate for both side to align to each other..
to do this we will have to modify the code.. we need to change the angle of the opening and closing of the servo to get the gates to align to each other..
- turn on the gates without installing the doors.. and open and close it using the blynk web or app..
- once you open the gate.. insert the 2 doors into its respected places
- use the app to close the gate and guest how much you need to add or subtract to the angles to get the doors to close perfectly
- use an increment of maybe 5 degrees each time for each door until you get it to close perfectly and seamless
- put a note on the each gate so you dont get confuse on which code controls which gate..
BLYNK_WRITE(V0) { int x = param.asInt();// this is left gate if(x == LOW) { servo1.write(120); <== close angle left gate } else { servo1.write(30); <== open angle left gate } int y = param.asInt();// this is right gate if(y == LOW) { servo2.write(1); <== close angle right gate delay(100); } else { servo2.write(100); <== open angle right gate delay(100); } } void setup() { Serial.begin(115200); servo1.write(130); <== default angle of left gate when turned on servo1.attach(D4,700,2300);// this is left gate servo2.write(1); <== default angle of right gate when turned on servo2.attach(D7,700,2300);// this is right gate BlynkEdgent.begin(); }
Conclusion
The jurassic park gate looks awesome when the torches lights up and it open and close remotely. The gate door looks great with textured look of wood grains.
Unfortunately i started this project late and currently writing this instructable on the last day of the deadline.. i didnt have time to paint the gates yet for this instructable.. even the t-rex hasnt been painted yet.. i'm gonna give it to my nephew as a set to match the gate and t-rex..
So here's some pros and cons i found out about the gate:
Pros
- remote control opening and closing the gate looks cool
- LED lights as torches
- controlling the gate using your smartphone
- can be play wirelessly without plugging it into a wall socket
Cons
- the gate control is locked onto a single WIFI network
- need to be connected to WIFI to work
- transfering ownership will be a hassle since you'll need to re-coding and linking to WIFI network
- gate hinge is fragile since its being controlled by the 2 servos only
In the future i might change the remote control from the smartphone app to another controller so it wont have WIFI restrictions and can be used anywhere.. and maybe make the jurassic world gate next..
Have fun making the project and happy 3d printing.