Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ardustim released
#1
http://blogs.libreems.org/arduino-wheel-simulator/

What is it? An arduino Uno based crank cam wheel pattern generator.

Who is it for? Developers/debuggers who are hacking on ECU's (any ecu for that matter).

Why do I need it? If you're a developer or working on firmware, or hacking a custom ECU or want to, a tool like this is a must to test how your setup responds to crank and cam signals.

Isn't there already stuff out there? Yes, but this is:
  1. Cheaper
  2. Fully Open Source
  3. Less Complex
  4. Easy to add new patterns to
than other solutions out there like JimStim (which has some stability and signal integrity issues at high RPM's, and has been known to brick itself at the worst possible time in your development cycle), and FreeEMS+LP, which requires a whole ECU plus external client software JUST to generate the signals (expensive overkill for most people)

Ardum-stim supports 31 different wheel patterns so far (more to come as GOOD documentation is found and decoded), and is capable of high slew rate RPM sweeping (currently just a semi-linear ramp), that is capable of changing the RPM 1000x/second.

Feature requests and bugs should be submitted as ISSUES at the issue tracker: https://redmine.libreems.org/projects/ardu-stim/issues, you will need to sign in to the tracker to submit new issues (keeps spam down). If that's too hard you can create a thread in this subforum and an issue will be created on your behalf when time permits.
-- David
Reply
#2
Thanks Dave!

Here is my brass-board test rig used for bench testing. Ardustim is working as advertised.

-Sean


Attached Files Thumbnail(s)
   
Reply
#3
Hi Dave,

I have a feature request whenever you have the time etc. If you have an extra timer channel on the Uno, can you setup a record mode so that you can capture at what degree a signal came in?

This feature would be particularity useful for testing the new scheduler. Not only that, but you should be able to port that code back into the firmware which could be super useful for things like knowing at what degree was knock detected etc.

C ya,
Sean
Reply
#4
(05-04-2014, 04:44 PM)seank Wrote: Hi Dave,

I have a feature request whenever you have the time etc. If you have an extra timer channel on the Uno, can you setup a record mode so that you can capture at what degree a signal came in?

This feature would be particularity useful for testing the new scheduler. Not only that, but you should be able to port that code back into the firmware which could be super useful for things like knowing at what degree was knock detected etc.

C ya,
Sean


Unfortunately I'm using all timers. You cannot really use timer0 (8 bit) as it's used by many arduino libraries and core functions (millis()). Timer 1 is 16 bit (and the ONLY ONE usable for input capture) and used for wheel pattern generator and timer2 is for rpm sweeping as it needs to run at a CONSISTENT relatively high speed.

An arduino Mega has three more 16 bit timers (like timer1), that I believe may be input capture capable but they are significantly more expensive, and you're still hampered by severely limited available RAM..

Due to the limitations of an arduino (very limited RAM), it makes a poor choice as a high speed capture device, esp since to transmit captured data it'll be using interrupts for serial transfers which can cause it to miss capture events.

If you want to do precise capturing, use a Saleae Logic Analyzer monitoring the ardu-stim's input to the ecu and the ecu's outputs, thus giving you a VERY PRECISE way of testing the scheduler and other core FW code. It would be worthwhile to investigate Saleae's API/SDK documentation to see if this is scriptable. A script could then in theory be written to tickele the ardustim, the saleae and get a capture out of a specific test-case. thus being ideal for regression testing and/or edge cases.

Due to the design of the ardu-stim it's possible to tweak it's firmware to program in "bad" patterns to test the decoder's tolerance for dodgy input as well. It's also possible with the current design to toggle additional outputs on a per-virtual crank/cam "rotation". i.e. flip a pin on for a certain number of degrees per cycle. NOTE: the degree resolution of this is limited to the wheel's patterns minimum resolution. which can be as low as 1 degree (GM Optispark, LS1, nissan 360 CAS), or as high as 90 deg (4 cylinder distributor pattern), so keep that in mind, it's possible to rework a pattern to increase it's degree resolution but at a loss of maximum reachable RPM. The more "edges" in a pattern the LOWER it's max RPM is. (a 720 edge pattern has about a 15,000 RPM limit, versus a 4 edge pattern can go to well over 250,000 RPM (current code is limited to 65535 RPM however)
-- David
Reply
#5
I am trying to get the source code. The link in the blog post points to http://git.libreems.org/libreems-suite/Srdu-Stim which redirect me to https://git.libreems.org/users/sign_in

I do not see a Register link at https://git.libreems.org/users/sign_in I've logged to gitlab.com with my gmail account but I can not find the code there.

Is this code still available?
Reply
#6
My use of git has been very little, can I get some help, i installed a git client and cloned ardu-stim to my local pc, installed arduino ide also.

need to figure out how to get the program built.
Reply
#7
(08-29-2014, 08:17 AM)rusefi Wrote: I am trying to get the source code. The link in the blog post points to http://git.libreems.org/libreems-suite/Srdu-Stim which redirect me to https://git.libreems.org/users/sign_in

I do not see a Register link at https://git.libreems.org/users/sign_in I've logged to gitlab.com with my gmail account but I can not find the code there.

Is this code still available?

The link should be http://git.libreems.org/libreems-suite/ardu-stim and you don't need an account to access that subproject.
Reply
#8
(08-31-2014, 11:02 AM)Hentai Wrote: My use of git has been very little, can I get some help, i installed a git client and cloned ardu-stim to my local pc, installed arduino ide also.

need to figure out how to get the program built.


Windows, mac or linux?
Reply
#9
(08-31-2014, 03:37 PM)admin Wrote:
(08-31-2014, 11:02 AM)Hentai Wrote: My use of git has been very little, can I get some help, i installed a git client and cloned ardu-stim to my local pc, installed arduino ide also.

need to figure out how to get the program built.


Windows, mac or linux?

Windows, but I figured it out finally

I downloaded the source code and opened it in the arduino ide but you have to open all files into the ide in tabs before compiling.
Reply
#10
Latest ardu-stim now has analog pot RPM control for those times when you don't want or need to fire up druid4arduino or a serial connection from a PC. When powered up, it defaults to a 6K RPM output and begins looking for a serial connection, if none is found it'll start reading analog channel 0 when you connect up a pot's wiper terminal (other ends of the pot got to arduino 5V and ground). Then that'll drive the RPM, firing up druid4arduino or a serial connection will make it ignore the analog until you disconnect and it times out.

Current bug is that you cannot change the wheel mode, it defaults to the compiled in default (at this time its the: Yamaha R1 8 tooth crank 1 tooth cam) though that can be changed by altering the "selected_wheel" param in ardustim.ino to select a different pattern, those are defined in wheel_defs.h

I'll probably add button inputs to switch wheel patterns, though i am fairly low on available resources (flash space), so that may or may not happen.
-- David
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)