I've built this and other projects using 4017, 555 chips etc. but would like to use an arduino now. I've got the hardware figured out, no problem. I have look through a number of my arduino books but haven't found a sketch close enough. I general there's one input and two ouputs. The input is from a rpm trigger that goes ground at upshift rpm. The two outputs are for shift solenoids. On takeoff when the rpm reaches preset, it goes low, causing the 1-2 shift, then when the rpm is reached again, trigger goes low and the 2-3 shift is made. There's a delay needed at the 1-2 shift because the rpm trigger does bounce and there's a slight shift lag. Without the delay it's likely to make a 1-3 shift. Also after the 2-3 shift any rpm rise will not cause another shift until the system is reset for the need race. I've put this question on a few forums but no results so far. I've tried a number of test sketches which kind-of works but isn't what I'd want as a final outcome. Thanks for any insight or direction.....Ken.
There's a delay needed at the 1-2 shift because the rpm trigger does bounce
How much of a delay? Reading the rpm trigger seems like it should be easy. Setting a pin HIGH or LOW is trivial. Recording when an event happens (when the rpm trigger goes HIGH OR LOW) is easy (millis()). Testing the interval between then and now (millis(), again) is trivial, so debouncing is taken care of. I guess I don't see the need for a delay, beyond that needed to handle the debouncing.
When using MSD and other rpm switches, the output goes from an open circuit to ground (at preprogrammed rpm) however there's a moment where it rapidly goes open, gnd, open, gnd. until the trigger rpm is exceeded or drops below the preset therefore causing a possible 1-3 shift. The controller needs to respond to the first ground trigger (for the 1-2 shift) but disregard the trigger for about 1/4 second to allow the upshift and rpm drop to get ready for the next trigger.