+ Reply to Thread
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 23

Thread: digital speedometer with 8051 Microcontroller

  1. #1
    Junior Member edzahid
    Join Date
    Jul 2008
    Location
    , kelantan, Malaysia.
    Posts
    8

    Default digital speedometer with 8051 Microcontroller

    hi
    i have an idea to build digital speedometer with distance travel in kilometer/meter ,show the speed (km/h) and to find how much distance total distance.
    need to press push botton if wanna to display other measurement.

    i want to use 16x2 lcd, 8051 cip, and Photomicrosensor or hall-effect sensor.

    I want to use it in my Bicycle and further in my bike
    sensor should be easy to install and simple too
    How to start?


  2. #2
    Administrator Binu is an unknown quantity at this point Binu's Avatar
    Join Date
    Jun 2007
    Location
    Nagercoil, Tamilnadu, India.
    Posts
    6,126

    Default

    Its a good project, You can use hall effect sensor. Measure the distance traveled for one revolution of the wheel.
    For each revolution's you can measure the Distance traveled. From the distance you can get the speed with respect to time.
    Use AT89C2051 microcontroller.

  3. #3
    Junior Member edzahid
    Join Date
    Jul 2008
    Location
    , kelantan, Malaysia.
    Posts
    8

    Default

    Can you help me with the schematic diagram?

  4. #4
    Administrator Binu is an unknown quantity at this point Binu's Avatar
    Join Date
    Jun 2007
    Location
    Nagercoil, Tamilnadu, India.
    Posts
    6,126

    Default

    Use this circuit, do needed changes for AT89C2051 microcontroller

  5. #5
    Junior Member ankitloud
    Join Date
    Feb 2009
    Location
    , karnatka, India.
    Posts
    1

    Default

    sir can you give me the code of this project ankitloud@gmail.com

    ankit sharma

  6. #6
    Administrator Binu is an unknown quantity at this point Binu's Avatar
    Join Date
    Jun 2007
    Location
    Nagercoil, Tamilnadu, India.
    Posts
    6,126

    Default

    You can download the source code from here

  7. #7
    Junior Member shenoy
    Join Date
    Sep 2008
    Location
    , karnataka, India.
    Posts
    12

    Default

    Hi

    I have an idea to build a speedometer for bikes using magnets ... I have thought of using reed switch as the sensing element and I need your help in building the basic circuit .... I have seen the above circuit diagram..

    1) what modification is needed in the above ckt ?
    2) which microcontroller is required for this project ...?

    Please provide me with the circuit diagram ...
    waiting for your sooner reply ...

    Regards,
    shenoy

    shenoy

  8. #8
    Administrator Binu is an unknown quantity at this point Binu's Avatar
    Join Date
    Jun 2007
    Location
    Nagercoil, Tamilnadu, India.
    Posts
    6,126

    Default

    The reed switches cant sense for high speed. you have to use the Hall effect sensors.

  9. #9
    Junior Member edzahid
    Join Date
    Jul 2008
    Location
    , kelantan, Malaysia.
    Posts
    8

    Default


    hi again mr binu.

    here is my progress on electronic speedometer..

    here is my circuit.. the there is no sensor connection.. because only use one wire.
    fyi..im using photo diode sensor...


    here is my actual circuit.. before this..im using assembly to test the connection LCD and Switch to 8051.. and i manage to get the result..
    *when on the power*

    *button 1 pressed*

    *button 2 pressed*

    *button 3 pressed*


    and here is the coding im used ..
    Code:
    SW1 EQU P3.0
    SW2 EQU P3.1
    SW3 EQU P3.2
    
    INIT: MOV A,#38H ; initialization
    ACALL CMD 	; issue command
    MOV A,#0EH 	; LCD On, cUrsor ON, cursor blinking OFF
    ACALL CMD
    MOV A,#01H 	; Clear LCD
    ACALL CMD
    MOV A,#06H 	; Shift cursor right
    ACALL CMD
    MOV A,#82H	; Cursor: line 1, position 2
    ACALL CMD	
    MOV A,#3CH	; 2nd line
    ACALL CMD
    MOV A,#01000101B	; E
    ACALL DISPLAY
    MOV A,#01001100B	; L
    ACALL DISPLAY
    MOV A,#01000101B	; E
    ACALL DISPLAY
    MOV A,#01000011B	; C
    ACALL DISPLAY
    MOV A,#01010100B	 ;T
    ACALL DISPLAY
    MOV A,#01010010B	; R
    ACALL DISPLAY
    MOV A,#01001111B	; O
    ACALL DISPLAY
    MOV A,#01001110B	; N
    ACALL DISPLAY
    MOV A,#01001001B	; I
    ACALL DISPLAY
    MOV A,#01000011B	; C
    ACALL DISPLAY
    MOV A,#0C3H       ; JUMP TO 2nd LINE, position 3
    ACALL CMD
    MOV A,#01010011B ; S
    ACALL DISPLAY
    MOV A,#01010000B	; P
    ACALL DISPLAY
    MOV A,#01000101B	; E
    ACALL DISPLAY
    MOV A,#01000101B	; E
    ACALL DISPLAY
    MOV A,#01000100B ; D
    ACALL DISPLAY
    MOV A,#01001111B	; O 
    ACALL DISPLAY
    MOV A,#01001101B	; M
    ACALL DISPLAY
    MOV A,#01000101B	; E
    ACALL DISPLAY
    MOV A,#01010100B	 ;T
    ACALL DISPLAY
    MOV A,#01000101B	; E
    ACALL DISPLAY
    MOV A,#01010010B	; R
    ACALL DISPLAY
    
    
    POLL:
            SETB SW1
            SETB SW2
            SETB SW3
            JNB SW1,SW1_Tmp
            JNB SW2,SW2_Tmp
            JNB SW3,SW3_Tmp
            JMP POLL
    
    SW1_Tmp:
            AJMP DISP_SW1
    SW2_Tmp:
            AJMP DISP_SW2
    SW3_Tmp:
            AJMP DISP_SW3
            JMP POLL
    
    DISP_SW1:
    MOV A,#01H 	; Clear LCD
    ACALL CMD
    MOV A,#80H	; Cursor: line 1, position 3
    ACALL CMD
    MOV A,#3CH	; 2nd line
    ACALL CMD
    MOV A,#01010011B ; S
    ACALL DISPLAY
    MOV A,#01110000B ; p
    ACALL DISPLAY
    MOV A,#01100101B ; e
    ACALL DISPLAY
    MOV A,#01100101B ; e
    ACALL DISPLAY
    MOV A,#01100100B ; d
    ACALL DISPLAY
    MOV A,#00101000B ; (
    ACALL DISPLAY
    MOV A,#01101101B ; m
    ACALL DISPLAY
    MOV A,#00101111B ; /
    ACALL DISPLAY
    MOV A,#01110011B ; s
    ACALL DISPLAY
    MOV A,#00101001B ; )
    ACALL DISPLAY
    MOV A,#0C1H       ; JUMP TO 2nd LINE, position 13
    ACALL CMD
    MOV A,#00110000B ; 0 
    ACALL DISPLAY
    MOV A,#00101110B ; .
    ACALL DISPLAY
    MOV A,#00110000B ; 0 
    ACALL DISPLAY
    
    JMP POLL                ; JUMP TO POLL FOR NEW KEY PRESS
    
    MOV A,#B ; 
    ACALL DISPLAY
    
    DISP_SW2:
    MOV A,#01H 	; Clear LCD
    ACALL CMD
    MOV A,#80H	; Cursor: line 1, position 3
    ACALL CMD
    MOV A,#3CH	; 2nd line
    ACALL CMD
    MOV A,#01000011B ; C
    ACALL DISPLAY
    MOV A,#01110101B ; u
    ACALL DISPLAY
    MOV A,#01110010B ; r
    ACALL DISPLAY
    MOV A,#01110010B ; r
    ACALL DISPLAY
    MOV A,#01100101B ; e 
    ACALL DISPLAY
    MOV A,#01101110B ; n 
    ACALL DISPLAY
    MOV A,#01110100B ; t 
    ACALL DISPLAY
    MOV A,#00100000B ; 
    ACALL DISPLAY
    MOV A,#01000100B ; D
    ACALL DISPLAY
    MOV A,#01101001B ; i 
    ACALL DISPLAY
    MOV A,#01110011B ; s
    ACALL DISPLAY
    MOV A,#01110100B ; t 
    ACALL DISPLAY
    MOV A,#01100001B ; a 
    ACALL DISPLAY
    MOV A,#01101110B ; n 
    ACALL DISPLAY
    MOV A,#01100011B ; c 
    ACALL DISPLAY
    MOV A,#01100101B ; e 
    ACALL DISPLAY
    MOV A,#0C1H       ; JUMP TO 2nd LINE, position 16
    ACALL CMD
    MOV A,#01101101B ; m
    ACALL DISPLAY
    JMP POLL
    
    DISP_SW3:
    MOV A,#01H 	; Clear LCD
    ACALL CMD
    MOV A,#80H	; Cursor: line 1, position 3
    ACALL CMD
    MOV A,#3CH	; 2nd line
    ACALL CMD
    MOV A,#01010100B ; T
    ACALL DISPLAY
    MOV A,#01101111B ; o
    ACALL DISPLAY
    MOV A,#01110100B ; t 
    ACALL DISPLAY
    MOV A,#01100001B ; a 
    ACALL DISPLAY
    MOV A,#01101100B ; l 
    ACALL DISPLAY
    MOV A,#00100000B ; 
    ACALL DISPLAY
    MOV A,#01000100B ; D
    ACALL DISPLAY
    MOV A,#01101001B ; i 
    ACALL DISPLAY
    MOV A,#01110011B ; s
    ACALL DISPLAY
    MOV A,#01110100B ; t 
    ACALL DISPLAY
    MOV A,#01100001B ; a 
    ACALL DISPLAY
    MOV A,#01101110B ; n 
    ACALL DISPLAY
    MOV A,#01100011B ; c 
    ACALL DISPLAY
    MOV A,#01100101B ; e 
    ACALL DISPLAY
    MOV A,#0C1H       ; JUMP TO 2nd LINE, position 3
    ACALL CMD
    MOV A,#01101101B ; m
    ACALL DISPLAY
    JMP POLL
    
    
    CMD:
    MOV P1,A
    CLR P3.5
    CLR P3.4
    SETB P3.3
    CLR P3.3
    ACALL DELAY
    RET;
    
    DISPLAY:MOV P1,A
    SETB P3.5
    CLR P3.4
    SETB P3.3
    CLR P3.3
    ACALL DELAY
    RET;
    
    DELAY: CLR P3.3
    CLR P3.5
    SETB P3.4
    MOV P1,#0FFh
    SETB P3.3
    MOV A,P1
    JB ACC.7,DELAY
    
    CLR P3.3
    CLR P3.4
    RET;
    
    END
    and here is the model im using to test this electronic speedometer..


    here is my sensor.. i already test this sensor..and its work well
    as nothing block his way.. it will send voltage, v=0.15v
    and if that this block his way.. output voltage is v=5.10v


    so the main problem here is..im not really good at writing a program in assembly either in c language..
    so if u can help me with this.. here is my email.. ed_zahid@yahoo.com

    *1st button=show the speed (m/s)
    *2nd button=show current distance travel
    *3rd button=show total distance travel
    *using atmel 89S51
    *12Mhz crystal
    *LCD LMB162ABC

  10. #10
    Administrator Binu is an unknown quantity at this point Binu's Avatar
    Join Date
    Jun 2007
    Location
    Nagercoil, Tamilnadu, India.
    Posts
    6,126

    Default

    I have replied you here
    http://www.8051projects.info/forum/t...?TOPIC_ID=1763
    Please dont double post your queries.


+ Reply to Thread

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts