• Tidak ada hasil yang ditemukan

A PROJECT THESIS SUBMITTED IN THE PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF

N/A
N/A
Protected

Academic year: 2023

Membagikan "A PROJECT THESIS SUBMITTED IN THE PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF "

Copied!
54
0
0

Teks penuh

We are deeply grateful to our supervisor, Professor Umesh Chandra Pati, whose encouragement, guidance and support from initial to final levels enabled us to develop an understanding of the subject. So the basic concept is to develop a model that can be useful as a security system in society and can control vehicle speed. The property of piezoelectric effect can be used to design a model that can be placed on the road surface and when a vehicle passes the sensor at higher speed, it will generate an alarming condition.

When a vehicle passes over the surface of 1. array of sensor, it will provide a voltage output which can be useful to start the timer in microcontroller and while the vehicle will pass over the other array of sensor, the voltage output from it will disable the timer in microcontroller. Therefore, the total time taken by the vehicle can be determined and so can the speed of the vehicle since we know the fixed distance between the two arrays of sensors. The cost of the system should also be considered when designing the sensor.

The concept of the piezoelectric effect can be implemented to have exactly the function described above. Thus, it is possible to design a system that will use the concept of the piezoelectric effect and will be able to detect the speed of a vehicle driving past it.

Project description

PROJECT DESCRIPTION

These voltages can be further used to enable and disable the timer bit in the microcontroller. Therefore, we can find out the exact time it takes the vehicle to switch from one set of sensors to another. Now the speed can be found out by doing some math in the microcontroller itself.

If the observed speed will be greater than a specific speed, an alarm condition will be generated which will activate a buzzer. And therefore we can be sure that the speed of crossed vehicles is more than the desired speed. Therefore, this model can be implemented as a security system to control the speed of vehicles in the community.

COMPLETE BLOCK DIAGRAM OF THE SYSTEM

While you hold it on your hand or simply touch it, it will give a random output voltage of 50 to 80 mV. When a heavy vehicle passes over it, it may not be able to withstand such high pressure.

An introduction to piezoelectric effect

Types of piezoelectric crystals

Designing of the model

Components required

Electrical characteristics OF L7805

Comparator circuit

When V1>V2, that is when no pressure is applied to the sensor, then V2-V1<0. But we don't need the negative saturated voltage in the idle case but in the idle case we need zero volt output voltage. A diode can be connected to the output of Opamp, so that we get a zero output.

From the given table it is clear that by using a diode we can eliminate unwanted negative voltage output. So when the vehicle moves over the array or when we push the sensor, the output voltage will be around 5v. So this voltage can be used to start and stop the timer bit in ATMEGA32 microcontroller.

When the vehicle passes over the first set of sensors it will give a voltage of approximately 5v to the timers input port then the timer will start and when it moves over the second bar then the generated voltage will disable the timer . Thus the total time it takes the vehicle to cover the distance between the two lanes can be determined.

Table 4.2: Result of comparator circuit
Table 4.2: Result of comparator circuit

Microcontrollers

  • ATmega32L
  • Pin Configuration of ATmega32L
  • Need of microcontroller in our system
  • Input/Output Ports
    • Port A (PA0…PA7)
    • Port B (PB0…PB7)
    • Port C (PC0…PC7)
    • Port D (PD0…PD7)
    • Registers Associated with the Ports
  • Timer

High performance and low power consumption are the most attractive features of the ATmega32 microcontroller. Besides that, to detect the incoming pulses from the strips, we are going to implement the continuous tuning mechanism, for which we need the input/output ports of the microcontroller. So first we need to familiarize ourselves with the functionalities of the input/output ports and the timer and also with their associated registers.

Therefore, in the following sections, we will focus on the operation of the timer and I/O ports, which will help us in modeling the microcontroller. But port B also serves many other functions of various special functions of the ATmega32 [1]. The main function of port C is to act as an 8-bit bidirectional I/O port with internal pull-up resistors selectable for each bit.

Port C also serves the functions of the JTAG interface and other special features of the ATmega32. Port D is an 8-bit bidirectional I/O port with internal pull-up resistors (selected for each bit). If PORTxn is written to logic one when the pin is configured as an input pin, the pull-up resistor is enabled.

To turn off the pull-up resistor, PORTxn must be written logic zero or the pin must be configured as an output pin[1]. If PORTxn is written logic one when the pin is configured as an output pin, the port pin is driven high (one)[1]. If PORTxn is written logic zero when the pin is configured as an output pin, the port pin is driven low (zero).

In our project work, we will only use Timer0 of ATmega32L for simulation purpose.

5.5.1 8-bit Timer/Counter0

  • Timer/Counter Clock Sources
  • Output Compare Unit
  • Registers Associated With Timer/Counter0
  • Timer/Counter Control Register – TCCR0
  • Timer/Counter Register – TCNT0
  • Output Compare Register – OCR0
  • Timer/Counter Flag Register(TIFR)
  • TOV0: Timer/Counter0 Overflow Flag 0: If an overflow occurs in Timer/Counter 0 then this bit is set

A CPU write overrides (takes precedence over) all reverse or count operations[1].. The job of the 8-bit comparator in timer0 is to continuously compare the value in the TCNT register and the value in the OCR0 register. Alternatively, the OCF0 flag can be cleared by software by writing a logic one to its I/O bit location[1]. When you write a logic one to the FOC0 bit, an immediate comparison match is forced on the waveform generation unit.

Bit 6, 3 – WGM01:0: Waveform Generation Mode: The counting sequence of the counter is controlled by these bits. They are: Normal mode, Clear Timer on Compare Match (CTC) mode and two types of Pulse Width Modulation (PWM) modes. When either or both bits are set, normal port functionality is overridden for the port pins to which the OC0 pin is connected.

The clock source that will be used by the timer is selected by these three bits. When a comparison match occurs, the output comparison flag (OCF0) in the Timer/Counter interrupt flag register is set. If a comparison match occurs between the timer value and the OCR0 register, the corresponding comparison match interrupt is executed.

The corresponding interrupt is executed if an overflow occurs in Timer/Counter0, that is, when the TOV0 bit is set in the Timer/Counter Interrupt Flag Register- TIFR. This bit can be cleared by hardware TCNT0 and the value in the OCR0 register, then this bit is set.

SIMULATION OF ATMEGA32L USING

AVR STUDIO 4

Simulation of atmega32L using AVR studio 4

  • Concept of the Programming
  • Register Values to be Uploaded
  • DDRB and DDRD registers should be uploaded with the values so that port A and port B will act as input ports for the implementation of polling mechanism. We will be transmitting the
  • Value to be uploaded in the OCR0 register can be calculated as follows
    • Formula for Speed Calculation
    • Screenshots of the Simulation
    • Observations
  • Conclusion

Also Port A must be configured as an output port so that the Port A pins are used to display the speed. Since the clock frequency of the ATmega32L in the simulator (AVR STUDIO 4) is 4 MHz, we will get the clock input for the timer from the prescaler which divides the input clock cycle by 64. For this purpose we need to configure the CS00, CS01 and CS02 bits in the TCCR0 register.

In the above programming, Port A is configured to show the value of the variable "p" as long as speed is not calculated. We can see the value shown by the Port A register at the lower part of the right side of the screen. In the left side of the screen, in the processor window, we can see that the reading of the stopwatch is about 218 milliseconds, which is almost equal to the value of the variable p.

In the above screenshot, we can see the speed value at Port A. So, with the derived formula for vehicle speed, the speed comes out to be 80 km/h. It was observed that the stopwatch values ​​were almost equal to that of the "p" variable which holds the milliseconds value.

Figure 6.2: Screen shot 2
Figure 6.2: Screen shot 2

Conclusion

Scope for the future

In order to prevent accidents, we can do by reducing the number of vehicles, but this seems to be impossible. What we can do is we can introduce certain rules for the purpose of driving. The vehicle must not move on certain roads at more than a certain speed.

This concept of piezoelectric sensor can be used to make the proposed sensor and can be used on the road for safety purpose. In this model, we only used the buzzer to activate the alarm condition to warn the operator or the traffic police in the next square, but it seems unsatisfactory to recognize the identity of the vehicle that crossed the lanes at a higher speed. A vehicle may not be recognized just by the sound of the buzzer, as if two vehicles pass the sensor arrays one after the other continuously.

The model can therefore be adjusted in the future to recognize the exact vehicle that has violated the rule. This can be done by attaching a digital camera that focuses just above the second sensor array. This will be a great advantage as it will provide a direct license plate photo to the security substation.

So that if two vehicles move simultaneously on the arrays, two separate sections can identify which section vehicle got higher speed and which is normal or else both crossed with higher speed. Now comes the question that these sensors can sustain such a higher weight of vehicles driving over them. It can be protected from higher weight by using ferrous metals as a shield or other advanced metal can be used to protect these sensors from external environmental effects.

Summary

Gambar

Figure 3.1 mono crystal with single                   figure 3.2 poly crystal with random    crystal axis [3]               crystal axis [3]
Table 4.1 Electrical characteristics of L7805
Table 4.2: Result of comparator circuit
Figure 6.2: Screen shot 2

Referensi

Dokumen terkait

Then, in the first process using a Serial RS485 to TTL module which is useful for serial data conversion from sensors that will be sent to a microcontroller using the Modbus

Referring to the conception and purpose of the PPKn can be seen that PPKn is a vehicle of value education in order to build the character of learners who have a sense of nationality and