Control method and device for trackless toy car

文档序号:1193562 发布日期:2020-09-01 浏览:27次 中文

阅读说明:本技术 无轨玩具汽车的控制方法和装置 (Control method and device for trackless toy car ) 是由 张洋 张虎 于 2020-06-04 设计创作,主要内容包括:本申请公开了无轨玩具汽车的控制方法和装置。所述方法的一具体实施方式包括:通过安装在玩具汽车上的光学辨识码传感器读取、识别跑道上印刷的光学辨识码,得到光学辨识码对应的码值;按照编码规则,解析所述码值,获取跑道信息;根据所述跑道信息,控制所述无轨玩具汽车自动行驶。该实施方式实现了在预先不知道跑道轨迹的情况下,根据按照编码规则解析得到的跑道信息,控制玩具汽车在无轨道的跑道上自动行驶。(The application discloses a control method and device for a trackless toy car. One embodiment of the method comprises: reading and identifying the optical identification code printed on the runway by an optical identification code sensor arranged on the toy car to obtain a code value corresponding to the optical identification code; analyzing the code value according to an encoding rule to acquire runway information; and controlling the trackless toy car to automatically run according to the runway information. The embodiment realizes that the toy car is controlled to automatically run on the track without tracks according to the track information obtained by analyzing according to the coding rule under the condition that the track of the track is not known in advance.)

1. A method of controlling a trackless toy vehicle, the method comprising:

reading and identifying the optical identification code printed on the runway by an optical identification code sensor arranged on the toy car to obtain a code value corresponding to the optical identification code;

analyzing the code value according to an encoding rule to acquire runway information;

and controlling the trackless toy car to automatically run according to the runway information.

2. The method of claim 1, wherein the analyzing the code value according to the encoding rule to obtain runway information comprises:

and analyzing the code value according to the coding rules of different types of runways and different traffic identifications to acquire runway information.

3. The method of claim 2, wherein the runway information comprises at least: direction of the runway, length of the runway, traffic identification, and preset running speed.

4. The method of claim 3, wherein said controlling the trackless toy vehicle to travel automatically based on the runway information comprises:

and controlling the toy car to go straight or turn according to the identified direction of the runway and accelerate, decelerate and stop according to the identified traffic sign according to the runway information.

5. The method according to any one of claims 1-4, further comprising:

and calculating the current running speed of the toy car according to the code values acquired twice.

6. The method of claim 5, further comprising:

calculating the deviation distance of the toy car from the center of the runway according to the code value;

and controlling the toy car to decelerate in response to the deviation distance being greater than a preset deviation distance threshold value, and controlling the toy car to drive to the center of the runway when the current running speed of the toy car is lower than a speed threshold value.

7. The method of claim 6, further comprising: and comparing the code values acquired twice before and after, and judging whether the toy car runs in the forward direction or the reverse direction.

8. The method according to any one of claims 6-7, further comprising:

and selecting to play corresponding sound effect according to the runway information and the current running speed of the toy car.

9. The method of claim 8, further comprising:

and in a remote control mode, the remote control device is communicated with the controller, receives the instruction and/or data sent by the controller, controls the toy car to run according to the received instruction and/or data, and feeds back car data to the controller.

10. A control device for a trackless toy vehicle, the device comprising:

the code value reading module is configured to read a code value corresponding to an optical identification code identified by an optical identification code sensor, wherein the optical identification code sensor is installed on the toy car and used for reading and identifying the optical identification code printed on the runway to obtain the code value corresponding to the optical identification code;

the runway information acquisition module is configured to analyze the code value according to a coding rule to acquire runway information;

and the control module is configured for controlling the trackless toy car to automatically run according to the runway information.

11. The apparatus of claim 10, wherein the runway information comprises at least: direction of the runway, length of the runway, traffic identification, and preset running speed.

12. The apparatus of claim 11, wherein the control module is specifically configured to control the toy vehicle to go straight or turn in the identified direction of the runway and to accelerate, decelerate, or stop in the identified traffic sign based on the runway information.

13. The apparatus of any of claims 10-12, further comprising:

and the speed calculating module is configured for calculating the current running speed of the toy car according to the code values acquired twice.

14. The apparatus of claim 13, further comprising:

a deviation runway calculating module configured to calculate a deviation distance of the toy car from a center of a runway according to the code value;

and the deviation correction module is configured for responding to the deviation distance larger than a preset deviation distance threshold value, controlling the toy car to decelerate, and controlling the toy car to drive to the center of the runway when the current driving speed of the toy car is lower than the speed threshold value.

15. The apparatus of claim 14, further comprising:

and the driving direction judging module is configured for comparing the code values acquired twice before and after and judging whether the toy car drives in the forward direction or the reverse direction.

Technical Field

The application relates to the technical field of toy cars, in particular to a trackless toy car.

Background

The toy car is one of the most popular toys for children, can promote the growth of children and has strong entertainment. In recent years, toy cars have also become popular with adult players. The existing toy cars run on a track runway or a fixed runway track, do not support users to design the runway track by themselves, and lack new ideas in playing methods.

Disclosure of Invention

It is an object of the present application to provide an improved control method and apparatus for a trackless toy vehicle that solves the problems noted in the background section above.

In a first aspect, the present application provides a method of controlling a trackless toy vehicle, the method comprising: reading and identifying the optical identification code printed on the runway by an optical identification code sensor arranged on the toy car to obtain a code value corresponding to the optical identification code; analyzing the code value according to an encoding rule to acquire runway information; and controlling the trackless toy car to automatically run according to the runway information.

In some embodiments, the analyzing the code value according to the encoding rule to obtain the runway information includes: and analyzing the code value according to the coding rules of different types of runways and different traffic identifications to acquire runway information.

In some embodiments, the runway information includes at least: direction of the runway, length of the runway, traffic identification, and preset running speed.

In some embodiments, said controlling said trackless toy vehicle to travel automatically based on said runway information comprises: and controlling the toy car to go straight or turn according to the identified direction of the runway and accelerate, decelerate and stop according to the identified traffic sign according to the runway information.

In some embodiments, the method further comprises: and calculating the current running speed of the toy car according to the code values acquired twice.

In some embodiments, the method further comprises: calculating the deviation distance of the toy car from the center of the runway according to the code value; and controlling the toy car to decelerate in response to the deviation distance being greater than a preset deviation distance threshold value, and controlling the toy car to drive to the center of the runway when the current running speed of the toy car is lower than a speed threshold value.

In some embodiments, the method further comprises: and comparing the code values acquired twice before and after, and judging whether the toy car runs in the forward direction or the reverse direction.

In some embodiments, the method further comprises: and selecting to play corresponding sound effect according to the runway information and the current running speed of the toy car.

In some embodiments, the method further comprises: and in a remote control mode, the remote control device is communicated with the controller, receives the instruction and/or data sent by the controller, controls the toy car to run according to the received instruction and/or data, and feeds back car data to the controller.

In a second aspect, the present application provides a control device for a trackless toy vehicle, the device comprising: the code value reading module is configured to read a code value corresponding to an optical identification code identified by an optical identification code sensor, wherein the optical identification code sensor is installed on the toy car and used for reading and identifying the optical identification code printed on the runway to obtain the code value corresponding to the optical identification code; the runway information acquisition module is configured to analyze the code value according to a coding rule to acquire runway information; and the control module is configured for controlling the trackless toy car to automatically run according to the runway information.

In some embodiments, the runway information includes at least: direction of the runway, length of the runway, traffic identification, and preset running speed.

In some embodiments, the control module is specifically configured to control the toy vehicle to go straight or turn in the identified direction of the runway, and to accelerate, decelerate, and stop in the identified traffic sign based on the runway information.

In some embodiments, the apparatus further comprises: and the speed calculating module is configured for calculating the current running speed of the toy car according to the code values acquired twice.

In some embodiments, the apparatus further comprises: a deviation runway calculating module configured to calculate a deviation distance of the toy car from a center of a runway according to the code value; and the deviation correction module is configured for responding to the deviation distance larger than a preset deviation distance threshold value, controlling the toy car to decelerate, and controlling the toy car to drive to the center of the runway when the current driving speed of the toy car is lower than the speed threshold value.

In some embodiments, the apparatus further comprises: and the driving direction judging module is configured for comparing the code values acquired twice before and after and judging whether the toy car drives in the forward direction or the reverse direction.

According to the trackless toy car control method and device, the toy car does not need to know a complete track in advance, only needs to acquire the code value of the OID identified by the current toy car, then analyzes the code value according to the coding rule to obtain track information, and finally controls the toy car to automatically run according to the track information. The runway is designed in a sectional mode, OID codes are printed on each section of runway according to coding rules, a user is supported to design and build a complete path of the runway, and the playing method is flexible. In addition, compared with a track runway, the technical scheme of the application has smaller abrasion to the runway and the toy car.

Drawings

Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:

FIG. 1 is a pictorial view of a runway object suitable for use in one embodiment of a trackless toy vehicle of the present application;

FIG. 2 is a schematic diagram illustrating the configuration of one embodiment of a trackless toy vehicle of the present application;

FIG. 3 is a flow chart of one embodiment of a method of controlling a trackless toy vehicle of the present application;

fig. 4 is a schematic diagram illustrating an exemplary configuration of a control device for a trackless toy vehicle of the present application.

Detailed Description

The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.

It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.

In the present application, each Optical Identification (OID) code is composed of a plurality of tiny code points, which are in the form of a lattice, and after decoding, is a code value, which is composed of at least one of the following: numbers, letters, special symbols. The toy car of the present application is required to run on a special runway, the upper surface of which has OID codes printed with ink containing carbon powder, and the traffic sign is a colored pattern printed with ink containing no carbon powder and covers the OID codes. Traffic signs include, but are not limited to: a start sign, a traffic light sign, a deceleration sign, an acceleration sign and a stop sign. And the OID codes on the runway are arranged according to a preset coding rule. Referring to fig. 1, a diagram of a runway object in one embodiment is shown. In addition, in order to increase entertainment and interest, the runway is set to be one section, and users can use the sectional runway to piece up the runway route wanted by themselves according to their originality.

Reference is made to fig. 2, which is a schematic illustration of the structure of one embodiment of a trackless toy vehicle of the present application. As shown in the figure, the toy car is composed of a micro control unit MCU201, an optical identification code sensor 202 and a power module 203. The power module includes a left dc motor 2031, a left driving wheel 2032, a right dc motor 2033, and a right driving wheel 2034. In this embodiment, a left dc motor 2031 is mechanically coupled to left drive wheel 2032 for driving rotation of left drive wheel 2032, and a right dc motor 2033 is mechanically coupled to right drive turbine 2034 for driving rotation of right drive wheel 2034. The MCU201 is electrically connected to the left dc motor 2031 and the right dc motor 2033, respectively, and controls the rotation speed of the driving wheel by outputting PWM (Pulse width modulation) signals with different duty ratios to the dc motors, which can also be understood as providing different driving powers to the driving wheel by outputting PWM signals with different duty ratios. In addition, the positive and negative of the PWM signal output from the MCU determines whether the driving wheel is rotating forward or reverse. The MCU realizes the automatic running of the toy car by controlling the duty ratio and the positive and negative of the PWM signal. For example, the left driving wheel and the right driving wheel have the same power, the toy car moves straight, the left driving wheel and the right driving wheel have different power, and the toy car turns. The driving wheel reverses to realize backing a car, and left driving wheel, right driving wheel reverse and power are different, realize turning backing a car.

In this embodiment, the optical identification sensor is mounted on the centerline of the bottom of the toy vehicle, and in other alternative implementations, the optical identification sensor is mounted at the front end of the toy vehicle, e.g., in a position intermediate the two headlights. The optical identification code sensor is electrically connected with the MCU. And reading the OID codes on the runway by the optical identification code sensor in real time or at a higher frequency, and decoding to obtain code values. Specifically, the optical identification code sensor emits infrared light, the infrared light irradiates on the OID code containing carbon powder, the OID code containing carbon powder has stronger reflection capacity on the infrared light, the optical identification code sensor receives the reflected infrared light, and then the OID code is decoded to obtain a code value.

The control method of the trackless toy vehicle provided by the present application is generally performed by a micro control unit MCU. With continued reference to fig. 3, a flowchart of one embodiment of a method of controlling a trackless toy vehicle according to the present application is shown. The control method comprises the following steps:

step 301, reading and identifying the optical identification code printed on the runway by an optical identification code sensor installed on the toy car to obtain a code value corresponding to the optical identification code.

In this embodiment, the MCU reads the code value corresponding to the optical id code identified by the optical id sensor according to a preset frequency. In other alternative implementations of this embodiment, the optical identification code sensor actively sends the value of the identified code to the MCU.

In this implementation, code values include, but are not limited to: coordinates representing the position of the OID code, a value representing the direction of the runway, a value representing the length of the runway, a value representing the remaining length of the runway, a value representing the preset driving speed and a value representing the traffic sign, wherein the direction of the runway includes but is not limited to: straight, left turn with different radians, right turn with different radians.

And step 302, analyzing the code value according to the coding rule to acquire runway information.

In this embodiment, different OID codes are printed on different runways and different traffic identifications according to the coding rule. For example, runways for left turns with different lengths and different arcs and for right turns with different arcs represent the coordinates of the position of the OID code with numbers in different ranges. Similarly, different traffic marks are represented by OID codes with specific code values, and the area where the OID codes of the traffic marks are located is covered with the printed colored traffic marks. And the MCU analyzes the code value according to the coding rule to acquire runway information. Among them, runway information includes but is not limited to: direction of the runway, length of the runway, traffic identification, and preset running speed. Wherein the preset running speed represents a running speed of the prescribed toy vehicle on the course.

In other alternative implementations of this embodiment, all runway coordinates are recorded using OID codes of the same numeric range, but the length, arc, direction, traffic sign, etc. of the runway are marked with OID codes that reserve the numeric field.

Step 303, controlling the trackless toy vehicle to automatically run according to the runway information.

In this embodiment, the MCU controls the toy car to go straight or turn at a preset driving speed in the direction of the runway on which the OID code is printed, and to accelerate, decelerate, and stop at the identified traffic sign, at the preset driving speed according to the runway information.

In this embodiment, the running speed of the toy car is precisely controlled. And setting the coordinates of the OID codes on the partial runway, wherein the coordinates represent the positions of the OID codes. And calculating the driving distance according to the coordinates of the OID codes read twice, dividing the distance by the interval time of reading the OID codes to obtain the current driving speed, comparing the current driving speed with the preset driving speed, and judging whether the driving power of the motor needs to be increased or reduced so as to control the acceleration or deceleration of the toy car.

In this embodiment, the toy vehicle is automatically driven on the track without running out of the track for precise control. And the MCU judges whether the toy car deviates from the central line of the runway, the distance from the center of the runway, and whether the toy car deviates to the right or left according to the read coordinates. For example, the runway transverse direction is the X-axis, and the runway centerline is the Y-axis, i.e., the abscissa of the centerline is 0. The absolute value of the abscissa of the read OID code indicates the deviation distance of the toy car from the center of the track. If the deviation distance is larger than the preset deviation distance threshold value, whether the current toy car is left-handed or right-handed is judged according to the positive and negative of the abscissa. In addition, according to the coordinates read twice, the vector is calculated to obtain the orientation of the toy car, and the driving power of the left motor and the right motor is adjusted according to the magnitude of the deviation distance to control the toy car to drive to the center of the runway. And after the toy car is driven to the center of the runway, calculating the current driving speed of the toy car, controlling the output driving power according to the current driving speed and the preset driving speed, and adjusting the driving speed to enable the driving speed to be equal to the preset driving speed.

In another optional implementation manner of this embodiment, the toy car stores therein the OID code of the runway and the preset running speed, and controls the toy car to freely run on the runway according to the preset running speed by comparing the read OID code with the stored OID.

In other optional implementation manners of the embodiment, warning lines are printed on two sides of the runway, and the two warning lines are composed of reserved OID codes with special code values. For example, the left fence is printed with a series of OID codes with a code value of 999, and the right fence is printed with a series of OID codes with a code value of 888. When the MCU reads the code value, the deviation distance of the toy car from the center of the runway is larger than a preset deviation distance threshold value, whether the toy car deviates to the left or to the right is judged according to the code value, the driving power of the left motor and the right motor is adjusted, the running direction of the toy car is changed, and the toy car is controlled to run to the center of the runway.

When the toy car is placed on the runway and automatic driving is started, the MCU judges whether the current vehicle is driven in the forward direction or the reverse direction according to the OID codes read twice. For example, it is determined whether the Y value of the coordinate read last time is greater than the Y value of the coordinate read last time, if so, it is determined that the toy car is running in the forward direction, and if not, it is determined that the toy car is running in the reverse direction, and the toy car is controlled to turn to the forward direction by adjusting the driving power of the left and right motors.

In the control method of the trackless toy car provided by the embodiment of the application, the runway is a section, the OID codes are printed according to the coding rule, the user is supported to design and set up the runway by himself, and the playing method is flexible. The toy car does not need to know a complete track in advance, only needs to acquire the code value of the OID identified by the current toy car, then analyzes the code value according to the coding rule to obtain track information, and finally controls the toy car to automatically run according to the track information.

In other embodiments, the toy vehicle has an acceleration sensor, and the MCU may calculate the current driving speed of the toy vehicle based on information collected by the acceleration sensor. The toy car is also provided with a loudspeaker, the MCU judges whether the current runway is a straight road or a curved road and the current running speed, selects a corresponding audio file and controls the loudspeaker to play the sound.

The toy car of this application not only has the automatic mode of going, still has the remote control mode, and under the remote control mode, the controller passes through wireless connection's mode and establishes communication with the toy car. And sending instructions and/or data to the toy car, and controlling the toy car to run by the MCU of the toy car according to the received instructions and/or data. Then, the current running speed of the toy car, the code value of the OID code and other data are fed back to the controller, and the running path of the toy car is not limited by the laying runway. The controller includes but is not limited to: cell-phone, panel computer, remote control handle.

The toy vehicle of the present application supports resetting parameters in an automatic driving mode. The controller establishes communication with the toy vehicle and modifies the parameters via the screen of the controller. Such parameters include, but are not limited to: the preset running speed, the number of turns of automatic running, the number of runways and the like.

In order to increase the interest, AR (Augmented Reality) playing method is added. Illustratively, the runway is shown in fig. 1, and has a plurality of runways supporting the running of a plurality of toy cars, and the intelligent terminal tracks the plurality of toy cars through the identification of the camera carried by the intelligent terminal. Virtual props are placed on the runway, and a user controls a toy car in augmented reality to pick up attack props and/or defense props through an intelligent terminal. For example, the attack prop which enables the toy car of the opposite side to close the optical identification code sensor is picked up, the attack prop which enables the left motor and the right motor of the toy car of the opposite side to have opposite driving powers is driven, the attack prop which enables the opposite side to accelerate and decelerate is made, and the running of the toy car of the opposite side is disturbed. Likewise, corresponding defense tools or high levels of defense power may also be picked up.

With further reference to fig. 4, as an implementation of the method, the present application provides one embodiment of a control apparatus for a trackless toy vehicle, the apparatus embodiment corresponding to the method embodiment shown in fig. 3.

As shown in fig. 4, the apparatus according to this embodiment includes: read code value module 401, obtain runway information module 402, control module 403, wherein, read code value module 401 configuration and be used for reading the code value that the optics discernment code that optics discernment code sensor discerned corresponds, wherein, optics discernment code sensor is installed on the toy car for read, discern the optics discernment code of printing on the runway, obtain the code value that optics discernment code corresponds. The runway information obtaining module 402 is configured to analyze the code value according to a coding rule, and obtain runway information. The control module 403 is configured to control the trackless toy vehicle to automatically travel according to the runway information.

In the embodiment, the code value reading module 401 reads the code value identified by the optical identification code sensor according to a preset frequency.

In this embodiment, the runway information obtaining module 402 analyzes the code value according to the encoding rule, and obtains at least one piece of runway information from the code value: the runway is a straight runway, the runway is a curve in which direction and radian, the coordinates of the runway, whether the code value represents a traffic sign or not, which traffic sign is represented, and the running speed is preset.

In other optional implementation manners of the embodiment, the runways are divided into different types according to the types of the runways, and each type of the runways is identified by the OID code with a different code value. The runway information obtaining module 402 stores runway information corresponding to each type of runway, and the runway information obtaining module 402 analyzes which type of runway the code value corresponds to according to the coding rule to obtain the runway information of the type of runway.

In this embodiment, the control module 403 controls the toy car to go straight or turn according to the identified direction of the runway, and to accelerate, decelerate, and stop according to the identified traffic sign according to the runway information.

In other embodiments, the automatic driving speed of the toy vehicle is controlled accurately. The device also comprises a speed calculating module and a PID adjusting module, wherein the speed calculating module is configured to calculate the current running speed of the toy car according to the coordinates and the reading intervals represented by the OID codes read twice. And the PID adjusting module is used for adjusting the driving power of the motor according to the difference value between the current running speed and the preset running speed. In other implementations, the speed calculation module includes an acceleration sensor, and calculates the current driving speed according to the acceleration collected by the acceleration sensor.

In other embodiments, the toy vehicle is automatically driven on the runway for precise control. The device also comprises a deviation runway calculating module and a deviation correcting module. The deviation calculating runway module is configured to calculate a deviation distance of the toy car from the center of the runway according to the read code value; the deviation correction module is configured to control the toy vehicle to decelerate in response to the deviation distance being greater than a preset deviation distance threshold, and to control the toy vehicle to drive toward the center of the runway when a current driving speed of the toy vehicle is less than a speed threshold.

In order to make the toy car more intelligent, the device further comprises a driving direction judging module, the driving direction judging module judges whether the toy car is driven clockwise or anticlockwise currently according to code values read twice in front and back, and in combination with coding rules, a user randomly places the toy car on a runway and the toy car automatically adjusts the direction to drive in the positive direction.

The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by a person skilled in the art that the scope of the invention as referred to in the present application is not limited to the embodiments with a specific combination of the above-mentioned features, but also covers other embodiments with any combination of the above-mentioned features or their equivalents without departing from the inventive concept. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

11页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:抽拉玩具盒

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!