Skip to content

Commit

Permalink
Add pattern ""4 cyl. Hall sensor dizzy with sparksensor"
Browse files Browse the repository at this point in the history
Add pattern ""4 cyl. Hall sensor dizzy with sparksensor"
Tested this on Arduino Nano and it workid nicely.
  • Loading branch information
TBAMax committed Aug 8, 2020
1 parent 4ad4a4b commit 3828ebf
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 50 deletions.
9 changes: 4 additions & 5 deletions ardustim/src/ardustim.ino
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,15 @@ wheels Wheels[MAX_WHEELS] = {
{ audi_135_with_cam_friendly_name, audi_135_with_cam, 1.5, 1080, 720 },
{ honda_d17_no_cam_friendly_name, honda_d17_no_cam, 0.6, 144, 720 },
{ mazda_323_au_friendly_name, mazda_323_au, 1, 30, 720 },
{ daihatsu_3cyl_friendly_name, daihatsu_3cyl, 0.8, 144, 360 },
{ daihatsu_3cyl_friendly_name, daihatsu_3cyl, 0.025, 144, 360 },
{ miata_9905_friendly_name, miata_9905, 0.6, 144, 720 },
{ twelve_with_cam_friendly_name, twelve_with_cam, 0.6, 144, 720 },
{ twenty_four_with_cam_friendly_name, twelve_with_cam, 0.6, 144, 720 },
{ subaru_six_seven_name_friendly_name, subaru_six_seven, 3.0, 720, 720 },
{ gm_seven_x_friendly_name, gm_seven_x, 1.502, 180, 720 },
{ gm_seven_x_friendly_name, gm_seven_x, 1.0, 180, 720 },
{ four_twenty_a_friendly_name, four_twenty_a, 0.6, 144, 720 },
{ ford_st170_friendly_name, ford_st170, 0.6, 720, 720 },
{ mitsubishi_3A92_friendly_name, mitsubishi_3A92, 0.6, 144, 720 },
};
{ spark_dizzy_4cyl_a_friendly_name, spark_dizzy_4cyl, 0.6, 144, 720 }
};

/* Initialization */
void setup() {
Expand Down
2 changes: 1 addition & 1 deletion ardustim/src/user_defaults.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
#include "wheel_defs.h"

uint16_t wanted_rpm = 6000;
volatile uint8_t selected_wheel = FOUR_TWENTY_A; //GM_7X; //TWELVE_MINUS_ONE_WITH_CAM; //MITSUBISH_4g63_4_2; //TWELVE_MINUS_ONE_WITH_CAM; // // //DIZZY_FOUR_CYLINDER; // // //SUBARU_SIX_SEVEN; // // //THIRTY_SIX_MINUS_ONE_WITH_SECOND_TRIGGER; //DIZZY_FOUR_CYLINDER; // //MITSUBISH_4g63_4_2; //THREE_SIXTY_NISSAN_CAS; // //_WITH_CAM; // // //TWELVE_MINUS_ONE_WITH_CAM; //TWELVE_MINUS_THREE; // //GM_LS1_CRANK_AND_CAM; //SIX_G_SEVENTY_TWO_WITH_CAM; // //MIATA_9905; // // //SIXTY_MINUS_TWO_WITH_CAM;
volatile uint8_t selected_wheel = SPARK_DIZZY_4CYL; //GM_7X; //TWELVE_MINUS_ONE_WITH_CAM; //MITSUBISH_4g63_4_2; //TWELVE_MINUS_ONE_WITH_CAM; // // //DIZZY_FOUR_CYLINDER; // // //SUBARU_SIX_SEVEN; // // //THIRTY_SIX_MINUS_ONE_WITH_SECOND_TRIGGER; //DIZZY_FOUR_CYLINDER; // //MITSUBISH_4g63_4_2; //THREE_SIXTY_NISSAN_CAS; // //_WITH_CAM; // // //TWELVE_MINUS_ONE_WITH_CAM; //TWELVE_MINUS_THREE; // //GM_LS1_CRANK_AND_CAM; //SIX_G_SEVENTY_TWO_WITH_CAM; // //MIATA_9905; // // //SIXTY_MINUS_TWO_WITH_CAM;

#endif
63 changes: 19 additions & 44 deletions ardustim/src/wheel_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@
SUBARU_SIX_SEVEN, /* Subaru 6 crank, 7 cam */
GM_7X, /* GM 7X pattern. 6 even teeth with 1 extra uneven tooth */
FOUR_TWENTY_A, /* DSM 420a */
FORD_ST170, /* Ford ST170 */
MITSUBISHI_3A92, /* Mitsubishi 3cylinder 3A92 */
SPARK_DIZZY_4CYL, /* 70/100 low/high ratio hall sensor dizzy with sparksensor for secondary*/
MAX_WHEELS,
}WheelType;

Expand Down Expand Up @@ -152,7 +151,7 @@
const char gm_eight_tooth_with_cam_friendly_name[] PROGMEM = "GM 8 even-tooth crank with 1 tooth cam";
const char volvo_d12acd_with_cam_friendly_name[] PROGMEM = "Volvo d12[acd] crank with 7 tooth cam";
const char mazda_thirty_six_minus_two_two_two_with_six_tooth_cam_friendly_name[] PROGMEM = "Mazda 36-2-2-2 with 6 tooht cam";
const char mitsubishi_4g63_4_2_friendly_name[] PROGMEM = "Mitsubishi 4g63 aka 4/2 crank and cam";
const char mitsubishi_4g63_4_2_friendly_name[] PROGMEM = "Mitsubish 4g63 aka 4/2 crank and cam";
const char audi_135_with_cam_friendly_name[] PROGMEM = "Audi 135 tooth crank and cam";
const char honda_d17_no_cam_friendly_name[] PROGMEM = "Honda D17 Crank (12+1)";
const char mazda_323_au_friendly_name[] PROGMEM = "Mazda 323 AU version";
Expand All @@ -163,9 +162,7 @@
const char subaru_six_seven_name_friendly_name[] PROGMEM = "Subaru 6/7 crank and cam";
const char gm_seven_x_friendly_name[] PROGMEM = "GM 7X";
const char four_twenty_a_friendly_name[] PROGMEM = "DSM 420a";
const char ford_st170_friendly_name[] PROGMEM = "Ford ST170";
const char mitsubishi_3A92_friendly_name[] PROGMEM = "Mitsubishi 3A92";

const char spark_dizzy_4cyl_a_friendly_name[] PROGMEM = "4 cyl. Hall sensor dizzy with sparksensor";

/* Very simple 50% duty cycle */
const unsigned char dizzy_four_cylinder[] PROGMEM =
Expand Down Expand Up @@ -1100,43 +1097,21 @@
3,3,3,3,3,1,1,1,1,1,1,0,
0,1,1,0,0,1,1,0,0,1,1,0
};

const unsigned char ford_st170[] PROGMEM =
{
0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,
1,1,1,1,1,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,3,3,3,3,3,2,2,2,2,2,3,
3,3,3,3,2,2,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1,1,1,1,0,0,0,0,
0,1,1,1,1,1,0,0,0,0,0,1,3,3,3,3,2,2,2,2,2,3,3,3,3,3,2,2,2,2,2,3,3,3,3,3,3,2,2,2,
2,3,3,3,1,1,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,0,0,0,
0,0,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,0,0,0
};

const unsigned char mitsubishi_3A92[] PROGMEM =
{
3,2,3,2,2,2,3,2,1,0,1,0,
1,0,3,2,1,0,3,2,3,2,3,2,
3,2,3,2,2,2,3,2,3,2,3,2,
3,2,3,2,3,2,3,2,3,2,3,2,
3,2,2,2,2,2,3,2,3,2,1,0,
1,0,1,0,3,2,3,2,3,2,3,2,
3,2,3,2,2,2,3,2,3,2,3,2,
3,2,3,2,3,2,3,2,3,2,3,2,
3,2,3,2,2,2,3,2,1,0,1,0,
1,0,3,2,3,2,3,2,3,2,3,2,
3,2,2,2,2,2,3,2,3,2,3,2,
3,2,3,2,3,2,3,2,3,2,3,2

/* 70/110 degrees low to high ratio and sparksensor secondary */
const unsigned char spark_dizzy_4cyl[] PROGMEM =
{ //Split into 5 degree blocks (12 per line)
0,0,0,0,0,0,0,0,0,0,0,0,
2,2,3,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,
0,0,0,0,0,0,0,0,0,0,0,0,
0,0,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,
};

#endif

0 comments on commit 3828ebf

Please sign in to comment.