I don't do "hardware" anymore
soooo....
This device could be done in about 10 minutes with a microcontroller and about 20 lines of code - I have no use for one since I don't even look at knock - to me if you're knocking, your already too late whereas AFRs and EGTs will tell you sooner as you creep up on the tune. Besides KR is built into DFIs; but anyways maybe this may kickstart someone (besides me
to just build this thing and get it over with) :
Here's some pseudo C code for the record (of course the calibration counts need be just scaled for whatever the ESC counts to degrees retard ratio is - u look it up, I dont feel like it):
int count, signal; // global
count =0; // intialize to 0 on device startup
while(TRUE)
{
signal=read adc(Portwhatever);
// read at total execution delays under clock speed
delay; // time this delay to have a rough timebase for counting pulses
// you could also use an interrupt scheme but I don't think this task is
// involved enough to require the timing accuracy an interrupt would provide
if(signal < 50) // guesstimate based on 8 bit adc - provides low detection...
// you could also use a digital input, but this way i can define an analog noise
// thresholding for triggering.
count++;
// Drive some stinkin LEDS - if you were cool you'd use an LCD - but that's
// easy too!
:
if(count>10)
LED1 ON;
if(count>15)
LED2 ON;
// and so on...
if(count > maximum possible KR - yea your engine's dead here )
{
LED3 ON;
delay; // add big ol delay here to make sure you know the crank went thru
// the block. :tongue:
}
delay; // eliminate some LED "flicker"
count = 0; //rst counting
} // end while(TRUE)
that's the basic idea... :redface:
Phil