Robots controlled via the Internet. The robot can be controlled in different ways. Robot assembly process

Controlling a robot is a challenging task. The definition we chose for requires the device to receive data about its environment. Then he made a decision and took appropriate actions. Robots can be autonomous or semi-autonomous.

  1. The autonomous robot works according to a given algorithm based on data received from sensors.
  2. A semi-autonomous robot has tasks that are supervised by a human. And additionally there are other tasks that it performs on its own...

Semi-autonomous robots

A good example of a semi-autonomous robot is a sophisticated underwater robot. A person controls the basic movements of the robot. And at this time, the on-board processor measures and reacts to underwater currents. This allows the robot to be kept in the same position without drifting. A camera on board the robot sends video back to the person. Additionally, onboard sensors can monitor water temperature, pressure and much more.

If the robot loses contact with the surface, an autonomous program is activated and lifts the underwater robot to the surface. In order to be able to control your robot, you will need to determine its level of autonomy. Perhaps you want the robot to be controlled via cable, wireless, or completely autonomous.

Cable control

The simplest way to control a robot is with a hand controller physically connected to it using a cable. The switches, knobs, levers, joysticks and buttons on this controller allow the user to control the robot without having to turn on complex electronics.

In this situation, the motors and power supply can be connected directly to the switch. Therefore, its forward/backward rotation can be controlled. This is used commonly in vehicles.

They have no intelligence and are considered "remote controlled machines" rather than "robots".


  • The main advantage of this connection is that the robot is not limited by operating time. Since it can be connected directly to the network. No need to worry about signal loss. The robot typically has minimal electronics and is not very complex. The robot itself can be lightweight or have an additional payload. The robot can be physically removed using a tether attached to the cable if something goes wrong. This is especially true for underwater robots.
  • The main disadvantages are that the cable can get tangled, get caught on something, or break. The distance to which the robot can be sent is limited by the length of the cable. Dragging a long cable adds friction and can slow or even stop the robot's movement.

Controlling the robot using a cable and built-in microcontroller

The next step is to install the microcontroller on the robot, but continue to use the cable. Connecting a microcontroller to one of your computer's I/O ports (such as a USB port) allows you to control your actions. Control occurs using a keyboard, joystick or other peripheral device. Adding a microcontroller to a project may also require you to program the robot with input signals.


  • The main advantages are the same as with direct cable control. More complex behavior of the robot and its reaction to individual buttons or commands can be programmed. There is a wide choice of controller controls (mouse, keyboard, joystick, etc.). The added microcontroller has built-in algorithms. This means it can interact with sensors and make certain decisions on its own.
  • Disadvantages include higher cost due to additional electronics. Other disadvantages are the same as when directly controlling the robot via cable.

Ethernet control

Used connector Ethernet RJ45. An Ethernet connection is required for control. The robot is physically connected to the router. Hence it can be controlled via the Internet. This is also possible (though not very practical) for mobile robots.

Setting up a robot that can communicate over the Internet can be quite complex. First of all, a WiFi (wireless internet) connection is preferred. Wired and wireless combination is also an option where there is a transceiver (transmit and receive). The transceiver is physically connected to the Internet, and the data received via the Internet is then transmitted wirelessly robot.


  • The advantages are that the robot can be controlled via the Internet from anywhere in the world. The robot is not limited in operating time, since it can use Power over Ethernet. PoE. This is a technology that allows electrical energy to be transmitted to a remote device along with data through a standard twisted pair By Ethernet networks. The use of Internet Protocol (IP) can simplify and improve the communication design. The advantages are the same as with direct wired computer control.
  • The disadvantage is more complex programming and the same disadvantages as with cable control.

Control using IR remote control

Infrared transmitters and receivers eliminate the cable connecting the robot to the operator. This is generally used by beginners. Infrared control requires a "line of sight" to operate. The receiver must be able to "see" the transmitter at all times in order to receive data.

Infrared remote controls remote control(such as universal remote controls remote control, for TVs) are used to send commands to an infrared receiver connected to the microcontroller. It then interprets these signals and controls the robot's actions.


  • The advantage is low cost. To control the robot, you can use simple TV remote controls.
  • The disadvantages are that it requires line of sight for control.

Radio control

Radio frequency control requires a transmitter and receiver with small microcontrollers to send, receive, and interpret radio frequency (RF) data. The receiver box contains printed circuit board(PCB) which contains the receiving unit and a small servo motor controller. Radio communication requires a transmitter matched/paired with a receiver. It is possible to use a transceiver that can send and receive data between two physically different communication system environments.

Radio control does not require line of sight and can be performed over long distances. Standard RF devices can transmit data between devices over distances of up to several kilometers. While more professional RF devices can provide control of the robot from almost any distance.


Many robot designers prefer to make semi-autonomous radio-controlled robots. This allows the robot to be as autonomous as possible and provide feedback to the user. And can give the user some control over some of its functions if necessary.

  • The advantages are the ability to control the robot over significant distances and can be easily configured. Communication is omnidirectional, but the signal may not be completely blocked by walls or obstacles.
  • The disadvantages are very low speed data transfer (simple commands only). Additionally, you need to pay attention to frequencies.

Bluetooth control

Bluetooth is a radio signal (RF) and is transmitted through specific protocols to send and receive data. Regular Bluetooth range is often limited to around 10m. Although it has the advantage of allowing users to control their robot via Bluetooth enabled devices. These are primarily cell phones, PDAs, and laptops (although custom programming may be required to create the interface). Just like radio control, Bluetooth offers two-way communication.


  • Advantages: Controllable from any Bluetooth-enabled device. But, as a rule, additional programming is required. These are smartphones, laptops, etc. Higher data rates can be omnidirectional. Therefore, no line of sight is needed and the signal can pass through walls a little.
  • Flaws. Must work in pairs. The distance is usually about 10m (without obstacles).

WiFi control

WiFi control is often an additional option for robots. Ability to control the robot wireless network over the Internet presents some significant advantages (and some disadvantages) for wireless control. To set up control of the robot via Wi-Fi, you need a wireless router connected to the Internet and a WiFi unit on the robot itself. For the robot, you can use a device that supports the TCP / IP protocol.


  • The advantage is the ability to control the robot from anywhere in the world. To do this, it must be within the range of the wireless router. Possible high speed data transmission.
  • The disadvantages are that programming is required. The maximum distance is usually determined by the choice of wireless router.

Control via cell phone

Other wireless technology, which was originally developed for human-human cell phone communication, is now used to control robots. Since frequencies cell phone are adjustable, enabling the cellular module on the robot usually requires additional programming. There is also no need to understand the cellular network system and regulations.


  • Advantages: the robot can be controlled anywhere there is cellular signal. Satellite communication possible.
  • Flaws; setting up software control cellular communications Can be challenging - not for beginners. Each cellular network has its own requirements and limitations. Online service is not free. Typically, the more data you transfer, the more money you have to pay. The system has not yet been configured for use in robotics.

The next step is to make full use of the microcontroller in your robot. And first of all, programming its algorithm for entering data from its sensors. Autonomous control can take various forms:

  1. be pre-programmed without environmental feedback
  2. with limited sensor feedback
  3. with complex sensor feedback

True autonomous driving involves many sensors and algorithms. They allow the robot to independently determine the best action in any given situation. The most complex methods The controls currently implemented on autonomous robots are visual and auditory commands. For visual control, the robot looks at a person or object to receive its commands.


Controlling a robot to turn left by reading an arrow pointing left on a piece of paper is much more difficult to accomplish than one might imagine. A service command such as "turn left" also requires quite a bit of programming. Programming many complex commands such as “Bring me slippers” is no longer a fantasy. Although it requires a very high level of programming and large quantity time.

  • The benefits are “real” robotics. Tasks can be as simple as blinking a light based on a single sensor to landing a spaceship on a distant planet.
  • The disadvantages depend only on the programmer. If the robot does something you don't want it to do, then you have only one option. This is to check your code, change it and load the changes into the robot.

Practical part

The goal of our project is to create an autonomous platform capable of making decisions based on external signals from sensors. We will use a Lego EV3 microcontroller. It allows us to create it as a completely autonomous platform. And semi-autonomous, controlled via Bluetooth or using an infrared control panel.


LEGO EV3 Programmable Brick

Similar material:

  • Plan: 1-What is the Internet (concept) 2-Ways to connect to the Internet, 81.69kb.
  • Fraud via the Internet, 11.94kb.
  • Structure and basic principles of operation of the Internet, 187.31kb.
  • Feasibility study, 609.73kb.
  • Using grid technologies, 81.79kb.
  • Global information network Internet, 928.45kb.
  • Basic plan Number of hours according to the plan, total Including, 45.76kb.
  • “SBIS++ Electronic reporting” in electronic form via the Internet, 80.99kb.
  • , 243.98kb.
  • Internet network. Service www, 240.73kb.
SIMULATION AND REMOTE CONTROL OF ROBOTS

VIA THE INTERNET

senior researcher I.R. Belousov

1/2 year, 2-5 year and graduate students

Study of modern methods of modeling and controlling robots. Algorithms for interaction of robots with complex dynamic objects using a technical vision system in the control loop are considered. Methods for remote control of robots via the Internet are being studied. The architecture of distributed control systems is presented, methods of information transfer, graphic modeling, and remote programming of robots using open Java and Java3D technologies are considered.

Introduction.

Statement of tasks discussed in the course. Demonstration of experimental results.

Control of robots in tasks of interaction with moving objects.

1. Setting tasks. Examples.

Review of tasks and methods of interaction of robots with moving objects. Using a technical vision system and object dynamics models. Statement of the problem of a robot gripping a rod on a bifilar suspension. Statement of the problem of interaction of a robot with spherical pendulums.

2. Use of technical vision systems.

Algorithms for processing video images. Determination of the positions of the rod and pendulums, use of kinematic prediction. Processing of measurement results.

3. Mathematical modeling and experimental testing of algorithms.

Equations of vibrations of a rod on a bifilar suspension. Algorithms for gripping a rod with a robotic manipulator. Equations of oscillations of a spherical pendulum. Algorithms for interaction of a robot with pendulums. Architecture of the experimental stand. Discussion of experimental results.

Remote control of robots via the Internet.

4. Review of existing systems.

Control systems via the Internet for mobile and manipulation robots. Disadvantages of existing systems, problems of control via the Internet, approaches to solutions.

5. Architecture of distributed robot control systems.

Hardware and program organization server and client parts of a distributed robot control system. Organization of data exchange.

6. Remote programming via the Internet.

Robot programming languages. Environment for remote programming of robots via the Internet.

7. Control of real systems.

Experiments on controlling manipulative and mobile robots via the Internet. Using a virtual robot control environment. Discussion of experimental results. Directions for further research.

Graphic modeling of robots.

8. Introduction to computer graphics.

Coordinate systems, three-dimensional transformations. The simplest algorithms.

9. Modeling geometric objects in Java3D.

Introduction to Java3D. Features of graphics programming in Java3D. Basic Concepts. Visualization of the simplest geometric objects in Java3D. Lighting, textures, object management, dynamic scene reconfiguration.

10. Description of robot kinematics.

Methods for describing the kinematics of manipulators. Direct and inverse problems of kinematics. Method of sequential formation of coordinate systems. Examples.

11. Graphic modeling of robots and workspace.

Combining objects. Geometric transformations. Visualization of robots, complex geometric and moving objects.

1

Pozhidaev I.V.

The ability to control a mobile robot via a radio channel will significantly expand the range of its application. To solve this problem, a laptop computer was installed on the mobile robot, and a cell phone with a GPRS modem was connected to it. Internet access is installed via a GPRS modem. Through the Internet, using another computer, control and monitoring of the robot systems were carried out. It was possible to control the robot's engines, receive information from sensors, and also receive information from a video camera as the Iris-1 mobile robot moved. Thus, it was possible to achieve remote control of a mobile robot via the Internet using the radio channel of a cell phone with a GPRS modem. And as a consequence of this, the distance over which a mobile robot can be controlled has increased significantly. The range of application of the robot has also expanded in terms of hard-to-reach dry areas.

Mobile robots are widely used in various industries and households. They are irreplaceable: when eliminating accidents at nuclear power plants, when searching and detecting explosives, when diagnosing faults in communications and eliminating them. Widespread use of mobile robots is observed in the exploration of the seabed at great depths. In aviation, unmanned robots are used to conduct reconnaissance activities and destroy the enemy. Mobile robots are used in the exploration of other planets solar system. Recently, robotics in the mobile robots sector has been developing at a rapid pace. The mobile robot sales market was worth $655 million in 2000 and will reach $17 billion in 2005.

A problem has arisen related to the more dynamic use of a mobile robot for inspecting communications and underground objects of both artificial and natural origin. It is due to the fact that the robot is controlled via a cable connected to the remote control, which limits its movement.

The ability to control a mobile robot via a radio channel will significantly expand the range of its application. This allows you to control it completely autonomously and over a long distance. The frequency range is much wider when controlled via a radio channel than via wired communication.

To solve this problem, a laptop computer was installed on the mobile robot, and a cell phone with a GPRS modem was connected to it. Internet access is installed via a GPRS modem. Through the Internet, using another computer, control and monitoring of the robot systems were carried out.

IN this experiment two types of telephone sets with different interfaces were used. These phones differ from each other in that one device is connected to a computer via a cable extended from usb port and the computer to the cell phone port, see block diagram No. 1. And another type of cell phone is switched through a cable from com port A laptop computer to a cell phone, see block diagram No. 2.

The robot "Iris-1", connected to a PC, was controlled using software for the operating room Microsoft system Windows. The robot itself was connected to the computer through PC boards and a cable from them. IN operating system, installed on the computer includes a standard component - Internet Explorer, internet navigator. Internet navigators come from different developers. There are two sets of software on two computers. One for a robot connected to a PC consists of: Microsoft Windows NT 4.0 and software for "Iris-1" in the form of the main component "LABVIEW 6.0" for controlling the robot. A second computer with a different set of software has access to the global computer network Internet using a standard Microsoft Windows component - Internet Explorer, but we used Netscape Navigator, as well as a PC to which a robot is connected, which is controlled remotely, see block diagram No. 3.

A computer that is connected to the Internet has software for connecting a phone with a computer and software for a GPRS modem for specific model cell phone. Cell phones operate in the frequency range from 900 MHz to 1800 MHz. Not all cell phone models have GPRS function.

Phones with GPRS classes 8 and 10 differ in the number of data transmission and reception channels. For GPRS class 8 - three channels for reception at 14.4 Kbit per second each and two for transmission. For a phone with GPRS type 10, we have 4 channels for reception and two for transmission. Phone models also have type A and B characteristics, that is, they support a GPRS modem and conversation or only a GPRS modem.

During the experiment, stable control of a remote robot through a cell phone was revealed, with the exception of cases of shielding of the radio signal (unstable reception between the base and the cell phone or its absence - complete shielding) from the cell phone or a violation in the wired Internet network itself.

When using a radio channel from a cell phone, the ability to remotely control all systems of the Iris-1 robotic complex, as well as control over their operation, was retained. We receive video images as the robot moves in black and white. The robot's engines could work alternately, which, if there were tracks, would allow it to turn in one direction or the other. If the motors worked simultaneously at the same rotation speed, matching in direction, then the robot moved straight forward or in the opposite direction. There was information about the presence of an obstacle in the direction of the robot’s movement (forward) using an ultrasonic sensor. The ultrasonic sensor consists of two parts: a receiver that sends a signal in front of the robot to a possible obstacle and a transmitter that receives the reflected signal from a possible object in front of the robot. The presence of an object in front of the robot was visually observed on the graph by an operator many kilometers from the Iris-1 RTK. Similarly, a picture of the presence of an obstacle above the robot was visible using a microwave sensor. Parameters from photopulse sensors, transmitted via the Internet using a radio channel from a cell phone, made it possible to build a parametric three-dimensional model in motion with a time delay using the T-FLEX CAD 3D package version 6.0 and higher.

Block diagram No. 1, connecting a cell phone via the USB port of a PC.

Block diagram No. 2, connecting a cell phone through the com port of a PC.

Block diagram No. 3, control of the mobile robot "Iris - 1".

List of components for controlling the mobile robot "Iris-1" at a long distance.

  1. A computer with a cell phone connected to it via a COM or USB port.
  2. Radio channel with GPRS modem in the device
  3. Base station cell phone company repeater
  4. Representative of global computer network (Internet) services - provider.
  5. Another computer connected to it through a board in it and a cable from it to the mobile robot.
  6. The computer with the robot has access to the global computer network through the radio channel of the cell phone.
  7. Availability of stable communication on the wired and radio channel sections of the computer network (Internet).

All of the above allows you to control a mobile robot remotely at a great distance and receive information about it.

Thus, it was possible to achieve remote control of a mobile robot via the Internet using the radio channel of a cell phone with a GPRS modem. And as a consequence of this, the distance over which a mobile robot can be controlled has increased significantly. The range of application of the robot has also expanded in terms of hard-to-reach land areas.

BIBLIOGRAPHY

  1. Nof. Sh. Handbook of industrial robotics. - 1989. - T.1. - M.: Mechanical Engineering. - 480 c.
  2. Nof. Sh. Handbook of industrial robotics. - 1990. - T.2. - M.: Mechanical Engineering. 480 c.
  3. Ugh. K. Gonzalez, R. Lee K. Robotics. - 1989. - M.: Mir. - 624s.
  4. Kuleshov V. S. Lakota N. A. Adryunin V. V. Remotely controlled robots and manipulators. - 1986. - M.: Mechanical Engineering. - 328c.
  5. Zharkov F. P. Karataev V. V. Nikiforov V. F. Panov V. S. Using LabVIEW virtual tools. - 1999. - M.: Solon-R. - 268c.
  6. Poduraev Yu. V. Fundamentals of mechatronics. - 2000. - M.: MSTU "STANKIN". - 80c.
  7. Maksimov N.V. Partyka T.L. Popov I.I. Computer architecture and computing systems. - 2005. - M.: Forum-Infra-M. - 512s.

Bibliographic link

Pozhidaev I.V. CONTROL OF THE MOBILE ROBOT "IRIS-1" BY RADIO CHANNEL USING A CELL PHONE // Fundamental Research. – 2005. – No. 7. – P. 14-16;
URL: http://fundamental-research.ru/ru/article/view?id=6320 (access date: 08/25/2019). We bring to your attention magazines published by the publishing house "Academy of Natural Sciences"

There are a huge number of instructions on the Internet for assembling various models of robots. Let's try to build our own model home Wi-Fi robot using information from the Cyber-place forum, parts partially from the online store. It is profitable to order many spare parts directly from China (Ebay, Aliexpress). This will significantly reduce the budget.
His view on the theory and design of modern robots is presented.

Functional view of the robot

  1. Moving along the surface according to operator commands,
  2. Broadcast video with a wide viewing angle.

Control block

Universal Carduino Nano V7 controller

Microcontroller: ATmega328
Input voltage: 5V to 30V
Clock frequency: 16 MHz
Flash memory: 32 KB
RAM (SRAM): 2 KB

CyberBot robot motherboard

The board is designed to connect various Arduino devices or analogue devices via standard interfaces.

Motor Control Module - Motor Shield

You can connect and control two motors to it direct current or 4 stepper motors. Contains HG7881 dual channel motor driver.
Power: 2.5V to 12V
Current consumption per channel: up to 800 mA

Geared motors

Geared motor with gear ratio 1:48
Voltage range from 3V to 6V.
Wheel rotation speed is 48 m/min.
Idle current (6V): 120mA
Noise level:<65dB

Communication module

Wireless WiFi router TP-Link 3020MR

This model is ideal for installing third-party firmware. Selected to control our robot. The firmware is based on OpenWRT firmware version r37816.
The router can be controlled from any web browser via the Web interface. Management via telnet and SSH is also available. The functionality is expanded by installing add-ons from the catalog. Available memory for applications 1.2Mb.

Webcam Logitech E3500

Camera with image correction capabilities.

USB hub

A block for connecting USB devices to each other: arduino, router, web camera.

Auxiliary elements

Platform

Wheels

Equipped with rubber tires and a shaft for the possible installation of an optical encoder disk, ideal for moving the platform on a surface.

Battery compartment

Required for installing batteries. For our version of the robot, 4 AA size batteries are enough.

Fasteners, wires

Auxiliary tools for connecting individual elements.

Robot assembly process

Preparing the CyberBot robot board is the most difficult for beginners, because involves the use of a soldering iron. Need to solder:

  1. Blocking capacitors from 0.1 µF and above
  2. Electrolytic capacitor from 100 uF x 16V and above
  3. Resistor 150 Ohm

Resistors must be installed based on one electrolyte and blocking capacitor for each installed module. As a result we should get the following:

The connectors will allow us to supplement the microcircuit with additional sensors and save us from constantly resoldering parts.

We connect the motor control module - Motor Shield - to the controller board. Screw on the battery compartment. To attach the engines to the platform you will need M3x30 bolts. We put wheels on the engines.
We attach the rest to the second part of the platform: web camera, router, USB hub. We tie the wires together with staples and carefully lay them out so that they do not interfere with other elements.

Software

Firmware for TP-Link 3020MR router

After installing and launching the development environment, you must select the type of board used and the port through which data will be exchanged between the controller and the computer. These settings are made through the menu "Tools" "Board menu".

When using the board Arduino Nano CH340G on Windows system requires installation of the CH341SER driver
The board must be recognized in the system as USB2.0 Serial.

Before uploading the sketch, we check it for errors. On the menu "SKETCH" choose "CHECK/COMPILATE".
If errors occur during verification, the compiler will point to a line with incorrect code. If no errors are found, then in the menu "SKETCH" choose "LOAD".

Sketch for Arduino Nano and Arduino UNO

The CyberLib library is required for the sketch to work.

#include #define motors_init (D4_Out; D5_Out; D6_Out; D7_Out;) uint8_t inByte; uint8_t speed=255; void setup() ( motors_init; D11_Out; D11_Low; randomSeed(A6_Read); for(uint8_t i=0; i<12; i++) beep(70, random(100, 2000)); робота UART_Init(57600); wdt_enable (WDTO_500MS); } void loop() { if (UART_ReadByte(inByte)) { switch (inByte) { case "x": robot_stop(); break; case "W": robot_go(); break; case "D": robot_rotation_left(); break; case "A": robot_rotation_right(); break; case "S": robot_back(); break; } if(inByte>47 && inByte<58) speed=(inByte-47)*25+5; } wdt_reset(); } void robot_go() { D4_Low; analogWrite(5, speed); analogWrite(6, speed); D7_Low; } void robot_back() { D4_High; analogWrite(5, 255-speed); analogWrite(6, 255-speed); D7_High; } void robot_stop() { D4_Low; analogWrite(5, 0); analogWrite(6, 0); D7_Low; } void robot_rotation_left() { D4_Low; analogWrite(5, speed); analogWrite(6, 255-speed); D7_High; } void robot_rotation_right() { D4_High; analogWrite(5, 255-speed); analogWrite(6, speed); D7_Low; }

Sketch for Arduino Mega

#include #define motors_init (D4_Out; D5_Out; D6_Out; D7_Out;) #define robot_go (D4_Low; D5_High; D6_High; D7_Low;) #define robot_back (D4_High; D5_Low; D6_Low; D7_High;) #define robot_stop (D4_Low; D5_Low; D6_Low; D7_Low ;) #define robot_rotation_left (D4_Low; D5_High; D6_Low; D7_High;) #define robot_rotation_right (D4_High; D5_Low; D6_High; D7_Low;) uint8_t inByte; void setup() ( motors_init; D11_Out; D11_Low; randomSeed(analogRead(6)); Serial.begin(57600); wdt_enable (WDTO_500MS); ) void loop() ( if (Serial.available()) ( inByte = Serial. read(); switch (inByte) ( case "x": robot_stop; break; case "W": robot_go; break; case "D": robot_rotation_left; break; case "A": robot_rotation_right; break; case "S": robot_back; ) ) wdt_reset();
Source code taken from cyber-place.ru

Service

Terminal utility

A module for working with the console from a web browser.

List of frequently used commands in CyberWrt

uname -a— Linux kernel version;
cat /proc/cpuinfo- information about hardware
cat /proc/meminfo— expanded information about occupied RAM
free -m— Information about used and free RAM
ls /dev— display of all devices in the system
id— summary information on the current user (login, UID, GID);
ps— all loaded processes;
date— view date/time
dmesg- download log file
lsmod— List of modules loaded into the kernel
netstat -rn- routing table
netstat -an | grep LISTEN- list of all open ports
netstat -tup— Active Internet connections

fdisk -l Information about all connected drives;
blkid— UUID information about all available drives in the system;
mount /dev/sda1 /mnt— Mounts the /dev/sda1 partition to the /mnt mount point;
mount— complete information about mounted devices;
umount/mnt— Unmounts the partition from the /mnt mount point;

clear— Cleaning the terminal window; — Ending the session;
passwd— changing the password of the current user;

opkg update– updating the list of packages
opkg upgrade– updating all installed packages;
opkg list-installed– displays a list of installed packages.

Checking the performance of engines in the development environment

On the menu "TOOLS" choose "SERIAL PORT MONITOR". In the terminal line we type the movement command:

Echo x > /dev/ttyUSB0

If everything is connected and configured correctly, then after pressing the button "SEND" the motors should start spinning.

You can stop the movement using the command:

Echo W > /dev/ttyUSB0

Problems

Incompatibility of the Arduino Nano V3 CH340 microcontroller with the TP-LINK TL-MR3020 router

Solutions found on the forum:

  • Connecting a 100 Ohm resistor per pin RST and on +5V
  • Reducing connection speed to 9600
  • Removing a capacitor or cutting a trace on Arduino
  • Connecting the microcontroller to the router via UART interface

As practice has shown, none of the above methods helped. Only after replacing the microcontroller with a Carduino Nano V7 did the robot start working through the router.

I have long dreamed of making a Wi-Fi robot that could be controlled remotely. And finally the day came when I was able to control the robot via the Internet, see and hear everything that was happening around it.
I invite those interested to the cat

The following components were used to create the robot:

This is what the robot I assembled looks like, without the top cover.

Now everything is in order:

Robot platform assembly:

Location of components on motherboard. I installed only Arduino Nano, motor driver and HC sound emitter:

The wr703N router was attached to the bottom of the robot platform with double-sided tape:

The web camera is attached to the furniture corner, to the standard holes of the platform provided for servomotors:

CyberWrt is a firmware built on the basis of OpenWrt and intended primarily for robots, smart homes and other devices built on the basis of popular models Tp-Link routers mr3020 b Wr703N. CyberWrt has the maximum possible volume free space for installing packages - 1.25MB. By default, a web server is installed and all operations can be carried out through the built-in web interface. Immediately after flashing, the router is available on the network via cable and WiFi as an access point. Through the web interface you can work in the " command line» - via the web terminal and in file manager, in which you can edit, download, delete, create, copy files and much more.

After flashing the router, it is available as a WiFi access point with the name “CyberBot”, we connect to it and go to home page router. This is what the web interface looks like immediately after the firmware is installed.

Install the modules FTDI Driver, Video Driver and CyberBot-2.

Flashing the Arduino controller.

The robot program code turned out to be quite simple, but it is enough to remotely control the robot via local network or the Internet.
The code is adapted for Arduino controllers with ATmega168/328 on board and uses the CyberLib library.
This library helps to get the most out of the controller and reduce the amount of final code
The code uses WDT to prevent the robot from freezing.
The code also supports camera control along the X and Y axes, but I did not have free servos and could not use this function:

Code for Arduino

#include #include Servo myservo1; Servo myservo2; long previousMillis; http://cyber-place.ru/attachment.php?attachmentid=600&d=1389429469 uint8_t LedStep = 0; // Counter int i; boolean light_stat; uint8_t inByte; uint8_t speed=255; // maximum speed by default #define init (D4_Out; D5_Out; D6_Out; D7_Out; D8_Out; D11_Out; D12_Out;) void setup() ( myservo1.attach(9); // Connecting servos to the port myservo2.attach(10); // Connecting servos to port init; // Initialize ports D11_Low; // Speaker OFF randomSeed(A6_Read); //Get a random value horn(); //audio notification of robot readiness UART_Init(57600);//Initialize the port for communication with the router wdt_enable (WDTO_500MS ); ) void loop() ( unsigned long currentMillis = millis(); if (LedStep == 0 && currentMillis - previousMillis > 500)( // Delay 0.5 sec. previousMillis = currentMillis; LedStep = 1; ) if (LedStep == 1 && currentMillis - previousMillis > 500)( // Delay 0.5 sec. previousMillis = currentMillis; LedStep = 2; ) if (LedStep == 2 && currentMillis - previousMillis > 500)( // Delay 0.5 sec. LedStep = 0; ) if (UART_ReadByte(inByte)) //If something arrived ( switch (inByte) // Let's see what command came ( case "x": // Stop the robot robot_stop();<58) speed=(inByte-47)*25+5; //принимаем команду и преобразуем в скорость } wdt_reset(); } void horn() { for(uint8_t i=0; i<12; i++) beep(70, random(100, 2000)); //звуковое оповещение } void robot_go() { D4_Low; analogWrite(5, speed); analogWrite(6, speed); D7_Low; } void robot_back() { D4_High; analogWrite(5, 255-speed); analogWrite(6, 255-speed); D7_High; } void robot_stop() { D4_Low; analogWrite(5, 0); analogWrite(6, 0); D7_Low; } void robot_rotation_left() { D4_Low; analogWrite(5, speed); analogWrite(6, 255-speed); D7_High; } void robot_rotation_right() { D4_High; analogWrite(5, 255-speed); analogWrite(6, speed); D7_Low; }

break;
case "W": // Move forward robot_go();

break;

case "D": // Rotate left robot_rotation_left();