Wi-Fi RC Cybertruck

by ВадимС3 in Workshop > 3D Printing

4672 Views, 47 Favorites, 0 Comments

Wi-Fi RC Cybertruck

365.jpg
photo_2022-11-13_13-45-43.jpg
photo_2022-11-13_13-45-40.jpg
photo_2022-11-13_13-45-50.jpg

If you're looking for a fun and accessible project to start learning Arduino, this easy-to-repeat WiFi-controlled toy robot is the perfect choice. This tiny robot doesn't require any motor drivers and is a great introduction to the world of electronics and coding. With its simple design and straightforward programming, this robot can be made by anyone, regardless of their experience level. Whether you're a seasoned maker or a curious beginner, this project is a fun and engaging way to explore the possibilities of Arduino and 3D printing. So, let's dive in and learn how to make your own WiFi-controlled robot toy.

Supplies

Wemos d1.jpg
TC4056A.jpg
1-1000x1000.jpg
7b3aeb8e-f049-443e-a4a5-5807c7f57cca.3e72869702e4fd8071f5a1535b890ad6.jpeg
71cJkfqxKrL.jpg
images.jpg


  • Wemos D1 mini


  • Type-CTP4056 Charging Module with Protection


  • 2x 9g servo (continuous rotation is preferred)


  • Switch


  • 650mAh battery


  • 10x M3 screws 25mm


  • Small magnet and a little piece of metal

Printing Parts

13.11.2022 17_17_34.jpg
22.jpg
photo_2022-11-14_20-45-38.jpg
image_2022-11-13_18-01-50.png
photo_2022-12-04_03-02-09.jpg

Step 1: 3D Printing the Parts

To build this WiFi-controlled toy robot, you will need to 3D print several parts using PLA plastic. I used grey and black PLA plastic for everything except the tracks, which require a flexible filament called TPU. Don't worry if you're new to using flexible filament like TPU – it's easy to work with and produces great results. You can print the black parts all at once, I named them with B# for convenience.

For the trunk insert and body, you will need to use supports, and I recommend using a layer height of 0.15 for best results. When printing the Wemos cover lid, I used a pause on height option in the slicer to allow for a colour change on the Tesla logo.

To ensure a good fit, I printed the bottom of the robot flat with a little slot on the back, then warmed the part a little bit and bent it to the shape of the robot's body. The trunk door has some space inside (see pic 3) for a piece of metal that will hold the door using a magnet inside the robot's body. I used a little nut for that.

Before printing, it's important to remember to mirror the small wheel support pieces and side windows. Once all the parts are printed, you're ready to move on to the next step.

Programming

image_2022-11-13_18-33-51.jpg
image_2022-11-13_18-33-5133.jpg
REM.jpg

To control the robot, we'll be using remotexy, a service that allows for wireless smartphone control of Arduino boards through Wi-Fi. I've been using RemoteXY for a couple of years and have found it to be an excellent and affordable option for adding smartphone control to projects.

To get started, you'll need to download the RemoteXY app for your iPhone or Android device. While the app isn't free, it's definitely worth the cost, and a trial version is available for those who want to try before they buy.

Once you have the app, it's time to program the ESP device using the Arduino IDE environment.


Sketch in files.

Do not forget to install the RemoteXY library

Make your own web/app remoteXY interface video instruction.


// RemoteXY select connection mode and include library
#define REMOTEXY_MODE__ESP8266WIFI_LIB_POINT
#include <ESP8266WiFi.h>


#include <Servo.h>  


// RemoteXY select connection mode and include library
#define REMOTEXY_MODE__ESP8266WIFI_LIB_POINT
#include <ESP8266WiFi.h>
#include <Servo.h>  
#include <RemoteXY.h>

// RemoteXY connection settings
#define REMOTEXY_WIFI_SSID "CyberTruck"
#define REMOTEXY_WIFI_PASSWORD ""
#define REMOTEXY_SERVER_PORT 6377

// RemoteXY configurate  
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =   // 63 bytes
  { 255,2,0,0,0,56,0,16,29,2,5,42,58,25,30,30,16,57,30,30,
  26,27,31,129,0,14,10,18,6,5,28,50,9,28,67,121,98,101,114,84,
  114,117,99,107,0,129,0,48,12,7,3,50,36,9,4,27,118,32,52,46,
  50,32,0 };
 
// this structure defines all the variables and events of your control interface
struct {

    // input variables
  int8_t joystick_1_x; // from -100 to 100  
  int8_t joystick_1_y; // from -100 to 100  

    // other variable
  uint8_t connect_flag;  // =1 if wire connected, else =0

} RemoteXY;
#pragma pack(pop)

Servo servo1;
Servo servo2;

/////////////////////////////////////////////
//           END RemoteXY include          //
/////////////////////////////////////////////

void setup()
{
  RemoteXY_Init ();

  pinMode (4, OUTPUT);
  pinMode (5, OUTPUT);

  servo1.attach(4); //pin D2
  servo2.attach(5); //pin D1
 
}


void loop()
{
  RemoteXY_Handler ();
  int speed1 = map(RemoteXY. joystick_1_x, -100, 100, 0, 180);
  int speed2 = map(RemoteXY. joystick_1_y, -100, 100, (-90), 90);


    servo1.write(speed1+speed2);
    servo2.write(speed1-speed2);
 
}

Downloads

Soldering

sOLDERING2.jpg
sWICH.jpg

As a general idea was to keep it simple and easily repeatable I'm using noisy servo motors to avoid expensive gear motors and drivers. But it will be a nice update in the future, I believe.

Soldering is pretty straightforward. You might not even need extra wires.

Continuous Rotation Servos

1-1000x1000.jpg

If You need to make a Continuous Rotation servo out of a regular one HERE is an Instructables.

Another, better ONE.


I recommend you get a Factory-made Continuous rotation servo with metal Gears.

Assembly

CyberTruck

The assembly process for this project is quite complex and lengthy to explain in words, so instead, I just made a little video. This should help to make the process more clear and easier to follow.

P.S.

photo_2022-12-04_03-02-11.jpg
photo_2022-12-04_03-02-14.jpg
photo_2022-12-04_03-02-15.jpg
photo_2022-12-04_03-02-17.jpg
photo_2022-12-04_03-34-08.jpg
image_2022-12-04_14-48-31.png

It took me a couple of tries to make it, how it looks now, just want to share some photos of the process and previous versions.

The best way to say thanks it's your support of Ukraine.

Leave a comment if you have any questions.

Thanks!