Abstract:
A vehicle trip recording apparatus collects trip data for manipulation by a separate computer. The computer software contains all the required controls and data manipulation programs for the trip recording device. The trip recording device contains only the hardware to collect and save distance pulses, current time and date, to talk with the computer, and a two button command interface. Of the two button command interface, one of the buttons selects between automatic or manual mode. The second button is a push type and performs the start/stop trip function when the first button is in the manual position. When the first button is in the automatic position, the second button preforms the start/stop calibrate function. Once the trip data has been downloaded into the computer, the trip data can be formatted, printed and saved with the separate computer.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates in general to vehicle trip data recording devices which use uniform pulses electronically generated, from a drive train, to record distances traveled in a motor vehicle. Specifically, the present invention relates to a device that can record the date, start time, distance travelled, and the stop time of a motor vehicle. 
     2. Description of Related Art 
     Many operators use motor vehicles in situations in which it is necessary to monitor and record time and distances traveled. These people are required to distinguish between personal and business use of a motor vehicle in order to pro-rate those expenses which can be used as an income tax deduction. Tracking distances traveled at all times for the complete year is necessary to determine the proper amount of motor vehicle usage which can be written off against federal income taxes. 
     In another situation it is desirable to keep accurate records of distances traveled in a motor vehicle when the operator reclaims expenses from a client or employer. Currently the vehicle operator is responsible, in most cases, for logging of vehicle activity in order to be reimbursed for vehicle expenses. The manual recording of log information is time consuming and tedious. A different example is the situation in which a motor vehicle, is operated by an employee, and the employer wishes to monitor time and distances traveled in order to determine if unauthorized private use of the vehicle has occurred. 
     At the present time this motor vehicle usage assessment is more often than not made at the end of the year. The assessment is only a rough guess because of a lack of documentation or a low cost tracking system to collect the vehicle usage information. Great attention to detail on a daily basis is required to record the data necessary to make the proper assessment of vehicle usage. Obviously therefore considerable error in the tax deduction calculation can occur one way or the other because of the wildly inaccurate rough guess technique. Manual recording of distances traveled by a given motor vehicle is a time consuming process and is subject to human error. 
     Devices of related art, which are intended to assist in collecting motor vehicle usage data, all do more than just collect time/distance travelled. Related art devices have an array of different types of operator interfaces including keypads, buttons, switches and displays to assist the user with categorizing or manipulating the data collected from the time/distance trip recording device. Other devices of related art require the user to categorize the data or information to be collected at the start of each trip. Some devices of related art require that information, such as present odometer reading at the start of a trip or when fuel is added to the vehicle, be entered by the operator when the event occurs. 
     SUMMARY OF THE INVENTION 
     It is an object of the present invention to collect and record vehicle trip data including date, start time, distance travelled, and stop time data from a motor vehicle. 
     It is a further object of the present invention that this trip data collection can occur manually or automatically. In the manual mode, the vehicle operator is required to press a button in order to start the trip data recording process. In the automatic mode, the trip data recording process starts when the vehicle is enabled for travelling such as when the ignition is turned on or the vehicle is placed in drive. The automatic mode will also end the trip recording and store the trip data when the ignition is turned off, the vehicle is placed in park or the vehicle is otherwise disabled. The manual mode trip can be ended by pressing a button or by the same events that end an automatic mode trip. 
     Another object of the present invention is that operator intervention is not required when the trip data is recorded in automatic mode. Thus the present invention need not be located in the operator compartment of the vehicle to record and store trip data. 
     Another object of the present invention is to provide a method for the vehicle operator to calibrate the device that records and stores the trip data. Calibration can be in miles, kilometers, or any unit of measure. 
     Another object of the present invention is the provision of means for downloading recorded trip data from the trip recorder to a personal computer with a standard computer data interface. Once the trip data is in the computer, a custom application program running on the computer may be used to manipulate the trip data as desired. Examples of what the custom application program could do with the trip data are; displaying, editing, printing, and mass storage. 
     Another object of the present invention is that parameters like time, date and operational information can be programmed into the trip recorder only through the computer data interface. Another example of operational information would be the programming of the register that is used to divide the string of electrical distance pulses coming into the present invention into useful units. This serial interface eliminates the need for extra buttons and displays to be attached to the present invention for entry of parametric data. 
     Another object of this invention is to be able to connect a notebook type computer to the trip recorder while trip data is being collected in the vehicle. This allows the user to immediately document the purpose for the trip. 
     Another object of this invention is to have an enclosure that is approximately the same size as a conventional pack of cigarettes so as to be pocket portable. The small size makes it easy to remove the present invention from the vehicle in which data was being collected and take it to a personal computer for transferring data. 
     These and other objects are achieved, in one embodiment, by an electronic device that contains several electronic subsystems. The electronic subsystems include a processor means, data storage, time of day clock, serial data interface hardware, power regulation, and operator interface. The operator interface; comprises one LED, an auto/manual mode input or select switch, an alarm speaker, and a start/stop push button switch for calibration and manual trip control. When the present invention is mounted in a motor vehicle it is connect to four electrical signals originating from a motor vehicle. The four signals needed for trip recording are: ground, vehicle power, distance pulses, and vehicle enable. 
     Once the trip data is saved into the present invention, the trip data can be downloaded to the computer while the present invention is mounted in the motor vehicle. If the time of day clock is battery backed, the present invention can be removed from the motor vehicle and taken to a computer located elsewhere. When the trip recorder is connected to the computer, the trip data can be downloaded. The interface is not limited to serial types like Infrared Red, or serial RS-232, but these would be the preferred methods of retrieving the trip data from the trip recorder. In order to retrieve and manipulate the trip data, a custom application program specifically written to interface with the trip recorder must be loaded onto the computer. 
    
    
     BRIEF DESCRIPTION OF DRAWINGS 
     FIG. 1 is a block diagram depicting the electronic hardware of the trip recorder. 
     FIG. 2 is a flowchart of the main program which runs on the central processing unit in the trip recorder. 
     FIG. 3 is a flowchart of the automatic mode program which is called from the main program. 
     FIG. 4 is a flowchart of the manual mode program which is called from the main program. 
     FIG. 5 is a flowchart of the distance pulse count interrupt program. 
     FIG. 6 is a flowchart of the serial communication interrupt program. 
     FIG. 7 is an isometric view of the trip data recorder. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Referring to FIG. 1, a block diagram of the electrical hardware of the present invention, the &#34;processor means&#34; 100, controls the process of recording trip data and the user interface through the serial interface, &#34;RS-232 Transmit/Receive drivers&#34; 150. To minimize circuit size and cost, a two wire &#34;IIC Serial Data Bus&#34; 120 is used to connect the &#34;time of day clock&#34; 130 and the &#34;EE-prom memory&#34; 140 to the &#34;processor means&#34; 100. The &#34;time of day clock&#34; 130 is powered by the &#34;battery&#34; 105. The preferred &#34;processor means&#34; 100 is a reduced pin count module of the 80C51 microcontroller architecture with an IIC hardware interface incorporated, model 83C751 from Philips Semiconductors. The &#34;system clock crystal&#34; 195 is used to generate the required clock signals that drive the &#34;processor means&#34; 100. The &#34;time of day clock&#34; 130 is a low power CMOS device that may consume as little as 1 u amp. A suitable &#34;time of day clock&#34; 130 device with an IIC interface would be either a model PCF8583 or PCF8593 clock calendars, both sold by Philips Semiconductors. The &#34;EE-prom memory&#34; 140 device is also preferable of CMOS technology with 32K bits of data storage. This translates into over 500 trips worth of data storage. Larger EE-proms are available but for this invention a suitable part would be a model 24C32 EE-prom from Microchip Technology Inc. 
     The connection of the present invention to the computer is facilitated through a +5 volt powered &#34;RS-232 Transmit/Receive drivers&#34; 150. The &#34;RS-232 Transmit/Receive drivers&#34; 150, has logic voltage levels on the &#34;processor means&#34; 100 signal side and generates the +/-12 volt required to driver the serial data out the &#34;serial interface&#34; 175, to the computer. A suitable &#34;RS-232 Transmit/Receive drivers&#34; 150 would be a model MAX232A device from Maxim Inc. The &#34;power regulator&#34; 180, is a 3-terminal device capable of regulating from 7 to 30 volts D.C. into 5 volts D.C. The 5 volts D.C. is required by all electrical devices in the present invention to operate properly and is distributed across the &#34;VCC&#34; 170, a voltage net. A suitable &#34;power regulator&#34; 180, for example, would be a model LM78L05 regulator sold by National Semiconductor. The 7 to 30 volts is fed to the &#34;power regulator&#34; 180 through the &#34;D.C. input power&#34; 185 which may be connected by suitable connector to the vehicle power system. 
     &#34;Speaker&#34; 115 and &#34;LED&#34; 125, are used to inform the trip recorder user of the current status of the trip recorder. &#34;LED&#34; 125, indicates when the trip recorder is powered on, when the trip recorder is recording a trip, when the trip recorder is in calibrate mode, when the trip recorder memory is almost full, and also when the trip recorder is full. The &#34;speaker&#34; 115, indicates when the trip recorder is powered on, the start and completion of a trip along with the start and stop of calibration. The &#34;mode switch&#34; 135, indicates to the &#34;processor means&#34; 100, wither the trip recorder is in automatic mode or manual mode. The &#34;start/stop switch&#34; 145, preferably comprises a push button switch which produces the start/stop signal used in manual mode trip recording and in the calibration process. 
     The present invention uses a total of six signals to operate. All six of the signals are available at two separate connectors. The signals are, the power and ground which provides the &#34;D.C. input power&#34; 185, the &#34;RS-232 Transmit/Receive drivers&#34; 150 signals, the vehicle status signal from &#34;vehicle status input&#34; 155, and distance pulses from the &#34;distance input&#34; 165. One connector is preferably located at the side or front of the device and is primarily used to download data while the recorder device is mounted in the vehicle. The second connector is preferably located at the back of the recording device and primarily facilitates the connection of the present invention to the motor vehicle, but this connector could also be used interface with an external computer. 
     Referring now to FIG. 2, a flowchart of the main looping routine. The &#34;initialization processor means&#34; 205, is processed after &#34;power on&#34; 200 and sets up the operational parameters for the microcontroller like activate interrupts, initialize port configurations, and sets up timer counters. Just before entering the main loop, while still at the &#34;initialize processor means&#34; 205, the &#34;processor means&#34; 100 in FIG. 1 retrieves the operational data from the &#34;EE-prom memory&#34; 140 so the trip recorder knows the next available location to store a trip in the &#34;EE-prom memory&#34; 140. Once the program is running in the main loop, In the decision diamond &#34;have input signals changed?&#34; 210, the two user input switches and the start trip signal are continuously monitored for changes. The process box &#34;process new input signals&#34; 220, is where the changes to the input signals are posted to the program. If the &#34;mode switch&#34; 135 is in the automatic mode, the program will pass through to the automatic subroutine when in the circle &#34;exit to automatic or manual subroutine&#34; 230. Refer to FIG. 3 for a description of the automatic subroutine. If the mode switch is in the manual mode, then the main loop will continuously pass through to the manual subroutine in the circle &#34;exit to automatic or manual subroutine&#34; 230. Refer to FIG. 4 for a description of the manual subroutine. Both the manual and automatic subroutines return to the main loop through the circle &#34;return from automatic or manual subroutine&#34; 240. 
     Another function performed in the main loop is to see if incoming data has arrived via a RS-232 interrupt. Decision diamond &#34;is command in input buffer?&#34; 250 determines if incoming data is detected, then the process box &#34;decode and execute command&#34; 260 will decode the incoming command, jump to the appropriate subroutine and perform the requested task. All incoming data is preferably in six byte records while all out going data is preferably in nine byte records. In the preferred form of the invention, 10 commands can be decoded from the incoming six byte records. The following is a list of preferred commands and their respective description which are decoded in the process box &#34;decode and execute command&#34; 260: 
     1. Read Time Date Reads the current time and data in the clock calendar and sends the data to the host computer which issuing the command. 
     2. Set Time Date Takes the time date data associated with this command and writes it to the clock calendar. 
     3. Read Register Reads the value of the register location included with this command and returns the value of that register to the host computer that issued the command. 
     4. Write Register Write the value included in this command to the register included in this command. 
     5. Download Transfers all the 8 byte records stored in EE-prom to the host computer issuing the command over the serial interface. 
     6. Write8 Writes the 8 byte record built by the host computer using the Write Register command described above in the transmit buffer. This record is written to the location included with this command. 
     7. Recall8 Reads the 8 byte storage location included in this command from the EE-prom and returns the data to the host computer that issued the command. 
     8. Revision Reads the revision level of the software which is located in the program memory and returns the data to the host computer that issued the command. 
     9. Test Starts a test of all internal subsystems and returns a completion code to the host computer that issued the command that indicate the status of the tested hardware. 
     10. Reset This command directs the trip recorder to a software reset that will re-initialize all operational parameters in the trip recorder. 
     The six byte commands to the trip recorder contains up to five bytes of data and the last byte is a checksum byte. The nine byte record sent to the host computer contains up to eight bytes of data and the ninth byte is a checksum byte. 
     In the Process box &#34;process any LED changes&#34; 270, the required state of the &#34;LED&#34; 125 is determined and the appropriate control signal is applied. When the trip recorder is in the calibrate mode, the process box &#34;decode and execute command&#34; 270 will have the &#34;LED&#34; 125 repeatedly blink off for a short pulse, then stay on for a long pulse. When the trip recorder is full and can no longer record more trips, the process box &#34;decode and execute command&#34; 270, will have the &#34;LED&#34; 125 repeatedly blink off for a long pulse and blink on for a short pulse. When the trip recorder reaches 80% capacity, the process box &#34;decode and execute command&#34; 270 will have the &#34;LED&#34; 125 repeatedly blink on and off at equal rates. When none of the above conditions or not true, process box &#34;decode and execute command&#34; 270, will keep the &#34;LED&#34; 125 on continuously when the trip recorder is recording a trip. Of course any suitable signal sequence may be used for the &#34;LED&#34; 125 to provide the desired information. 
     Referring now to FIG. 3, after entering the &#34;automatic mode&#34; 300, the starting point is the decision box, &#34;vehicle status 1&#34; 310. When the ignition is turned-on or some vehicle enabling signal is produced, the program will go to the process box, &#34;start trip if not in progress&#34; 320 and start a trip if one has not all ready started. Otherwise, the program will pass through process box, &#34;start trip if not in progress&#34; 320, and go to the decision box, &#34;is start/stop button pushed 1?&#34; 340. If the calibrate button is pushed, the program will go through the process box, &#34;toggle calibrate bit&#34; 360, to start or stop the collection of the unit of measure of the trip recorder. After toggling the calibrate bit, the program goes to the decision box, &#34;is calibrate active?&#34; 370, and will go to the process box, &#34;stop and save calibrate&#34; 390, if calibrate was active. If calibrate was not active, then the program will go through the process box, &#34;start calibrate&#34; 380, and start the recording of the unit of measure of the trip recorder. 
     When the ignition is turned off or the vehicle is otherwise disabled, the program will go to the decision box, is &#34;trip active?&#34; 330 and check to see if there is a trip currently active. If a trip is active, then the program will go to the process box, &#34;end trip, save data&#34; 350, and save the trip data to the &#34;EE-prom memory&#34; 140. Also, the program saves all the operational data like, the address of the next eight byte record and the number of records saved, at the end of the &#34;EE-prom memory&#34; 140. This operational data is updated after every trip because it will be recovered from the &#34;EE-prom memory&#34; 140 during program initialization at power-on (See process box, &#34;initialize controller&#34; 205). Saving this operational data after every trip permit the system electrical power to be removed from the trip recorder and the trip data will still be retained. Alternatively to using the ignition system as input for the recorder, a suitable switch may be associated with the vehicle transmission to provide a signal when the vehicle is in park. This &#34;in park&#34; signal and it&#39;s absence, may be used for vehicle enabled/disabled signals similarly to the &#34;ignition on&#34;, &#34;ignition off&#34; signals. All process and decision boxes that exit the automatic mode to return to the main program do so through &#34;return to main program loop&#34; 395. 
     Referring now to FIG. 4 a flowchart of the manual mode, &#34;active vehicle status 2&#34; 405, is the first decision box processed by this subroutine after passing &#34;manual mode entry&#34; 400. If the ignition is on, the program will go from &#34;active vehicle status 2&#34; 405 to the decision box, &#34;is start/stop button pushed 2?&#34; 410. If the &#34;start/stop switch&#34; 145 (FIG. 1) is pushed, then the program will go to the process box, &#34;toggle trip in progress bit&#34; 430. After the trip in progress bit has been changed, then the program goes to the decision diamond, &#34;was trip in progress?&#34; 440. If a trip was in progress, the program will go to the process box, &#34;end trip, save data&#34; 460. 
     If a trip was not in progress, the program will leave the decision diamond, &#34;was trip in progress 1?&#34; 440, and go the process box, &#34;start trip&#34; 450. &#34;Is start/stop button pushed 2?&#34;, &#34;end trip, save data&#34; 350 and &#34;start trip&#34; 450 exit the manual mode subroutine though the circle &#34;return to main program loop&#34; 395. If a trip was in process and &#34;active vehicle status 2&#34; 405 should de-activate, then the program will enter decision diamond &#34;was trip in progress 2&#34; 420. If a trip was in progress, the program will exit the decision diamond &#34;was trip in progress 2&#34; 420, then the program will go to the process box &#34;end trip, save data&#34; 350. If the trip has ended, the program will continue to pass through &#34;was trip in progress 2?&#34; 420 and exit back to the main program loop through &#34;return to main program loop&#34; 395 until &#34;active vehicle status 2&#34; 405 becomes active or the mode is changed to the automatic mode with &#34;mode switch&#34; 135. 
     Referring now to FIG. 5, a block diagram of the distance pulse counting interrupt subroutine. After detecting a distance pulse, the program will pass through the &#34;pulse count subroutine&#34; 500 and first enter the decision diamond, &#34;bypass for count scale divide?&#34; 505. &#34;Bypass for count scale divide?&#34; 505, is a user programmable divide register that enables the present invention to reduce a stream of 2000 pulses per mile down to ten pulses per mile which allows for longer trips to be recorded. At ten pulses per mile, the trip recorder has approximately a 6,400 mile per trip capacity. At 100 pulses per mile, the trip recorder can record a trip of approximately 640 miles. The effect of pulses per mile occurs in the decision diamond &#34;bypass for count scale divide?&#34; 505. 
     If the bypass in not taken, then the next decision diamond &#34;is calibrate active?&#34; 510, is processed. If calibrate is active, then the program goes through the process box increment calibrate count then goes to the process box &#34;increment distance pulse counter&#34; 530. If calibrate is not active, the program will pass through the decision diamond &#34;is calibrate active&#34; 500, and go directly to the process box &#34;increment distance pulse counter&#34; 530. In the decision diamond &#34;is calibrate active&#34; 530, when the calibrate function has just been activated, calibrate counter is set to zero. While calibrate is active, the program will pass through the process box &#34;increment calibrate count&#34; 520 every time a distance pulse is detected. When a trip is first started, distance pulse counter is set to zero. both the &#34;bypass for count divide?&#34; 505 and &#34;increment distance pulse counter&#34; 530, exit this subroutine through &#34;return to main program&#34; 540. 
     FIG. 6 shows a flow chart of the interrupt that processes serial communications. This routine starts at &#34;serial communication interrupt&#34; 600 when the incoming signal on the serial port interrupt pin goes high. Once this communications interrupt subroutine starts, it continues to maintain control of the program until all ten bits that represent the received byte of data have been collected. The process box, &#34;receive the incoming bit&#34; 610 switches after receiving the first bit from using the edge trigger interrupt input pin to using a timer to count the bit cell times. Once all ten bits are received, the decision diamond &#34;are all ten bits received&#34; 620, will exit out the yes path. When entering the process box &#34;increment input buffer pointer&#34; 630, the program stores the just received byte in to which the location the buffer pointer is currently pointing. Then after storing the just received byte the input buffer pointer is incremented. When the decision diamond &#34;are all six bytes received?&#34; 640, can exit by the yes path, the main loop is notified that all six bytes have been received and program passes through the circle &#34;return to main program loop&#34; 650. Control is then turned over to the main loop to process the incoming command. The incoming six byte commands are described in the FIG. 2 description. 
     FIG. 7 is an isometric drawing showing the preferred embodiment of the trip data recorder. The view is from the front and shows the &#34;trip recorder enclosure&#34; 710. The &#34;downloading connector&#34; 720 is located in the front for easy user access. The locations of the &#34;LED&#34; 125, the &#34;mode switch&#34; 135, and the &#34;start/stop switch&#34; 145, are also indicated in this drawing. 
     The described embodiment of the invention disclosed herein is in a form that can be utilized by the greatest number of people, for the minimal cost. Other variations of form and interfacing to a personal computer will be apparent to persons skilled in the art. These alternate forms and interfacing to a personal computer are within the scope and spirit of the present invention.