1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Speedometer

Discussion in 'Microcontrollers' started by Kiko, Mar 8, 2007.

  1. mvadu

    mvadu New Member

    Joined:
    Nov 27, 2006
    Messages:
    35
    Likes:
    0
    Location:
    Bangalore, India
  2. Sputnik

    Sputnik New Member

    Joined:
    Sep 13, 2005
    Messages:
    20
    Likes:
    0
    Thanks!! That worked!!

    Im using FastLCD to make graphics, but the code format is incorrect. Did you have to manually convert the code or is there an automatic converter you used?
     
  3. Kiko

    Kiko New Member

    Joined:
    Apr 24, 2004
    Messages:
    79
    Likes:
    1
    Location:
    Brazil
    I used GLCDtodopic (attached) to make the splash screen.

    Rgds
     

    Attached Files:

  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. Kiko

    Kiko New Member

    Joined:
    Apr 24, 2004
    Messages:
    79
    Likes:
    1
    Location:
    Brazil

    BTW, it has a built in font converter.
     
    Last edited: May 31, 2007
  6. Sputnik

    Sputnik New Member

    Joined:
    Sep 13, 2005
    Messages:
    20
    Likes:
    0
    Thank you!!
     
  7. MrSpock

    MrSpock New Member

    Joined:
    Nov 8, 2007
    Messages:
    27
    Likes:
    0
    I re-created the Gear Position Indicator schematic (see attached) and it works great while on the bench. As soon as I put it on the bike it screwes up the signal coming from the Gear Position Switch to the ECU. It seems like voltage divider drops the voltage required by the ECU. Is there any way around it?

    Is there a way to output certain voltage from PIC?

    Here is my code:

    Code (text):

    Device 16F876A
    DEFINE XTAL 20
    ALL_DIGITAL=TRUE
    DECLARE ADIN_RES 10
    DECLARE ADIN_TAD FRC
    DECLARE ADIN_STIME 50
    PORTB_PULLUPS True
    Dim Result As Word
    Dim Total As Float
    Dim X As Word
    Dim ErrCount As Byte
    SYMBOL seg1=PORTC.0
    SYMBOL seg2=PORTC.1
    SYMBOL seg3=PORTC.2
    SYMBOL seg4=PORTC.3
    SYMBOL seg5=PORTC.4
    SYMBOL seg6=PORTC.5
    SYMBOL seg7=PORTC.6
    Delayms 500
    TRISA=%0000001
    ADCON1=%10000000
    high PORTC 'Display segment test
    Delayms 1000
    low PORTC
    ErrCount=0

    Start:
    Result=0
    Total=0
    X=0
    Repeat
            Delayms 1
            Result=ADIN 0
            Result=Result*2
            Total=Total+Result
            Inc X
    Until X=20
    Total=Total/20
    Total=Total*5/1023
    'Delayms 10
    Select Total
            Case 1.000 to 2.025 '1st gear
                    low seg1
                    high seg2
                    high seg3
                    low seg4
                    low seg5
                    low seg6
                    low seg7
                    ErrCount=0
            Case 2.026 to 2.700 '2nd gear
                    high seg1
                    high seg2
                    low seg3
                    high seg4
                    high seg5
                    low seg6
                    high seg7
                    ErrCount=0
            Case 2.701 to 3.329 '3rd gear
                    high seg1
                    high seg2
                    high seg3
                    high seg4
                    low seg5
                    low seg6
                    high seg7
                    ErrCount=0
            Case 3.330 to 3.700 '4th gear
                    low seg1
                    high seg2
                    high seg3
                    low seg4
                    low seg5
                    high seg6
                    high seg7
                    ErrCount=0
            Case 3.699 to 4.190 '5th gear
                    high seg1
                    low seg2
                    high seg3
                    high seg4
                    low seg5
                    high seg6
                    high seg7
                    ErrCount=0
            Case 4.191 to 4.470 '6th gear
                    high seg1
                    low seg2
                    high seg3
                    high seg4
                    high seg5
                    high seg6
                    high seg7
                    ErrCount=0
            Case 4.471 to 5.500 'Neutral
                    high seg1
                    high seg2
                    high seg3
                    high seg4
                    high seg5
                    high seg6
                    low seg7
                    ErrCount=0
            Case Else 'ERROR (NO VOLTAGE)
        If ErrCount > 50 Then                          
                            high seg1
                            low seg2
                            low seg3
                            high seg4
                            high seg5
                            high seg6
                            high seg7
        Else
                   low seg1
                            low seg2
                            low seg3
                            low seg4
                            low seg5
                            low seg6
                            low seg7  
                            Inc ErrCount
        EndIf
            EndSelect
    GoTo Start

     
     

    Attached Files:

    Last edited: Nov 18, 2007
  8. wschroeder

    wschroeder New Member

    Joined:
    Nov 11, 2007
    Messages:
    65
    Likes:
    0
    Location:
    NYC
  9. Kiko

    Kiko New Member

    Joined:
    Apr 24, 2004
    Messages:
    79
    Likes:
    1
    Location:
    Brazil
    Try to change the 10K resistor (R2) in the circuit you have attached for a 100NF capacitor.
     
  10. MrSpock

    MrSpock New Member

    Joined:
    Nov 8, 2007
    Messages:
    27
    Likes:
    0
    Nope. Doesn't work. The divider won't make 1/2 ot the input voltage...
     
  11. tahirmaqsood20

    tahirmaqsood20 New Member

    Joined:
    Nov 19, 2007
    Messages:
    3
    Likes:
    0
    spedometer

    i whant make speedometer with distance meter any body have sechmatec and mcu softwaer
     
  12. NOKIAS

    NOKIAS New Member

    Joined:
    Sep 27, 2007
    Messages:
    1
    Likes:
    0
    Hi people,

    first of all, congratulations for this great forum,
    second, sorry for my bad english....

    I have a Suzuki gsxr 750 from 1996 that has the GPS sensor and i've found the correct wire.

    Now i am trying to use tho code made by KIKO and GRAMO:

    and i am using the same schematic of http://w.box.net/public/npssr2ijfj (gramo)

    I've tested in Proteus and it seems to work ok, but i cant makt it work in proteus with a external xtal of 20Mhz.

    I am not using the LM LCD.... I am using a "POWERTIP pc1602F B" and the best tadasheet that i've found from it is http://w.cec-mc.ru/comp/lcd/powertip/easy_lcm/PC1602LRU-FWA-H-YV.pdf

    Does this lcd work with "our" schematic?

    I cant get the circuit working....

    Can sameone give me a help?

    Thanks.

    Edit..... I've read some things about this and the problem is that this lcd has not an "interpretator" (i think) it is form HD44780 family..... can anyone please help to use it with Gramo's schematic (video)?
     
    Last edited: Nov 22, 2007
  13. tahirmaqsood20

    tahirmaqsood20 New Member

    Joined:
    Nov 19, 2007
    Messages:
    3
    Likes:
    0
    i whant make a speedometer with 89c2051 plz any body send me code
     

    Attached Files:

    • hud.gif
      hud.gif
      File size:
      5.8 KB
      Views:
      486

Share This Page