Definition of Problem
When seeking aftermarket motorcycle accessories there are certainly no shortages when the part involves going fast or being loud. However, there is a gaping hole for accessories that mimic such functionality that one would find in a modern consumer vehicle. Even in stock form, motorcycle accessories such as the speedometer and tachometer are rarely accurate within acceptable ranges. This led to the development of the Motorcycle Monitoring System. This product incorporates several key features that would be expected in modern luxury vehicles with ones that do not meet standards in stock form. This product would be highly marketable, as it does not have any current competitors on the market. This product also has outstanding capabilities to be expanded and retrofitted to any make or model foreign or domestic.
If a motorcycle enthusiast wants multiple electronic accessories they all must be purchased as separate units. Most of these units must be placed within a reach distance from the rider creating a distraction of devices if multiple units are needed. Another potential distraction comes from constantly holding the throttle and the wrist pains associated with it. There are "throttle lock" solutions but these raise questions of safety and often fail in actual application because of vibrations through the throttle. There are also stand alone cruise control systems most of them being complex and very expensive. Last, it is not uncommon to find that basic accessories such as the speedometer and tachometer are inaccurate up to 10% of true values. This could lead to speeding fines and the eventual replacement of these sensors for more accurate counterparts, thus adding to the barrage of instruments needing attention.
Scope of Project
The subsequent sections of this report will outline the system specifications, technical information, performance verifications, and future work. The functional design requirement were constructed based on system needs for real world performance and reliability. The requirements include operation at standard automotive voltage and weather resistance. The technical solution was devised from multiple revisions of hardware and peer review. The testing of the system was not as through as the originally proposed due to weather and time restraints. Along with the lack of testing there were multiple features that were determined to fit in the project well with little expansion and this is discussed in future work.
Functional Design Requirements
The intent of this project is to design a motorcycle monitoring system. This system will incorporate modules that would otherwise be separate entities into a single unit. It will also provide a cruise control system that is equivalent to a standard vehicle cruise control. Last, this system will provide a more accurate solution to stock instrumentation that come standard on a motorcycle.
- System includes a global positioning sensor.
- System includes a wheel speed sensor.
- System includes a LCD display.
- System includes a microcontroller.
- System includes a cruise control module.
- System includes a directional button pad to control menu options and cruise parameters.
- System displays engine RPM.
- System displays speed in either KPH or MPH
- System displays elevation in feet or meters.
- System displays battery voltage.
- GPS speed operates within ±1 mph accuracy.
- Engine RPM operates to a max of 16,000 RPM with a resolution of 100 RPM.
- Cruise control system maintains ±2 mph on level ground.
- Cruise control system releases throttle control within 250mS of brake or clutch application.
- Cruise control system functions between 35 to 85 MPH.
- System consumes less than 25 watts at maximum capacity.
- System operates on voltage range from 10V to 15V.
Proposed Technical Solution
A solution to the proposed problem in the design requirements has been broken up into individual sub modules. Figure 1 provides a complete block diagram of the proposed motorcycle monitoring system. Each block in Figure 1 depicts a section of the project that will be addressed individually. The blocks on the left represent incoming sensor data streams or signal pulses. The information enters the middle microcontroller block where the data is processed for calculations and display purposes. The microcontroller outputs information to the screen and to a flash memory device.
Figure 1: System Block Diagram
The motorcycle monitoring system is designed as a consumer level system where the consumer can choose different modules to connect to the main module to add features to their system. The main module is necessary for the operation of any of the other module. The main module contains the microcontroller which controls the sensors in the main module and the sensors in the option modules.
The microcontroller will do the main calculations for the system. The microcontroller gathers information from the GPS sensor, wheel speed sensor, battery voltage, throttle position, and button pad. This information is then displayed to the user and also used for feedback in the cruise control system.
The wheel speed sensor that is used in the design is a Hall Effect device designed for use in ferrous edge detection. The system includes a Hall Effect sensor instead of trying to integrate preexisting sensors that come stock. This sensor makes the system universal and applicable to different types of motorcycles. This is necessary because there are multiple varieties of speed sensing devices employed. These range from analogue to digital output, therefore making it difficult to integrate into a single device. The wheel speed submodule is not essential due to the incorporation of the GPS submodule but if a strong GPS signal is not available it provides a redundancy. Additionally, the wheel speed versus the GPS speed can be used to show the inaccuracies in Hall Effect wheel speed sensors.
Global Positioning Satellite
The GPS (global positioning satellite) sensor is an important feature of the system. The sensor provides comma delaminated information through a UART connection; within the information stream is latitude, longitude, elevation and velocity in mph. The information is formatted into NMEA (National Marine Electronics Association) messages. This information must be parsed into usable values from the data stream. There are six different NMEA messages provided by the GPS sensor. Each message provides a different set of data, for the purposes of this design, only two of the messages were parsed for information. These two messages are GGA and RMC. GGA provides fixed data including latitude, longitude, satellites used and resolution. RMC provides UTC time, speed over ground, course, and the date.
Using the code in the C file below the GPS information was collected and parsed. The file contains an interrupt routine to collect each byte of the stream. When a comma is detected in the stream the previous bytes are fused into a single element. When the bytes that signify the end of a message are detected the fused bytes are analyzed to see if they are one of the two desired messages. If they are there information is parsed into a structure so the information can be used by the rest of the system.
The incorporation of the motors revolutions per second is beneficial for many calculations and engine monitoring. The RPM reading does not require a new sensor. The spark plug coil wire is used to determine when the rate at which the motor is igniting. This spark plug coil is where the voltage is stepped up from the standard automotive 12V to serval thousand volts to bridge the spark plug gap. The signal is much easier to connect into a microcontroller system on the low side of the coil. However the signal produced by the coil is very noisy due to inductance related to stepping up the voltage. This inductive noise is very poor for providing edges to determine when an ignition occurs. To produce a better signal the signal should be filtered. For this design a dual pole RC filter was selected. The signal output from this filter is much better than the input but the output is still not ideal. To make a digital signal input for the microcontroller to interpret at re-triggerable monostable oscillator was created from a 555 timer and a pnp BJT. No only does the 555 timer create a digital signal input for the microcontroller to interpret but protects the microcontroller from voltage spikes as it has a higher voltage tolerance of 16V compared to the 5V tolerance of the microcontroller. The output signal of the oscillator is used to control the gate of a npn BJT to produce a 0-5V output to the microcontroller. The total filter system is shown in the figure below. The dual pole filter has a bandwidth of 1000 Hz and the oscillator can re-trigger every millisecond or at 1000 Hz. This translates to 60,000 RPM which is far greater than most motor applications but still slower than the high frequency noise.
Figure: Dual Pole RC Filter with Re-triggerable Oscillator.
The battery voltage is used to determine the charge in the motorcycle battery. It will give the user information on condition of the battery and help prevent the user from being stranded by a dead battery. The voltage is determined using an analog to digital (AD) converter on the microcontroller. The voltage reference to the AD is at the power input to the main module.
The user is given the information collected by the monitoring system through a LCD screen. The screen will have multiple display modes in which the GPS speed, wheel speed, acceleration, and RPMs will be displayed.
The throttle position is used to determine how far the throttle is open. On most bikes the throttle position is a potentiometer. The throttle position is used to make the cruise control system a closed loop feedback system. On many bikes the potentiometer is already on the throttle assembly but not used for any portion of the original motorcycle sensors.
The digital servo that was chosen is traditionally used in remote control vehicles. These servos provide an ample amount of torque and more importantly a speed that exceeds that of any other actuator considered. It was important to reduce the complexity of the system and this servo eliminated the need for an extra safety precautions.
Servo Driver Board
The driver board is used to move the servo. The incorporation of this board allowed for the tracking of throttle position. It has a set amount of servo positions that ensure that the throttle position is always known by the control loop and system controller.
Cruise Control Release
In order to ensure a vehicle product is fit for consumer use it must provide the user with full access and control over the engine and breaking system in fractions of a second. The primary concern in this project is the ability for the cruise control system to render control of the throttle to the rider. The servo eliminated the need for a more complex throttle return mechanism. It is able to turn a full 90 degrees in 0.17sec and only 60 degrees of actual servo rotation is needed. The brake light provides an interrupt with the highest priority to ensure instantaneous release of the throttle tension by the servo is achieved. This meets or exceeds all OEM standards for throttle return.
Cruise Control Activation
The cruise control system should not be active in situations where it endangers others or the rider. Therefore it was determined that a minimum speed of 35 MPH will need to be achieved before the cruise will allow activation. The highest speed limit in America is now 85 MPH. Subsequently, a maximum speed of 85 MPH can be set and maintained by the cruise control.
The primary system components are listed in Table 1. There are some parts included in the table that were not specified in the design. They are included because they add functionality that fits well in the design of the system for a minimal cost; such parts include the accelerometer. There is another part in the final design that was not specified in the original design; it was added for its usefulness in testing and proving the system functions as desired. This part is the Micro SD Card slot; using this, the system measurements could be saved for later analysis of system performance. The servo is one of the few components that was not sourced from DigiKey. It is a servo you would normally find in an RC car and it is the most expensive part of the entire design but it is necessary because of the high torque needed. The largest single cost of the system main module is the GPS module. There are alternative parts that provide the same functionality at a lower cost. However this GPS chip was selected because of the ease of communication with it. If the system were to be produced in mass quantity it would make financial sense to select another GPS chip. The LCD is the next most expensive part; the cost of this part is average for LCD screens. Another screen could be selected with less resolution to reduce cost slightly because the resolution is greater than what is required. Overall the system cost is not terribly high compared to other motorcycle wheel speed and tachometer clusters and when produced in larger quantities the price would be reduced even further. The full system bill of materials can be found attached.
Table 1: Primary System Components.
PIC 32 Microcontroller
Accelerometer 3 Axis
MicroSD Card Slot
Serial SPI Flash
Solomon Systech SSD1926 LCD Controller
HS-785HB 3.5 Rotations
|Servo Driver Board||Spark Fun||ROB-08897|
The performance verification was done through a variety of methods. Each module that was tested and verified accurate as listed below along with testing methods.
In order to verify the accuracy of the GPS chip two different measures were taken. The first was to simply input the given coordinates into Google Maps. Google placed the point of interest approximately 3m away from the true location which the chip was displaying the coordinates coordinate. Extreme measures such as creating a shield in order to block the GPS signal were taken to test the robustness of the GPS signal. The system was able to maintain a signal with many metallic devices attempting to block the signal. This was performed to simulate buildings and other sources of interference. Even with this the GPS would still not be able to maintain a signal and a source of accurate speed if it was in a tunnel. For this reason the system was made a GPS corrected wheel speed rather than a pure GPS speed; when the GPS signal goes away the system still has the corrected speed from the Hall Effect wheel sensor. The second test method in regards to the GPS was testing the speed output with comparison to gps speed acquired from an Android Smartphone. While driving in a car at a constant 50, 60, and 80 mph both speeds were compared for discrepancies. The system retuned values that were within 0.2 mph of the Android phone thus it was concluded that the sensor was highly accurate and acceptable to rely on for correcting values.
Figure 2: GPS Output Confirmation
In order to test the system under a load that approximately represent the road load conditions a dynamometer (dyno) was used. Unfortunately, the primary purpose of a dyno is to measure the power output of the vehicle being tested. The inertia of the dyno did not present an accurate representation of the wind drag a motorcycle experiences while in acceleration and deceleration. Another issue encountered when performing dyno testing was a loose ground wire causing a jump of approximately in the indicated speed. With the loose ground wire the system speed was not consistent; the lack of consistency made if very difficult for the cruise control to get the servo position correct to keep the wheel speed at the desired speed. However even with the instability and the slow response of the dyno simulation the system was still able to manipulate the throttle in a controlled stable fashion. The cruise control in this testing environment was able to maintain a speed of +/- 5mph of the set cruise speed. This accuracy was determined on observation because the motorcycle monitoring system speed was not reliable nor was data logging available. Unfortunately, time did not allow for further testing of the system with a fixed ground wire and a real test on the road.
Figure 3: Dyno Testing Display
Two videos of the system performing dyno testing can be observed at
There are several areas that could be expanded upon in order to gain further functionality of the system. The first and most important would be to design and complete a working printed circuit board(PCB). A PCB would allow for the functionality of the entire development kit to be enclosed in a dust and water resistant enclosure. This enclosure would then be mounted to the motorcycle with all of the components housed inside of it. Second, most motorcycle have a potentiometer connected to the carburetors in order for the ECU to adjust timing with respect to throttle position. This system could use throttle position to automatically take up slack in the throttle. This would provide the end user in a much more instantaneous cruise control system. Last, additional features could be added to provide a better user experience and a more broad range of functionality. With the microcontroller, graphics accelerator, and LCD screen it would not require much hardware to add a large list of features. A small list of these features would include but are not limited to: SD card data logging, Accelerometer, USB data transmission, RFID keyless ignition, blinker relays, and an automatic shifter unit. All of these functions are well within reach with more code and hardware development.
With the conclusion of this project not all design specifications could be perfectly acquired. However, with the given weather conditions this year full testing and specification completion would not have been possible. The cruise system was able to maintain +/- 5 mph on the dyno which gave an inaccurate representation of a road load and the speed sensing mechanism was plagued with inaccuracy from a broken solder joint. The cruise loop is able to control throttle adjustments for an error of 2 mph or more. The wheel speed sensor was able to maintain the minimum required accuracy without the assistance of the GPS sensor. However, with a change in tire diameter the GPS chip would account for slight variations in order to maintain this level of accuracy. Additionally, the GPS sensor makes the system more universally installable to other motorcycles because the speed will auto calibrate the speed over time. Some of the most crucial results acquired were OEM standards and safety measures that were met and exceeded. The servo was able to return the throttle from its maximum position to full off in approximately 140mS. This is much quicker than what was required and is faster than what the motor would respond to. Minimum speed and gear, depending on rpm and speed indicated, were implemented and disabled cruise activation. Also a RPM limit was set in order to maintain the integrity of the motor. The overall project completion was considered a success with many avenues for future expandability available.
Project Code (Requires Microchip Libraries for Applications)
Project Schematic (Diptrace file format)
Board Layout (Diptrace file format)