Introduction: RC CONTROLLER WITH CAMERA VERSION 3 (Pi_CAR V3)

FOR ORIGINAL DESCRIPTION, CLICK HERE

Step 1: ------ CONTENTS ------

------ CONTENTS ------

  • USED MATERIALS
  • RASPBERRY PI INSTALLATION
  • SAMPLE VEHICLE SELECTION AND RASPBERRY PI PIN CONNECTION SCHEME
  • ANDROID APPLICATION INSTALLATION AND USER'S GUIDE
  • WINDOWS APPLICATION INSTALLATION AND USER'S GUIDE
  • TEST VIDEO
  • QUICK INSTALLATION

FOR ORIGINAL DESCRIPTION, CLICK HERE

Step 2: Used Materials

Used materials
Product Name Piece Raspberry Pi 1 Raspberry Pi Camera Module 1 Wi-Fi Adaptör 1 (Optional for Pi 3) L298N,BTS7960,L293,ESC Motor Drive 1 or 2 DC MOTOR 2 or 4 Servo Motor 2 or 3 12V Lipo Batarya 1 Jumper kablo ~ Vehicle Chassis 1 5V Power Supply (LM2596-ADJ) or (2A Mini) 1

FOR ORIGINAL DESCRIPTION, CLICK HERE

Step 3: RASPBERRY PI

RASPBERRY PI:

FOR ORIGINAL DESCRIPTION, CLICK HERE

PURPOSE AND MISSIONS:

  • We can take a view with using the Raspberry pi camera module and transfer it to the phone via raspberry pi.
  • Transferring data from the phone or from the computer to the motor drivers.

RASPBERRY PI SETUP:

Raspberry pi setup is quite simple. First, Win32DiskImager is the program that is required to print the operating system to the SD card. Click to download

1. Raspbian Operating System Downloads;

We will need to write the the operating system containing vehicle control software.The point to be noted here is that when selecting the operating systems listed below, download it according to the Wi-Fi module in your hand and print it to the sd card.Modems supported by Operating Systems and Operating Systems are given below.

Downloadable operating system for Raspberry Pi 3

We have 2 alternative methods for Raspberry pi 3;

  1. Using built-in Wi-Fi directly on Raspberry Pi.
  2. Using an external USB Wifi adapter.(It is the recommended method for distance and data speed. Of course this will vary depending on the Wi-Fi adapter you use.)

1.If you want to manage Pi_CAR via Raspberry pi 2 or the built-in Wi-Fi module on the Raspberry Pi 3.Download the operating system on this link and print to the SD card.

For this option, we have avaible and tested wifi devices and chipsets. Tested Devices Chipsets Dark WDN300A5 RTL8192CU Tenda UH150 RT2870/RT3070 AWUS036NH RT2870/RT3070

Detailed information for other supported chipsets and devices:http://elinux.org/RPi_USB_Wi-Fi_Adapters

2. Printing Operating System to Micro-SD Card

We extract the downloaded image file from within the zip.Then we open the Win32DiskImager program we downloaded earlier. We choose our img file from the specified location.

Once you are sure your Sd card is connected to the computer, you can see it in the Devices section. Then click on the write button and start burning. The writing process takes about 5-7 minutes. The completion of the writing process is indicated by the newly opened window "Write Successfull." Wait until you see the article.

3.Connections and OperationPi_CAR Wi-Fi Password: TRaspberry

After the writing process is completed, you can remove your SD card from the computer and insert it into the Raspberry. All you need to do now is mount the car after you have made the necessary power and motor drive connections to Raspberry.

Click! on the sample vehicle selection and the appropriate pin connection of the vehicle.

Please ask! what you do not understand.

FOR ORIGINAL DESCRIPTION, CLICK HERE

Video Description:

Step 4: ANDROID

ANDROID:

FOR ORIGINAL DESCRIPTION, CLICK HERE

PURPOSE AND MISSIONS:

  • Maintaining control of RC-Car that made from Android and Raspberry Pi.
  • Simple and pure design for user.
  • Taking video stream via Raspberry Pi and show this to user.
  • My purpose is to control the vehicle builded by raspberry pi and the camera on it.

INSTALL ANDROID APPLICATION:

  • Installing of the application is very simple. Only after enter the ANDROID GOOGLE PLAY market, you can type in searching box com.stackcuriosity.tooght or application name RC CONTROLLER WITH CAMERA for directly access to application.

USING THE APPLICATION AND HINTS

IMPORTANT NOTE:

After installing our Android app, it is normally necessary to automatically connect to the Wi-Fi network we created on the car.However, in newer versions of Android (5 and up), Android tries to connect to Google's services to increase user experience and prevent them from connecting to captive networks. According to this connection status, it allows or blocks data communication on the Android Wi-Fi network. Due to this situation, the new versions of Android (5 and above) do not allow connection to the Wi-Fi network we created on our car.For detailed information click here!. We have 2 Alternative methods for solving this problem.

  • 1st METHOD (RECOMMENDED)
    • Using Android Studio This method assumes that you are an android developer.
      • Download android Studio from here!.
      • After downloading and making the necessary adjustments, you need to activate your phone's developer options;
        • Settings ==> About Your Phone ==> Compile Number 5 times in a row. The Phone will now say that you are a developer. In the same way
        • Settings ==> Developer Options ==> Turn on.
        • Settings ==> Developer Options ==> Enable USB debugging

    Now, after you make sure that your phone is connected to the computer and that the phone is recognized by the computer (install the drivers if the phone is not recognized by the computer), In the Android studio environment, you should check that your phone is recognized. The simplest control is to display your phone model on the screen that opens by pressing Shift + F10.

    Now, all we have to do is click on the Terminal tab on the bottom left or press Alt + F12. On the opened terminal screen;

    • adb shell
    • settings put global captive_portal_detection_enabled 0

    If everything goes well, you should type settings get global captive_portal_detection_enabled in this command and the terminal should also type 0 (zero). If you see 0 (zero), you can now connect and use the car smoothly

  • 2nd METHOD
    • Settings ==> Wireless ==> Pi_CAR ==> Advanced Options Password: TRaspberry IP settings = Statik Ip address = 192.168.57.57 Gateway = 192.168.57.1 Network prefix length = 24 DNS 1 = 8.8.8.8 DNS 2 = 8.8.4.4Once you have entered the required information above, click Connect. And get ip address and connect. Then if you get a warning that you do not have internet access on your wireless connection, press yes again after you select the Ask again for this network option.VIDEO EXPRESSION

    And everything is okay. You can now use the application.

Raspberry Pi Connection Informations

Once you've downloaded your Android app, you will see the following welcome : Now all you need to do is check the tool. screen. Let's briefly explain the working principle and the introduction of the application.

APPLICATION DETAILS1. EXPLAINING OF THE VISUAL DESIGN AND PROGRAMMING LOGIC

Our application rely on 3 basis. These are;

I.Providing direction control of the vehicle and camera movement.(There are 3 different control methods as Joystick, Button and Vr (Camera movement).) II. Transfer live video streaming from car to user. III. Connection signal level indicator of vehicle.

  • To that 3 basis;
    • We will explain the vehicle with the side facing the android side in direction control.On the Android side, there are 3 different control interfaces for the user. These are directional control buttons, joystick and VR. Now let's examine these 3 control interfaces

Button Control Interface

Seek bar (Velocity setting), Camera On / Off,Wi-Fi status indicator and Arrow keys are available.

  • Seek bar(Velocity setting)is created from 15 slice and velocity coefficient is 6.66. So any move of the Seek bar, there will be changing 6.66 and its multiples. For instance, If Seek bar in fifth order, produced pwm = 5*6.66 = 33.3. And it is rounded to 33.
  • Menu keys (Camera On/Off and WiFi Indicator) Other vehicle control functions beside Seekbar 'ın; Camera on / off button for taking the camera image through the vehicle " Open ", " CLOSE ", In the same way, an indication of whether our application is connected to the Wi-Fi network we created on Raspberry Pi." NOT CONNECTED ", " CONNECTED "
  • Arrow keys provide seperating directions of data which take from Seek bar(Velocity setting). For moving direction of the car, + or - sign come to head of the PWM value. For example:200:200 // move forward. (2 motors work with 200pwm) 200:-200 //move backward. (2 motors work with 200pwm) 200:-200 // left motor turns 200 pwm to forward, right motor turns 200 pwm to backward (The car turns its around from left to right.) 200:-200 // left motor turns 200 pwm to backward, right motor turns 200 pwm to forward (The car turns its around from right to left.) 200:100 // The car moves as turning to the right.

2.SENSITIVITY IN TURNING LEFT AND RIGHT

  • When our car moving to right cross and left cross, motors' PWM value which will be turning side decreases, and so this provides slower motor rotating. So, the car can achieve the intended turnings. This rotating sensitivity setting let to user.
    • The formula for calculating cross turnings: PWM VALUE - ((PWM VALUE) / PWM RATE)
    • In default, PWM RATE is 2.
    • You can reach the PWM RATE setting from right-top button in the screen and from there to Settings menu.
  • PWM interval which can be entered is a value as a minimum and maximimum between 1-4 interval in integer and double type.

Joystick Control Interface

  • There are 2 joystick control interfaces for controlling the car and the camera. From these interfaces, the directional control of the vehicle on the left, while the right side provides directional control of the camera on the vehicle. The point to note in the joystick control interface is the maximum speed setting. The maximum speed setting here specifies the maximum speed at which the vehicle can travel. The camera speed is fixed. The pwm range generated by raspberry pi is considered when determining the maximum speed setting. This range is 0-100 The maximum speed range you will set for the vehicle should be between 0-100
  • Please ask! what you do not understand.

VR Control Interface

  • In the VR interface, you need to pay attention to the calibration of the instrument's sensors. In the application, two kinds of sensor calibration are done.
  • 1. Calibration; Automatically by the application, magnetometer and gyroscope data are filtered and a reference value is taken according to the geography of the earth.
  • 2. Calibration; The calibration we need to do manually. After bringing our head to the reference (point where we want), you need to click on the compass icon from the menu bar. This calibration refers to the origin (center point) of our head (according to Calibration 1). After this second calibration, the vehicle camera will move towards that point wherever you turn your head.
  • NOTE: When VR mode is selected, a second device is required for motion control of the vehicle. Again, in the same way, Via a second android phone as you can control using other control interfaces, In our developed Microsoft application, you can check with the help of Fly Joystick.
  • Please ask! what you do not understand.

FOR ORIGINAL DESCRIPTION, CLICK HERE

Step 5: WINDOWS

WINDOWS:

FOR ORIGINAL DESCRIPTION, CLICK HERE

PURPOSE AND MISSIONS:

  • Provide direction control of the car.
  • Simple and easy visual interface for the user.

WINDOWS "Pi_CAR" APPLICATION INSTALLATION AND CONFIGURATION SETTINGS:

  • Pi_CAR has no camera support in windows application, Without a camera view, free use is offered for those who want to drive vehicle.
  • For the activation of the application you need to have your internet connection during the initial installation. Appart from that, there is nothing to pay attention to.
  • The installation of the application is extremely simple. All you have to do is install the setup file.

APPLICATION USAGE AND TIPS.

  • Windows application; There is only Fly joystick support at the moment to control the vehicle..
  • The point to note in the Windows control interfaces is the maximum speed setting. The maximum speed setting here indicates the maximum speed at which the vehicle can reach. The pwm range generated by raspberry pi is considered when determining the maximum speed setting. This range is 0-100 . The maximum speed range you will set for the vehicle shuould be between 0-100.NOTE:
  • The main purpose of this windows application, during use of the VR control interfaces on Android, it is possible to move the vehicle as an alternative to the android application.

FOR ORIGINAL DESCRIPTION, CLICK HERE

Step 6: ​BRIEF AND ABSTRACT INSTALLATION

BRIEF AND ABSTRACT INSTALLATION

FOR DETAIL INFORMATION AND INISTALLATION, PLEASE START AT THE TOP OF THE PAGE.!!

STEP 1:

  • 1.If you want to manage Pi_CAR via Raspberry pi 2 or the built-in Wi-Fi module on the Raspberry Pi 3.Download the operating system on this link and print to the SD card.

STEP 2

  • Click! on the sample vehicle selection and the appropriate pin connection of the vehicle.

STEP 3

  • Download the Android control software from this link and upload to Android Phone.

ADIM 4

  • Download and installation the windows control software from this link

And the operation is complete. If you have correctly connected the Raspberry pi motor drivers, you can now start checking the vehicle.

  • Please ask! what you do not understand.

FOR ORIGINAL DESCRIPTION, CLICK HERE

Step 7: ICON AND TEST VIDEO

ICON OF OUR APPLICATION:

FOR ORIGINAL DESCRIPTION, CLICK HERE


TEST VIDEO:

FOR ORIGINAL DESCRIPTION, CLICK HERE

Step 8: THE SAMPLE VEHICLE SELECTION AND THE APPROPRIATE PIN CONNECTION OF THE VEHICLE

THE SAMPLE VEHICLE SELECTION AND THE APPROPRIATE PIN CONNECTION OF THE VEHICLE


FOR ORIGINAL DESCRIPTION, CLICK HERE

Vehicle Type 1: Single-motor, Servo steering

  • This vehicle used one motor for back and forth movement and one motor driver for driving this motor.
    • The BTS7960 was preferred here as the engine driver. L298N / L293 etc. Motor drives can be used.
  • A servo motor was used for steering movements.
  • 2 servo motors used for camera movements.

LIST OF MATERIALS

Product name Piece Raspberry Pi 1 Raspberry Pi Camera Module 1 Wi-Fi Adaptör 1 (Optional for Pi 3) L298N,BTS7960,L293 Motor Drive 1 DC MOTOR 1 SERVO MOTOR 3 12V Lipo Battery 1 Jumper Cable ~ Vehicle Chassis 1 5V Power Supply or Power Bank (LM2596-ADJ) or (2A Mini) 1 THE CONNECTION DIAGRAM IS AS FOLLOWS

RASPBERRY PI PIN CONNECTIONS

PIN NAME GPIO NUMBERS (BCM) SERVO MOTOR FOR STEERING CONTROL GPIO 16 SERVO MOTOR FOR CAMERA VERTICAL AXIS MOVEMENT GPIO 15 SERVO MOTOR FOR CAMERA HORIZONTAL AXIS MOVEMENT GPIO 14 MOTOR DRIVE FOR RIGHT PWM GPIO 13 MOTOR DRIVE FOR LEFT PWM GPIO 19 MOTOR DRIVE FOR RIGHT ENABLE PIN GPIO 23 MOTOR DRIVE FOR LEFT ENABLE PIN GPIO 24 5V POWER VCC 5V INPUT 5V POWER GND GND INPUT

  • IMPORTANT NOTE 1 Here's what you need to look out for: If you misplug the motor drivers and the camcorder's pins, the car or camera will only have the wrong movements. But if you plug the 5V power supply into the wrong or wrong pins, irreversible damage can occur in the raspberry. Ahududaki iğnelerin güç girişine alternatif olarak, mikro usb girişinizi ahududu pi'de de kullanabilirsiniz(Power bank etc. , Other alternative.)
  • IMPORTANT NOTE 2: You should not feed your raspberry and servo motors directly from the same power supply. Kısacası, LV2596 ile 5V üretiyorsanız, Ahududanı ve Servo motorları doğrudan çalıştırmamalısınız.

Please ask! what you do not understand.

FOR ORIGINAL DESCRIPTION, CLICK HERE

Vehicle Type 2: Tank Type Vehicle

  • There are 2 direction control motors, right and left engine. The operation is shaped like a tank.
  • As can be seen from the pictures below, the rotation speed difference between the right and left motors is used for right and left turns.

6 X 6 VEHICLE !!

LIST OF MATERIALS

Product Name Piece Raspberry Pi 1 Raspberry Pi Camera Module 1 Wi-Fi Adaptor 1 (Pi 3 için isteğe bağlı) L298N,BTS7960,L293 Motor Drive 1 or 2 DC MOTOR 2 or 4 SERVO MOTOR 2 12V Lipo Battery 1 Jumper Cable ~ Vehicle Chassis 1 5V Power Supply (LM2596-ADJ) or (2A Mini) 1

  • This vehicle used 6 (3/3) motors in total for moving back and forth / right and left and two motor drives for driving this motor.
    • The BTS7960 was preferred here as the engine driver. L298N / L293 etc. Motor drives can be used.
  • The difference in rotation speeds of the right and left side motors was used for steering movements.
  • Two servo motors were used for camera movements.

THE CONNECTION DIAGRAM IS AS FOLLOWS

RASPBERRY PI PIN CONNECTIONS

PIN NAME GPIO NUMBERS (BCM) SERVO MOTOR FOR CAMERA VERTICAL AXIS MOVEMENT GPIO 15 SERVO MOTOR FOR CAMERA HORIZONTAL AXIS MOVEMENT GPIO 14 RIGHT MOTOR DRIVE FOR RIGHT PWM GPIO 13 RIGHT MOTOR DRIVE FOR LEFT PWM GPIO 19 LEFT MOTOR DRIVE FOR RIGHT PWM GPIO 18 LEFT MOTOR DRIVE FOR LEFT PWM GPIO 12 MOTOR DRIVE FOR RIGHT ENABLE PIN GPIO 23 MOTOR DRIVE FOR LEFT ENABLE PIN GPIO 24 MOTOR DRIVE FOR RIGHT ENABLE PIN GPIO 20 MOTOR DRIVE FOR LEFT ENABLE PIN GPIO 21 5V POWER VCC 5V INPUT 5V POWER GND GND INPUT

  • IMPORTANT NOTE 1 Here's what you need to look out for: If you misplug the motor drivers and the camcorder's pins, the car or camera will only have the wrong movements. But if you plug the 5V power supply into the wrong or wrong pins, irreversible damage can occur in the raspberry. Ahududaki iğnelerin güç girişine alternatif olarak, mikro usb girişinizi ahududu pi'de de kullanabilirsiniz(Power bank etc. , Other alternative.)
  • IMPORTANT NOTE 2: You should not feed your raspberry and servo motors directly from the same power supply. Kısacası, LV2596 ile 5V üretiyorsanız, Ahududanı ve Servo motorları doğrudan çalıştırmamalısınız.

Please ask! what you do not understand.

FOR ORIGINAL DESCRIPTION, CLICK HERE

Comments

About This Instructable

3,258views

66favorites

License:

Bio: https://tr.linkedin.com/in/zafersn93
More by Zafer M.Ş:RC CONTROLLER WITH CAMERA VERSION 3 (Pi_CAR V3)RC CONTROLLER WITH CAMERA V2  (Pi_CAR V2)RC CONTROLLER WITH CAMERA
Add instructable to: