Please regard me below kindergarten level of electronics and arduino coding. (I do have a very rudimentary grasp of both)
I want to build a device that will read an input with an 0-8V AC signal roughly sinusoidal and between 100Hz and 10Khz and then output an 0-8V AC signal, roughly sinusoidal with a frequency either higher or lower than the input frequency. The ratio between input and output frequencies preferably adjustable from 0.1 to 10 via a trim pot but a factor in the code will also do if this would simplify hardware.
This requirement arises from my automotive engine swops where the W-pin (or P pin) of an alternator has to be matched to the rev counter / tachometer on the dash where the tacho expects this 0-8V AC signal and not the pulses that typically come from the coil- terminal.
How would you suggest I approach this requirement?
I would investigate commercial solutions first. This is not a rare requirement so I am sure there are products available.
If you don't like the commercial solutions, I know Silicon Chip magazine published a circuit to do exactly this. It is available in their book of car projects or in the online subscription. You may have to pay a few bucks to get access to their archive.
This is very confusing because you're talking about variable voltage and variable frequency and I don't know which is important or if both are important.
You have several "complications"...
The Arduino ADC can't read accurately to 10kHz. You need to sample at least twice per cycle (Nyquist theory) so you'd need to sample at 20kHz or more and you loose accuracy above 15kHz.
Analog-to-Digital Converter
24.1 Features
• 10-bit Resolution
• 0.5 LSB Integral Non-linearity
• ± 2 LSB Absolute Accuracy
• 13 - 260μs Conversion Time
• Up to 76.9kSPS (Up to 15kSPS at Maximum Resolution)
There is no built-in digital-to-analog converter (so it can't put-out a sine wave without additional hardware).
The Arduino's processor works on +5V and the ADC can read - to +5VDC. It can't directly read the negative half of an AC signal (in fact it can be damaged by voltages outside of that 0-5V range). There are ways to accommodate the 0-8VAC on the input (if you really have that).
You'd need an amplifier on the output. But even with an amplifier, getting 8V out is "difficult" with a 12V system. 8V RMS is about 22V peak-to-peak so you'd need a +12V power supply and a -12V power supply, or a 24V power supply, etc.
One thing I would check is to see if the receiving device will accept 5V pulses instead of an 8V sine wave. Try feeding it a square wave (PWM value 128) to see if you get a reasonable display. The Arduino UNO PWM frequency is about 490 Hz (or 980 Hz on Pin 5 and Pin 6).
As for reading the signal, you can use a diode in series to eliminate the negative half of the input signal and use a resistor in series and 5V Zener diode across the signal to clip the over-voltage parts of the input signal. Choose the resistor to keep the current below the current limit of the Zener diode. This will give you something that should be readable by an Arduino digital input. I'd try reading that with one of the many frequency-counter sketches.
For frequencies in the 31 Hz to 65 kHz range, you can use the tone() function to produce square-wave outputs.