yacc module for opel astra g mid

Upload: prudencio-l-serviano-iii

Post on 01-Jun-2018

302 views

Category:

Documents


13 download

TRANSCRIPT

  • 8/9/2019 Yacc Module for Opel Astra g Mid

    1/17

    YACC — User Manual Page 1 of   17YACC — User Manual Page 1 of   17YACC — User Manual Page 1 of   17

     Yet Another Car Computer

     Yet Another Car Computer is do-it- yourself electronic device addressed tomiddle skilled hobbyists.

    Opel cars are primary destinationof YACC which works with cars dis-plays, preserves genuine interior look and seems to be a factory device.

    Moreover, YACC can work with pop-ular alphanumeric LCD displays. Thisfeature, extended configuration andpainless calibration method make pos-sible to install YACC in practically every car equipped with fuel injection.

    Functions

    1) Instantaneous speed measure-ment with precision of 0.1 km/h.

    2) Traveled distance measurement. Automatically shown every time vehicle stops.

    3) Average speed measurement. Two values are measured: (a) total av-erage speed, (b) average speed cor-responding to motion i.e. only re-ferring to periods of time when ve-hicle is moving.

    4) Time of journey and time when ve-hicle is stopped measurement.

    5) Cost of used fuel.

    6) Fuel consumption: (a) averagesince key was turned on, (b) in-stantaneous cor responding to last 5 second, (c) instantaneous cor-responding to road segment of length ranging from 50 to 1000meters.

    7) Used fuel gauge. Low fuel level warning: (a) estimation of fuellevel in the tank, (b) distance es-timation remaining on the tank given mileage.

    8) Three trips. Each trip metersdistance, average speed, time of 

     journey, average and total fuelconsumption and cost of fuel for longer periods of time.

    9) Tachometer.

    10) Battery voltage meter.

    11) Manual steering of automatic an-tenna. It is possible not to usethe antenna e.g. when listening toCD.

    12) Sport mode. 1/4 mile and 0. . .60,

    0. . .80, 0. . .100 km/h runs.

    Informations from points 2, 3, 4 and5 are automatically displayed when ve-hicle stops. While going through thecity they give an interesting possibil-ity of observations of mileage, compar-ison the average speed with the speedof e.g. bicycle, realizing how much time

     we spent in traffic jams and how big car expenses are.

    Instantaneous speed gives a chanceto estimate how big an excess of factory speedometer indication is.

     Average fuel consumption corre-sponding to segment of the road fo-cuses our attention on big differencesdepending on traffic conditions anddriving style.

    Using the YACC

    Single button is used to control the de- vice. Two types of presses are recog-

    nized. Pressing and holding the but-ton for less than 1 second is calleda short press. Pressing and holdingthe button for more than 1 second iscalled a long press. Short presses cyclethe display between successive workingmodes. Long presses are used to enter 

    commands (e.g. to reset fuel counter,to begin a trip etc.)

     A  [ ]  symbol is shown when a longpress is available.

     Working modes are shown on figures5,   6   and   7. Short presses are repre-sented by thin, vertical lines

    SPDM/A/T 

    RPM

    and long presses by thick, horizontalones.

     TRIPS TRIP 1

    Basic mode

     While driving instantaneous speed v  isshown in km/h.

    SPD 50.2

    If tank capacity (FUEL   →   TANK CAP) isset and an amount of fuel remaining intank (difference between defined tank capacity and used fuel  F) is lower than

     warning level  (FUEL   →   WARN LEV), thanthe following data are shown instead of letters  SPD.

    a) Tank fuel level (in liters).

    F10 50.2

    Here  F10  means that 

    9.5 <  TANK CAP − F ≤ 10.5

     b) Estimated distance remaining onthe tank (in kilometers).

    D124 51.4

     This distance is calculated usingcurrent average fuel consumptionFA.

     When the vehicle stops (conditionv <   0.5 km/h) the following values aredisplayed.

    a) Traveled distance in meters

    M 12005

    or for distances greater than 100

    km in kilometers.KM 1200.1

     b) Average speed, excluding thetime when t he vehicle wasstopped/total average speed inkm/h.

    A 40/32.7

    c) Total time of trip/time when vehi-cle was stopped in minutes.

    T 20/4

    For total trip time greater than 60minutes, both times are displayedone after another. Time of trip

    T 2H30

    and time when vehicle wasstopped.

    W 0H25

    d) Fuel cost.

    EUR 20/4.5

  • 8/9/2019 Yacc Module for Opel Astra g Mid

    2/17

    YACC — User Manual Page 2 of   17YACC — User Manual Page 2 of   17YACC — User Manual Page 2 of   17

     The first value corresponds to TRIP1 and is shown only for active trip.

     The second value corresponds tocurrent traveled distance (sincekey was turned on).

    Distance, travel time and fuel cost mea-surements start each time when thekey is turned on (precisely since thefirst moment when  v  ≥   0.5 km/h) andend when the key is turned off.

     Tachometer

     The value of engine revolutions per minute is shown.

    RPM 1200

     Average fuel consumption

     Average fuel consumption correspond-ing to traveled distance (since the key 

     was turned on) is shown. The unit isl/100 km.

    FA 7.5

    User can choose between displayingnumerical values related to consumedfuel (averages FA, FH, FK, FX, fuel counter F) with accuracy of one or two decimaldigits after decimal dot (FUEL   →   ACC).One should remember however, that 

     TID allows to display decimal point be-tween two most right digits only. Withtwo digit accuracy result will be shownas integer with unit 0.01 l/100 km.

    FA 750

    Instantaneous fuel consumption perhour

    Instantaneous fuel consumption corre-sponding to last 5 seconds is shown.

     The unit is l/h.FH 1.2

    Instantaneous fuel consumption cor-responding to segment of the road

    Instantaneous fuel consumption cor re-sponding to the preceding segment of the road of selected length (10 m, 20 m,50 m, 100 m, 200 m, 500 m, 1 km) isshown. The unit is l/100 km.

    FK05 8.5

    or FX05 8.5

    Long press enters settings mode en-abling to select length of the segment of the road. Next short presses cycles be-tween values 10 m (FK01), 20 m (FK02),50 m (FK05), 100 m (FK1), 200 m (FK2),500 m (FK5) , 1 k m (F1K). Long pressswitches between  FK  and  FX   modes. InFK  mode all amount of used fuel is in-cluded in calculations. In  FX  mode fuel

    used when vehicle was stopped is not included. YACC returns to main menuautomatically after 5 second.

    Fuel gauge

     The amount of fuel used so far isshown. The unit is l.

    F 31.2

    Long press enters the fuel relatedmenu. Successive short presses cyclethrough following commands.

    a)   RESET   – counter reset. Use thiscommand every time you fill up

     but don’t want to recalibrate fuelcoefficient  cfuel. Long press resetsthe counter and confirms withmessage

    DONE

     b)   ADD   – use this command every time you are filling your tank but not completely full. Long press

    switches to editor mode (EDIT) where you enter the amount (in0.01 l) of fuel added.

    c)   CAL   – choose this command when you are filling your tank and want to use the data collected during

    the past tank to calibrate your fuel coefficient   cfuel. Long pressswitches to editor mode (EDIT)

     where you enter the amount (in0.01 l) of fuel added during thisfill-up.

    d)   PRICE   – fuel price. Long pressswitches to editor mode (EDIT)

     where you enter fuel price in 0.01currency unit. Currency sym-

     bol can be defined in   FUEL   →CURRENCY  mode.

    e)   EXIT  – returns to previous menu. Automatically after 5 seconds or  with a long press.

    Fuel cost

    Fuel cost cor responding to traveled dis-tance is shown.

    EUR 10.6

    Battery

     The battery voltage is shown. The unit is V.

    BATT 12.2

     YACC switches to this mode immedi-ately after key is turned on giving pos-sibility to observe voltage drops when

     vehicle ignition is attempted. After 20seconds YACC returns automatically to

     basic mode.

     Trips

     Trips allows to measure total distance,time and used fuel for longer periods.Long press in

    TRIPS

    mode switches to trips related menu where short presses cycle through suc-cessive trips (TRIP 1,   TRIP 2,   TRIP 3)and command   EXIT   returning to mainmenu — automatically after 5 secondsor with a long press.

    For each trips following values aredisplayed every 2 seconds

    a) trip number, e.g.

    TRIP 1 *

     b) traveled distance,

    c) average speed,

    d) time of trip,

    e) average fuel consumption,

    f) total fuel consumption,

    g) fuel cost.

    Symbol  *  after number means that tripis active i.e. distance, time and fueldata are updated all the time. Lack of * means that trip was ended.

    Long press begins or ends the trip.If the trip is inactive the command

    BEGIN n

    is shown where   n   corresponds to tripnumber. Next long press resets all triprelated data and marks trip as active.

     The action is confirmed withDONE

    Since that moment distance, time andfuel data will be updated all the time.If the trip is active the command

    END n

  • 8/9/2019 Yacc Module for Opel Astra g Mid

    3/17

    YACC — User Manual Page 3 of   17YACC — User Manual Page 3 of   17YACC — User Manual Page 3 of   17

    is shown. Next long press ends the trip. The action is confirmed with

    DONE

     YACC switches to  BATT mode for 20 sec-onds immediately after key was turnedon. During that time period a singlelong press resets and begins   TRIP 1.

    Sport mode

    Long press in basic mode switchesto sport mode. Short presses cyclethrough runs: 1/4 mile, 0. . .60, 0. . .80,0. . .100 km/h.

     YACC automatically prepares to new run each time vehicle is stopped. Runname (1/4,  60,  80,  100) is shown on theleft side and word ready RDY onthe right one.

    1/4 RDY

     Timing commences automatically upondetection any motion. The percent rel-ative value of distance (speed) is shownon the left side. Run time in second isshown on the right side.

    47% 10.2

     At t he end of the run timing stops andrun name is shown once more on theleft side.

    1/4 21.0

    Long press in sport mode switchesback to basic mode.

    Manual antenna steering

     When you turn radio on an antenna status

    ANT ON

    or ANT OFF

    is shown for 5 second. Short presschanges the state of the antenna to theopposite one.

    During radio use a long press (if not connected with another command)changes antenna position to the oppo-site one.

     Turning the key off 

     YACC turns off after 30 seconds of idle-ness.

    Configuration

    Pressing and holding button for 5 sec-onds in tachometer mode switches toconfiguration menu. A ”stereo” symbolappears on 8–digit display and ”Dolby”symbol on 10–digit one. 20 secondsidleness switches automatically back to

     basic mode.

    Editor

    Editor allows to enter numerical val-ues and is available in selected workingmodes. Editor is always entered witha long press. Next short presses cy-cle through successive digits and com-mands   CANCEL   and   SET. The   SET   com-mand is visible only when a value has

     been changed and a new value is in

    proper range. Long press during   SETcommand stores a value, ends editor mode and returns to the mode editor 

     was started from.

    Long press during  CANCEL   commandends editor mode without any changes.

    Long press during digit selectionswitches into a mode which allows tochange digit value. Short presses se-lect new value and a long press acceptsit.

    Defaults

     Astra F 

    PRESETS   →   ASTRA F. Long press recallsdefault fuel measurement values for As-tra F.

    FUEL  →  COEF 3 669 000FUEL  →  SOURCE L  

     Astra G

    PRESETS   →   ASTRA G. Long press recallsdefault fuel measurement values for As-tra G.

    FUEL  →  COEF 27 700

    FUEL  →  SOURCE F  

    Speed and distance

    Calibration

    SPEED   →   DISTANCE. Use the followingprocedure. Begin   TRIP 1   and reset the mechanical distance counter at thesame time. Travel some tens of kilome-ters. With a long press switch to edi-tor mode and enter traveled distance inmeters. The calibration coefficient  cdist

     will be calculated automatically.One needs to remember that most 

    mechanical counters work in two di-rections — count downward while go-ing backward. YACC uses a pulser anddoes not distinguish directions.

    Calibration coefficient

    SPEED   →   COEF. In editor mode enter cdist   value in range 1. . .65 535 equal tonumber of impulses corresponding to 1km.

    Instantanous speed averaging

    SPEED   →   NOISE. YACC uses a simple al-gorithm to achieve better precision of speed measurement. The measure-ment process lasts approximately  SPEED→   T MIN. Number of recorded impulses

    correspoding to traveled distance is di- vided by measurement time.

     Traveled distance impulses are gen-erated by special devices called pulsers.Construction of pulsers varies. Very of-ten they are based on rotating wheel.Mechanical inaccuracies of workman-ship, looseness, axis and propel cable

     vibrations can cause additional errors.Figure 8   shows calculations of instan-taneous speed based on recorded timesof two successive impulses.

    Result analysis indicates that for this specific case pulser generates 15impulses with every revolution. There-fore it would be better to use time pe-riods corresponding to multiply of 15impulses.

    In editor mode enter the value  SPEED→   NOISE in range 0. . .99. Value 0 turnsaveraging off. If during single mea-surement less than   2·SPEED   →   NOISEimpulses are recorded (small speeds)than instantaneous speed is calculated

     without averaging. For other cases the biggest multiply of   SPEED   →   NOISE   im-pulses is used in calculations.

    Signal selection

    SPEED   →   SOURCE. The letter   R   corre-sponds to rising edge and the letter   Fto falling one. Long press changes be-tween  R  and  F.

  • 8/9/2019 Yacc Module for Opel Astra g Mid

    4/17

    YACC — User Manual Page 4 of   17YACC — User Manual Page 4 of   17YACC — User Manual Page 4 of   17

    Minimum measurement time

    SPEED   →   T MIN. In editor mode enter  value in range 10. . .110 in hundredparts of second.

    Maximum measurement time

    SPEED   →   T MAX. In editor mode enter  value in range 10. . .110 in hundredparts of second.

    Fuel

     Tank capacity

    FUEL   →   TANK CAP. In editor mode enter tank capacity (value in range 0. . .250)in liters. Value 0 turns low fuel level

     warning off.

     Warning level

    FUEL   →   WARN LEV. In editor mode enter  value in liters in range 0. . .99. Value 0turns low fuel level warning off.

    Currency symbol

    FUEL   →   CURRENCY. In editor mode enter three letter currency symbol (e.g. EUR,USD etc.)

     Accuracy

    FUEL   →   ACC. Long press switches be-tween displaying numerical values re-lated to consumed fuel (averages FA, FH,FK,   FX, fuel counter   F) with accuracy of one or two decimal digits after dec-imal dot. One should remember how-ever, that TID allows to display deci-mal point between two most right dig-its only. With two digit accuracy result 

     will be shown as integer with unit 0.01l/100 km.

    Calibration coefficient

    FUEL   →   COEF. In editor mode enter  cfuel value in range 1. . .99 999 999 equal

    to the sum of impulses lengths corre-sponding to 1 liter of fuel.

    Reading fuel consumption data 

    FUEL   →   HISTORY. In t his mode onecan read data necessary to computefuel consumption calibration coeffi-cient  cfuel. Short presses cycle betweensuccessive results. 20 seconds of idle-ness returns to basic mode.

    Results are shown in order reverseto chronological (1 — past fill, 2 — fill

     before past etc.) A single fill is repre-sented by 3 values: A — amount of fuelin 0.01 liters, B — beginning 5 digitsΣf , C — ending 5 digits of  Σf .

    Example results.1A 04328

    1B 01855

    1C 82273

    2A 04409

    2B 01619

    2C 59814

    3A 03844

    3B 013133C 73735

    4A 04163

    4B 01538

    4C 56441

    5A 04312

    5B 01553

    5C 67922

    6A 03736

    6B 01389

    6C 54037

    7A 04358

    7B 01599

    7C 57383

    8A 04346

    8B 01594

    8C 08461

    Liters  Σ

    f 1. 43.28 185 582 2732. 44.09 161 959 8143. 38.44 131 373 7354. 41.63 153 856 4415. 43.12 155 367 9226. 37.36 138 954 0377. 43.58 159 957 3838. 43.46 159 408 461

     We assume that amount of used fuelvfuel is proportional to totallength Σf  of recorded impulses

    vfuel · cfuel  = Σf 

     The method used to obtain value of cfuel   consists in filling up the fuel tank of car (until the pomp stops). However this method has potentially many er-rors like inaccuracy of the pomp work,the moment pomp stops, etc.

    Results are shown on figure   9.Points corresponding to fills 2, 4, 5,6, 7 and 8 are approximately linear.Fills 1 and 3 have thick errors and has

     been excluded from further analisys. A straight line  y  =  cfuel · x has been fitted

     with least square method.

    Signal selection

    FUEL   →   SOURCE. The letter   L   selectslength measure of low level, the letter H  — high one, the letter  R  counts risingedges and F  — falling ones.. Long presscycles through  L,  H,  R,  F.

     Tachometer

    Calibration coefficient

    RPM   →   COEF. Long presses cyclethrough subsequent    crpm   coefficient 

     values: 1, 2, 3, 4, 5, 6,   12

    ,   13

    ,   14

    ,   15

    ,   16

    .

    Edge selection

    RPM   →   SOURCE. The letter  R  correspondsto rising edge and the letter  F  — fallingone. Long press changes between R andF.

    Minimum measurement time

    RPM   →   T MIN. In editor mode enter  value in range 10. . .110 in hundredparts of second.

    Maximum measurement time

    RPM   →   T MAX. In editor mode enter  value in range 10. . .110 in hundredparts of second.

    Battery

    Calibration

    BATTERY   →   VOLTAGE. Measure a battery  voltage with a multimeter. With a long

    press switch to editor mode and enter measured value in units 0.01 V. Thecalibration coefficient   cbatt   will be cal-culated automatically.

    Calibration coefficient

    BATTERY   →   COEF. In editor mode enter cbatt  value in range 1. . .65 535. TheA/Dconverter resolution is equal to 10 bits.

     Value  u  =1 023 corresponds to voltage

  • 8/9/2019 Yacc Module for Opel Astra g Mid

    5/17

    YACC — User Manual Page 5 of   17YACC — User Manual Page 5 of   17YACC — User Manual Page 5 of   17

    1.1 V. The value shown in battery volt-age mode BATT is calculated with the fol-lowing formula.

    cbatt · u

    10 000

    RadioManual antenna steering

    RADIO   →   ANT. Value   YES   enables and value NO  disables manual antenna con-trol. Long press changes value to op-posit one.

     When manual steering is disabledantenna opens automatically with ra-dio turning on and closes 10 second af-ter turning radio off.

    Connection with factory radio re-ceiver

    RADIO   →   OPEL. Value   YES  allows to usefactory radio receiver. When receiver isin use YACC does not send any data to

     TID. Value   NO   corresponds to constant access of YACC to TID display. If oneuse factory radio with this setting data collision will occur and none or randomdata will be displayed. However this

     will not lead to any disfunction.

    LCD display

    Display width

    LCD   →   WIDTH. Select number of charac-ters in a single line in range 12. . .20.

    Number of lines

    LCD   →   LINES. Select number of lines(one or two).

    For a single line the way of work cor-responds to TID display.

    For two lines, the upperone displaysinstantaneous speed and estimation of fuel and distance remaining on your tank. The lower line corresponds to TIDdisplay.

    Second line offset

    LCD   →   OFFSET. In the editor enter anaddress (number in range 0. . .127) of the first character in the second line.

     This option allows to deploy practically every model of LCD display.

     TID display selection

     The YACC computer works with factory display used in Opel cars. There aretwo variants of displays with 8 or 10digits. The proper display type can beselected with 8/10 jumper.

    8/10 jumper open 8 digit display close 10 digit display 

    Construction

    Schematic diagrams are shown on fig-ures   10   and   ??. The microcontroller IC1 running with clock 12 MHz andsupplied with 3.3 V is the main ele-ment. At such supply voltage the mi-crocontroller is slightly overclocked but 

     works correctly.

    Low supply voltage guaranteesproper work of device when ignitionis attempted what usually cause big

     battery voltage drops.

    Supply

    Supply circuit uses low drop voltageregulator IC5. Key on voltage pullsPWR2 line low which in turn switches

     T1 transistor on and powers the micro-controller. Microcontroller keeps PWR4line low during work and keeps power even after turning key off. Concur-rently YACC monitors key on voltage by reading state of PWR1 line.

     A/D converter

     A/D converter input voltage range is0. . .1.1 V. Battery voltage measurement uses a divider with R4 and R5 resistors.Diodes D1 and D2 protect A/D input.

    OutputsIC2 and T2 are used to convert 3.3 V level signals into 12 V level ones.

    If you don’t intent to manually con-trol automatic antenna than skipassembly of T2, R13 and R16 ele-ments.

    Inputs

    IC3 is used to convert 12 V level sig-

    nals into 3.3 V level ones. Additionally for traveled distance signal (ICP), enginerevolution signal (INT1) and fuel con-sumption signal (INT0) Schmidt triggers(built with IC4) can be used.

     Triggers are activated by jumpersaccording to the following table.

    Schmidt trigger  bypassedused

     Assembly in the car

    Elements assembly on the circuit boardis the first step. The microcontroller IC1 is mounted into a socket.

     YACC was designed for control but-ton which switches the ground. This

    corresponds with 8–digit displays (e.g. Astra F).

    In 10–digit displays (e.g. Astra-G)the dot button switches positive volt-age. In order to adjust YACC to work 

     with 10–ditig displays you should omit assembling D3 diode and make twoadditional connections on the circuit 

     board.

     A comprehensive description of as-sembly is available on the web page

    e-pmk.eu/en/diy/yacc/know-how 

     YACC and LCD displays

    Due to users feedback the possibility of communication with popular LCDdisplays based on HD44780 driver has

     been added to t he YACC computer.

    Connection

     The way of connection of LCD dis-play to YACC computer is shown onfigure   10. Connections have to bemade with wires soldered directly to thepoints on printed circuit boards.

    Depending on the display type it could be necessary to use contrast reg-ulation (R1 variable resistor) and/or 

     backlight current restraint (R2 resis-tor).

  • 8/9/2019 Yacc Module for Opel Astra g Mid

    6/17

    YACC — User Manual Page 6 of   17YACC — User Manual Page 6 of   17YACC — User Manual Page 6 of   17

    Supply

    Depending on current consumption by LCD display (backlight current rangingfrom tens to hundreds mA is the most significant factor) it would be necessary to use additional voltage regulator or might be possible to use existing one(after substituting original IC5 LP2950-3V3 circuit with +5V equivalent, e.g.LP2950-5V0 or 78L05).

    Display selection

    Display selection is determined withPC3 input. Connecting the input withthe ground (with LCD/TID switch or simply with wire) selects LCD display.Leaving the input unconnected selects

     TID display.

    Restoring factory settings

    Improper configuration can couse that information will not be displayed prop-erly.

    Closing 8/10 jumper and poweringdevice restores factory settings:

    LCD  →  WIDTH 12LCD  →  LINES 1LCD  →  OFFSET 64

    Measurement methods

    Speed and distance

    Speed and distance measurements useelectric impulses generated by a specialdevice called pulser.

    Impulses are counted in 32–bit counter. Thus, assuming that 1 kmcorresponds to  cdist  =  16 900 impulses

    (real value for test car), the counter range is over 250 000 km.

     Additionally, times of the rising (R)

    t

    u

    tn   tn+k

    or falling (F)

    t

    u

    tn   tn+k

    edges are recored. Edge type can beselected during configuration (SPEED   →SOURCE  mode). Resolution of measure-ments is equal approximately to 21  µs.

     According to the number of im-pulses k  and their times tn, tn+k   instan-

    taneous speed is calculated with thefollowing formula 

    k

    cdist·

    46 875 · 3 600

    tn+k − tn

    kmh

    Setting value of   cdist   coefficient inrange 1. . .65 535 makes it possible toadjust device to every car. Suggestedcalibration method is explained in fur-ther parts   (SPEED   →   DISTANCE   i   SPEED→   COEF  modes).

    Measurement time is determined by two values: the minimum time   SPEED→   T MIN   and maximum time   SPEED   →T MAX.   One can apply own values tothese coefficients to achieve the best fit to own car. The measurement in-cludes the lowest number   k   impulses

    (not greater than 255), such that  tn+k−tn  >SPEED   →   T MIN. For big speeds themeasurement could last shorter thanSPEED   →   T MIN. When at least two im-pulseswill not be recorded during SPEED→   T MAX   time instantaneous speed isassumed to 0 and a new measurement starts immediately.

     When the value of coefficient   SPEED→   NOISE>   0   and the number of recorded impulses k > 2·SPEED   →   NOISEonly   k̃   beginning impulses are consid-ered in the calculation, where   k̃  ≤  k  isthe biggest multiple of  SPEED   →   NOISE.

    Engine revolution speed

    Measurement of engine revolutionspeed is analogous to measurement of instantaneous speed. The RPM valueis calculated with the following formula 

    crpm · k ·46 875 · 60

    tn+k − tn

     revmin

    Selection of the value   crpm   from set 1, 2, 3, 4, 5, 6,   1

    2,   13

    ,   14

    ,   15

    ,   16

     (RPM   →   COEFmode) allows to fit to own car.

    Minimum and maximum times of measurement are determined by  RPM   →T MIN   and   RPM   →   T MAX   configurationsettings.

    Measurement includes no morethan   k   =   255 impulses and can last shorter than   RPM   →   T MIN   for big rev-olution speeds.

    Fuel mileage

    Fuel consumption is calculated fromthe length or count of impulses gener-ated by Engine Control Module (ECM)or taken from signal driving injector.

    (a) Times of rising and falling edges

    are recorded with the same accuracy asin instantaneous speed measurement.Maximum length of impulse equals ap-proximately 21 ms. Longer impulsesare rejected.

     Times of impulses t2 − t1  and  t4 − t3corresponding to high (H)

    t

    u

    t1   t2   t3   t4

    or low (L) level respectively 

    t

    u

    t1   t2   t3   t4

    are summarized in 32-bit counter  Σf .

    (b) Rising

  • 8/9/2019 Yacc Module for Opel Astra g Mid

    7/17

    YACC — User Manual Page 7 of   17YACC — User Manual Page 7 of   17YACC — User Manual Page 7 of   17

    t

    u

    1 2

    or falling

    t

    u

    1 2

    edges are counted in  Σf .Selection of corresponding signal

    level or edge is set during configuration(FUEL   →   SOURCE  mode). The amount of used fuel is calculated with the follow-ing formula 

    Σf 

    cfuel[l]

    Calibration process consists in esti-mation of  cfuel   coefficient, which valueis in the range 1. . .99 999 999   (FUEL→   COEF   mode). In the test car   cfuel

     value turned out to be 3 669 000 andcorresponded to fuel counter capacity over 1 170 liters. Calibration processis described in detail in furthersections(FUEL   →   HISTORY  mode).

     Time

     The measurement of trip time and time when vehicle is stopped uses 32-bit 

    clock counters with resolution equalapproximately to 1.40 second. There-fore the maximum range is over 190

     years.

     Accuracy of mathematical calcula-tions

    Mathematical calculations are per-formed with 64–bit precision. When a calculated value is big so much that cannot fit on a display an overflow con-dition OVF  is shown.

     Technical specifications

    Supply voltage: 5. . .27 V Supply current: 21 mA 

     YACC has a very large reserve of computational power. Recorded, maxi-mum traveled distance signal (ICP) fre-quency is equal to about 50 kHz, andengine revolution signal (INT1) to about 115 kHz.

    In the test car (cdist   =   16 900,crpm   =   1/2) traveled distance signalat assumed speed 180 km/h corre-sponds to frequency 845 Hz and uses1.7% available computational power.Engine revolution signal at assumedspeed 6 500 rpm corresponds to fre-quency 216 Hz and uses 0.2 % com-

    putational power.

    Factory settings

    Factory settings correspond to Astra F  with X16XEL engine. Engine revolu-tion and fuel consumption signals weretaken from Engine Control Module.

    SPEED  →  COEF 16 900SPEED  →  NOISE 15SPEED  →  SOURCE R  SPEED  →  T MIN 50

    SPEED  →  T MAX 60FUEL  →  TANK CAP 50FUEL  →  WARN LEV 9

    FUEL  →  CURRENCY PLNFUEL  →  ACC 1FUEL  →  COEF 3 669 000

    FUEL  →  SOURCE L  RPM →  COEF 1/2RPM →  SOURCE R  RPM →  T MIN 20RPM →  T MAX 60

    BATTERY  →  COEF 1 607RADIO  →  ANT Y  RADIO  →  OPEL NLCD  →  WIDTH 12

    LCD  →  LINES 1LCD  →  OFFSET 64

  • 8/9/2019 Yacc Module for Opel Astra g Mid

    8/17

    YACC — User Manual Page 8 of   17YACC — User Manual Page 8 of   17YACC — User Manual Page 8 of   17

         + +

          C

          2

    Q1

    GND

    INOUT

    IC5

    I1  1

    I2  2

    I3  3

    I4  4

    I5  5

    I6  6

    I7  7

    O116

    O215

    O314

    O413

    O512

    O611

    O710

    CD +9 GND   8

    IC2

    (ADC5)PC5   28

    (ADC4)PC4  27

    (ADC3)PC3  26

    (ADC2)PC2  25

    (ADC1)PC1  24

    (ADC0)PC0  23

    (SCK)PB5  19

    (MISO)PB4  18

    (MOSI)PB3  17

    (SS)PB2  16

    (OC1)PB1  15

    (ICP)PB0  14

    (AIN1)PD7  13

    (AIN0)PD6  12

    (T1)PD5  11

    (T0)PD4  6

    (INT1)PD3  5

    (INT0)PD2  4

    (TXD)PD1  3

    (RXD)PD0  2

    GND8

      VC C7

    AVCC20

      AREF21

    XTAL19

    XTAL210

    RESET1

    AGND22

    IC1

          C

          3      C      4

    R 6 R7

    R9

    T2

          R

          1      3

    R1 6

    T1R2

          R

          1

    R3

    I1  1

    I2  2

    I3  3

    I4  4

    I5  5

    I6  6

    I7  7

    O116

    O215

    O314

    O413

    O512

    O611

    O710

    CD +9

    GND  8

    IC 3

    R8

          R

          4

          R      5

          C      5

    R1 1

          D      3

    R1 0      R

          1      2

    C8

          C

          1

    C6

    C7

          D

          1

          D

          2

          R

          1      5

          R

          1      4

    2

    3

    1

    IC4A

    6

    5

    7

    IC4B

    9

    10

    8

    IC4C

    13

    12

    14

    IC4D

            4

            1        1

          R

          1      7

          R

          1      8

    R1 9

    R2 0

    R2 1

    R2 2

    R2 3

    R2 4

            1   2

          8      /      1      0

            1        2        3        4      I      C      P

            1   2 3 4

          I      N      T      1

            1   2 3 4

          I      N

          T      0

    1

    3

    5

    7

    9

    CO N

    11

    13

    2

    4

    6

    12

    14

    8

    10

    D4

    D5

    SC L

    SC L

    MR Q

    MR Q

    IC P

    IC P

    INT0

    INT0

    INT1

    INT1

    PWR4

    PWR4

    PWR2

    PWR2

    A D C 0

    A D C 0ANT

    ANTRADIO

    RADIO

    PWR1

    PWR1

    SD A

    SD APWR3

    PWR3

    R6-R11 47k

          4      7    u

    12 MHz

    L P 2 9 5 0 -3 V 3

    GN D

    GN D

    U L N 2 0 0 3 A N

    GN D

    ATMEGA168

          1      0      0    n

          4      7    u

    B C 5 5 7

          2      2      0      k

    22 k

    B C 5 5 722 k

          2      2      0      k

    22 k

    U L N 2 0 0 3 A N

          8      2      k

          5      k      6

          2      2      0    n

          1      N

          4      1      4

          8

    +3.3V

    +3.3V

    + 1 2 V

    + 1 2 V

          1      0      k

    GN D

    GN D

    2 2 0 n

          1      0      0    n

    33 p

    33 p

          1      N

          4      1      4      8

          1      N

          4      1      4      8

    +3.3V

          4      7      k

          4      7      k

    L M 2 2 4 N

    L M 2 2 4 N

    L M 2 2 4 N

    L M 2 2 4 N

          2

          2      k

          2      2      k

    GN D

    + 1 2 V

    1 0 0 k

    47 k

    1 0 0 k

    47 k

    1 0 0 k

    47 k

    GN D

    1 N 4 1 4 8

    1 N 4 1 4 8

    Figure 1: Schematic diagram. Control button switches the ground.

  • 8/9/2019 Yacc Module for Opel Astra g Mid

    9/17

    YACC — User Manual Page 9 of   17YACC — User Manual Page 9 of   17YACC — User Manual Page 9 of   17

          1      4

          1   2

    C2

    Q1

    IC5

    IC2IC1

    C3

    C4R6

    R7

    R9T2

    R13

    R16

    T1

    R2

    R1

    R3

    IC3

    R8

          R      4

          R      5

          C      5

    R11

    D3

    R10

          R      1      2

          C      8

    C1

    C6

    C7   D1D2

    R15

    R14

    IC4      R      1      7

          R      1      8

          R      1      9

          R      2      0

          R      2      1

          R      2      2

          R      2      3

          R      2      4

    8/10

          I      C      P

          I      N      T      1

          I      N      T      0

          C

          O      N

          D      4

          D      5

    D1,. . .,D5 1N4148 T1, T2 BC557BIC1 ATMEGA168IC2, IC3 ULN2003IC4 LM224/LM324IC5 LP2950-3V3/78L05

    R1, R13 220 k  ΩR2, R3, R16,. . .,R18 22 k  ΩR4 82 k  ΩR5 5,6 k  ΩR6,. . .,R11, R14, R15, R20, R22, R24 47 k ΩR12 10 k  ΩR19, R21, R23 100 k  Ω

    C1, C3 100 nF C2, C4 47  µF C5, C8 220 nF C6, C7 33 pF  Q1 12 MHz

    Figure 2: Placement of elements.

  • 8/9/2019 Yacc Module for Opel Astra g Mid

    10/17

    YACC — User Manual Page 10 of   17YACC — User Manual Page 10 of   17YACC — User Manual Page 10 of   17

    Display connection

    type description Corsa B Corsa C Vectra B Astra F Astra G

    2 supply Key on voltage +12 V 5 1 53 output MRQ 10 12 10

    4 supply Ground 3 6 25 output SDA 11 11 116 input Traveled distance signal 12 9 127 output SCL 9 10 98 output Controlling signal +12 V 8 2 8

    11 input Control button On circuit board

    13 supply Battery +12 V 1 3 1

     Automatic antenna connection

    type description1 output Connection with automatic antenna (fig.  4, pin 7).

    10 input Connection with radio receiver (fig.   4, pin 7).

    Engine revolution and fuel consumption signal connection

    type description12 input Fuel consumption. Signal from Engine Control Module or from injector.14 input Engine revolution speed. Signal from Engine Control Module.

     Table 1: YACC connector description.

  • 8/9/2019 Yacc Module for Opel Astra g Mid

    11/17

    YACC — User Manual Page 11 of   17YACC — User Manual Page 11 of   17YACC — User Manual Page 11 of   17

    !"

    #

    $

    !

     

    Display 

    Corsa B, Astra F Signal description

    1 Battery +12V 

    3 Ground

    5 Key on voltage +12 V 

    8 Control signal +12 V 

    9 SCL  

    10 MRQ

    11 SDA  

    12 Traveled distance signal

    !

    "

    "#

    $

     

    Display 

    Corsa C, Astra GSignal description

    1 Key on voltage +12 V 

    2 Control signal +12 V 

    3 Battery +12V 

    6 Ground

    9 Traveled distance signal

    10 SCL  

    11 SDA  

    12 MRQ

    !"

    !

    #$

    !%

     

    Display 

     Vectra BSignal description

    1 Battery +12V 

    2 Ground

    5 Key on voltage +12 V 

    8 Control signal +12 V 

    9 SCL  

    10 MRQ

    11 SDA  

    12 Traveled distance signal

    Figure 3: Display connector.

    !

    "

    #$

    #%

    %

    &

    ##

    %'

    (%#

    %)%$

    = =

     

    !

    "

    #$

    #%

    %&

    %'

    &$

    #

    (

    #&

    '

    #)

    %!

    &*

    ! ! ! = =

     

    Figure 4: Radio receiver connector.

  • 8/9/2019 Yacc Module for Opel Astra g Mid

    12/17

    YACC — User Manual Page 12 of   17YACC — User Manual Page 12 of   17YACC — User Manual Page 12 of   17

    KEY ON

    BATT   BEGIN

     TRIP1

    SPDM/A/T 

    RPMCONFIG

    FA 

    FH

    FK/FX 

    10 M

    20 M

    50 M

    100 M

    200 M

    500 M

    1 KM

    FK ↔FX 

    FUEL COST 

    RESET DONE

     ADD  EDIT 

     VALUE

    CAL   EDIT 

     VALUE

    PRICE  EDIT 

     VALUE

    EXIT 

    BATT 

     TRIPS

     TRIP 1  BEGIN

    END  DONE

     TRIP 2  BEGIN

    END  DONE

     TRIP 3

    EXIT 

    BEGINEND

      DONE

    1/4 M

    0. . .60KM/H

    0. . .80KM/H

    0. . .100KM/H

    5 s

    Figure 5: Working modes.

  • 8/9/2019 Yacc Module for Opel Astra g Mid

    13/17

  • 8/9/2019 Yacc Module for Opel Astra g Mid

    14/17

    YACC — User Manual Page 14 of   17YACC — User Manual Page 14 of   17YACC — User Manual Page 14 of   17

    _1234

    *1234

    _*234

    -1---

    -2---

    -3---

    -4---

    -5---

    -6---

    -7---

    -8---

    -9---

    -0---

    _*234

    __*34

    --2--

    --3--

    --4--

    --5--

    --6--

    --7--

    --8--

    --9--

    --0--

    __*34

    ___*4

    ---3-

    ---4-

    ---5-

    ___*4

    ___5*

    ----4

    ----5

    ----6

    ----7

    ----8

    ----9

    ----0

    ___5*

    SET 

    Short presses cycle through digits andcommands (SET,  CANCEL). Selected digit 

    is marked with  *Long presses switch to digit valuechange mode or execute commands.

    Short presses select new digit value.Long press confirms a choice.

    Figure 7: Editor mode. Initial value 1234 is changed to 50.

  • 8/9/2019 Yacc Module for Opel Astra g Mid

    15/17

    YACC — User Manual Page 15 of   17YACC — User Manual Page 15 of   17YACC — User Manual Page 15 of   17

    t  [s]

    v  [ kmh

      ]

    60

    70

    80

    1224.00 1224.05 1224.10 1224.15 1224.20

    1

    2

    3

    4

    5

    6

    7

    8   910

    11

    12

    13

    14

    15

     Averagespeedcnoise  = 15

    Speed calculatedfrom two neighboringpoints.

    Figure 8: Inaccuracy of instantaneous speed measurement. Pulser is place in mechanical speedometer.

  • 8/9/2019 Yacc Module for Opel Astra g Mid

    16/17

    YACC — User Manual Page 16 of   17YACC — User Manual Page 16 of   17YACC — User Manual Page 16 of   17

    1.3 · 108

    l

    Σf 

    1.4 · 108

    1.5 · 108

    1.6 · 108

    1.7 · 108

    1.8 · 108

    1.9 · 108

    37 38 39 40 41 42 43 44 45

    2

    4  5

    6

    78

    1

    3

    y  = 3 669 000 · x

    Results with thick errors were ex-cluded from calcu-lations.

    44.09 161959814

    41.63 153856441

    43.12 155367922

    37.36 138954037

    43.58 159957383

    43.46 159408461

    File  fuel.dat  with data for gnuplot program.

    f(x)=a*x

    fit f(x) "fuel.dat" via a

    plot [37:45] "fuel.dat", f(x)

    Gnuplot commands.

    Figure 9: Calculation of fuel consumption calibration coefficient   cfuel  by fitting a straight line   y   =   cfuel · x   to recorded data with least square method.   Gnuplot program was used.

    http://www.gnuplot.info/http://www.gnuplot.info/

  • 8/9/2019 Yacc Module for Opel Astra g Mid

    17/17

    YACC — User Manual Page 17 of   17YACC — User Manual Page 17 of   17YACC — User Manual Page 17 of   17

    LCD 2x16

    (ADC5)PC5   28(ADC4)PC4

      27

    (ADC3)PC3  26

    (ADC2)PC2  25

    (ADC1)PC1  24

    (ADC0)PC0  23

    (SCK)PB5  19

    (MISO)PB4  18

    (MOSI)PB3  17

    (SS)PB2  16

    (OC1)PB1  15

    (ICP)PB0  14

    (AIN1)PD7  13

    (AIN0)PD6  12

    (T1)PD5  11

    (T0)PD4  6

    (INT1)PD3  5

    (INT0)PD2   4

    (TXD)PD1  3

    (RXD)PD0  2

    GN D8

      VC C7

    A V C C20   AREF21

    X T A L 19

    X T A L 210

    RESET1

    AGND22

         G     N     D

        1

         V     D     D

        2

         V    5

        3

         R     S

        4

         R     W

        5

         E

        6

         D     B    0

        7

         D     B    1

        8

         D     B    2

        9

         D     B    3

        1    0

         D     B    4

        1    1

         D     B    5

        1    2

         D     B    6

        1    3

         D     B    7

        1    4

         A

        1    5

         K

        1    6

    1 2

    LCD/TID  13

        2

    R1

          R      2

    DB7

    DB6

    DB5

    DB4

    RS

    E

    ATMEGA168

    +5V  GND

    GND

    10K

    Figure 10: Connection of LCD display.