History of Digital Speed and Odometer
Typical bicycle speedometers measure the time between each wheel revolution, and give readout on a small, handlebar-mounted digital display. The sensor is mounted on the bike at a fixed location, pulsing when the spoke-mounted magnet passes by. In this way, it is analogous to an electronic car speedometer, using pulses from an ABS sensor, but with a much cruder time/distance resolution – typically one pulse/display update per revolution, or as seldom once every 2-3 seconds at low speed with a 26-inch wheel. Digital speed and Odometer are used in developing devices for cars and bikes.
The Reason I Chose This Topic
Digital world is very interesting, that is why one has picked the following topic. The second reason is that the following device is very expensive, and that is why one would like to save my money and make it by oneself.
Description of the Project
This project is based on the Digital bicycle speedometer/odometer. The goal of this project is to show that the device can measure both the distance of the trip and the speed .
One will also show the method of research, the details of the main hardware, such as Hall sensor, the smallest unit of microprocessor, measurement of frequency, data storage in EEPROM and systematic LED display modules.
One will introduce the general idea of this project, design schematic, methods graphs to show how the hardware works.
Using the functions of microprocessor in programming, the measurement of frequency will be calculated.
One will also include the circuit design and schematics in this paper
Design Theory and Method
The microprocessor is the central application and control tower, where all the device actions are processed and relayed for further execution. It is interconnected with the different aspects of the device, and thus, creates a channel for all the applications to interconnect and work effectively and efficiently.
The mechanisms connected to the device are the keypad, the Hall sensor, and the reset circuit. Jointly, they work together to collect the required information. They transfer it to the microprocessor for analysis and processing data to be relayed as output.
The data storage application in this device is used to store necessary information that may be needed later. It is in such a way that even without a power supply, the information is safe and is accessible after power supply resumes.
The beeper and LED screen are used as output applications to relay the data that the microprocessor has analyzed and processed. Through different combinations, the beeper sounds, and each sound is of the different meaning, as explained later in the discussion. The indicator light in the device is used as a notification tool for any commands executed or any warnings that are in place.
The Hall Effect sensor is a type of a transducer that helps in the variance of its output voltage in response to the magnetic fields that are present. If, for instance, one holds a magnet near the Hall sensor, the output pin in place will toggle due to the strength of the magnetic fields. Hall Effect sensors are very reliable, very cheap, and are a non-contact way of sensing the magnetic objects that are in proximity to the device. It is for this reason that they are very common in most of the devices.
In this discussion, the Hall Effect is described as the production of voltage differences across the electrical conductor that later transverses to an electric current in the conductor and produces a field perpendicular to the current.
In comparison to other magnetic field sensing devices, the Hall elements have an advantage to produce the output voltage which is fully independent from the detected magnetic field. Moreover, the inductive sensors work as follows: when there is small velocity of the flux variation, the output is also very small, or even minimal. On comparison with sensors based on an emitter detector optical pair, the Hall Effect sensors are not sensitive to such conditions as dust, vibration, humidity and have some characteristics that are constant over some period of time. In the emitter detector optical pair, the emitter light is decreasing with age. Hence lack mechanical contacts, if are applied to the movement detection, the Hall Effect sensors are proved to be more robust than others, whose contacts become interference due to arcing and wear off. The Hall Effect sensors are based more on semiconductors than the common metals, as they have smaller conductivity and they have larger opposed voltage. Their potential in semiconductors or carrier mobility can be managed through the addition of impurities, which make it possible to obtain the repeatable and conclusive Hall coefficient.
Unit of Microprocessor
The system of microprocessor includes microcontroller, reset circuit, and the oscillator circuit.
Structure of Microprocessor Units
If the microprocessor is working, there are three things one has to pay attention to: 1. the power supply; 2.Clock signal; 3. Reset.
Limited time Offer
There are 40 pins in the AT89S52 microprocessor: 2 pins of power supply, 2 pins of oscillator, 4 pins for control, and 32 pins for programmable input/output.
Power supply: pin 40 (Vcc) is 5V, and pin 20 (GND).
Reset circuit (Figure 2.3): capacitor is connected in series with the resistor. When the circuit is closed, pin RST is in a higher position, and time required for RST to remain in a higher position is dependable on the RC value. Where the acronyms C = 10uf and R = 10k%u2126. RST has to be kept in a higher position more than the required two clock cycles.
The Oscillator circuit (Figure 2.4): It is commonly referred to as the heartbeat of every microcontroller. The one used below is the internal clock signal, connected between XTAL1 (Pin19) and XTAL2 (Pin18), and one capacitor is placed between each pin and the ground. The value of the capacitor one used is 30pf. Thus, the frequency is recorded as being 1.0592MHz.
The connection of control pin EA/VPP (pin 31) is used for data storage. If it is low, microcontroller will read instructions from external storage. Moreover, it will read from internal storage if the pin is in a higher position. For the AT89S52, there is 8KB rewritable EEPROM storage, so EA pin is connected in a higher position.
Method of Frequency Measurement
The method of measuring a frequency signal is presented, and different ways in which this method reduces error are considered in this discussion. This project is aimed at measuring the speed and the distance, and relay the acquired data to the LED display. The signal for recording this data comes from the Hall Sensor and goes to the microprocessor that calculates the frequency. However, the effect of noise and the signal reduce should be reduced to a considerable amount, so the the recording is more accurate. The signal then goes to the microprocessor that amplifies annd starts to filter for the data to be recorded. The results acquired that pertain to speed and distance should be stored to the memory, and then displayed on the LED screen. This is a general method to calculate the results required (supposed, the speed is constant in the time period, and the distance is a product of speed and time).
In this design, one will consider the sensitivity of speed and the response in time. The microprocessor measures the frequency of pulses, so the speed is accurate. Measuring distance under the ideal condition has the biasness that is less than 5 meters as marginal error. For the whole distance during the trip, this biasness is acceptable. There are 4 digits displayed that are inclusive of the speed travelled at and distance covered.
First of all, the magnet needs to be fixed onto the front wheel of the bike. A small circular magnet (about 2cm in diameter), normally used in speakers in small toys, can be used for this purpose. It is important to fix the magnet to the spoke of the wheel, and fix the Hall sensor to the fork of the bike in the same level to the magnet. When the wheel rotates with the magnet in place, a pull of signal is made when the Hall sensor and magnet meet during the multiple revolutions. One pull means the wheel has rotated in a complete cycle. For instance, if the radius of the wheel is 0.25m (R= 0.25m), Circumference of the wheel C= 2πR = 1.5m. Distance is equal to C times the number of interrupt. Counter T1 calculates the time of a cycle, so speed is distance divided by the time (V = S/T). When the distance button is pressed, the distance light indicates on, and the display switches to distance. When the speed button is pressed, the speed light indicates on, and the display is switched to speed. If the speed is over the limit, the system sends a signal indicated by the alarm light when it flashes.
As the LED frequency increased, the lighting output rose, while all the while maintaining efficiency and reliability were at acceptable levels. There are seven segments in the LED display. The seven elements of the display can be lit in different combinations to represent the Arabic numerals.
In a simple LED package, all of the cathodes, or all of the anodes of the segment LEDs are connected and brought out to a common pin; this is referred to as a “common cathode” or “common anode” device, depending on the terminal connected to the device. However, 7 segments and decimal point package would only require 9 pins (though, commercial products typically contain more pins, and/or spaces where pins would go, in order to match industry standard output pins).
EEPROM stands for Electrically Erasable Programmable Read-Only Memory, and is a type of a non-volatile memory which is used in computers and some electronic devices in order to store very small amounts of data which must be saved when the power is disconnected.
EEPROM is a read-only user-modifiable memory (ROM) which can be reprogrammed and erased by writing onto it repeatedly. It can be done through the application of high electrical voltage, generated internally or externally, in case of modern EEPROMs. EEPROMs can be programmed and erased in-circuit.
The distance data storage is AT24C02 (Figure 5.1). First of all, the microprocessor sends a writing signal when this signal is confirmed by AT24C02, and then the internal data of the microprocessor will be picked and sent to AT24C02. When displaying the distance, there is a reading signal sent to AT24C02 when this signal is confirmed, it will send the data back to the microprocessor. So, when the system power is off, the data is still there and available until the next time the device is powered on.