Hi all,
I'm hoping someone will be able to offer some advice to a beginner? (all my electronics theory and skills are self-taught!)

Long story short, what this circuit does is interface a Mitsubishi cruise control stalk to a VN commodore cruise unit.
The Mitsubishi cruise stalk has a resistance for each function - i.e. 3k for resume, 1k for set, 330ohms for cancel, etc. and then output a 12v signal for each function.
Basically without going into too much detail about the specifics - voltage of the cruise stalk is read in using a voltage divider (R1) - as said before, each function has a fixed resistance. This makes a 0-5v input that the micro reads. If the ADC value falls between hardcoded values, then it turns pins 24, 25, 26 or 27 on while the ADC value is in range. If it's not in a range, the outputs should be off.
U1 is a ATmega8.
U2 is a 7805 voltage reg
u3 is a ULN2003
D3 is a 5.1v zener diode.
R1 is a 1.2k resistor
D2 & D3 are 1n4004
Q1 & Q2 are just regular npn transistors like 2n2222
J2 is ISCP/Jtag header
J3 is a pin header for debugging - just to easily connect to the rs232 pins of the micro.
other resistors/capacitors, unsure about values yet...
Outputs of the ULN2003 (U3) are as follows:
- Cancel (makes cruise unit think brakes were pressed to cancel)
- Set
- Resume
- on/off
- Status LED - Blue
- Status LED - Red
- Status LED - Green
The idea of using the ULN2003 is so I can get a 12v signal output from the 5v output of the micro. The status led is a common cathode RGB LED. Micro determines the colour of the LED.
Q1 & Q2 are used to read/output the speedo signal into the micro so it can be modified. Input and output is a 12v square wave that changes in frequency as the speed increases (linear). The micro just modifies the frequency.
I once upon a time made a version 1 of this circuit (used optocouplers in a similar way that I'm using the uln2003), and it worked (except i discovered that the speedo signal was not the same between vehicles - ended up using Jaycar/silicon chip speed modifier kit). So this time, I'm going to get the micro to modify the speed signal.
I guess what I'd like to know is:
- Would this be OK for use in an automotive system? is there any additional components or protection I’d need?
- Is there a better way to get a 12v output signal for each function rather than using the uln2003 and resistor?
- for the speed input (Q2), would this be ok? I'm trying to put the lease amount of load on the speedo circuit of the car
- what’s the point of the capacitors near the crystal? I found this on a few Atmel examples
- would D3/R16 be safe enough to drop the voltages from 12v to 5v for the micro?
- what are some values for resistors? R1 is 1.2k, but all others I haven’t really worked out what values as I’m not sure the best way of calculating
- is there any way of making this circuit smaller? I’m going to get the PCB made double sided, using through hole components... not confident with qfp, smd yet
- What do I do with the unused pins on the micro?
If you need any more clarification, please ask. Thanks for your patience! I think I've jumped into the deep end a bit with this.
Ps. don't worry about the code on the micro, that's already sorted ;P
Cheers,
Bill