I'm working on a home project where I'm reading a variable reluctance sensor that outputs a sine wave that alters it's frequency and amplitude based on RPM.
Firstly, I want to read the source wave from the sensor and output it verbatim from the Arduino through another port. At a certain, variable, amplitude, I need to cap it's amplitude.
I have been reading up on sine waves, DDS, DAC's and various circuitry to achieve such a result such as the MAX9924 which is designed to handle VR sensors.
I have not seen mention if the DDS method can support a sine wave swinging about 0v from +5 to -5v?
To achieve this at the moment I am thinking that I could use the analogRead function to take in the source sine wave. I understand that the analogWrite function operates digitally so I can either use DDS to replicate a sine wave or use another physical solution.
So my current thoughts are to convert the source to digital then use a DDS algorithm, or a DAC, or a MAX9924 to output a corresponding sine wave at the same frequency and amplitude.
I can then write some software to filter/cap the sine wave at certain level of amplitude to then emit a constant signal rather than continuing to output a variable signal tied to the source.
First of all, I'm most interested to see if I can capture this source sine wave and then re output it by some method, in effect, replicating the source signal through the Arduino as a first step.
Thoughts if this is possible and any ideas to point me on the right track would be appreciated!
what is your ADC sampling rate and resolution?
a DDS is in effect a programmable signal generator
I would suggest a DAC such as mcp4725 - you read from the ADC, do any processing required and output to the DAC
Can be done using a bipolar DAC/bipolar power supply, but a 16 MHz Uno may not be fast enough to sample the input and produce the output. Please answer the question in reply #1.
I've not been able to find a datasheet for the crank position sensor I'm using so far so it looks like I will have to pull out the scope when I get a chance and measure it in situ. I doubt its much different to other sensors of the same type, manufacturer is FAE.
Think there will be at least 8000 events per second at 8000 rpm if that helps assuming a 60 position trigger wheel working with the VR sensor.
One of my concerns was if it would be fast enough, would a due be a better choice?
IMO, you will have to add some hadware (providing input sine wave frequency * number_of_samples < 1 MHz) as a voltage divider (the DUE is 0V - 3.3V compliant only) plus some hadware to have a bipolar ADC and a bipolar DAC:
To add, I've found a VR conditioning board produced by Speeduino which is using the MAX chip I mentioned above. It converts the output into a 5v square wave. I may use this on the input side and look at how to implement the bipolar DAC/PSU on the output post processing.
Hi,
What is the application?
What actual information do you need from the reluctance pickup?
Just frequency, or is amplitude important as well?
This sounds automotive in nature, are you trying to modify the engine ECU input.
When it comes to ECU type applications of reluctor output, it is just the frequency that is important.
What will you be outputting the processed waveform to?
I guess I ultimately need both, or at least I need to know the amplitude potential of the sensor in question at max rpm.
I've realised now that I can just trim the input signal and produce a square wave to determine frequency/rpm. As you say the frequency is the key number I'm ultimately looking for (RPM).
If the ECU is only interested in frequency then it doesn't seem like I have to worry about the amplitude too much when I reproduce the AC signal and send it back to the ECU. Getting out of phase is a concern.
As for the application, it's varied, but ultimately I'm looking to create a sensor simulator to help with two ECU's in a type of piggy back setup where 1 ECU handles part of the engine and another manages the other parts. It's to ensure the OEM ECU is still handling certain things like ESC. The OEM ECU still needs to see inputs to work properly, in other words spoofed to keep it from throwing codes.
As for the input side, I'm working on a circuit I'm going to try out without needing a chip to translate the sine wave to a square wave and go from there.
I'm not certain how to recreate the AC sine wave yet but one step at a time!
Hi,
Okay, if you are going to need two ECU, why not feed them the sensor signal to both inputs together, you then do not have to worry about phase differences.
I think you will find the amplitude is not important from these sensors, as long as you can read the frequency.
If you do need to buffer the signal, then discrete ICs will do the job.