Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated to include Rover MEMS trigger patterns #16

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions ardustim/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"platformio.platformio-ide"
]
}
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"platformio.platformio-ide"
],
"unwantedRecommendations": [
"ms-vscode.cpptools-extension-pack"
]
}
5 changes: 5 additions & 0 deletions ardustim/src/ardustim.ino
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ wheels Wheels[MAX_WHEELS] = {
{ mitsubishi_3A92_friendly_name, mitsubishi_3A92, 0.6, 144, 720 },
{ Toyota_4AGE_CAS_friendly_name, toyota_4AGE_CAS, 0.333, 144, 720 },
{ Toyota_4AGZE_friendly_name, toyota_4AGZE, 0.333, 144, 720 },
{ rover_mems_mode1_thirtysix_minus_one_one_friendly_name, rover_mems_mode1_thirtysix_minus_one_one, 0.6, 72, 360 },
{ rover_mems_mode2_thirtysix_minus_one_one_one_one_friendly_name, rover_mems_mode2_thirtysix_minus_one_one_one_one, 0.6, 144, 720 },
{ rover_mems_mode3_thirtysix_minus_one_one_one_one_friendly_name, rover_mems_mode3_thirtysix_minus_one_one_one_one, 0.6, 144, 720 },
{ rover_mems_mode4_thirtysix_minus_one_one_one_one_friendly_name, rover_mems_mode4_thirtysix_minus_one_one_one_one, 0.6, 144, 720 },
{ rover_mems_mode5_thirtysix_minus_one_one_one_one_friendly_name, rover_mems_mode5_thirtysix_minus_one_one_one_one, 0.6, 144, 720 }
};

/* Initialization */
Expand Down
111 changes: 110 additions & 1 deletion ardustim/src/wheel_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,12 @@
MITSUBISHI_3A92, /* Mitsubishi 3cylinder 3A92 */
TOYOTA_4AGE_CAS, /*Toyota 4AGE CAS, 4 teeth and one cam tooth*/
TOYOTA_4AGZE, /*Toyota 4AGZE, 24 teeth and one cam tooth*/
MAX_WHEELS,
ROVER_K_MODE1_36_ONE_ONE, /* MEMS pattern 1 36-1-1 with teeth as 17 gap 17 gap */
ROVER_K_MODE2_36_ONE_ONE_ONE_ONE, /* MEMS pattern 2 36-1-1-1-1 with teeth as 11 gap 5 gap 12 gap 4 gap */
ROVER_K_MODE3_36_ONE_ONE_ONE_ONE, /* MEMS pattern 3 36-1-1-1-1 with teeth as 2 gap 14 gap 3 gap 13 gap */
ROVER_K_MODE4_36_ONE_ONE_ONE_ONE, /* MEMS pattern 4 36-1-1-1-1 with teeth as 3 gap 14 gap 2 gap 13 gap */
ROVER_K_MODE5_36_ONE_ONE_ONE_ONE, /* MEMS pattern 5 36-1-1-1-1 with teeth as 9 gap 7 gap 10 gap 6 gap */
MAX_WHEELS
}WheelType;

/* Name strings for EACH wheel type, for serial UI */
Expand Down Expand Up @@ -171,6 +176,11 @@
const char mitsubishi_3A92_friendly_name[] PROGMEM = "Mitsubishi 3A92";
const char Toyota_4AGE_CAS_friendly_name[] PROGMEM = "Toyota 4AGE";
const char Toyota_4AGZE_friendly_name[] PROGMEM = "Toyota 4AGZE";
const char rover_mems_mode1_thirtysix_minus_one_one_friendly_name[] PROGMEM = "Rover 36-1-1 flywheel EARLY MEMS";
const char rover_mems_mode2_thirtysix_minus_one_one_one_one_friendly_name[] PROGMEM = "Rover 36-1-1-1-1 11 gap 5 gap 12 gap 4 gap";
const char rover_mems_mode3_thirtysix_minus_one_one_one_one_friendly_name[] PROGMEM = "Rover 36-1-1-1-1 2 gap 14 gap 3 gap 13 gap";
const char rover_mems_mode4_thirtysix_minus_one_one_one_one_friendly_name[] PROGMEM = "Rover 36-1-1-1-1 3 gap 14 gap 2 gap 13 gap";
const char rover_mems_mode5_thirtysix_minus_one_one_one_one_friendly_name[] PROGMEM = "Rover 36-1-1-1-1 9 gap 7 gap 10 gap 6 gap";


/* Very simple 50% duty cycle */
Expand Down Expand Up @@ -1207,4 +1217,103 @@
1,1,0,0,0,0,0,0,0,0,0,0,
1,1,0,0,0,0,0,0,0,0,0,0,
};

/* Rover MEMS engine tooth patterns. 4 available. 1st isn't commoon (36-1-1). 2,3 and 4 are the most common.
* Pattern 1 is MEMS 1.0,1.3,1.6 36-1-1 with the teeth grouped 17-17-
* Pattern 2 is MEMS 1.9 36-1-1-1-1 with the teeth grouped 12-4-11-5 with gaps at 120, 180, 310, 360
* Pattern 3 is MEMS 2.0 36-1-1-1-1 with the teeth grouped 14-3-13-2 with gaps at 80, 110, 260, 300
* Pattern 4 is MEMS 3.0 36-1-1-1-1 with the teeth grouped 14-2-13-3 with gaps at 80, 120, 270, 300
*/

const unsigned char rover_mems_mode1_thirtysix_minus_one_one [] PROGMEM =
{
1,0,1,0,1,0,1,0,1,0,
1,0,1,0,1,0,1,0,1,0,
1,0,1,0,1,0,1,0,1,0,
1,0,1,0,0,0,1,0,1,0,
1,0,1,0,1,0,1,0,1,0,
1,0,1,0,1,0,1,0,1,0,
1,0,1,0,1,0,1,0,1,0,
0,0
};

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

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



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

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


#endif