I think it's reporting RPM correctly because I'm recording the time periods between pulses and they're now very well behaved. I've been meaning to put it back on the scope and verify the periods recorded are in agreement with the pulses I see - but it seems unlikely I'll find an error there. I'm also keeping a count of how many time periods fall outside of the expected range (of about 1K to 10K RPM). The count hovers pretty close to zero until I get the ignition simulator spinning faster than 10K. The "ignition simulator" is just a coil and distributor mounted on a board that I spin with a variable speed cordless drill. It's set up to spark on all 8 cylinders so it's very easy to get an equivalent single cylinder 10K RPM with the cordless drill.
This is the LCD display:
"20 x 4 LCD, 5 volt, based on the popular HD44780"
Here is how the LCD is connected to the Arduino:
Display Arduino
------------- ----------------
1 (VSS) GND Arduino pin
2 (VDD) +5v Arduino pin
3 (contrast) output of pot (Gnd-to-5V)
4 RS Arduino digital pin 12
5 R/W Arduino digital pin 11
6 Enable Arduino digital pin 10
7 No connection
8 No connection
9 No connection
10 No connection
11 LCD Data4 Arduino digital pin 6
12 LCD Data5 Arduino digital pin 5
13 LCD Data6 Arduino digital pin 4
14 LCD Data7 Arduino digital pin 3
15 Backlight No connection
16 Backlight GND No connection
I'm pretty sure display pins 7-10 are optional data inputs. They currently have no connection and are not specified to be in use. Do you suppose I need to tie them high or low?
>> Is the uC getting the signal okay?
Yes. I can also stream the results to the laptop via USB serial comms - and that continues to show good results after the display has gone wacky.
>>it could be a grounding issue instead.
Interesting. Can you tell me more?
>> Best to show the complete circuit, including the LCD.
Do you mean a circuit diagram or a photo? I can try to provide either. The whole thing is haywired on one of those proto-boards with jumper wires - it occurs to me that all those wires could be behaving as antennas for all this high freq noise. Not sure how to handle that on a proto-board.
For now let me describe the basis of how the parts are hooked together...
I'm powering the Arduino from a 9V battery. The Arduino provides a regulated 5V output. I use the Arduino Gnd and 5V regulated output to the Vcc and Gnd rails of the proto-board. This is how I power the 555, transistor, display, etc. Does that make sense?
Thanks very much for any tips. If you think sharing power and Gnd between the transistor, 555, and display (and the shield of the ignition pickup wire) is the problem, could you suggest a cheap isolated supply to power the transistor? I would then keep that as a completely separate circuit that would communicate with the 555 through an opto-isolator.
Disclaimer - I'm a complete hack.
Thanks!