CN107441726A - Control the method, apparatus and system of electric toy car - Google Patents
Control the method, apparatus and system of electric toy car Download PDFInfo
- Publication number
- CN107441726A CN107441726A CN201610378267.3A CN201610378267A CN107441726A CN 107441726 A CN107441726 A CN 107441726A CN 201610378267 A CN201610378267 A CN 201610378267A CN 107441726 A CN107441726 A CN 107441726A
- Authority
- CN
- China
- Prior art keywords
- direct current
- current generator
- target
- motor driver
- pulse
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63H—TOYS, e.g. TOPS, DOLLS, HOOPS OR BUILDING BLOCKS
- A63H17/00—Toy vehicles, e.g. with self-drive; ; Cranes, winches or the like; Accessories therefor
- A63H17/26—Details; Accessories
Landscapes
- Toys (AREA)
Abstract
The disclosure is directed to control the methods, devices and systems of electric toy car.Wherein, this method includes:Obtain the pulse information of the photoelectric code disk of the direct current generator in the electric toy car;According to target diversion angle and/or target velocity and the pulse information obtained, to driving the motor driver of the direct current generator to send instruction, so that the direct current generator realizes the target diversion angle and/or target velocity.In the disclosure, micro-control unit is according to the pulse information of the photoelectric code disk of the direct current generator of reading, to control the rotation of direct current generator, so as to realize the control of steering angle, speed to electric toy car, with simple in construction, control simply, micro-control unit size of code is small, writes simple, low cost and other advantages.
Description
Technical field
This disclosure relates to electric toy car technical field, more particularly to the method for control electric toy car, dress
Put and system.
Background technology
Electric toy car is by motor-driven toy car.It is, for example, possible to use high-precision servomotor
To accurately control the speed of electric toy car and steering angle.But servomotor cost is higher, knot
Structure is complicated, and is not easy to safeguard.
The content of the invention
The embodiment of the present disclosure provides a kind of method, apparatus and system for controlling electric toy car.Technical scheme
It is as follows:
According to the first aspect of the embodiment of the present disclosure, there is provided a kind of method for controlling electric toy car, including:
Obtain the pulse information of the photoelectric code disk of the direct current generator in the electric toy car;
According to target diversion angle and/or target velocity and the pulse information obtained, to driving institute
The motor driver for stating direct current generator sends instruction, so that the direct current generator realizes the target steering angle
Degree and/or target velocity.
Alternatively, the direct current generator includes the first direct current generator for realizing the target diversion angle;
The pulse information obtained includes the rotational pulse number of the photoelectric code disk of first direct current generator;
The motor driver includes the first motor driver for driving first direct current generator;
It is described according to target diversion angle and the pulse information obtained, to driving the direct current
The motor driver of machine sends instruction, so that the direct current generator realizes the target diversion angle, including:
According to target diversion angle and default steering locking angle degree, target pulse number is obtained;
When the rotational pulse number of acquisition is equal to the target pulse number, driven to first motor
Device sends the first instruction, so that first motor driver stops driving first direct current generator.
Alternatively, methods described also includes zero point correction step:
By the rotational pulse number of acquisition when the electric toy car is diverted to the first side most terminal it is clear
Zero;
Rotational pulse number when electric toy car to be diverted to the second side most terminal turns as the maximum
To umber of pulse Max corresponding to angle;
Electric toy car from the second side most terminal return again to first side during, record described in
Rotational pulse number, when the rotational pulse number is equal to Max/2, sent to first motor driver
3rd instruction, so that first motor driver stops driving first direct current generator, turned to
Zero point.
Alternatively, it is described according to target diversion angle and default steering locking angle degree, obtain target arteries and veins
Number is rushed, including:
Calculate the ratio of the steering locking angle degree and the target diversion angle;
The ratio is rounded as N;
It is Max/N to obtain the target pulse number.
Alternatively, the direct current generator includes the second direct current generator for realizing the target velocity;
The pulse information obtained includes the rotational pulse frequency of the photoelectric code disk of second direct current generator
Rate;
The motor driver includes the second motor driver for driving second direct current generator;
According to target velocity and the pulse information obtained, to the motor for driving the direct current generator
Driver sends instruction, so that the direct current generator realizes the target velocity, including:
Target pulse frequency is obtained according to the target velocity;
The second instruction is sent to second motor driver, so that second motor driver drives institute
State the second direct current generator so that the rotational pulse frequency of acquisition is equal to the target pulse frequency.
Alternatively, it is described that target pulse frequency is obtained according to the target velocity, including:
Target pulse frequency is obtained according to below equation:Target velocity=target pulse frequency × speed reducing ratio ×
Wheel diameter;Wherein, speed reducing ratio is the speed reducing ratio of the reduction box of the second direct current generator.
According to the second aspect of the embodiment of the present disclosure, there is provided a kind of device for controlling electric toy car, including:
Acquisition module, it is configured as obtaining the arteries and veins of the photoelectric code disk of the direct current generator in the electric toy car
Rush information;
Control module, it is configured as according to target diversion angle and/or target velocity and the acquisition mould
The pulse information that block obtains, instructed to driving the motor driver of the direct current generator to send, so that
The direct current generator realizes the target diversion angle and/or target velocity.
Alternatively, the direct current generator includes the first direct current generator for realizing the target diversion angle;
The pulse information obtained includes the rotational pulse number of the photoelectric code disk of first direct current generator;
The motor driver includes the first motor driver for driving first direct current generator;
The control module, including:
First acquisition submodule, it is configured as according to target diversion angle and default steering locking angle degree,
Obtain target pulse number;
First control submodule, it is configured as the rotational pulse number that the acquisition module obtains and is equal to
During the target pulse number that first acquisition submodule obtains, sent to first motor driver
First instruction, so that first motor driver stops driving first direct current generator.
Alternatively, described device also includes calibration module, the calibration module, including:
First processing submodule, the rotational pulse number for being configured as obtaining the acquisition module is in institute
State when electric toy car is diverted to the first side most terminal and reset;
Second processing submodule, obtained described in when being configured as electric toy car being diverted to the second side most terminal
The rotational pulse number that modulus block obtains is as umber of pulse Max corresponding to the steering locking angle degree;
3rd processing submodule, is configured as electric toy car and returns again to institute from the second side most terminal
During stating the first side, the rotational pulse number that the acquisition module obtains is recorded, when the rotation arteries and veins
When rushing number and being equal to Max/2, the 3rd instruction is sent to first motor driver, so that first electricity
Machine driver stops driving first direct current generator, obtains turning to zero point.
Alternatively, first acquisition submodule, is additionally configured to:Calculate the steering locking angle degree with
The ratio of the target diversion angle, the ratio is rounded as N, obtaining the target pulse number is
Max/N。
Alternatively, the direct current generator includes the second direct current generator for realizing target velocity;
The pulse information obtained includes the rotational pulse frequency of the photoelectric code disk of second direct current generator
Rate;
The motor driver includes the second motor driver for driving second direct current generator;
The control module, in addition to:
Second acquisition submodule, it is configured as obtaining target pulse frequency according to the target velocity;
Second control submodule, it is configured as sending the second instruction to second motor driver, so that
Second motor driver drives second direct current generator so that the acquisition module obtains described
Pulse frequency is equal to the target pulse frequency that second acquisition submodule obtains.
Alternatively, second acquisition submodule, it is configured as obtaining target pulse frequency according to below equation
Rate:Target velocity=target pulse frequency × speed reducing ratio × wheel diameter;Wherein, speed reducing ratio is second straight
Flow the speed reducing ratio of the reduction box of motor.
According to the third aspect of the embodiment of the present disclosure, there is provided a kind of electronic toy vehicle control, including:
Micro-control unit, motor driver and the direct current generator with photoelectric code disk, wherein:
The micro-control unit, include the device of control electric toy car as described above;
The motor driver is configured as receiving the instruction that the micro-control unit is sent, and according to described
Direct current generator described in order-driven;
The direct current generator with photoelectric code disk is configured as being realized according to the driving of the motor driver
Target diversion angle and/or target velocity.
Alternatively, the direct current generator includes being used for the first direct current generator and use for realizing target diversion angle
In the second direct current generator for realizing target velocity;The motor driver includes driving first direct current
First motor driver of machine and the second motor driver for driving second direct current generator.
According to the fourth aspect of the embodiment of the present disclosure, there is provided a kind of device for controlling electric toy car, including:
Processor;
For storing the memory of processor-executable instruction;
Wherein, the processor is configured as:
Obtain the pulse information of the photoelectric code disk of the direct current generator in the electric toy car;
Believed according to the pulse that target diversion angle and/or target velocity and the acquisition module obtain
Breath, to driving the motor driver of the direct current generator to send instruction, so that the direct current generator realizes institute
State target diversion angle and/or target velocity.
The technical scheme provided by this disclosed embodiment can include the following benefits:
Above-mentioned technical proposal, micro-control unit according to the pulse information of the photoelectric code disk of the direct current generator of reading,
To control the rotation of direct current generator, so as to realize the control of steering angle, speed to electric toy car,
With simple in construction, control simply, micro-control unit size of code is small, writes simple, low cost and other advantages.
It should be appreciated that the general description and following detailed description of the above are only exemplary and explanatory
, the disclosure can not be limited.
Brief description of the drawings
Accompanying drawing herein is merged in specification and forms the part of this specification, shows and meets this public affairs
The embodiment opened, and be used to together with specification to explain the principle of the disclosure.
Fig. 1 is the flow chart of the method for the control electric toy car according to an exemplary embodiment.
Fig. 2 is the flow chart of the method for the control electric toy car according to another exemplary embodiment.
Fig. 3 is the flow chart of the method for the control electric toy car according to another exemplary embodiment.
Fig. 4 is the flow chart of the method for the control electric toy car according to an exemplary embodiment.
Fig. 5 is the block diagram of the device of the control electric toy car according to an exemplary embodiment.
Fig. 6 is the control mould in the device of the control electric toy car according to another exemplary embodiment
The block diagram of block.
Fig. 7 is the calibrating die in the device of the control electric toy car according to another exemplary embodiment
The block diagram of block.
Fig. 8 is the control mould in the device of the control electric toy car according to another exemplary embodiment
The block diagram of block.
Fig. 9 is the block diagram of the electronic toy vehicle control according to another exemplary embodiment.
Figure 10 is the block diagram for being used to control the device of electric toy car according to an exemplary embodiment.
Embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following
When description is related to accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous
Key element.Embodiment described in following exemplary embodiment does not represent the institute consistent with the disclosure
There is embodiment.On the contrary, they are only and being described in detail in such as appended claims, the disclosure one
The example of the consistent apparatus and method of a little aspects.
The technical scheme that the embodiment of the present disclosure provides, is related to electric toy car.Fig. 1 is according to an exemplary reality
A kind of flow chart of the method for the control electric toy car exemplified is applied, as shown in figure 1, control electronic toy
The method of car is used in micro-control unit, comprises the following steps S11-S13:
In step s 11, the pulse information of the photoelectric code disk of the direct current generator in electric toy car is obtained.
Photoelectric code disk is a kind of the geometry of machinery displacement on output shaft to be converted into pulse by opto-electronic conversion
Or the sensor of digital quantity.Photoelectric code disk is made up of grating disc and photoelectric detection system.Grating disc be
Several slots are partially opened on the plectane of certain diameter.Photoelectric code disk is coaxial with direct current generator,
When direct current generator rotates, grating disc rotates at the same speed with direct current generator, through electric component groups such as light emitting diodes
Into photoelectric detection system detection export some pulse signals, pass through arteries and veins of the pulse signal within the unit interval
The current rotating speed of direct current generator can be obtained by rushing number (i.e. frequency).
In step s 12, according to target diversion angle and/or target velocity and obtain pulse information,
To driving direct current generator motor driver send instruction so that direct current generator realize target diversion angle and/
Or target velocity.
Electronic toy vehicle control includes micro-control unit, motor driver and direct current generator.Microcontroller
Unit is the control centre of whole electric vehicle system, and advance, retrogressing, left-hand rotation, the right-hand rotation of electric car are all
It is controlled by micro-control unit.Micro-control unit reads the pulse information of the photoelectric code disk of direct current generator,
Direct current generator is driven by motor driver, so as to the angle for controlling or turning right, and control
Make current speed.Motor driver can use PWM, and (Pulse Width Modulation, pulse are wide
Degree modulation) mode drives direct current generator, and the operating of direct current generator can be adjusted by adjusting PWM dutycycle
Speed, so as to reach regulation speed and turning velocity.
In the present embodiment, micro-control unit according to the pulse information of the photoelectric code disk of the direct current generator of reading,
To control the rotation of direct current generator, so as to realize the control of steering angle, speed to electric toy car,
With simple in construction, control simply, micro-control unit size of code is small, writes simple, low cost and other advantages.
Fig. 2 is a kind of flow of the method for control electric toy car according to another exemplary embodiment
Figure.In this embodiment, electric toy car is four-wheel electric toy car, and direct current generator includes realizing target
First direct current generator of steering angle;The pulse information of acquisition includes the photoelectric code disk of the first direct current generator
Rotational pulse number;Motor driver includes the first motor driver of the first direct current generator of driving;First is straight
The steering of motor control the first two wheel is flowed, so as to control the steering of electric toy car.As shown in Fig. 2
The method of control electric toy car comprises the following steps:
In the step s 21, the rotation arteries and veins of the photoelectric code disk of the first direct current generator in electric toy car is obtained
Rush number.
In step S22, according to target diversion angle and default steering locking angle degree, target is obtained
Umber of pulse.
In this step, can be according to the umber of pulse Max corresponding to steering locking angle degree, to obtain target
Target pulse number corresponding to steering angle.Wherein, steering locking angle degree is according to the deflecting roller of electric toy car
Angle from the terminal of side to the terminal of opposite side that can be rotated in the operating condition from determines.Can root
Preset according to the different structure of electric toy car.
First, calculate steering locking angle degree and target diversion angle and ratio;Then by ratio round for
N;Then it is Max/N to obtain target pulse number.Because motor gear has gap, N is bigger, turns to
Angle it is smaller, error is bigger.N is smaller, and the angle of steering is bigger, and turning error is smaller.
Wherein, as shown in figure 3, the umber of pulse corresponding to steering locking angle degree can be obtained by following steps
Take:
It is when electric toy car is diverted to the leftmost side, the rotational pulse number of acquisition is clear in step S31
Zero.
In step s 32, the rotational pulse number obtained when electric toy car being diverted into the rightmost side is as most
Umber of pulse Max corresponding to big steering angle.
In step S33, during electric toy car returns again to left side, the rotational pulse number of acquisition
During equal to Max/2, the 3rd instruction is sent to the first motor driver, so that the first motor driver stops
The first direct current generator is driven, obtains turning to zero point.
The effect for obtaining turning to zero point is to make the preceding samsara of electric toy car just car can keep straight-line travelling.
Above-mentioned steps S31- steps S33 can be used for zero point correction.
In the other embodiment of the disclosure, electric toy car can also be made to turn to from right to left, then from a left side
Zero point correction is carried out to right turn.
It is when electric toy car is diverted to the rightmost side, the rotational pulse number of acquisition is clear in step S31 '
Zero.
In step S32 ', the rotational pulse number obtained when electric toy car is diverted into the leftmost side is as most
Umber of pulse Max corresponding to big steering angle.
In step S33 ', during electric toy car returns again to right side, the rotational pulse number of acquisition
During equal to Max/2, the 3rd instruction is sent to the first motor driver, so that the first motor driver stops
The first direct current generator is driven, obtains turning to zero point.
In step S23, when the rotational pulse number of acquisition is equal to target pulse number, driven to the first motor
Dynamic device sends the first instruction, so that the first motor driver stops the first direct current generator of driving.
Fig. 4 is a kind of flow of the method for control electric toy car according to another exemplary embodiment
Figure.In this embodiment, electric toy car is four-wheel electric toy car, and direct current generator includes realizing target
Second direct current generator of speed;The umber of pulse of acquisition includes the rotation arteries and veins of the photoelectric code disk of the second direct current generator
Rush frequency;Motor driver includes the second motor driver of the second direct current generator of driving;Second direct current
Machine controls the speed of latter two wheel, so as to control the speed that electric toy car advances or retreated.Such as Fig. 4
It is shown, control the method for electric toy car to comprise the following steps:
In step S41, the rotation arteries and veins of the photoelectric code disk of the second direct current generator in acquisition electric toy car
Rush frequency.
In step S42, target pulse frequency is obtained according to target velocity.
Target velocity=target pulse frequency × speed reducing ratio × wheel diameter.Wherein, speed reducing ratio is second straight
Flow the speed reducing ratio of the reduction box of motor.
In step S43, the second instruction is sent to the second motor driver, so that the second motor driver
Drive the second direct current generator so that the rotational pulse frequency of acquisition is equal to target pulse frequency.
In another embodiment of the disclosure, the turning velocity of electric toy car can also be controlled.Can be with
The rotational pulse frequency of the photoelectric code disk of the first direct current generator in electric toy car is obtained, then according to mesh
Pulse frequency corresponding to marking turning velocity acquisition, sends to the first motor driver and instructs, so that the first electricity
Machine driver drives the first direct current generator so that the rotational pulse frequency of the first direct current generator of acquisition is equal to
The corresponding pulse frequency obtained according to target diversion speed, you can realize the control to turning velocity.
In another embodiment of the disclosure, Fig. 2 and Fig. 4 embodiment can be merged into an implementation
Example, that is, the method for controlling electric toy car, played by driving the rotating of former and later two direct current generators to realize
Have advance, retrogressing, left-hand rotation, the right-hand rotation of carriage.The wherein DC MOTOR CONTROL electric toy car of front-wheel
Steering, the DC motor driver electric toy car of trailing wheel moves forward and backward.The control of steering angle is adopted
Realized with the umber of pulse for reading direct current generator photoelectric code disk, the control of speed is using reading direct current generator light
The pulse frequency of code disc is realized.
Following is embodiment of the present disclosure, can be used for performing embodiments of the present disclosure.
Fig. 5 is a kind of block diagram of the device of control electric toy car according to an exemplary embodiment,
The device can pass through the part or complete being implemented in combination with as electronic equipment of software, hardware or both
Portion.As shown in figure 5, the device includes:
Acquisition module 51, it is configured as obtaining the photoelectric code disk of the direct current generator in the electric toy car
Pulse information;
Photoelectric code disk is a kind of the geometry of machinery displacement on output shaft to be converted into pulse by opto-electronic conversion
Or the sensor of digital quantity.Photoelectric code disk is made up of grating disc and photoelectric detection system.Grating disc be
Several slots are partially opened on the plectane of certain diameter.Photoelectric code disk is coaxial with direct current generator,
When direct current generator rotates, grating disc rotates at the same speed with direct current generator, through electric component groups such as light emitting diodes
Into photoelectric detection system detection export some pulse signals, pass through arteries and veins of the pulse signal within the unit interval
The current rotating speed of direct current generator can be obtained by rushing number (i.e. frequency).
Control module 52, for being configured as according to target diversion angle and/or target velocity, Yi Jisuo
The pulse information of the acquisition of acquisition module 51 is stated, is sent to the motor driver of the direct current generator is driven
Instruction, so that the direct current generator realizes the target diversion angle and/or target velocity.
Electronic toy vehicle control includes micro-control unit, motor driver and direct current generator.Microcontroller
Unit is the control centre of whole electric vehicle system, and advance, retrogressing, left-hand rotation, the right-hand rotation of electric car are all
It is controlled by micro-control unit.Micro-control unit reads the pulse information of the photoelectric code disk of direct current generator,
Direct current generator is driven by motor driver, so as to the angle for controlling or turning right, and control
Make current speed.Motor driver can use PWM, and (Pulse Width Modulation, pulse are wide
Degree modulation) mode drives direct current generator, and the operating of direct current generator can be adjusted by adjusting PWM dutycycle
Speed, so as to reach regulation speed and turning velocity.
In the present embodiment, micro-control unit comes according to the pulse information for the photoelectric code disk for reading direct current generator
The rotation of direct current generator is controlled, so as to realize the control of steering angle, speed to electric toy car, tool
There is simple in construction, control simply, micro-control unit size of code is small, writes simple, low cost and other advantages.
In another embodiment of the disclosure, electric toy car is four-wheel electric toy car, direct current generator
The first direct current generator including realizing target diversion angle;The pulse information of acquisition includes the first direct current generator
Photoelectric code disk rotational pulse number;The first motor that motor driver includes the first direct current generator of driving drives
Dynamic device;The steering of first DC MOTOR CONTROL the first two wheel, so as to control the steering of electric toy car.
As shown in fig. 6, the control module 52, including:
First acquisition submodule 521, it is configured as according to target diversion angle and default maximum steering
Angle, obtain target pulse number;
First control submodule 522, it is configured as the rotational pulse that the acquisition module 51 obtains
When number is equal to the target pulse number that first acquisition submodule 521 obtains, to first motor
Driver sends the first instruction, so that first motor driver stops driving first direct current generator.
Fig. 7 is a kind of block diagram of the device of control electric toy car according to an exemplary embodiment,
The device also includes calibration module 53.Calibration module 53 includes:
First processing submodule 531, is configured as the rotational pulse for obtaining the acquisition module 51
Number is reset when the electric toy car is diverted to the first side most terminal;
Second processing submodule 532, it is configured as electric toy car being diverted to the second side most terminal when institute
The rotational pulse number of the acquisition of acquisition module 51 is stated as umber of pulse corresponding to the steering locking angle degree
Max;
3rd processing submodule 533, is configured as electric toy car and turns again from the second side most terminal
To during first side, the rotational pulse number that the acquisition module 51 obtains is recorded, when described
When rotational pulse number is equal to Max/2, the 3rd instruction is sent to first motor driver, so that described
First motor driver stops driving first direct current generator, obtains turning to zero point.
In another embodiment of the disclosure, first acquisition submodule 521, it is additionally configured to:Calculate
The ratio of the steering locking angle degree and the target diversion angle, the ratio is rounded as N, obtained
The target pulse number is Max/N.Because motor gear has gap, N is bigger, and the angle of steering is got over
Small, error is bigger.N is smaller, and the angle of steering is bigger, and turning error is smaller.
In another embodiment of the disclosure, electric toy car is four-wheel electric toy car, direct current generator
The second direct current generator including realizing target velocity;The umber of pulse of acquisition includes the photoelectricity of the second direct current generator
The rotational pulse frequency of code-disc;Motor driver includes the second motor driver of the second direct current generator of driving;
The speed of second DC MOTOR CONTROL latter two wheel, so as to control the speed that electric toy car advances or retreated
Degree.As shown in figure 8, the control module 52, including:
Second acquisition submodule 523, it is configured as obtaining target pulse frequency according to the target velocity;
Target velocity=target pulse frequency × speed reducing ratio × wheel diameter.Wherein, speed reducing ratio is second straight
Flow the speed reducing ratio of the reduction box of motor.
Second control submodule 524, it is configured as sending the second instruction to second motor driver,
So that second motor driver drives second direct current generator so that the acquisition module 51 obtains
The rotational pulse frequency be equal to second acquisition submodule 523 obtain the target pulse frequency
Rate.
Second acquisition submodule 523, is configured as:Target pulse frequency is obtained according to below equation:
Target velocity=target pulse frequency × speed reducing ratio × wheel diameter;Wherein, speed reducing ratio is the second direct current
The speed reducing ratio of the reduction box of machine.
As shown in figure 9, the disclosure also provides a kind of electronic toy vehicle control, including:Microcontroller list
Member 901, motor driver 902 and the direct current generator 903 with photoelectric code disk, wherein:
The micro-control unit 901, include the device of above-mentioned control electric toy car;
The motor driver 902 is configured as receiving the instruction that the micro-control unit is sent, and according to
Direct current generator described in the order-driven;
The direct current generator 903 with photoelectric code disk is configured as the drive according to the motor driver 902
Move to realize target diversion angle and/or target velocity.
The direct current generator 903 includes being used to realize the first direct current generator of target diversion angle and for reality
Second direct current generator of existing target velocity;The motor driver 902 includes driving first direct current
First motor driver of machine and the second motor driver for driving second direct current generator.
The disclosure also provides a kind of device for controlling electric toy car, including:
Processor;
It is configured as storing the memory of processor-executable instruction;
Wherein, the processor is configured as:
Obtain the pulse information of the photoelectric code disk of the direct current generator in the electric toy car;
Believed according to the pulse that target diversion angle and/or target velocity and the acquisition module obtain
Breath, to driving the motor driver of the direct current generator to send instruction, so that the direct current generator realizes institute
State target diversion angle and/or target velocity.
On the device in above-described embodiment, the concrete mode that wherein modules perform operation is having
Close and be described in detail in the embodiment of this method, explanation will be not set forth in detail herein.
Figure 10 is a kind of device 800 for being used to control electric toy car according to an exemplary embodiment
Block diagram.For example, device 800 can be mobile phone, and computer, digital broadcast terminal, message receipts
Send out equipment, game console, tablet device, Medical Devices, body-building equipment, personal digital assistant etc..
Reference picture 10, device 800 can include following one or more assemblies:Processing component 802, is deposited
Reservoir 804, power supply module 806, multimedia groupware 808, audio-frequency assembly 810, input/output (I/O)
Interface 812, sensor cluster 814, and communication component 816.
The integrated operation of the usual control device 800 of processing component 802, such as with display, call,
Data communicate, and camera operation and record operate associated operation.Processing component 802 can include one
Or multiple processors 820 carry out execute instruction, to complete all or part of step of above-mentioned method.In addition,
Processing component 802 can include one or more modules, be easy between processing component 802 and other assemblies
Interaction.For example, processing component 802 can include multi-media module, to facilitate multimedia groupware 808
Interaction between processing component 802.
Memory 804 is configured as storing various types of data to support the operation in device 800.This
The example of a little data includes the instruction of any application program or method for being operated on device 800, connection
It is personal data, telephone book data, message, picture, video etc..Memory 804 can be by any types
Volatibility or non-volatile memory device or combinations thereof realize, such as static RAM
(SRAM), Electrically Erasable Read Only Memory (EEPROM), erasable programmable is read-only to be deposited
Reservoir (EPROM), programmable read only memory (PROM), read-only storage (ROM), magnetic is deposited
Reservoir, flash memory, disk or CD.
Power supply module 806 provides electric power for the various assemblies of device 800.Power supply module 806 can include
Power-supply management system, one or more power supplys, and other are for device 800 with generating, managing and distributing electricity
The associated component of power.
Multimedia groupware 808 is included in the screen of one output interface of offer between device 800 and user.
In certain embodiments, screen can include liquid crystal display (LCD) and touch panel (TP).Such as
Fruit screen includes touch panel, and screen may be implemented as touch-screen, is believed with receiving the input from user
Number.Touch panel includes one or more touch sensors with sensing touch, slip and touch panel
Gesture.Touch sensor can the not only border of sensing touch or sliding action, but also detect and touch
Or the duration and pressure that slide is related.In certain embodiments, multimedia groupware 808 includes
One front camera and/or rear camera.When device 800 is in operator scheme, such as screening-mode or
During video mode, front camera and/or rear camera can receive outside multi-medium data.Each
Front camera and rear camera can be a fixed optical lens system or have focal length and optics
Zoom capabilities.
Audio-frequency assembly 810 is configured as output and/or input audio signal.For example, audio-frequency assembly 810 wraps
Include a microphone (MIC), when device 800 is in operator scheme, as call model, logging mode and
During speech recognition mode, microphone is configured as receiving external audio signal.The audio signal received can
To be further stored in memory 804 or be sent via communication component 816.In certain embodiments,
Audio-frequency assembly 810 also includes a loudspeaker, for exports audio signal.
I/O interfaces 812 provide interface, above-mentioned periphery between processing component 802 and peripheral interface module
Interface module can be keyboard, click wheel, button etc..These buttons may include but be not limited to:Homepage is pressed
Button, volume button, start button and locking press button.
Sensor cluster 814 includes one or more sensors, for providing various aspects for device 800
State estimation.For example, sensor cluster 814 can detect opening/closed mode of device 800,
The relative positioning of component, such as the display and keypad that component is device 800, sensor cluster 814
It can be changed with the position of 800 1 components of detection means 800 or device, user contacts with device 800
Existence or non-existence, the orientation of device 800 or acceleration/deceleration and the temperature change of device 800.Sensor
Component 814 can include proximity transducer, be configured to detect in no any physical contact attached
The presence of nearly object.Sensor cluster 814 can also include optical sensor, as CMOS or CCD schemes
As sensor, for being used in imaging applications.In certain embodiments, the sensor cluster 814 is gone back
Acceleration transducer, gyro sensor, Magnetic Sensor, pressure sensor or TEMP can be included
Device.
Communication component 816 is configured to facilitate wired or wireless way between device 800 and other equipment
Communication.Device 800 can access the wireless network based on communication standard, such as WiFi, 2G or 3G, or
Combinations thereof.In one exemplary embodiment, communication component 816 is received via broadcast channel and come from
The broadcast singal or broadcast related information of external broadcasting management system.In one exemplary embodiment, lead to
Letter component 816 also includes near-field communication (NFC) module, to promote junction service.For example, in NFC
Module can be based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB)
Technology, bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 800 can be by one or more application specific integrated circuits
(ASIC), digital signal processor (DSP), digital signal processing appts (DSPD), programmable patrol
Collect device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor
Or other electronic components are realized, for performing the above method.
In the exemplary embodiment, a kind of computer-readable storage of non-transitory including instructing is additionally provided
Medium, such as the memory 804 including instruction, above-mentioned instruction can be held by the processor 820 of device 800
Go to complete the above method.For example, non-transitorycomputer readable storage medium can be ROM, with
Machine access memory (RAM), CD-ROM, tape, floppy disk and optical data storage devices etc..
A kind of non-transitorycomputer readable storage medium, when the instruction in storage medium is by mobile terminal
During computing device so that mobile terminal is able to carry out a kind of method for controlling electric toy car, method bag
Include:
Obtain the pulse information of the photoelectric code disk of the direct current generator in the electric toy car;
According to target diversion angle and/or target velocity and the pulse information obtained, to driving institute
The motor driver for stating direct current generator sends instruction, so that the direct current generator realizes the target steering angle
Degree and/or target velocity.
Alternatively, the direct current generator includes the first direct current generator for realizing the target diversion angle;
The pulse information obtained includes the rotational pulse number of the photoelectric code disk of first direct current generator;
The motor driver includes the first motor driver for driving first direct current generator;
It is described according to target diversion angle and the pulse information obtained, to driving the direct current
The motor driver of machine sends instruction, so that the direct current generator realizes the target diversion angle, including:
According to target diversion angle and default steering locking angle degree, target pulse number is obtained;
When the rotational pulse number of acquisition is equal to the target pulse number, driven to first motor
Device sends the first instruction, so that first motor driver stops driving first direct current generator.
Alternatively, methods described also includes zero point correction step:
By the rotational pulse number of acquisition when the electric toy car is diverted to the first side most terminal it is clear
Zero;
Rotational pulse number when electric toy car to be diverted to the second side most terminal turns as the maximum
To umber of pulse Max corresponding to angle;
Electric toy car from the second side most terminal return again to first side during, record described in
Rotational pulse number, when the rotational pulse number is equal to Max/2, sent to first motor driver
3rd instruction, so that first motor driver stops driving first direct current generator, turned to
Zero point.
Alternatively, it is described according to target diversion angle and default steering locking angle degree, obtain target arteries and veins
Number is rushed, including:
Calculate the ratio of the steering locking angle degree and the target diversion angle;
The ratio is rounded as N;
The target pulse number is Max/N.
Alternatively, the direct current generator includes the second direct current generator for realizing the target velocity;
The pulse information obtained includes the rotational pulse frequency of the photoelectric code disk of second direct current generator
Rate;
The motor driver includes the second motor driver for driving second direct current generator;
According to target velocity and the pulse information obtained, to the motor for driving the direct current generator
Driver sends instruction, so that the direct current generator realizes the target velocity, including:
Target pulse frequency is obtained according to the target velocity;
The second instruction is sent to second motor driver, so that second motor driver drives institute
State the second direct current generator so that the rotational pulse frequency of acquisition is equal to the target pulse frequency.
Alternatively, it is described that target pulse frequency is obtained according to the target velocity, including:
Target pulse frequency is obtained according to below equation:Target velocity=target pulse frequency × speed reducing ratio ×
Wheel diameter;Wherein, speed reducing ratio is the speed reducing ratio of the reduction box of the second direct current generator.
Those skilled in the art will readily occur to this after considering specification and putting into practice disclosure disclosed herein
Disclosed other embodiments.The application is intended to any modification, purposes or the adaptability of the disclosure
Change, these modifications, purposes or adaptations follow the general principle of the disclosure and including this public affairs
Open undocumented common knowledge or conventional techniques in the art.Description and embodiments only by
It is considered as exemplary, the true scope of the disclosure and spirit are pointed out by following claim.
It should be appreciated that the disclosure be not limited to be described above and be shown in the drawings it is accurate
Structure, and various modifications and changes can be being carried out without departing from the scope.The scope of the present disclosure is only by institute
Attached claim limits.
Claims (15)
- A kind of 1. method for controlling electric toy car, it is characterised in that including:Obtain the pulse information of the photoelectric code disk of the direct current generator in the electric toy car;According to target diversion angle and/or target velocity and the pulse information obtained, to driving institute The motor driver for stating direct current generator sends instruction, so that the direct current generator realizes the target steering angle Degree and/or target velocity.
- 2. according to the method for claim 1, it is characterised in thatThe direct current generator includes the first direct current generator for realizing the target diversion angle;The pulse information obtained includes the rotational pulse number of the photoelectric code disk of first direct current generator;The motor driver includes the first motor driver for driving first direct current generator;It is described according to target diversion angle and the pulse information obtained, to driving the direct current The motor driver of machine sends instruction, so that the direct current generator realizes the target diversion angle, including:According to target diversion angle and default steering locking angle degree, target pulse number is obtained;When the rotational pulse number of acquisition is equal to the target pulse number, driven to first motor Device sends the first instruction, so that first motor driver stops driving first direct current generator.
- 3. according to the method for claim 2, it is characterised in that methods described also includes zero point correction Step:By the rotational pulse number of acquisition when the electric toy car is diverted to the first side most terminal it is clear Zero;Rotational pulse number when electric toy car to be diverted to the second side most terminal turns as the maximum To umber of pulse Max corresponding to angle;Electric toy car is during the second side most terminal returns again to first side, described in record Rotational pulse number, when the rotational pulse number is equal to Max/2, sent to first motor driver 3rd instruction, so that first motor driver stops driving first direct current generator, turned to Zero point.
- 4. according to the method for claim 3, it is characterised in that it is described according to target diversion angle with And default steering locking angle degree, target pulse number is obtained, including:Calculate the ratio of the steering locking angle degree and the target diversion angle;The ratio is rounded as N;It is Max/N to obtain the target pulse number.
- 5. according to the method for claim 1, it is characterised in thatThe direct current generator includes the second direct current generator for realizing the target velocity;The pulse information obtained includes the rotational pulse frequency of the photoelectric code disk of second direct current generator Rate;The motor driver includes the second motor driver for driving second direct current generator;According to target velocity and the pulse information obtained, to the motor for driving the direct current generator Driver sends instruction, so that the direct current generator realizes the target velocity, including:Target pulse frequency is obtained according to the target velocity;The second instruction is sent to second motor driver, so that second motor driver drives institute State the second direct current generator so that the rotational pulse frequency of acquisition is equal to the target pulse frequency.
- 6. according to the method for claim 5, it is characterised in that described to be obtained according to the target velocity Target pulse frequency is taken, including:Target pulse frequency is obtained according to below equation:Target velocity=target pulse frequency × speed reducing ratio × Wheel diameter;Wherein, speed reducing ratio is the speed reducing ratio of the reduction box of the second direct current generator.
- A kind of 7. device for controlling electric toy car, it is characterised in that including:Acquisition module, it is configured as obtaining the arteries and veins of the photoelectric code disk of the direct current generator in the electric toy car Rush information;Control module, it is configured as according to target diversion angle and/or target velocity and the acquisition mould The pulse information that block obtains, instructed to driving the motor driver of the direct current generator to send, so that The direct current generator realizes the target diversion angle and/or target velocity.
- 8. device according to claim 7, it is characterised in thatThe direct current generator includes the first direct current generator for realizing the target diversion angle;The pulse information obtained includes the rotational pulse number of the photoelectric code disk of first direct current generator;The motor driver includes the first motor driver for driving first direct current generator;The control module, including:First acquisition submodule, it is configured as according to target diversion angle and default steering locking angle degree, Obtain target pulse number;First control submodule, it is configured as the rotational pulse number that the acquisition module obtains and is equal to During the target pulse number that first acquisition submodule obtains, sent to first motor driver First instruction, so that first motor driver stops driving first direct current generator.
- 9. device according to claim 8, it is characterised in that described device also includes calibration module, The calibration module, including:First processing submodule, the rotational pulse number for being configured as obtaining the acquisition module is in institute State when electric toy car is diverted to the first side most terminal and reset;Second processing submodule, obtained described in when being configured as electric toy car being diverted to the second side most terminal The rotational pulse number that modulus block obtains is as umber of pulse Max corresponding to the steering locking angle degree;3rd processing submodule, is configured as electric toy car and returns again to institute from the second side most terminal During stating the first side, the rotational pulse number that the acquisition module obtains is recorded, when the rotation arteries and veins When rushing number and being equal to Max/2, the 3rd instruction is sent to first motor driver, so that first electricity Machine driver stops driving first direct current generator, obtains turning to zero point.
- 10. device according to claim 9, it is characterised in thatFirst acquisition submodule, is additionally configured to:Calculate the steering locking angle degree and the target The ratio of steering angle, the ratio is rounded as N, it is Max/N to obtain the target pulse number.
- 11. device according to claim 7, it is characterised in thatThe direct current generator includes the second direct current generator for realizing target velocity;The pulse information obtained includes the rotational pulse frequency of the photoelectric code disk of second direct current generator Rate;The motor driver includes the second motor driver for driving second direct current generator;The control module, in addition to:Second acquisition submodule, it is configured as obtaining target pulse frequency according to the target velocity;Second control submodule, it is configured as sending the second instruction to second motor driver, so that Second motor driver drives second direct current generator so that the acquisition module obtains described Rotational pulse frequency is equal to the target pulse frequency that second acquisition submodule obtains.
- 12. device according to claim 11, it is characterised in that second acquisition submodule, It is configured as obtaining target pulse frequency according to below equation:Target velocity=target pulse frequency × deceleration Than × wheel diameter;Wherein, speed reducing ratio is the speed reducing ratio of the reduction box of the second direct current generator.
- A kind of 13. electronic toy vehicle control, it is characterised in that including:Micro-control unit, motor Driver and the direct current generator with photoelectric code disk, wherein:The micro-control unit, including the control electric toy car as described in any one of claim 7 to 12 Device;The motor driver is configured as receiving the instruction that the micro-control unit is sent, and according to described Direct current generator described in order-driven;The direct current generator with photoelectric code disk is configured as being realized according to the driving of the motor driver Target diversion angle and/or target velocity.
- 14. system according to claim 13, it is characterised in that the direct current generator includes being used for Realize the first direct current generator of target diversion angle and the second direct current generator for realizing target velocity;Institute State the first motor driver and driving described second that motor driver includes driving first direct current generator Second motor driver of direct current generator.
- A kind of 15. device for controlling electric toy car, it is characterised in that including:Processor;For storing the memory of processor-executable instruction;Wherein, the processor is configured as:Obtain the pulse information of the photoelectric code disk of the direct current generator in the electric toy car;Believed according to the pulse that target diversion angle and/or target velocity and the acquisition module obtain Breath, to driving the motor driver of the direct current generator to send instruction, so that the direct current generator realizes institute State target diversion angle and/or target velocity.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610378267.3A CN107441726B (en) | 2016-05-31 | 2016-05-31 | Method, device and system for controlling electric toy car |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610378267.3A CN107441726B (en) | 2016-05-31 | 2016-05-31 | Method, device and system for controlling electric toy car |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107441726A true CN107441726A (en) | 2017-12-08 |
CN107441726B CN107441726B (en) | 2020-02-07 |
Family
ID=60485031
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610378267.3A Active CN107441726B (en) | 2016-05-31 | 2016-05-31 | Method, device and system for controlling electric toy car |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107441726B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109375620A (en) * | 2018-10-12 | 2019-02-22 | 深圳市今天国际智能机器人有限公司 | The method and device of origin is returned using single photoelectric sensor control steering wheel |
WO2020215347A1 (en) * | 2019-04-25 | 2020-10-29 | 吴根飚 | Remote control car having simple servo control system |
CN113069756A (en) * | 2020-01-03 | 2021-07-06 | 北京小米移动软件有限公司 | Touch signal control method, touch signal control device and storage medium |
CN114040270A (en) * | 2021-11-29 | 2022-02-11 | 深圳市星卡科技有限公司 | Method and device for remotely adjusting memory seat and computer equipment |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN2491083Y (en) * | 2000-12-29 | 2002-05-15 | 新会人人电子玩具有限公司 | Remote controlled toy car having electronic speed changed and frout wheel kicked |
CN2605904Y (en) * | 2003-03-28 | 2004-03-10 | 陈伟平 | Remote control toy motorcycle |
CN2657878Y (en) * | 2003-11-18 | 2004-11-24 | 中国科学院自动化研究所 | Drive struction of platform for moving robot |
CN2795916Y (en) * | 2005-04-22 | 2006-07-12 | 北京中科信电子装备有限公司 | Photoelectric code motor controller |
CN1929288A (en) * | 2006-09-15 | 2007-03-14 | 合肥工业大学 | DC motor controller based on FPGA |
CN201383784Y (en) * | 2009-02-18 | 2010-01-13 | 朱铭锆 | Motor driver |
CN101656503A (en) * | 2009-09-29 | 2010-02-24 | 袁亚军 | Drive method of brushless electric bike controller |
CN101938241A (en) * | 2009-06-30 | 2011-01-05 | 河南中光学集团有限公司 | Stepping motor control system and control method thereof |
CN202161805U (en) * | 2011-06-28 | 2012-03-14 | 长安大学 | Intelligent track-seeking model car for race with double tracks |
CN202334412U (en) * | 2011-09-01 | 2012-07-11 | 北京信息科技大学 | Brushless DC motor control system |
CN102857165A (en) * | 2012-09-17 | 2013-01-02 | 天津工业大学 | Current sensor based motor-driven carrier control method |
CN202844570U (en) * | 2012-09-27 | 2013-04-03 | 东北林业大学 | Intelligent model car based on linear power controller (LPC) 2138 advanced reduced instruction set computer (RISC) machine (ARM) 7 master controller |
CN103948285A (en) * | 2014-04-11 | 2014-07-30 | 陕西科技大学 | Double-wheeled upright meal delivery robot capable of storing maps |
-
2016
- 2016-05-31 CN CN201610378267.3A patent/CN107441726B/en active Active
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN2491083Y (en) * | 2000-12-29 | 2002-05-15 | 新会人人电子玩具有限公司 | Remote controlled toy car having electronic speed changed and frout wheel kicked |
CN2605904Y (en) * | 2003-03-28 | 2004-03-10 | 陈伟平 | Remote control toy motorcycle |
CN2657878Y (en) * | 2003-11-18 | 2004-11-24 | 中国科学院自动化研究所 | Drive struction of platform for moving robot |
CN2795916Y (en) * | 2005-04-22 | 2006-07-12 | 北京中科信电子装备有限公司 | Photoelectric code motor controller |
CN1929288A (en) * | 2006-09-15 | 2007-03-14 | 合肥工业大学 | DC motor controller based on FPGA |
CN201383784Y (en) * | 2009-02-18 | 2010-01-13 | 朱铭锆 | Motor driver |
CN101938241A (en) * | 2009-06-30 | 2011-01-05 | 河南中光学集团有限公司 | Stepping motor control system and control method thereof |
CN101656503A (en) * | 2009-09-29 | 2010-02-24 | 袁亚军 | Drive method of brushless electric bike controller |
CN202161805U (en) * | 2011-06-28 | 2012-03-14 | 长安大学 | Intelligent track-seeking model car for race with double tracks |
CN202334412U (en) * | 2011-09-01 | 2012-07-11 | 北京信息科技大学 | Brushless DC motor control system |
CN102857165A (en) * | 2012-09-17 | 2013-01-02 | 天津工业大学 | Current sensor based motor-driven carrier control method |
CN202844570U (en) * | 2012-09-27 | 2013-04-03 | 东北林业大学 | Intelligent model car based on linear power controller (LPC) 2138 advanced reduced instruction set computer (RISC) machine (ARM) 7 master controller |
CN103948285A (en) * | 2014-04-11 | 2014-07-30 | 陕西科技大学 | Double-wheeled upright meal delivery robot capable of storing maps |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109375620A (en) * | 2018-10-12 | 2019-02-22 | 深圳市今天国际智能机器人有限公司 | The method and device of origin is returned using single photoelectric sensor control steering wheel |
WO2020215347A1 (en) * | 2019-04-25 | 2020-10-29 | 吴根飚 | Remote control car having simple servo control system |
CN113069756A (en) * | 2020-01-03 | 2021-07-06 | 北京小米移动软件有限公司 | Touch signal control method, touch signal control device and storage medium |
CN114040270A (en) * | 2021-11-29 | 2022-02-11 | 深圳市星卡科技有限公司 | Method and device for remotely adjusting memory seat and computer equipment |
Also Published As
Publication number | Publication date |
---|---|
CN107441726B (en) | 2020-02-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104537860B (en) | Driving safety prompt method and device | |
CN107441726A (en) | Control the method, apparatus and system of electric toy car | |
CN106782085A (en) | Display module and electronic equipment | |
CN104503671A (en) | Driving control method and device of electric self-balancing vehicle | |
CN104156915A (en) | Skin color adjusting method and device | |
CN105068467B (en) | Control the method and device of smart machine | |
CN105159559A (en) | Mobile terminal control method and mobile terminal | |
CN104954719B (en) | A kind of video information processing method and device | |
CN104536935B (en) | Calculate display methods, calculate edit methods and device | |
CN105574278A (en) | Assisting force providing method and device | |
CN105117008A (en) | Operation guide method and apparatus and electronic device | |
CN105302412A (en) | Method and apparatus for displaying state of smart device | |
CN104537132A (en) | Motion data recording method and device | |
CN107515669A (en) | Display methods and device | |
CN106775202A (en) | A kind of method and device of information transfer | |
CN106462378A (en) | Display method, apparatus and automobile data recorder | |
CN105224174A (en) | The display packing of Paste and device | |
CN104994304A (en) | Optical anti-vibration method and device, and terminal equipment | |
CN105094626A (en) | Method and device for selecting text contents | |
CN106648650A (en) | Method and device for adjusting terminal display status | |
CN105898228B (en) | Control method and device for picture pick-up device | |
CN105045125A (en) | Reminding method and device used in household appliance control | |
CN104778037A (en) | Display method and display device for widgets of application program | |
CN105043404A (en) | Navigation method and navigation device | |
CN105487774A (en) | Image grouping method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |