View previous topic :: View next topic |
Author |
Message |
jepherz
Joined: 12 Mar 2006 Posts: 3
|
Questions concerning multiplcation of square wave frequency |
Posted: Wed Mar 22, 2006 1:33 pm |
|
|
Hello all,
I am interested in building a circuit which will latch onto a Karman frequency from an car's maf sensor in order to alter the frequency of the input the car's ECU is seeing. Basically, the circuit would need to input a square wave frequency, latch onto that frequency in order to get the proper time, and alter it (maybe make the output 80% of the input frequency) and then output the corresponding frequency to the car's ECU.
From my understanding of PICs, you are limited to the PWM readings because of the operating oscillation of them. Other than possibly some sort of an optical isolator to block noise, can any of you help me with what I would have to design for this to work?
Thanks for your help!
-Jeff |
|
|
Humberto
Joined: 08 Sep 2003 Posts: 1215 Location: Buenos Aires, La Reina del Plata
|
|
Posted: Wed Mar 22, 2006 3:29 pm |
|
|
Are you tied to make that modification in a digital MAF?
It would be much more easy to make such modification in an analog MAF.
Humberto |
|
|
Eugeneo
Joined: 30 Aug 2005 Posts: 155 Location: Calgary, AB
|
|
Posted: Wed Mar 22, 2006 10:28 pm |
|
|
Are you going with forced induction or just changing the curve?
I think the frequencies are about 30 to 3K Hz so you could use the CCP to capture the value. Then modify and send them out on a pic. The resolution may not be that great at the high end. You could use a frequency to voltage and vise versa.
If you have other inputs (boost pressure, O2, knock) then your going to have to do some more thinking. |
|
|
jepherz
Joined: 12 Mar 2006 Posts: 3
|
|
Posted: Mon Mar 27, 2006 5:21 pm |
|
|
So there is no way to lock onto an incoming square wave, and output a multiplied frequency based on that? I thought someone was talking about such a circuit to do just that, and it didn't even have a pic in the circuit since it was set up always as the same multiplier? |
|
|
jepherz
Joined: 12 Mar 2006 Posts: 3
|
|
Posted: Mon Mar 27, 2006 6:01 pm |
|
|
BTW, it is being used for forced induction. Maf hz readings are around 0-2000 Hz. |
|
|
Tre
Joined: 03 Jun 2005 Posts: 21
|
Digital PLL |
Posted: Wed Mar 29, 2006 10:11 am |
|
|
What you are trying to do is create a digital PLL. You want to lock onto an incoming waveform and then modify the duty cycle. I can see a lot of potential problems with this. Particularly, you don't want to just add a constant XX% to the duty cyle, you need to design a transfer function H(s) that maps the input X(s) into the output Y(s). You can fairly easily accomplish this with the PIC. However, you will need to be concerned about the delay introduced by the transfer function, TF. 0-2kHZ shouldn't be a problem. There was a posting on this board a long time ago about implemeting a PLL in software, interesting article. You might want to check that out.
Hope this helps,
Drew |
|
|
|