Hi,
I'm new to the board. Have an Arduino Duemilanove I've been toying around with for a while now.
At the moment I am trying to create a very basic tachometer using my Arduino (and I know many have made one before me).
The trouble is that I cant get a reliable signal from the interrupt 0 pin.
I'm using a "stimulator" for input (built to test my megasquirt DIY ECU). It has a microcontroller to generate a tach frequency (which is adjustable with some potentiometers).
This stimulator does not have it's own 5v regulator so I built a little input circuit using a PNP transistor to switch the interrupt (pin2) between Arduino's 5v and Gnd (with a pullup on the 5v side of things). I just apply the 12v tach output from the stimulator to the base to switch.
Yes I know it's a dirty circuit, but it was the best I could do with what I had lying around.
When I feed this input to some code that just increments a counter on every interrupt and then reads the number of pulses every 200ms (after which it resets the count) I get some very erratic numbers.
They look somewhat proportional to the frequency I set on the stimulator but it seems like the interrupt is triggered at least >10 times for every actual rising edge on the tach input.
The stimulator is working 100% correctly, I verified this on my megasquirt ecu.
Does anyone have some advice in this matter?
I strongly get the feeling I should be referencing the grounds of both boards to eachother, but since I havent got my head around getting them to share the same supply I'm not sure that would be wise.
Also: Just having a wire on pin2 that is not attached to anything also causes lots of interrupts, is this pin really that sensitive??
Thanks in advance for any usefull suggestions!
Regards Ivan
(from the netherlands in case anyone has problems with my english).