Summary of the invention
In view of above-mentioned the deficiencies in the prior art part, the object of the present invention is to provide a kind of bicycle trip table system based on mobile phone and calculate the method for bicycle trip, can realize by mobile phone the itinerary sheet function of bicycle.
In order to achieve the above object, the present invention has taked following technical scheme:
A bicycle trip table system based on mobile phone, it comprises:
Be used for transmitting and receiving infrared ray, and according to the ultrared frequency receiving, produce the infrared detection module of the square-wave signal of respective cycle;
Ultrared reflection unit for the transmitting of reflective infrared detection module;
In described mobile phone, be provided with for calculating the mileage of bicycle and the microprocessor of speed according to the cycle of described square-wave signal and interruption times;
Described infrared detection module has the plug with the receiver J-Horner adaptation of mobile phone, and the signal output part of described detection module is connected with described microprocessor by described plug.
In the above-mentioned bicycle trip table system based on mobile phone, described infrared detection module comprises:
Phase-locked loop circuit ATD for outputting oscillation signal;
For described oscillator signal is amplified and drives infrared-emitting diode to launch ultrared triode;
Be used for launching ultrared infrared-emitting diode;
For receiving the ultrared infrared receiving diode of reflection unit reflection;
The operational amplifier amplifying for the signal that infrared receiving diode is received,
Described phase-locked loop circuit ATD is also for exporting the square-wave signal of respective cycle according to the frequency of the signal of operational amplifier output;
The Rt port of the base stage of described triode and described phase-locked loop circuit ATD, collector is connected with the negative pole of described infrared-emitting diode, grounded emitter; The positive pole of described infrared-emitting diode connects high level;
The plus earth of described infrared receiving diode, negative pole is connected with the reverse input end of described operational amplifier; The positive input ground connection of described operational amplifier, output terminal is connected with the IN port of described phase-locked loop circuit ATD, and the OUT port of described phase-locked loop circuit ATD is connected with described plug.
In the above-mentioned bicycle trip table system based on mobile phone, described infrared detection module also comprises: for controlling the oscillation module of the frequency of described oscillator signal, described oscillation module comprises the first resistance and the first electric capacity; One end of described the first resistance is connected with the Rt port of described phase-locked loop circuit ATD and the base stage of triode, and the other end is connected with one end of described the first electric capacity, the other end ground connection of described the first electric capacity.
In the above-mentioned bicycle trip table system based on mobile phone, between described infrared receiving diode and the reverse input end of operational amplifier, be provided with the second resistance.
In the above-mentioned bicycle trip table system based on mobile phone, described reflection unit is metallic reflection sheet, and this metallic reflection sheet is installed on the spoke of bicycle.
In the above-mentioned bicycle trip table system based on mobile phone, described metallic reflection sheet is reflective silver foil, reflective aluminium foil or reflection Copper Foil.
In the above-mentioned bicycle trip table system based on mobile phone, described infrared detection module is installed on the vehicle frame of bicycle.
In the above-mentioned bicycle trip table system based on mobile phone, the mileage of described bicycle obtains in the following manner:
S=2πR*N
Wherein, S is route, the radius that R is cycle wheel, the number of pulses that N is described square-wave signal.
In the above-mentioned bicycle trip table system based on mobile phone, the speed of a motor vehicle of described bicycle obtains in the following manner:
V=2πR/T
Wherein, the instantaneous velocity that V is bicycle, the radius that R is cycle wheel, T is the cycle of a square-wave signal.
A method for the calculating bicycle trip of above-mentioned bicycle trip table system, it comprises:
Infrared ray by infrared detection module transmitting predeterminated frequency;
By described reflection unit, reflect described infrared ray;
By described infrared detection module, received the infrared ray of reflection unit reflection, according to described ultrared frequency, produce the square-wave signal of respective cycle, and this square-wave signal is exported to mobile phone;
Described mobile phone is provided with microprocessor, and this microprocessor calculates mileage and the speed of bicycle according to the number of times of the cycle of described square-wave signal and its interruption.
Compared to prior art, a kind of bicycle trip table system based on mobile phone provided by the invention and calculate the method for bicycle trip, this system comprises infrared detection module, reflection unit and mobile phone, by the infrared ray of infrared detection module transmitting predeterminated frequency; By described reflection unit, reflect described infrared ray; By described infrared detection module, received the infrared ray of reflection unit reflection, according to described ultrared frequency, produce the square-wave signal of respective cycle, and this square-wave signal is exported to mobile phone; Described mobile phone is provided with microprocessor, this microprocessor calculates mileage and the speed of bicycle according to the number of times of the cycle of described square-wave signal and its interruption, automatic vehicle user only need buy an infrared detection module with low cost, and utilize mobile phone just can realize the itinerary sheet function of bicycle, given full play to the use value of mobile phone.
Embodiment
The invention provides a kind of bicycle trip table system based on mobile phone and calculate the method for bicycle trip, for making object of the present invention, technical scheme and effect clearer, clear and definite, referring to accompanying drawing, developing simultaneously, the present invention is described in more detail for embodiment.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
Refer to Fig. 1, the bicycle trip table system the invention provides based on mobile phone comprises infrared detection module 11, reflection unit 21 and mobile phone 31, infrared detection module 11 has the plug 12 with the receiver J-Horner adaptation of mobile phone 31, in described mobile phone 31, be provided with microprocessor 32, the signal output part of described detection module is connected with the interruptive port of described microprocessor 32 by described plug 12.
Wherein, described infrared detection module 11 is for transmitting and receiving infrared ray, and according to the square-wave signal of the ultrared frequency generation respective cycle receiving, described reflection unit 21 is for the infrared ray of reflective infrared detection module 11 transmittings, and described microprocessor 32 is according to mileage and the speed of the cycle of described square-wave signal and interruption times calculating bicycle.
See also Fig. 2, it is the circuit theory diagrams that the present invention is based on the bicycle trip table system preferred embodiment of mobile phone.In the head circuit of mobile phone 31, be provided with road microphone (MIC) input, two-way earphone DAC(digital-to-analog conversion) output.Described plug 12 is 3.5 Audio Jack plugs, it comprises four PIN pin, its the 1st PIN pin and the 4th PIN pin are vacant, the 2nd PIN pin ground connection, the 3rd PIN pin is connected with the receiver J-Horner of mobile phone 31, controls receiver J-Horner send EINTO_HRADSER look-at-me to microprocessor 32 by infrared detection module 11.
Refer to Fig. 3, the infrared detection module 11 that the present invention is based on the bicycle trip table system of mobile phone comprises phase-locked loop circuit ATD U2, triode T1, infrared-emitting diode D1, infrared receiving diode D2 and operational amplifier U1, the base stage of described triode T1 is connected with the Rt port (resistance timed ports) of described phase-locked loop circuit ATD U2, collector is connected with the negative pole of described infrared-emitting diode D1, grounded emitter; The positive pole of described infrared-emitting diode D1 connects high level; The plus earth of described infrared receiving diode D2, negative pole is connected with the reverse input end of described operational amplifier U1; The positive input ground connection of described operational amplifier U1, output terminal is connected with the IN port (input port) of described phase-locked loop circuit ATD U2, and the OUT port (output port) of described phase-locked loop circuit ATD U2 is connected with the 3PIN pin of described plug 12.
Described phase-locked loop circuit ATD U2 is for outputting oscillation signal, and triode T1 mainly plays amplification, and for described oscillator signal is amplified and drives infrared-emitting diode D1, described infrared-emitting diode D1 is used for launching infrared ray; Described infrared receiving diode D2 and infrared-emitting diode D1 are a pair of infrared tube, for receiving the infrared ray of reflection unit 21 reflections, described phase-locked loop circuit ATD U2 is also for exporting the square-wave signal of respective cycle according to the frequency of the signal of operational amplifier U1 output.
In the embodiment of the present invention, infrared detection module 11 also comprises that, for controlling the oscillation module of the frequency of described oscillator signal, described oscillation module comprises the first resistance R 6 and the first capacitor C 3; One end of described the first resistance R 6 is connected with the base stage of triode T1 with the Rt port of described phase-locked loop circuit ATD U2, and the other end is connected with one end of described the first capacitor C 3, the other end ground connection of described the first capacitor C 3.
Please continue to refer to Fig. 3, between described infrared receiving diode D2 and the reverse input end of operational amplifier U1, be provided with the second resistance R 3, between the reverse input end of operational amplifier U1 and the second resistance R 3, be in series with the second capacitor C 2, and be in series with the 3rd resistance R 5 between the reverse input end of operational amplifier U1 and output terminal.
In the embodiment of the present invention, described phase-locked loop circuit ATD U2 adopts the integrated chip that model is LM567, is provided with phaselocked loop, quadrature phase wave detector (quadrature phase detector device), amplifier and an output transistor, as shown in Figure 4 in it.In phaselocked loop, comprise a current control oscillator (CC0), a phase detector and a feedback filter.The 1st pin of described phase-locked loop circuit ATD U2 is that output filter capacitor pin (Ofil), the 2nd pin are low-pass filtering output pin (Lfil), the 3rd pin is input pin (IN), the 4th pin is power pin (VDD), the 5th pin is regularly pin (Rt) of resistance, the 6th pin is regularly pin (Ct) of capacitance-resistance, the 7th pin is ground pin (GND), and the 8th pin is output pin (Out).
In the specific implementation, the 1st pin of described LM567 chip is by the 3rd capacitor C 5 ground connection, and the 2nd pin is by the 4th capacitor C 6 ground connection, and the 3rd pin is connected with the output terminal of operational amplifier U1 by the 5th electric capacity, the 7th pin ground connection, the 8th pin is connected with the 3rd PIN pin of described plug 12.
Refer to Fig. 3, Fig. 5 and Fig. 6, in specific implementation process, described reflection unit 21 is metallic reflection sheet, and this metallic reflection sheet is installed on the spoke of bicycle, and described infrared detection module 11 is installed on the vehicle frame of bicycle.Wherein, described metallic reflection sheet is that reflective silver foil, reflective aluminium foil, reflection Copper Foil or other have the device of reflecting effect.
To the present invention is based on the principle of work of the bicycle trip table system of mobile phone, be elaborated below:
In infrared detection module 11, by the first resistance R 6 and the first capacitor C 3, control the centre frequency of phase-locked loop circuit ATD U2.By the 5th pin outputting oscillation signal of phase-locked loop circuit ATD U2, this signal, after triode T1 amplifies, promotes the outside reflected infrared of infrared-emitting diode D1.The reflection unit 21 being now arranged on bicycle spoke will rotate with cycle wheel, when reflection unit 21 turns to the correlation position (as shown in Figure 5) of infrared receiving diode D2, by reflection unit 21, the infrared reflection of infrared-emitting diode D1 transmitting is returned, by infrared receiving diode, D2 receives, then after amplifying, operational amplifier U1 inputs to the 3rd pin of phase-locked loop circuit ATD U2, the signal frequency consistent with the frequency of infrared-emitting diode D1 output (being that the signal frequency of infrared receiving diode D2 reception and the centre frequency of phase-locked loop circuit ATD U2 internal voltage controlled oscillator are consistent) receiving due to infrared receiving diode D2, after processing, passes through phase-locked loop circuit ATD U2 internal circuit its 8th pin output low level, afterwards again by the 3rd PIN pin triggering microprocessor 32 interruptions of plug 12.In the time of bicycle uniform motion, the spoke that reflection unit 21 is installed periodically passes through infrared-emitting diode D1 and infrared receiving diode D2, makes the square-wave signal that the 11 output cycles of infrared detection module are T, as shown in Figure 7.Cell-phone microprocessor 32 produces interruption after receiving this square-wave signal, and according to mileage and the speed of the cycle of square-wave signal and interruption times calculating bicycle.
In the embodiment of the present invention, microprocessor calculates the mileage of bicycle in the following manner:
S=2πR*N
Wherein, S is route, the radius that R is cycle wheel, the number of pulses that N is described square-wave signal.
Microprocessor 32 calculates the speed of a motor vehicle of bicycle in the following manner:
V=2πR/T
Wherein, the instantaneous velocity that V is bicycle, the radius that R is cycle wheel, T is the cycle of a square-wave signal.
And, after having calculated the speed and route of bicycle, by mobile phone display screen, carry out corresponding demonstration.In other embodiments, described microprocessor can also calculate and record the average velocity, maximal rate, one way mileage number, total kilometrage number, public affairs of bicycle/mile conversion etc.
In the embodiment of the present invention, when reflection unit 21 has reflected infrared, (now reflection unit 21 is not positioned at the correlation position of infrared receiving diode D2, position as shown in Figure 6), the 3rd pin of described phase-locked loop circuit ATD U2 does not have signal input, and now the 8th pin of phase-locked loop circuit ATD U2 is high level.
And, when infrared receiving diode D2 receives infrared signal or the undesired signal of other frequencies, because the centre frequency of itself and phase-locked loop circuit ATD U2 internal voltage controlled oscillator is inconsistent, after phase-locked loop circuit ATD U2 inter-process, make its 8th pin output high level, therefore the bicycle trip table system based on mobile phone provided by the invention can not be subject to the interference of other frequency signal, its strong anti-interference performance.
Wherein, the above-mentioned bicycle trip table system based on mobile phone, the embodiment of the present invention is also corresponding provides a kind of method that adopts the calculating bicycle trip of above-mentioned bicycle trip table system, and as shown in Figure 8, described method comprises:
S110, by the infrared ray of infrared detection module transmitting predeterminated frequency;
S120, by described reflection unit, reflect described infrared ray;
S130, the infrared ray being reflected by described infrared detection module reception reflection unit, produce the square-wave signal of respective cycle according to described ultrared frequency, and this square-wave signal exported to mobile phone;
S140, described mobile phone are provided with microprocessor, and this microprocessor calculates mileage and the speed of bicycle according to the number of times of the cycle of described square-wave signal and its interruption.
Wherein, in step S130, when infrared detection module receives after the infrared signal of reflection unit reflection, head amplifies processing by this signal, then judges that whether the frequency of this signal and the oscillation signal frequency of its transmitting be identical, if, output low level, triggers the micro-handling interrupt of mobile phone; Otherwise output high level.
In sum, a kind of bicycle trip table system based on mobile phone provided by the invention and calculate the method for bicycle trip, this system comprises infrared detection module, reflection unit and mobile phone, by the infrared ray of infrared detection module transmitting predeterminated frequency; By described reflection unit, reflect described infrared ray; By described infrared detection module, received the infrared ray of reflection unit reflection, according to described ultrared frequency, produce the square-wave signal of respective cycle, and this square-wave signal is exported to mobile phone; Described mobile phone is provided with microprocessor, this microprocessor calculates mileage and the speed of bicycle according to the number of times of the cycle of described square-wave signal and its interruption, automatic vehicle user only need buy an infrared detection module with low cost, and utilize mobile phone just can realize the itinerary sheet function of bicycle, given full play to the use value of mobile phone.
Be understandable that, for those of ordinary skills, can be equal to replacement or change according to technical scheme of the present invention and inventive concept thereof, and all these changes or replacement all should belong to the protection domain of the appended claim of the present invention.