Remote Vehicle Starter Help


Closed Thread
Results 1 to 23 of 23

Hybrid View

  1. #1
    Join Date
    Mar 2006
    Location
    Pennsylvania, USA.
    Posts
    130


    Did you find this post helpful? Yes | No

    Default Re: Remote Vehicle Starter Help

    I used a voltage divider. For my test circuit, I had the ADC continuously read the voltage, and send the result out the serial port. With my laptop watching the serial port, I started the car, and had before and after battery voltage readings. Merry Christmas,Jerry
    If your oscilloscope costs more than your car...

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: Remote Vehicle Starter Help

    Cool deal, my guess about voltages is about 8 volts cranking and jumps to 12 to 12.8 when first starts ? A rare problem with that setup is a dying battery that sits at rest at 12 volts but when starter enguages, the voltage dips so low that the starter drops out and the voltage goes up then repeats that chatter in and out. Not sure how you would detact that. Timmers may have thought of that but with more circuitry.
    Don

  3. #3
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: Remote Vehicle Starter Help

    I'm not having any luck using the ACD of a 16F877A.
    Maybe I should have given the thing a better output than a flashing light,
    but I'm pretty sure I'm getting a zero reading every time.
    The circuit always waits for the timeout to stop the starter motor.

    if anyone likes to take a look...

    Code:
    
    
    ' Remote start controller
    '  for '92 Toyota Surf
    '
    DEFINE OSC 04                            'hardware is using a 4MHz crystal
    DEFINE ADC_BITS 10                        '10 bit ADC for 16F877A
    '
    adcon1.0 = 1 : adcon1.3 = 1                'set porte pins digital
    trise.0 = 1 : trise.2 = 1                'set porte pins as inputs
    trisb.1 = 1 : trisb.2 = 1                'set portb pins as inputs
    trisd.2 = 1    : trisd.3 = 1                'set portd pin as input
    trisa.0 = 1 : trisa.1 = 1                'set all analogue channels as inputs
    trisa.2 = 1 : trisa.3 = 1                '
    ADCON1 = 0                                'set analogue inputs
    ADCON1.7 = 1                            'right justified for 10 bit ADC
    '
    seq var byte                            'run sequence flag
    timea var byte                            'time lsd
    timeb var byte                            'time msd
    timec var byte                            'timer
    timed var byte                            'timer
    timee var byte                            'timer
    xtimed var byte                            'timer
    xtimee var byte                            'timer
    debouncea var byte                        'input a debounce counter
    debounceb var byte                        'input b debounce counter
    debouncec var byte                        'input c debounce counter
    srelay var byte                            'starter relay status
    irelay var byte                            'ignition relay status
    bvoltage var word                        'battery voltage value
    avoltage var word                        'running voltage value
    ttiimmee var byte                        'timer
    held var bit                            'button held flags
    xheld var bit                            '
    rlock var bit                            '
    gosub reset                                '
    '
    '
    main:
    if timeb > $04 then                        '
    '
    if srelay = 0 then                        '
    high portb.5                            'led on
    else                                    '
    low portb.5                                'led off
    endif
    endif                                    '
    pauseus 500                                'delay
    if irelay = 0 then                        '
    low portb.5                                'led off
    endif                                    '
    '
    timea = timea + 1                        'increment timer
    if timea = $FF then                        '
    timeb = timeb + 1                        '
    timea = 0                                '
    endif                                    '
    '
    if timeb = $06 then                        'check timer
    if timec < $F0 then                        '
    timec = timec + 1                        '
    endif                                    '
    timeb = 0                                'reset timer
    endif                                    '
    '
    
    
    
    '
    '
    if debouncea < $F9 then                    'increment debounce a timer
    debouncea = debouncea + 1                '
    endif                                    '
    if debounceb < $F9 then                    'increment debounce b timer
    debounceb = debounceb + 1                '
    endif                                    '
    if debouncec < $F9 then                    'increment debounce c timer
    debouncec = debouncec + 1                '
    endif    
    '
    if debouncea = $F9 then                    '
    if portb.1 = 0 then                        'ignition off button, yellow wire
    seq = 0                                    'end sequence
    irelay = 0                                'turn relays off
    srelay = 0                                '
    gosub reset                                '
    endif                                    '
    endif                                    '
    '
    if debounceb = $F9 then                    '
    if portb.2 = 0 then                        'violet wire... unlock button
    debounceb = $F8                            '
    held = 1                                '
    timed = timed + 1                        '
    if timed = $FE then                        '
    timed = 0                                '
    timee = timee + 1                        '
    endif                                    '
    endif                                    '
    if portb.2 = 1 then                        '
    held = 0                                '
    timed = 0                                '
    timee = 0                                '
    debounceb = 0                            '
    endif                                    '
    if timee > $09 then                        'unlock button held delay define here
    timed = 0                                '
    timee = 0                                '
    debounceb = 0                            '
    held = 0                                '
    seq = 1                                    'activate sequence
    timec = 0                                '
    endif                                    '
    endif                                    '
    '
    if debouncec = $F9 then                    '
    if portd.2 = 0 then                        'blue wire... lock button
    debouncec = $F8                            '
    xheld = 1                                '
    xtimed = xtimed + 1                        '
    if xtimed = $FE then                    '
    xtimed = 0                                '
    xtimee = xtimee + 1                        '
    endif                                    '
    endif                                    '
    if portd.2 = 1 then                        '
    xheld = 0                                '
    xtimed = 0                                '
    xtimee = 0                                '
    debouncec = 0                            '
    endif                                    '
    if xtimee > $09 then                    'lock button held delay define here
    xtimed = 0                                '
    xtimee = 0                                '
    debouncec = 0                            '
    seq = 0                                    'end sequence
    rlock = 0                                '
    irelay = 0                                'turn relays off
    srelay = 0                                '
    gosub reset                                '
    endif                                    '
    endif                                    '
    '
    if seq = 1 then                            '
    irelay = 1                                'turn on ignition power relay
    if timec = 02 then                        '
    srelay = 1                                'turn on starter motor relay
    endif                                    '
    '
    if srelay = 1 then                        '
    '
    ttiimmee = ttiimmee + 1                    'increment timer
    if ttiimmee = 70 then                    'time between samples is set here
    ADCIN 0, avoltage                        'read running voltage
    if avoltage > bvoltage + 1 then            'detect vehicle start
    srelay = 0                                'turn off starter motor
    endif                                    '
    ttiimmee = 0                            '
    
    bvoltage = avoltage                        'remember old voltage reading
    
    
    endif                                    '
    '
    if portb.2 = 0 then                        '
    timec = $03                                '
    timeb = $02                                '
    rlock = 0                                '
    srelay = 0                                '
    low portd.1                                '
    pause 1000                                '
    endif                                    '
    endif                                    '
    '
    if timec = $03 then                        'starter motor on time defined here
    if timeb = $03 then                        '
    rlock = 0                                '
    srelay = 0                                'turn off starter motor
    endif                                    '
    endif                                    '
    '
    endif                                    '
    '
    if seq = 0 then irelay = 0                'turn off ignition power relay
    '
    '
    if srelay = 0 then                        'set starter relay state to starter relay flag
    rlock = 0                                '
    low portd.1
    else
    high portd.1
    endif
    '
    if irelay = 0 then                        'set ignition relay state to ignition relay flag
    low portd.0
    else
    high portd.0
    endif
    '
    goto main                                'repeat main loop
    '
    '
    reset:
    srelay = 0 : irelay = 0                    'reset relay status for start program
    timea = 0 : timeb = 0                    'reset timer variables for start program
    timec = 0 : timed = 0                    '
    timee = 0 : ttiimmee = 0                '
    xtimed = 0 : xtimee = 0                    '
    debouncea = 0 : debounceb = 0            'reset debounce timers
    debouncec = 0                            '
    held = 0 : xheld = 0                    'reset flag
    avoltage = 0 : rlock = 0                '
    bvoltage = 65533                        '
    low portd.1 : low portd.0                'start with relays off hardware controlled
    seq = 0                                    '
    return                                    '
    '
    '
    '
    '
    '
    Cheers, Art.

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Remote Vehicle Starter Help

    This sorta conflicts
    adcon1.0 = 1 : adcon1.3 = 1 'set porte pins digital
    With This
    ADCON1 = 0 'set analogue inputs
    ADCON1.7 = 1 'right justified for 10 bit ADC

    But the last two lines should be OK. See register 11-2 in the data sheet.

    Not sure I follow this:
    ADCIN 0, avoltage 'read running voltage
    if avoltage > bvoltage + 1 then 'detect vehicle start

    avoltage will not be greater than 1023.. 10 bit
    Then there is this
    bvoltage = 65533
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: Remote Vehicle Starter Help

    I'll have to look at the ADCON1 register. I think there is some insight for me there.

    The initial value for bvoltage is set higher than any 10 bit reading can be so the flag is not triggered on the first cycle.
    It could just as easily be 1024, but it's a 10 bit value stored in a 16 bit word var, so I can use a higher number.

    bvoltage is the last reading stored for X number of cycles to be compared to the current value which is avoltage.
    If no branch condition is met, then the current value becomes the last value for comparison the next time.

  6. #6
    Join Date
    Mar 2006
    Location
    Pennsylvania, USA.
    Posts
    130


    Did you find this post helpful? Yes | No

    Default Re: Remote Vehicle Starter Help

    I'll try to see if I can find some code. I've been doing Arm7 C programming the last two years, so I have to dig out my old basic files. My code worked well in two Ford vehicles, and I drove them both through a full winter using the starter every cold winter morning! I built the first one on a Lab-x board from melabs, it has an LCD to show whats happening, but the output to the laptop was safer for testing because I had history to look at after I drove the car.If the initial battery voltage was about 11 vdc, the processor would refuse to try to start the engine. I typically see 12.4 to 12.8 before the starter engages, and 13.8 or so as soon as the starter is disengaged. Happy New Year!Jerry
    If your oscilloscope costs more than your car...

  7. #7
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default Re: Remote Vehicle Starter Help

    Happy new year y'all!

    I've installed remote car starter for 12 years and there's quite a few method you can use if you don't have any Tach signal generated by the Alternator, available on the Cluster connector or ECM.

    The oldest method in early 90's
    1) use a vacuum switch...
    Con:
    not always easy and doable to find a proper vacuum source/hose,
    need to cut the hose, and take chance the switch could freeze

    The next most popular in those years
    2) read the Battery voltage, should be 'round 13.8ish V when the vehicle is started
    Con:
    Starter often stay engaged when not properly implemented or with "Soon to die" alternator

    The most valuable and still in use solutions are
    1) use a Field effect sensor attached on the top of the alternator.
    Easy to implement, but some alternator do not generate enough magnetic field, OR have their own
    "Strong Sweet spot", so you may have to monitor it to find the sweet spot. And once you find it, sometime it's just not simple to sit your detector there. You also need to route more wires.

    2) read the Alternator output, the wire that goes "High" when the vehicle is started
    The easiest solution, easy to implement with an averaged ADCIN routine (plus some extra pause and double/triple check) and a really strong power supply, board and noise filtering design. The safest and easiest in the installation field. Most alternator have this specific output.

    3) grab the junk generated by the alternator on the 12V line and use it as "Tach" signal
    Really popular available and patented by many car starter brand. If properly designed it works a treat for all type of car, truck, everything and do not require any extra wiring.

    Enjoy, back to my batcave.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

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