Remote Vehicle Starter Help


Closed Thread
Results 1 to 23 of 23

Hybrid View

  1. #1
    Join Date
    Apr 2011
    Location
    Kent, UK
    Posts
    52


    Did you find this post helpful? Yes | No

    Default Re: Remote Vehicle Starter Help

    I built an auto starter for a generator.
    Used a hall effect sensor looking at the starter teeth of the flywheel. Fed this into TIMER 1 external clock input, and used it to count the number of pulses (teeth) over a time period. I then did some tests and measured the fastest it could crank when warm, then set a threshold about 20% higher. Never had a problem with it.

    For the record, I built in lots of safety features, which included low voltage cutout, under speed cranking, low oil pressure, over temperature, with visual and audible warnings before starting and an emergency stop switch.

    I was able to have a remote control panel in the house where I could display and configure the parameters or manually start the engine and switch over the electric contactors. Never used it in manual, auto was fine.

  2. #2
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: Remote Vehicle Starter Help

    I can understand why people would do this with generators. Who wants to walk outside to start an engine

    My alternator may not produce voltage straight away (although I'm pretty sure it does),
    I am able to see an initial voltage, then a drop while cranking, then a gradual rise to a higher voltage.

    I think this is nice because I should be able to use the supply leg of the 7805 to take
    the voltage measurement, and need no extra wires.

  3. #3
    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...

  4. #4


    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

  5. #5
    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.

  6. #6
    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.

  7. #7
    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.

Members who have read this thread : 1

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