Basil Final

download Basil Final

of 18

Transcript of Basil Final

  • 8/8/2019 Basil Final

    1/18

    MICROCONTROLLERMICROCONTROLLER--

    BASEDBASED

    SPEEDOMETERSPEEDOMETER--CUMCUM--

    ODOMETERODOMETER

    Submitted bySubmitted by

    BABY BESTINBABY BESTINBASILJOHNSONBASILJOHNSON

    THARA VIJAYANTHARA VIJAYAN

  • 8/8/2019 Basil Final

    2/18

    INTRODUCTIONINTRODUCTION

    TheThe projectproject comprisescomprises aa dcdc motor motor speedspeed

    controllercontroller circuitcircuit withwith reedreed sensorsensor.. ItIt isis beingbeingdetecteddetected byby thisthis andand displaydisplay thethe samesame atat LCDLCD

    inin formform ofof speedspeed KmKm../Hr/Hr.. andand alsoalso displaydisplay thethe

    distancedistance coveredcovered byby thethe vehiclevehicle..

  • 8/8/2019 Basil Final

    3/18

    FEATURES OF DIGITALFEATURES OF DIGITAL

    SPEDOMETERSPEDOMETER

    Digital readoutDigital readout

    Speed displayed in km/hourSpeed displayed in km/hour

    Distance traveled displayed in kilometersDistance traveled displayed in kilometers

    Readings saved in nonReadings saved in non--volatile memory (EEPROM)volatile memory (EEPROM) Reliability due to use of the microcontrollerReliability due to use of the microcontroller

    No mechanical wear and tearNo mechanical wear and tear

    HomeHome--brewed speed transducer/ sensorbrewed speed transducer/ sensor

    Self reset to zero after completion of 99,999.9 kmSelf reset to zero after completion of 99,999.9 km Easy to build and fix onto the bikeEasy to build and fix onto the bike

  • 8/8/2019 Basil Final

    4/18

    BLOCK DIAGRAMBLOCK DIAGRAM

  • 8/8/2019 Basil Final

    5/18

    SPEEDOMETER-CUM-

    ODOMETER UNIT ON A BIKES

    HANDLE BAR

  • 8/8/2019 Basil Final

    6/18

    REED SWITCH AND MAGNET

    FIXED ON THE FRONT WHEEL

    OF MOTOR BIKE

  • 8/8/2019 Basil Final

    7/18

    CIRCUIT DIAGRAMCIRCUIT DIAGRAM

  • 8/8/2019 Basil Final

    8/18

    CIRCUIT COMPONENTSCIRCUIT COMPONENTS

    PIC 16F873APIC 16F873A

    LCD MODULE

    SPEED SENSOR OPTOCOUPLEROPTOCOUPLER

    POWER SUPPLYPOWER SUPPLY

  • 8/8/2019 Basil Final

    9/18

    CIRCUIT DISCRIPTIONCIRCUIT DISCRIPTION

    PIC16F873APIC16F873A

    Parameter NameParameter Name ValueValue

    Program Memory TypeProgram Memory Type FlashFlash

    Program Memory (KB)Program Memory (KB) 77

    CPU Speed (MIPS)CPU Speed (MIPS) 55 RAM BytesRAM Bytes 192192

    Data EEPROM (bytes)Data EEPROM (bytes) 128128

    Digital Communication PeripheralsDigital Communication Peripherals 11--A/E/USART, 1A/E/USART, 1--

    MSSP(SPI/I2C) Capture/Compare/PWM PeripheralsMSSP(SPI/I2C) Capture/Compare/PWM Peripherals 2 CCP2 CCP

    TimersTimers 2 x 82 x 8--bit, 1 x 16bit, 1 x 16--bitbit ADCADC 55 chch, 10, 10--bitbit

    ComparatorsComparators 22

    Temperature Range (C)Temperature Range (C) --40 to 12540 to 125

    Operating Voltage Range (V)Operating Voltage Range (V) 2 to 5.52 to 5.5

    Pin CountPin Count 2828

  • 8/8/2019 Basil Final

    10/18

    CIRCUIT DISCRIPTIONCIRCUIT DISCRIPTION

    LCD MODULELCD MODULE

    To display the speed and distance traveled, weTo display the speed and distance traveled, we

    have used a 16x2 alpha numeric LCD based onhave used a 16x2 alpha numeric LCD based onHD44780 controller. The backlight feature ofHD44780 controller. The backlight feature of

    the LCD allows data to be visible even at nightthe LCD allows data to be visible even at night

  • 8/8/2019 Basil Final

    11/18

    CIRCUIT DISCRIPTIONCIRCUIT DISCRIPTION

    SPEED SENSOR.

    For this project, we make use of a simpleFor this project, we make use of a simple

    homehome--made speed transducer. The rotation ofmade speed transducer. The rotation ofthe wheel is sensed by the combined action ofthe wheel is sensed by the combined action of

    a reed switch and a magnet fixed on the wheel.a reed switch and a magnet fixed on the wheel.

    The sensor sends a pulse to the microcontrollerThe sensor sends a pulse to the microcontroller

    each time a revolution is madeeach time a revolution is made

  • 8/8/2019 Basil Final

    12/18

    CIRCUIT DISCRIPTIONCIRCUIT DISCRIPTION

    OPTOCOUPLER.

    An optocoupler is used to counter the effects ofAn optocoupler is used to counter the effects of

    bouncing when the contact of reed switch isbouncing when the contact of reed switch isclosed.closed.

  • 8/8/2019 Basil Final

    13/18

    CIRCUIT DISCRIPTIONCIRCUIT DISCRIPTION

    POWER SUPPLY.POWER SUPPLY.

    The power supply for various parts of theThe power supply for various parts of the

    circuit is drawn from the vehicles 12V batterycircuit is drawn from the vehicles 12V batteryafter reducing it to 5V using a threeafter reducing it to 5V using a three--terminalterminal

    voltage.voltage.

  • 8/8/2019 Basil Final

    14/18

    WORKINGWORKING

    ReedReed switch,switch, whichwhich isis aa electroelectro mechanicalmechanical switchswitch ,,

    whenwhen comescomes inin contactcontact withwith thethe magnet,magnet, getsgets closedclosed..

    AsAs aa resultresult optocoupler,optocoupler, whichwhich interfacesinterfaces reedreed switchswitch

    withwith thethe PICPIC microcontrollermicrocontroller getsgets activatedactivated resultingresultinganan interruptinterrupt signalsignal toto thethe microcontrollermicrocontroller.. NumberNumber ofof

    interruptsinterrupts multipliedmultiplied withwith thethe perimeterperimeter ofof thethe wheelwheel

    providesprovides thethe distancedistance coveredcovered.. AndAnd thethe numbernumber ofof

    interruptsinterrupts withwith inin aa particularparticular timetime givesgives thethe speedspeed..

    DistanceDistance andand speedspeed areare shownshown inin thethe LCDLCD displaydisplay

  • 8/8/2019 Basil Final

    15/18

    CALCULATIONCALCULATION

    Circumference of the wheel= 2rCircumference of the wheel= 2r

    (where r is in cm)(where r is in cm)

    = 2= 23.143.143030

    = 188.4 cm or 1.884 metres= 188.4 cm or 1.884 metres

    Speed in km/hour:Speed in km/hour:

    NN1.881.883600/10003600/1000

    = N= N6.784 or N6.784 or N6.86.8

    Distance :Distance :

    The odometer is updated every 100 metres. To cover 100 metres,

    the wheel is required to make approximately 53 revolutions

    (100/1.88).

  • 8/8/2019 Basil Final

    16/18

    CONCLUSIONCONCLUSION

    Normally,Normally, digitaldigital speedometersspeedometers areare foundfound onlyonly inin luxuryluxury

    carscars andand highhigh--endend motorbikesmotorbikes.. EvenEven ifif youryour motorbikemotorbike

    hashas aa mechanicalmechanical speedometer,speedometer, whatwhat willwill youyou dodo whenwhen

    itit getsgets damaged?damaged? First,First, youyou needneed toto replacereplace thethemechanicalmechanical wormworm geargear andand thenthen thethe cablecable..

  • 8/8/2019 Basil Final

    17/18

    REFERENCEREFERENCE

    Electronics for you . November 2008Electronics for you . November 2008 http://www.wikipedia.org/http://www.wikipedia.org/

  • 8/8/2019 Basil Final

    18/18