PC Utility To Sweep RPM With The MissingTooth Hack BenchTest

A place for small project requests from the team to exist and grow into something fully fledged and useful to the masses.
Post Reply
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

PC Utility To Sweep RPM With The MissingTooth Hack BenchTest

Post by Fred »

Dumped from IRC and rearranged to be more useful and less random:

[21:32] <@FreeAir> still need a PC utility to pump data into it, i want to sweep rpm, triangle style is fine for a start
[21:33] <@FreeAir> send a stop logging packet, hard coded
[21:33] <@FreeAir> send a bench test setup packet, partly hard coded, pull number of base teeth from the command line --BaseTeeth=12/36/24
[21:33] <@FreeAir> send many rpm adjust packets, mostly hard coded, just checksummed and escaped afterward
[21:33] <@FreeAir> you could add an adjustable pause between to optimise it from the command line with --InterPacketPause=3ms
[21:33] <@FreeAir> have a function RPM vs time
[21:33] <@FreeAir> pull the rpm out of the function for each packet
[21:33] <@FreeAir> based on time

[21:34] <@FreeAir> bonus points for displaying current RPM in a UI of some sort, even if it's a console line

[21:36] <@FreeAir> so you could A stop logging, B start the test C display RPM and pump out RPM
[21:38] <@FreeAir> cycleFreeEMSBenchTestRPMHack --Pattern=triangle --StartRPM=50 --MinRPM=50 --MaxRPM=7000 --SweepPeriod=10s
[21:38] <@FreeAir> something like that, only triangle for now, hard code that if you like, or error on other stuff
[21:43] <@FreeAir> max out the iterations

[21:38] <@FreeAir> you can write to the read only structs when you have bench test firmware loaded, and at no other time.
[21:38] <@FreeAir> so the new hack just reads from that and uses it for the slice period
[21:39] <@FreeAir> sample RPM set packets are in the lib dir
[21:39] <@FreeAir> same for stop logging and bench test packets

https://github.com/fredcooke/freeems-va ... 0x0200.bin
https://github.com/fredcooke/freeems-va ... 0x0400.bin
https://github.com/fredcooke/freeems-va ... 00-OFF.bin
https://github.com/fredcooke/freeems-va ... rallel.bin

Packet structure: https://github.com/fredcooke/freeems-va ... cation.tex

[21:45] <@FreeAir> you can ignore all the return packets and just flood the line with a continuous stream

[21:39] <@johntramp> ok, i should read up on the bench test firmware
[21:39] <@johntramp> there must be a thread somewhere, right?

viewtopic.php?f=56&t=1180

[21:40] <@FreeAir> in fact, i think it's in the latex now

https://github.com/fredcooke/freeems-va ... erface.tex

You need to calculate the RPM from number of ticks per event, number of events per cycle, or vice versa, a cycle is a revolution in this mode.

To trigger the mode, set one of the PWs to 3, and the rest to not-3, then all that matters are the first three values. The "which event" values don't matter. The "how many cycles" should be maxed. 5 of the PWs don't matter. Events per cycle = base teeth. Ticks per event = related to RPM via this formula:

60000000 / (baseteeth * toothperiod * 0.8)

from this post: viewtopic.php?p=20967#p20967

[21:45] <@FreeAir> just a little single C file would be OK

[21:46] <@FreeAir> let me do a thread from the above conversation to clean it up for you

Done! :-)

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: PC Utility To Sweep RPM With The MissingTooth Hack Bench

Post by Fred »

John, your fish/info, laid on a platter for your consumption ;-)

Code: Select all

 00 77 77 01 0C FF FF ?? ?? 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 
Which breaks down into the following:

Code: Select all

0x00 flags - correct
0x7777 payload ID - correct
0x01 mode - correct
0x0C events per cycle / base teeth = 12/0x0C for default, 36/0x24 for common
0xFFFF cycles, max this out
0x???? ticks per event / effective rpm - set this dynamically, this is the initial value only
00 00 00 00 00 00 - zeros for ease of manual checksum verification
0x0003 This triggers the special mode
0x0000 irrelevant as long as it's not 3, zeros easy to count
0x0000 irrelevant as long as it's not 3, zeros easy to count
0x0000 irrelevant as long as it's not 3, zeros easy to count
0x0000 irrelevant as long as it's not 3, zeros easy to count
0x0000 irrelevant as long as it's not 3, zeros easy to count
Hard code, 'cept the RPM and base teeth.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: PC Utility To Sweep RPM With The MissingTooth Hack Bench

Post by Fred »

Thanks John! :-)

Image

Image

Available in hash 0c30416ff4faa40e2bbdce06762ff27355b3eae8

Currently from my repo https://github.com/fredcooke/Lacerated-Pempheridae

Though John will pull it in soon, I guess! :-)

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: PC Utility To Sweep RPM With The MissingTooth Hack Bench

Post by Fred »

DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: PC Utility To Sweep RPM With The MissingTooth Hack Bench

Post by Fred »

Combo with OLV, BenchTest, two normal firmware versions, this 6, MTX, and Preston :-)

http://www.youtube.com/watch?v=CIjvVGdKxgk
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: PC Utility To Sweep RPM With The MissingTooth Hack Bench

Post by Fred »

https://github.com/johnhowe/Lacerated-Pempheridae

^ John's master copy, more up to date right now, afaik.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: PC Utility To Sweep RPM With The MissingTooth Hack Bench

Post by Fred »

http://megatunix.com/tracker/view.php?id=30

John, please update to match! Thanks :-)
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
johntramp
LQFP112 - Up with the play
Posts: 119
Joined: Sat Apr 24, 2010 1:42 am
Location: New Zealand

Re: PC Utility To Sweep RPM With The MissingTooth Hack Bench

Post by johntramp »

User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: PC Utility To Sweep RPM With The MissingTooth Hack Bench

Post by Fred »

johntramp wrote:I let Dave win that round.
ROFL! Nearly woke up the mrs with laughter at 4:30am :-p
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
Post Reply