Q5. Can I feed the VSS output directly into the AVR?
I have measured the VSS (vehicle speed sensor) output and it is a series of pulses from 0 to 5V that increase in frequency with an increase in speed. Sounds like it’s already digital, no need for the ADC. The signal looks pretty clean to me, but there is a little bit of ringing when it hits 5V so that the overall value may go over a little. Would this need any conditioning? I can supply pictures of my o-scope readings if needed.
Q6. Can the AVR handle a square wave?
I think I may have answered this one already. The tach signal is actually a series of square waves with I believe -5V low to +5V high. All the microcontroller has to do is count them and adjust the stepper motor accordingly. Do I have to convert this to a series of 0 to 5V pulses? Also, at the higher frequencies, the signal goes up to like 7V and decays down to 5V over the length of the pulse, before going negative and doing the inverse of that, so it is like a portion of a sawtooth. I presume that is not good. It does the same thing at the lower frequencies, but only to like 5.5 V or so. Strange that the car’s computer can handle that. Perhaps it is conditioned inside of the ECU. Once again, I can provide a picture of the o-scope reading if needed.
ozone:
Q5. Can I feed the VSS output directly into the AVR?
I have measured the VSS (vehicle speed sensor) output and it is a series of pulses from 0 to 5V that increase in frequency with an increase in speed. Sounds like it’s already digital, no need for the ADC. The signal looks pretty clean to me, but there is a little bit of ringing when it hits 5V so that the overall value may go over a little. Would this need any conditioning? I can supply pictures of my o-scope readings if needed.
Yes, though you'll want to do some simple buffering of it to remove noise and glitches.
Q6. Can the AVR handle a square wave?
I think I may have answered this one already. The tach signal is actually a series of square waves with I believe -5V low to +5V high. All the microcontroller has to do is count them and adjust the stepper motor accordingly. Do I have to convert this to a series of 0 to 5V pulses? Also, at the higher frequencies, the signal goes up to like 7V and decays down to 5V over the length of the pulse, before going negative and doing the inverse of that, so it is like a portion of a sawtooth. I presume that is not good. It does the same thing at the lower frequencies, but only to like 5.5 V or so. Strange that the car’s computer can handle that. Perhaps it is conditioned inside of the ECU. Once again, I can provide a picture of the o-scope reading if needed.
All micros can measure the period of a digital signal and on/off ratio. Inexpensive ones can handle, say, several hundred KHz.
To get the I/O to the right voltage levels, you need some simple circuits to condition the signal.