Ethernet Controlled ROVER

1,311

31

17

This is Ethernet Controlled ROVER that you can watch the images by streamingin your pc. I made this proyect for fun and as cheap as possible. I've learned very much with this proyect so I'm so happy with that.

If you liked please vote me for the first time author contest, thank you!

Step 1: Let's See the Materials

For this rover we will need:

Screw drivers

Pliers

Hot Glue

Soldering Iron and acc.

Wires for soldering https://es.aliexpress.com/item/Free-shipping-5M-10...

Drill

Step 2: Setup the Raspberry Pi

First you will have to install Raspbian into the SD card. You can follow this tutorial if you dont't know how. Python is already installed in that distro, so you won't have to worry about it.

https://www.raspberrypi.org/documentation/installation/installing-images/

Step 3: Make the ROVER Chasis and Cam Turret

My chasis and turret is made of wood because I don't have any 3D printer and I wanted to make this proyect as cheap as posible. First we will draw the shape of the body, as long as you want, I did more big than needed to possibly add future expansion and develope it more.

After you draw the base to include motors, turret, Rpi, etc... make sure to mark the holes that you will drill for fix all the components to the base.

After that let's desing the turret to hold the camera. I did a 2 axis turret but if you want to simplify it you can just do it of one axis. I glued the servo's "arms" to the wood in wich I drilled a hole to attach it to the servo.

Then you fix the servo to the board on the position you want. I did without glue because the future modifications I'lll realise.

Step 4: Schematic

It's importand to solder properly all the components because when you put it all on the base it will move so maybe connections can get broken. In the step down regulador I use a USB that is regulated at 5V an includes a voltimeter. I use that because is much easiest and you don't need to calibrate it.

Yoy can use any transistor that you want because is very low current, just two leds. I would have put a white led stripe so It would have lighted more, but I just have two white leds so...

The real photo is just to make you see how messy it can get.

Step 5: Soldering Motors and Wires

We need to solder our motors, I soldered them in pairs(one pair for each side). Also we will solder the wires of the battery and conecctions for each component. Also you can so most of them by a breadboard.

Drill a hole in the wood board to pass the wires to the motor driver.

Try to put the same colour on the motor's polarity because their are connected reversed in the motor driver. If the code doesn't work fine just change the configuration of the wires.

Step 6: Setup the Arduino Code

Before put the components to the chasis I configued them to work properly to see if the wiring is okay, the directions are okay, the turret works properly, etc...

In this step you can load the code in the arduino and you won't have to do any more with this.

My controlls are:

f->foward

s->back

d->turn right

a->turn left

q->stop

o->lights on

u->lights off

i & k ->Y axis of webcam

j & l ->X axis of webcam

Step 7: SSH to Raspberry to Control Rover

With SSH enabled we will be able to configure our raspberry from another PC. If it isn't enabled you use the raspberry in the monitor and write in the terminal "sudo raspi-config"

Step 8: MJPG Streamer

We will use this program to stream the video from the webcam connected to the Raspberry. You can install this on raspberry

$ ls -l /dev/video*

If any webcam is detected, it's not connected or compatible

$ sudo apt-get install libjpeg8-dev
$ sudo apt-get install imagemagick $ sudo apt-get install subversion

Now we creater a folder

$ mkdir mjpg
$ cd mjpg
$ svn co  https://svn.code.sf.net/p/mjpg-streamer/code/mjpg... mjpg-streamer

$ cd mjpg-streamer
$make

And after this it should be installed, you write on the navigator "Raspberry'sIP:8080"(not literally)

Step 9: Some Python Scripts for the Rpi

On the mjpg-streamer folder you write

nano control.py

It will open a text editor, then you paste this into that file. Yoy maybe need to change the address of your arduino.

import tty
import sys import termios import serial import os arduino = serial.Serial('/dev/ttyUSB0' , 9600) #maybe the addres of your arduino can be ACM0 orig_settings = termios.tcgetattr(sys.stdin) tty.setraw(sys.stdin) x = 0 while x != chr(27): # ESC x=sys.stdin.read(1)[0] arduino.write(x) termios.tcsetattr(sys.stdin, termios.TCSADRAIN, orig_settings)

Step 10: Fix Components to the Board

Fix the arduino, motor driver, Rpi, servos, motors... Then do all the connections, try with the arduino if motor drivers and the directions of motors and servos are okay. Put the wheels on the motors. After this connect the raspberry with the camera on the turret.

Step 11: Use It!

From a pc make the ssh connection. Go to the folder mjpg-streamer. In other terminal do the same.

In one terminal write

control.py

In the otherone

./mjpg_streamer -i "./input_uvc.so -d /dev/video0 -y" -o "./output_http.so -w ./www"

Then open your favorite navigator and put the raspbery's IP followed by :8080

And just have fun!

Share

    Recommendations

    • Plastics Contest

      Plastics Contest
    • Optics Contest

      Optics Contest
    • Make it Glow Contest 2018

      Make it Glow Contest 2018

    17 Discussions

    0
    None
    maverick-the savage

    10 months ago

    so u control using the key board and see through the webcam on the montar

    0
    None
    dimonbikon

    1 year ago

    Does not work ! write to me on the post please bikovskiy@yandex.ru

    0
    None
    dimonbikon

    1 year ago

    Good

    If you do not find me on Skype, give your login, I'll add you.

    Thank you so much.

    2 replies
    0
    None
    manu2022

    Reply 1 year ago

    I just explained it to you by skype, please stop spamming

    0
    None
    manu2022

    Reply 1 year ago

    I'll help you by skype keep calm hahaha

    0
    None
    dimonbikon

    1 year ago

    but if I use for video motion

    then how to set up only a part with drivers?

    how to set up a python?

    On the mjpg-streamer folder you write

    nano control.py

    if I use for video motion i dont have mjpg-streamer folder

    What to do with this step?

    Thank you.

    3 replies
    0
    None
    manu2022dimonbikon

    Reply 1 year ago

    You have to open a new terminal on the master PC and execute that file. Tell me how are you planning to control your rover. What OS are you using on master PC?

    0
    None
    dimonbikonmanu2022

    Reply 1 year ago

    In general, I'm interested in the machine control part

    How to make control via python with keyboard buttons

    Move forward back to the left in the right and turn on the light to turn it off.

    And I'll make a video with motion

    0
    None
    manu2022dimonbikon

    Reply 1 year ago

    The python script takes all characters introduced by keoboard and send it to the arduino board by serial comunication.

    0
    None
    dimonbikon

    1 year ago

    I can execute the command

    sudo svn co https: //svn.code.sf.net/p/mjpg-streamer/code/mjpg ... mjpg-streamer

    but after execution nothing happens and no directory or file is created

    1 reply
    0
    None
    manu2022dimonbikon

    Reply 1 year ago

    Are you doing that as sudo? It should work, but I did that long time ago so I dont remember very well. If you still having problems I'll try to find out how to help you!

    0
    None
    dimonbikon

    1 year ago

    Hello

    It's very good project

    Tell me how to do it so that you can connect not only from the local network?

    Thank you!

    1 reply
    0
    None
    manu2022dimonbikon

    Reply 1 year ago

    Well, you will have to use a service like NO-IP or make the raspberry a real server with a public IP, I think the last thing can be made using apache but i am not sure.

    0
    None
    dimonbikon

    1 year ago

    Can you help?

    How to make it possible to connect and control not only from the local network with minimal loss of speed?