Introduction: Wifi Camera Remote Control Car

The Wifi Camera Remote Control Car is designed to visual access in situations where human presence is either dangerous or difficult. This car allows a user to have remote access through wifi with a camera that connects to a phone app and motor control through keyboard clicks on a remote computer connected to wifi. This car could be useful in combat situations as well as campus tours during pandemics. This car can provide access when humans can't.

Supplies

Step 1: Software/Code

Software

  • Arduino 1.8.5 - https://www.arduino.cc/en/software
  • Python 3.7.4  - https://www.python.org/downloads/


Libraries needed for install:

For the first two libraries: (Sketch> Include Libraries > Manage Libraries)

-WIFINina library

-SAMD library


- For the Sparkfun library: (Sketch> Include Library > Add .Zip Library)

-Download from Repo:

-https://github.com/sparkfun/SparkFun_TB6612FNG_Arduino_Library/blob/master/src/SparkFun_TB6612.h


- Update Arduino Nano 33 Iot  firmware: ( tools-> WIFI101/firmware updater)

Code

UDP_Server.py

UDP_client.py

last_project.ino




Step 2: Circuit Diagram

Step 3: Camera, Wheels and Board

  • Board and Motors: The motors are mounted to a piece of plywood using zip ties. You need to drill two holes in each of the four corners of the board. Thread the zip ties through these holes and wrap them around the motors before tightening the zip ties. Once the motors are securely mounted attach the wheels by popping them onto the axels.
  • Camera: To set up the camera follow the instructions in the box and download the CamHi app off the app store. Once you’re in the app connect the camera to the same wifi network that your device is connected to. This should be easy if you are on a home wifi network with a simple passcode. To attach the camera to the board you need to drill a hole through the board in the front middle or wherever you want your camera to be centered. Through this hole you can thread the included screw from the camera and screw it into the bottom of the camera into the tripod style mount. 


Step 4: Soldering

​​Soldering Arduino Nano Every

Following the techniques in this video and the circuit diagram from step 1: 

  • Solder the nano iot and one of the motor drivers to one of the prototyping boards 
  • Then solder the second motor driver to the second prototyping board.


Step 5: Setup Code to Connect to Wifi

  1. Set up a hotspot or wifi network without multi-step or username/ password protection.
  2. Connect the computer to that network.
  3. Using the UDP_Server.py file, set up a server using a port number that will be shared between all the clients.
  4. Run the UDP_client.py file in order to connect the client to the udp server created in the previous step.
  5.  Using the last_project.ino connect WIFI hotspot by putting the server name into the ssid[] variable and the password into the pass[] variable.  Change the port number to the same port number as the two python files

Step 6: Upload Program to Board

  • Connect the board to a computer using a micro usb cable
  • Open the program using arduino
  • Click Tools->Port and select the USB option
  • Then go to Tools->Board and select nano 33 iot
  • Finally click the upload button on the program.


Step 7: Operating Instructions

- Open two terminals on the computer and navigate to the directory where the files are stored. 

-In one terminal run the script “python3 UDP_server.py” and in another terminal run “python3 UDP_client.py”

- In the terminal window with the client you can control the car using the WASD commands to move and the P key to break. 



Step 8: Improvements:

  • Lighter chassis
  • Faster wifi chip
  • More voltage for motors
  • More powerful motors
  • Motor driver that drives four or more motors


Step 9: Video