Remote controlled robots. Remote control of the robot from a tablet. Remote control connection diagram

To gain experience in working with the Arduino board, so to speak, as a learning experience and just for fun, this project was created. The goal of the project was to create a car that can move autonomously, avoiding various obstacles without colliding with them.

Step 1: List of components and project cost

1. Toy car with radio control (radio controlled).

This thing costs about 20 bucks, if you have the opportunity to spend more, you can use it better.

2. Arduino Uno microcontroller - $25

3. Motor shield for controlling electric motors - $20

4. GPS for navigation. Adafruit Ultimate GPS Shield - $50

5. Magnetometer as a compass for navigation. Adafruit HMC5883 Magnetometer - $10

6. Ultrasonic distance sensor to avoid obstacles. HC-SR04 - $6

7. LCD display to display vehicle status and information. LCD Display Blue 1602 IIC, I2C TWI - $6 (you can use another one)

8. Infrared sensor and remote control.

9. Arduino sketch (C++ program).

10. Thin wood board as a mounting platform.

11. Development boards. One is long and narrow, and the other is small, in order to separately install the magnetometer on it away from other elements.

12. Jumpers.

13. Ultrasonic sensor mounting kit - $12

14. Soldering iron and solder.

So, in total, everything cost about $150, this is assuming you purchase all these components, since you may already have some of these.

Step 2: Chassis and platform installation

The radio control was removed from an unwanted toy that cost 15 bucks.

The car here has two engines. Using one engine, the remote control controls the speed of the robot, and using the other, the steering is controlled.

A thin board was used as a mounting surface on which breadboards, Arduino, LCD, etc. were attached. The batteries are placed under the board and the wires are passed through the drilled holes.

Step 3: Program

The Arduino is controlled via a C++ program.

Source

RC_Car_Test_2014_07_20_001.ino

Step 4: LCD Display

During operation, the screen displays the following information:

Row 1:

1. TH - Task, heading to the current waypoint

2. CH - Current direction of the robot

Row 2:

3. Err - Compass direction, shows in which direction the robot is moving (left or right)

4. Dist - Focal distance (in meters) to the current waypoint

Row 3:

5. SNR - Sonar distance, that is, the distance to any objects in front of the robot

6. Spd - Robot speed

Row 4:

7. Mem - Memory (in bytes). Arduino memory has 2 KB

8. WPT n OF x - Shows where the robot is in the list of waypoints

Step 5: Avoid Colliding with Objects

To help the robot avoid obstacles, an ultrasonic “Ping” sensor was used here. It was decided to combine it with the Arduino NewPing library, since it is better than the simple PIng library.

The library was taken from here: https://github.com/fmbfla/Arduino/tree/master/NewPing

The sensor was installed on the robot's bumper.

Hello, Habrakhabr! I sat on the evening of June 11, watching a film. Unexpectedly for myself, I discovered that a woman I had never known before had written to me with an offer to make a robot for their new quest. The bottom line is that you need to solve puzzles, explore hiding places, correctly apply hints, use available things and ultimately get keys and open doors... I was required to make a robot controlled from a computer using a separate program. I had doubts about some problems, for example: will I have time and how exactly to do wireless data transfer (I had previously only done wireless data transfer on the NXT)? After weighing the pros and cons, I agreed. After that, I began to think about data transfer. Since it was necessary to make a robot quickly, there was no time to remember and further master, for example, Delphi, so the idea arose to make a module that would send commands. The computer is simply required to send data to the COM port. This method is strange, but the fastest. This is what I want to describe here. I will also attach 3 programs that will help you make a radio-controlled car.
Transmitter assembly and its program.
I made a module for a computer from FTDI Basic Breakout 5/3.3V from DFrobot, a fairly common ATMEGA 328P-PU microcontroller with an Arduino bootloader and a radio module based on the nRF24L01 chip. Essentially it's just an Arduino Uno with a radio module. It is what it is. The radio module has a feature that I did not immediately notice: the input voltage should be in the range from 3 to 3.6 volts (although applying 5 volts to it will not kill it, but will not work), the upper limit of the logical unit is 5V. This means that to connect the radio module to the mega you do not need a level converter between 3.3V and 5V, but you need to install a 3.3V stabilizer. FTDI has a built-in stabilizer, and I powered the radio module from it.

This is what the module itself looks like (inside and in the assembly):

The program consists of initialization, start message and processing of commands from the control program. This was the case in my case. Basic commands of the Mirf library:

#include
#include
#include
#include
#include
These libraries are needed for the radio module to work

Mirf.csnPin = 4 - sets the pin number responsible for “permission to communicate” between the radio module and the MK
Mirf.cePin = 6 - sets the pin number responsible for the operating mode of the radio module (receiver/transmitter)
Mirf.spi = &MirfHardwareSpi - configures the SPI line
Mirf.init() - initializes the radio module
Mirf.payload = 1 - size in bytes of one message (default 16, maximum 32)
Mirf.channel = 19 - sets the channel (0 - 127, default 0)
Mirf.config() - sets transfer parameters


Mirf.setTADDR((byte *)"serv1") - switches the radio module to transmitter mode
Mirf.setRADDR((byte *)“serv1”) - switches the radio module to receiver mode

Mirf.send(data) - sends a byte array
Mirf.dataReady() - reports the end of processing of received data
Mirf.getData(data) - write received data to the data array

I am attaching the code for the transmitter program.

Transmitter program

#include
#include
#include
#include
#include

Char active;
byte data;

Void setup()
{
Serial.begin(19200);

Mirf.csnPin = 4;
Mirf.cePin = 6;

Mirf.init();
Mirf.payload = 1;
Mirf.channel = 19;
Mirf.config();

Mirf.setTADDR((byte *)"serv1");

//signal message about the start of work
data=7;
Mirf.send(data);
delay(200);
}

void loop()
{
if (Serial.available()) //If the data is ready to be read
{
active=Serial.read(); // Write data to a variable
}

If (active=="2")
{
data=2;
}

If (active=="3")
{
data=3;
}

If (active=="4")
{
data=4;
}

If (active=="5")
{
data=5;
}

If (active=="6")
{
data=6;
}

Mirf.send(data); //Send data
while(Mirf.isSending()); // Wait while the data is sent
}

Management program.

There is one interesting thing - Processing. The syntax is the same as in Arduino, only instead of void loop() there is void draw(). But it became even more interesting in my situation with the processing Serial library, which allows you to work with a serial port. After reading the tutorials on Spurkfun's website, I played around with blinking the LED on the Arduino connected to the computer at the click of a mouse. After that, I wrote a program to control the robot from the keyboard. I am attaching the arrow control code. In principle, there is nothing unusual in it.

Machine control program

import processing.serial.*;
import cc.arduino.*;

Serial myPort;
PFont f=createFont("LetterGothicStd-32.vlw", 24);

Void setup()
{
size(360, 160);
stroke(255);
background(0);
textFont(f);

String portName = "XXXX"; // Here you need to write the name of your port
myPort = new Serial(this, portName, 19200);
}

Void draw() (
if (keyPressed == false)
{
clear();
myPort.write("6");
println("6");
}
}

Void keyPressed()
{
// 10 - enter
// 32 - space
// 37/38/39/40 - keys
clear();

Fill(255);
textAlign(CENTER);
//text(keyCode, 180, 80);

Switch(keyCode)
{
case 37:
text("Edem vlevo", 180, 80);
myPort.write("1");
break;

Case 38:
text("Edem pryamo", 180, 80);
myPort.write("2");
break;

Case 39:
text("Edem vpravo", 180, 80);
myPort.write("3");
break;

Case 40:
text("Edem nazad", 180, 80);
myPort.write("4");
break;

Default:
text("Takoy kommandi net", 180, 80);
myPort.write("6");
break;
}
}

Receiver program.

The initialization of this program differs from the initialization of the transmitter program in just one line. The key command in the endless loop is Mirf.getData(data). Next, the received command is compared with the numbers that correspond to any of the robot’s actions. Well, then the robot acts exactly according to commands. I am attaching the program code for the machine's receiver.

Machine programs

#include
#include
#include
#include
#include

Void setup()
{
Serial.begin(9600);

PinMode(13, OUTPUT); //LED

Mirf.csnPin = 10;
Mirf.cePin = 9;
Mirf.spi =
Mirf.init();
Mirf.payload = 1;
Mirf.channel = 19;
Mirf.config();
Mirf.setRADDR((byte *)"serv1");
}

void loop()
{
byte data;

If(!Mirf.isSending() && Mirf.dataReady())
{
Mirf.getData(data);
Serial.println(data);
}

Switch (data)
{
case 1:
motors(-100, 100); // turn left
break;

Case 2:
motors(100, 100); // go straight
break;

Case 3:
motors(100, -100); // turn right
break;

Case 4:
motors(-100, -100); // going back
break;

Default:
motors(0, 0); // we're standing
break;
}

Delay(50);
}

Conclusion.

What came out of all this:

I made this robot for Claustrophobia. They conduct quests in reality in different cities, and just for one of these quests, the organizers needed a radio-controlled robot sapper. I like it. This, of course, is flawed, because... against the backdrop of control using the communication tools built into the laptop, but it was done on its own, done very quickly and without any problems. I hope this article will help you do something similar, and maybe even more complicated. Here, whoever wants what.

Tags: Add tags

The main module of the Lego Mindstorms EV3 construction set can work with leJOS firmware, which allows you to run Java applications. Especially for this, Oracle has released and supports a separate version of the full-fledged Java SE.

The normal JVM allowed me to use the Java Management Extensions (JMX) protocol built into it to implement remote control of the robotic arm. To combine control elements, sensor readings and images from IP cameras installed on the robot, a mnemonic diagram made on the AggreGate platform is used.


The robot itself consists of two main parts: a chassis and a manipulator arm. They are controlled by two completely independent EV3 computers, all coordinated through the control server. There is no direct connection between computers.

Both computers are connected to the room’s IP network via NETGEAR WNA1100 Wi-Fi adapters. The robot is controlled by eight Mindstorms motors - 4 of them are “large” and 4 are “small”. Also installed are infrared and ultrasonic sensors to automatically stop at an obstacle when reversing, two touch sensors to stop the rotation of the manipulator due to an obstacle, and a gyroscopic sensor to facilitate operator orientation by visualizing the position of the shoulder.

The chassis has two motors, each of which transmits power to a pair of tracked drives. Another motor rotates the entire robotic arm 360 degrees.

In the manipulator itself, two motors are responsible for raising and lowering the “shoulder” and “forearm”. Three more motors are responsible for raising/lowering the hand, rotating it 360 degrees and squeezing/unclosing the “fingers”.

The most complex mechanical unit is the “brush”. Due to the need to move three heavy engines to the “elbow” area, the design turned out to be quite tricky.

In general, everything looks like this (a box of matches was difficult to find for scale):

Two cameras are installed to transmit the image:

  • A regular Android smartphone with the IP Webcam app installed for a general overview (HTC One pictured)
  • Autonomous Wi-Fi micro-camera AI-Ball, installed directly on the “hand” of the manipulator and helps to grab objects of complex shapes

EV3 Programming

The software of the robot itself turned out to be as simple as possible. The programs on the two computers are very similar, they start a JMX server, register MBeans corresponding to motors and sensors, and go to sleep waiting for JMX operations.

Code of the main classes of the robotic arm software

public class Arm ( public static void main(String args) ( try ( EV3Helper.printOnLCD("Starting..."); EV3Helper.startJMXServer("192.168.1.8", 9000); MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); EV3LargeRegulatedMotor motor = new EV3LargeRegulatedMotor(BrickFinder.getDefault().getPort("A")); LargeMotorMXBean m = new LargeMotorController(motor); ); // Registering other motors here EV3TouchSensor touchSensor = new EV3TouchSensor(SensorPort.S1); TouchSensorMXBean tos = new TouchSensorController(touchSensor); ; // Registering other sensors here EV3Helper.printOnLCD("Running"); Thread.sleep(Integer.MAX_VALUE); catch (Throwable e) ( e.printStackTrace(); ) ) public class EV3Helper ( static void startJMXServer(String address, int port) ( MBeanServer server = ManagementFactory.getPlatformMBeanServer(); try ( java.rmi.registry.LocateRegistry.createRegistry(port); JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://" + address + ":" + String.valueOf(port ) + "/server"); props = new HashMap (); props.put("com.sun.management.jmxremote.authenticate", "false"); props.put("com.sun.management.jmxremote.ssl", "false"); JMXConnectorServer connectorServer = JMXConnectorServerFactory.newJMXConnectorServer(url, props, server); connectorServer.start(); ) catch (Exception e) ( e.printStackTrace(); ) ) static void printOnLCD(String s) ( LCD.clear(); LCD.drawString(s, 0, 4); ) )

For each type of sensor and motor, an MBean interface and a class that implements it have been created, which directly delegates all calls to the class included in the leJOS API.

Example interface code

public interface LargeMotorMXBean ( public abstract void forward(); public abstract boolean suspendRegulation(); public abstract int getTachoCount(); public abstract float getPosition(); public abstract void flt(); public abstract void flt(boolean immediateReturn); public abstract void stop(boolean immediateReturn); public abstract void waitComplete(); public abstract void rotateTo(int limitAngle, boolean immediateReturn); abstract int getLimitAngle(); public abstract void resetTachoCount(); public abstract void rotate(int angle, boolean immediateReturn); public abstract void rotateTo(int limitAngle()); public abstract void setStallThreshold(int error, int time); public abstract int getRotationSpeed(); public abstract float getMaxSpeed(); public abstract void stop(); public abstract int getSpeed(); public abstract void setSpeed(int speed); )

Example MBean implementation code

public class LargeMotorController implements LargeMotorMXBean ( final EV3LargeRegulatedMotor motor; public LargeMotorController(EV3LargeRegulatedMotor motor) ( this.motor = motor; ) @Override public void forward() ( motor.forward(); ) @Override public boolean suspendRegulation() ( return motor. suspendRegulation(); ) @Override public int getTachoCount() ( return motor.getTachoCount(); ) @Override public float getPosition() ( return motor.getPosition(); ) @Override public void flt() ( motor.flt() ; ) @Override public void flt(boolean immediateReturn) ( motor.flt(immediateReturn); ) // Similar delegating methods skipped )

Oddly enough, the programming ended there. Not a single line of code was written on the server side or operator workstation.

Connecting to the server

The robot is directly controlled by the AggreGate IoT platform server. The installed free version of AggreGate Network Manager includes a JMX protocol driver and allows you to connect up to ten JMX hosts. We will need to connect two - one for each EV3 brick.

First of all, you need to create a JMX device account by specifying the URL specified when starting the JMX server in the settings:

JMX device connection properties


After that, select the assets (i.e. MBeans in this case) that will be added to the device profile:

Selecting MBeans


And after a few seconds we look and change the current values ​​of all polled properties of MBeans:

Device snapshot


You can also test various operations by manually calling MBean methods, such as forward() and stop().

List of operations


Next, we set up polling periods for sensors. A high polling frequency (100 times per second) is used since the control server is located on the local network together with the robot, and it is the server that makes decisions about stopping rotation when it hits an obstacle, etc. The solution is certainly not industrial, but in a well-functioning Wi-Fi network within one apartment it proved to be quite adequate.

Survey periods


Operator Interface

Now let's move on to creating the operator interface. To do this, we first create a new widget and add the necessary components to it. In the final working version it looks like this:

In fact, the entire interface consists of several panels with buttons, sliders and indicators, grouped in various grid layouts, and two large video players that broadcast images from cameras.

View from inside the interface editor

Whole form:

View with container panels shown:


Now, as the automated control system specialists say, all that remains is to “revive the mnemonic diagram.” For this purpose, so-called bindings connecting properties and methods of graphical interface components with properties and methods of server objects. Since EV3 computers are already connected to the server, the MBeans of our robot can also be server objects.

The entire operator interface contains about 120 bindings, most of which are of the same type:

Half of the same type of bindings implement control by clicking on buttons located on the mnemonic diagram. This is beautiful, convenient for testing, but completely unsuitable for real movement of the robot and moving loads. Activators of bindings from this group are events mousePressed And mouseReleased various buttons.

The second half of the bindings allows you to control the robot from the keyboard by first pressing the Keyboard Control button. These bindings react to events keyPressed And keyReleased, and in the condition of each binding it is written which button code should be reacted to.

All control bindings call methods forward(), backward() And stop() various MBeans. Since event delivery occurs asynchronously, it is important that function calls forward()/backward() and subsequent calls stop() not mixed up. To do this, bindings that call methods of one MBean are added to one Queue.

Two separate groups of bindings set the initial speeds and accelerations of the engines (currently this is implemented on the server side using a model, so these bindings are disabled) and change the speeds/accelerations when moving the Speed ​​and Acceleration sliders.

Send your good work in the knowledge base is simple. Use the form below

Students, graduate students, young scientists who use the knowledge base in their studies and work will be very grateful to you.

Posted on http://www.allbest.ru/

Development of a remote control system for an educational robot

Introduction

robotics user program microprocessor

Robotics is one of the most dynamically developing areas today. We see how robots are gradually conquering all spheres of life - manufacturing, medicine, agriculture, etc. In the near future, robots will become an integral part of everyday life. Therefore, specialists with skills in the field of robotics and mechatronics are needed. In turn, to train future specialists, educational robots are required, on which it will be possible to improve their knowledge.

It’s amazing how quickly technology is developing in our time; it seems that the pace of their development is already difficult to follow. Cell phones are one of the striking examples; today every person has them. Moreover, they have become an integral part of our society. There are phones with a minimal set of functions, and there are “advanced” ones with functions comparable to a personal computer.

Cell phones partially replace many devices such as a camera, computer, e-reader, etc. It’s worth thinking “why not control some simple devices using your phone?” It is not suggested to replace the entire device, but only some of the remote controls. This will simplify the control of various devices in a person’s daily life. For example, one phone with Bluetooth function can replace all remote controls for home appliances, which are so often lost.

This current problem will be solved thanks to a similar device developed in this project, the main idea and purpose of which is to create a remote control system for an educational robot via a Bluetooth communication channel.

Bluetooth is the most common communication channel at the moment. It is available on almost all phones and is very easy to use. Bluetooth or bluetooth is a manufacturing specification for wireless personal area networks. Bluetooth ensures the exchange of information between devices such as personal computers, mobile phones, printers, digital cameras, mice, keyboards, joysticks, headphones, headsets. Bluetooth allows these devices to communicate when they are within a radius of up to 200 meters from each other (range varies greatly depending on obstacles and interference), even in different rooms.

The word Bluetooth is translated from Danish as “Blue-toothed”. This nickname was worn by King Harald I, who ruled Denmark and part of Norway in the 10th century and united the warring Danish tribes into a single kingdom. The implication is that Bluetooth does the same with communication protocols, combining them into one universal standard.

In this work, a remote control system for an educational robot is being developed. The educational mobile robot is built on the basis of a radio-controlled car. And remote control is carried out via Bluetooth communication channel. The signal transmission device was a phone with the ability to transmit information via Bluetooth, and the receiver device was a Bluetooth module installed on a board in the machine.

Let's define what a robot is. Robot is an electromechanical, pneumatic, hydraulic device or a combination thereof, designed to carry out production and other operations usually performed by humans (sometimes animals). The use of robots makes it possible to facilitate or even replace human labor.

With the development of robotics, 3 types of robots have emerged:

With a strict action program;

Controlled by a human operator;

With artificial intelligence, acting purposefully without human intervention.

Meanwhile, a robot is not so much a hybrid of a machine and a living creature as an automatic mechanism that performs specific work that is unusual for other types of machines. For example, a crane is a machine for lifting loads to a height, a computer is an electronic computing machine. A computer-controlled crane can already be called a robot.

When we talk about robots, we often wonder how intelligent they are and whether, therefore, they can pose a danger or benefit to humans. An interesting topic, although we should talk here not about robots, but about the computers that control their actions. The robot itself is just a set of actuators. Commands for movement are given to the actuators by a computer, in this case a telephone.

To achieve the project goal, the following tasks were set and solved:

1) Development of a block diagram of a control device. A block diagram of the operation of an educational mobile robot with a remote control system is being developed.

2) Development of a microprocessor control device for DC motors. An electrical circuit diagram is being developed - selection of motors, microcontroller, communication interface. The electrical circuit diagram is calculated and a printed circuit board and assembly drawing are developed.

3) Development of an algorithm and program for the control device;

1 . Development of a block diagram of a control device

System block diagram

Using the software installed on the phone, signals are generated and transmitted to the receiver device, in this case it is a Bluetooth module.

The Bluetooth module, in turn, receives signals and, without processing, transmits them to the main control element - the microcontroller.

Receiving information, the microcontroller processes it and generates control signals for the control driver. And through the control driver, voltage is supplied to the DC motors for their operation.

2 . Development of a microprocessor control device for DC motors

In this section, the development of an electrical circuit diagram is carried out - the choice of motors, microcontroller, communication interface. The electrical circuit diagram is calculated and a printed circuit board and assembly drawing are developed.

Development of an electrical circuit diagram

Engine selection

As the control object in this work, we selected engines installed in a radio-controlled car purchased specifically for the job.

Selecting a microcontroller

The Atmega8 microcontroller from Atmel was chosen as the main element for receiving and processing signals (see Appendix B). The microcontroller has UART ports and 3 timers, which is necessary for this work.

Atmel digital signal processors are widely used because they have an affordable price and a sufficient set of peripherals.

Selecting a microcircuit and communication interface

To control the motors, there was a choice between L298N and L293D drivers. But the choice settled on the L298N driver. It operates over a wider voltage range, and therefore there is no risk of overheating the chip. It is also easily accessible and has a full range of functions necessary to get the job done.

The UART interface is selected as the communication interface with the computer in this project. This interface was not chosen by chance, because a Bluetooth module is used for data transmission, which in turn uses the UART interface. Another advantage is its good data transfer speed - 9600 Kbps.

Calculation of mechanical power.

The weight of the model is 0.7 kg, the maximum speed is 1 m/s with a wheel diameter of 30 mm.

Let's calculate the acceleration:

Torque is calculated as follows:

At the moment of inertia and angular acceleration b =

To calculate the maximum engine power, the engine speed is used, expressed in revolutions per minute:

Engine power is proportional to torque and speed:

Calculation of electrical circuit diagram

Selecting a power control driver.

In this work we use the L298N driver with the following characteristics:

Maximum operating voltage: Upit< Uдрайвера=46 В;

Supply voltage U supply =+5 V, +3.3 V;

Maximum output current (per channel): Ipit< Iдрайвера=2 А:

Calculation of resistors.

The Reset pin of the microcontroller, according to the technical documentation, is recommended to be connected to the power supply through a pull-up resistor with a nominal value of 10 kOhm.

Resistors for connecting the microcontroller and the Bluetooth module are installed based on the technical documentation of the module: operating voltage 3.3 V; when working with a voltage of 5 V, install resistors with a nominal value of 4.7 kOhm.

For stable operation and to avoid burning out the LED, it is necessary that the current flowing in the circuit corresponds to the nominal (10 or 20 milliamps), for this we install a resistor with a resistance of 1 kOhm.

Calculation of capacitors.

To stabilize the voltage coming from the power source, capacitors with a capacity of 30 μF and 100 μF were connected in parallel.

It is already known that the Bluetooth module operates on a voltage of 3.3 V, so the operating voltage in the 5 V chip will be excessive, which can lead to the module burning out. Therefore, to reduce the voltage it is necessary to connect the L78L33 stabilizer. Based on its technical documentation, 2 capacitors with a capacity of 0.33 μF and 0.1 μF are required. The connection diagram is shown in the figure.

Connection diagram for stabilizer L78L33

PCB design

The development of the device design is carried out on the basis of the developed electrical circuit diagram, taking into account the requirements for maintainability, the requirements of technical aesthetics, taking into account operating conditions and other requirements.

When designing a PCB, the following must be considered.

Unless there are any restrictions, the printed circuit board (PCB) must be square or rectangular. The maximum size of any side should not exceed 520 mm. The thickness of the PP must correspond to one of the numbers in the series: 0.8; 1.0; 1.5; 2.0 depending on the area of ​​the PP.

The centers of the holes should be located at the coordinate grid nodes. Each mounting and via hole must be covered by a contact pad.

The diameter of the mounting holes and the diameters of the microcircuit leads range from 0.8...1.2 mm, and the diameters of the resistor leads range from about 0.66 mm. To simplify the manufacturing process, the mounting holes on the board have a diameter of 0.8 and 1.2 mm. The grid pitch is 1.27 mm.

Solder the elements with POS-61 solder. The board material is fiberglass foil STEF 2-1.5-50 according to GOST 10316-86.

Development of an assembly drawing

When developing an assembly drawing, attention must be paid to the following requirements:

1) the development of an assembly drawing of a DC motor control device is carried out on the basis of the developed circuit diagram, taking into account the requirements for drawing documents;

2) in accordance with the scheme for dividing the product into component parts, assign a designation to the assembly unit and its elements in accordance with GOST 2.201-68;

3) enter the required dimensions in accordance with the requirements of GOST 2.109-73;

4) fill out the specification, meeting all the requirements of GOST 2.108-68;

5) fill out the main inscription and complete other necessary inscriptions (technical requirements, etc.).

3 . Development of an algorithm and program for a control device

In this section, we develop an algorithm for a microprocessor control device for DC motors, as well as develop a control program for a telephone.

Development of an algorithm for a microprocessor control device for DC motors.

Figure 3 shows a diagram of the operating algorithm of the microprocessor control device.

Transmitted byte values:

10:00 - Stop; 01 - Forward; 10 - Back; 11 - Stop.

23:00 - Stop; 01 - Right; 10 - Left; 11 - Stop.

Program development.

Development of a control program for DC motors.

This program is necessary to control DC motors. The microcontroller is controlled by a program from the phone.

DC motor control program using the ATmega8 microcontroller (see Appendix A).

Development of a program for the phone.

To run this program, you must have Windows 98/2000/ME/XP installed on your computer. This program was developed in the Android SDK environment.

The following namespaces are used for work:

import java.io.IOException;

import java.io. OutputStream;

import java.util. List;

import java.util.UUID;

import android.app. Activity;

import android.app. AlertDialog;

import android.app. ProgressDialog;

import android.bluetooth. BluetoothAdapter;

import android.bluetooth. BluetoothDevice;

import android.bluetooth. BluetoothSocket;

import android.content. Context;

import android.content. DialogInterface;

import android.content. Intent;

import android.content. DialogInterface. OnClickListener;

import android.hardware. Sensor;

import android.hardware. SensorEvent;

import android.hardware. SensorEventListener;

import android.hardware. SensorManager;

import android.net. Uri;

import android.os. Bundle;

import android.os. Handler;

import android.os. Message;

import android.view. LayoutInflater;

import android.view. Menu;

import android.view. MenuInflater;

import android.view. MenuItem;

import android.view. MotionEvent;

import android.view. View;

import android.widget. Button;

import android.widget. TextView;

import android.widget. Toast;

Purpose and conditions of use of the program.

The program is designed to generate and transmit signals to a microprocessor device.

To run this program, you must have a device with any version of the Android operating system. This program was developed in the Android SDK environment.

Access to the program

Before starting the program, you must connect power to the microprocessor device and wait for the LED to blink, which means it is ready for work.

To start the program, you must turn on Bluetooth on the device and launch the “BluCar” application. Using the “Connect to a device” button, establish a connection with the Bluetooth module (“linvor”). After the LED stops blinking, you can begin transferring data.

4. User guide

To check the functionality of the educational mobile robot, you need the following:

Turn on the power to the educational mobile robot using the button shown in the figure.

Power button

Wait for the two LEDs shown in Figure 5 to blink. The first (white) is installed on the circuit, blinking every second, indicating that the circuit has power and is ready for operation. The second LED is located on the Bluetooth module and has 2 operating modes:

Flashing: waiting for connection;

Steady light: indicates connection.

LED working status

Next, turn on Bluetooth on the phone and launch the “BluCar” program presented in Figure 6. In the program, click the “Connect from device” button, and from the provided list select linvor, which is the Bluetooth module. We wait until the LED on the module starts to light constantly, which means a successful connection. The educational mobile robot with a remote control system is ready for work.

Program on the phone "BluCar"

Control methods:

“Forward” button - moving forward;

“Reverse” button - move backwards;

Rotating the phone on a horizontal plane with the right edge down - turning the front wheels to the right;

Rotating the phone on a horizontal plane with the left edge down - turning the front wheels to the left;

To turn off the mobile robot, you need to turn off the power to the circuit and click the “Disconnect from device” button in the program.

Conclusion

As a result of completing a final qualifying bachelor's thesis on the topic: “Development of a remote control system for an educational robot,” a remote control system for an educational robot via a Bluetooth communication channel was produced and created. An educational robot is a machine with two DC motors and a battery. The signal transmission device was a phone with the ability to transmit information via Bluetooth, and the receiver device was a Bluetooth module installed on a board in the machine.

The practical problem considered in the project gives a clear idea of ​​the significance of the presented device. This device will be able to solve very pressing everyday problems, such as controlling all home appliances from your phone and more.

The created remote control system is carried out using a microcontroller. Microcontrollers are much better than their predecessors. They are much smaller in size and have greater productivity, and also significantly speed up the task assigned to them. In this work, a microcontroller is used to process signals that come to it from the phone. It is also responsible for generating signals for the motor driver, which causes the motors to spin directly. The microcontroller is installed in a circuit, which in turn is installed in the machine and connected to the engines.

The above conclusions are drawn from the first (theoretical) part. A block diagram has been created.

The second chapter describes how a microprocessor-based device for remote control of DC motors was developed.

In the third chapter, an algorithm and a phone program for visualizing the control of DC motors was created.

As a result of this work, all set goals and objectives were successfully achieved. In the process of performing the work, skills in developing electrical circuits, their calculations, and layout were consolidated. Also during work, microcontroller programming skills were improved and programming experience was gained in the Android environment.

Bibliography

1. Semenov B.Yu. Power electronics for amateurs and professionals - M.: Solon-R, 2001. -126 p.

2. Lauren Darcy, Shane Conder: Android in 24 hours. Programming applications for the Google operating system. Ed. Reed Group, 2011

3. Kasatkin A.S. Electrical engineering: Textbook. manual for universities. 4th ed. - M.: Energoatomizdat, 1983. -440 p., ill.

4. Evstifeev A.V.: AVR microcontrollers of the Tiny and Mega families from ATMEL. Publishing house "Dodeka-XXI", 2008. - 558 p.

5. Romanycheva E.T. Development and execution of design documentation for radio-electronic equipment. / Directory. M.: Radio and communication, 1989. - 448 p.

6. Sivukhin D.V. General course of physics: T.1. Mechanics: Textbook for physics majors at universities. - M.: Nauka, 1974. - 520 p.

7. Horwitz P., Hill W. The Art of Circuit Design. In 3 volumes. Per. from English - M.: Mir, 1993.

8. Atmel, 8-bit Microcontroller with 16K Bytes In-System Programmable Flash Atmega16 - Datasheet.

9. L298 - Dual Full-Bridge Driver - Datasheet.

10. L78L00 SERIES - Positive voltage regulators - Datasheet.

11. Bluetooth Serial Converter UART Interface 9600bps User's Guide - Datasheet

12. Wikipedia: The free encyclopedia. 2012. URL: http://ru.wikipedia.org. (Date of access: 05/20/2012).

Posted on Allbest.ru

...

Similar documents

    Development of a block diagram of a control device for an educational robot. Selecting a motor, microcontroller, microcircuit, communication interface and stabilizer. Calculation of the electrical circuit diagram. Development of an assembly drawing of the device and program algorithm.

    course work, added 06/24/2013

    Development of a circuit diagram of a microprocessor-based DC motor control device based on the ATmega 128 controller. Development of a package of subroutines in the Assembler language for the purpose of regulating and correct operation of the device.

    course work, added 01/14/2011

    Characteristics of the device and technological data of the industrial robot SM40TS. Description of the U83-K1883 series microprocessor kit, its command system, K572PV4 microcircuit, functional, circuit diagrams and operating algorithm of the control program.

    course work, added 06/02/2010

    Development of a control microprocessor device that implements a specified interaction with the control object, features of hardware and software. System software that ensures the execution of a given control algorithm.

    course work, added 10/25/2009

    Purpose, classification and composition of the access control system. Main characteristics of biometric means of personal identification. User identification by iris. Development of an algorithm for the functioning of the device.

    thesis, added 11/25/2014

    Analysis of existing systems for creating and managing websites, their general characteristics and assessment of functionality at the present stage. Requirements for the server part, means of its development. Interface testing. Creation of a user manual.

    thesis, added 04/11/2012

    Relevance of the task. Development of a functional diagram of the device. Radar installation (RLU). Microprocessor part. Justification of the device operation algorithm. Development of a device control program. Algorithm diagram. Explanations for the program.

    course work, added 10/18/2007

    Analysis of technical specifications. Development of the program interface and its algorithms. Coding and testing of developed software, assessing its practical effectiveness and functionality. Formation and content of the user manual.

    course work, added 07/31/2012

    Modern combat technologies. Robotic means in the military sphere. Design of unmanned aerial vehicles, land and sea robots. Development of a program in Prolog to perform the task of demining a military robot deminer.

    course work, added 12/20/2015

    Designing a microprocessor device that converts the RS-232 interface (COM port) to IEEE 1284 (LPT port). Block diagram of the device. Converting a serial interface to a parallel interface on an ATMega 8 microcontroller.