Need Design Ratification before I shoot myself in the foot, Vehicle Speed Corrector + more

Discussion in 'The Projects Forum' started by Hoylegj, Mar 11, 2016.

  1. Hoylegj

    Thread Starter New Member

    Mar 10, 2016
    16
    1
    Good afternoon, and many thanks in advance.

    This is the Start of a spec I’m putting together, and I would be very grateful if you could stop me if I'm going down the wrong road.

    I've still got a lot of detail to understand but it’s a start, all be it an adventurous one. I'm a programmer of many years, C,C++,ASM, and others, but never worked on Pics before, done a few simple things like making a LED flash, which I used to start understanding the basic of PIC programming, this was the starting point of a much bigger project I need to undertake. I've been using a PIC18F45K50 for the stuff I've done so far.

    I'm building a custom car and it needs to go through a DVLA build test, this rightly tests many parts of the car and electronics are the way forward.

    Thus the issues I need to address are :-
    Speedo speed correction (5V Square wave)
    Steering Control(5V Square wave)
    Max Speed fuel cutoff


    * ===================
    * Design Requirements
    * ===================
    *
    * This code/device is to resolve 3 issues I’m having with building a Vehicle
    * to pass BIVA government test.
    *
    * R1) The Vehicle being built has mismatched gearbox, final drive and wheel
    * sizes, which in turn cause the speedometer to read incorrectly.
    * a) Generate new correct square wave VS output signal based on the Ford VSS
    * b) VSS only produces around 2 pulses per second at 1 mph
    *
    * R2) A maximum speed limiter so that various components used cannot exceed
    * their design threshold, like Tyres.
    * a) Create a Fuel Pump On / Off to control the Maximum speed
    *
    * R3) Outputs to drive a Vauxhall Corsa Steering Column
    * This column has 3 force settings controlled by the VSS frequency,
    * High 0-15mph, Medium 18-45mph, Low 45mph+,
    * a) An VS output frequency for the speed (Approx 5 x the Ford VSS signal)
    * b) An output pin to drive Steering Initializing, i.e. 0v on start,
    * and then +12v after ten seconds
    * c) RPM Input and Output pins, used in Steering Initialisation
    * As a plus it allows wiring from one place
    *
    * PIC Ports Used (pin numbers are not correct, to be determined) :-
    * 1) Speed Corrector
    * RA1 - Input from the gearbox Vehicle Speed Sensor (VSS)
    * RB1 - Output Corrected Speed Frequency
    * 2) RPM
    * RA2 - RPM Input signal
    * 3) Vauxhall Electronic Steering Column
    * RB2 - Output Frequency
    * RB3 - 0v to 12v via MosFet, 10 second after start, i.e RPM reads > 400
    * 3) Max Speed Trigger
    * RB4 - 12v to 0v via MosFet, High / Low to switch the Fuel Pump On / Off
    *
    * Basic Processing:-
    * Use an interrupt to capture the Vehicle Speed Sensor (VSS) Pulses
    * (frequency) and keep a count of them
    * Use a timer 4 times a Second to execute a procedure that uses the captured
    * VSS Pulses and computes the new outputs for (Speed and Steering),
    * then reset the VSS counter after the computation.
    * Finally setting the output frequency’s as calculated
    * This will repeat 4 times a second

    Pic_Pop.jpg
     
Loading...