Commit 0219c75a authored by David Andruczyk's avatar David Andruczyk

Added hentaiXP 24-2 with second trigger pattern

parent 0b4ef81a
......@@ -7,23 +7,18 @@ leveraging its onboard timers and ultra cheap price..
Using a SparkFun Redboard (Uno clone) it's able to generate in excess of a
32,000 RPM 60-2 crank trigger digital signal.
In theory it can go over 100,000 RPM though that needs more analysis to be
sure the signal isn't too jittery at that level.
Tested with an Arduino Uno (SprkFun Redboard (Uno clone)
Tested with an Arduino Uno (SparkFun Redboard (Uno clone))
To build load the .ino file with the arduino toolkit compile and install
Pin 8 will provide the wheel signal.
Pin 8 will provide the crank or primary wheel signal
Pin 9 will provide the cam or secondary wheel signal
Running on tiny's, Mega's or other arduino variants beside the Uno
may require code modifications or have a different output pin number, so YMMV.
There is no guarantee, if you blow up your arduino, hurt yourself, burn
down your house or hurt others youare completely liable for your actions
down your house or hurt others you are completely liable for your actions
and you will hold the author and the rest of the life on this and any other
planet blameless for your own actions.
Be safe out there...
......@@ -59,7 +59,7 @@
};
byte sweep_state = ASCENDING;
volatile uint16_t new_OCR1A = 5000; /* sane default */
volatile byte selected_wheel = SIX_G_SEVENTY_TWO_WITH_CAM;
volatile byte selected_wheel = TWENTY_FOUR_MINUS_TWO_WITH_SECOND_TRIGGER;
/* Tie things into one nicer structure ... */
struct wheels {
......@@ -98,6 +98,7 @@
{ weber_iaw_with_cam_friendly_name, weber_iaw_with_cam, 0.6, 144 },
{ fiat_one_point_eight_sixteen_valve_with_cam_friendly_name, fiat_one_point_eight_sixteen_valve_with_cam, 3.0, 720 },
{ three_sixty_nissan_cas_friendly_name, three_sixty_nissan_cas, 3.0, 720 },
{ twenty_four_minus_two_with_second_trigger_friendly_name, twenty_four_minus_two_with_second_trigger, 0.3, 72 },
};
void setup() {
......
......@@ -89,6 +89,7 @@
WEBER_IAW_WITH_CAM, /* From jimstim IAW weber-marelli */
FIAT_ONE_POINT_EIGHT_SIXTEEN_VALVE_WITH_CAM, /* Fiat 1.8 16V from jimstim */
THREE_SIXTY_NISSAN_CAS, /*from jimstim 360 tooth cas with 6 slots */
TWENTY_FOUR_MINUS_TWO_WITH_SECOND_TRIGGER, /* Mazda CAS 24-1 inner ring single pulse outer ring */
MAX_WHEELS,
}WheelType;
......@@ -122,6 +123,7 @@
PROGMEM prog_char weber_iaw_with_cam_friendly_name[] = "Weber-Marelli 8 crank+2 cam pattern";
PROGMEM prog_char fiat_one_point_eight_sixteen_valve_with_cam_friendly_name[] = "Fiat 1.8 16V crank and cam";
PROGMEM prog_char three_sixty_nissan_cas_friendly_name[] = "Nissan 360 CAS with 6 slots";
PROGMEM prog_char twenty_four_minus_two_with_second_trigger_friendly_name[] = "Mazda CAS 24-2 with single pulse outer ring";
/* Very simple 50% duty cycle */
......@@ -616,4 +618,11 @@
0,2,0,2,0,2,0,2,0,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3, /* 641-680 deg */
1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3, /* 681-720 deg */
};
PROGMEM prog_uchar twenty_four_minus_two_with_second_trigger[] =
{
/* See http://postimg.org/image/pcwkrxktx/, 24-2 inner ring, single outer pulse */
1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,3,2,2,2,2,2, /* 11 teeth then outer and missing */
3,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0,0,0, /* 11 more teeth then missing */
};
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment