Engine Simulator

Hey Everyone,
New to forum. Very intimidating with all the information available on here. Not sure where to start. I repair/rebuild ECM's and Instrument clusters and would like to build a crank/cam simulator. Have never used an Arduino and do not know anything about programming. The signals I would like are 60-2, 36-1 etc and not sure how to get there. Where do I start and what do I need. I have Arduino UNO and tons of electronic parts. Just need knowledge. I am on the older side so be nice with the comments :slight_smile:

bwilliams60:
The signals I would like are 60-2, 36-1 etc

Welcome... not sure what that means, please explain in detail:

voltage (high and low) - is this 12V for automotive?

do you need a crank sensor output and a cam output sensor? is this one combined signal?

what does the ratio 60-2 and 36-1 mean?

How fast (frequency)

It sounds like something we can do relatively easily but bring us up to speed with crank/cam terminology and what you need.

Cam and crank sensors can be variable reluctance or Hall effect so analog or digital depending on the OEM.
A 60 - 2 configuration means that there is a tone ring on the crankshaft that has spacing for 60 teeth, but only 58 are present. The two missing teeth identify the #1 cylinder at TDC. If it was 36 + 1, it would be 36 teeth on a 360 degree wheel, with #36 having an extra tooth.
I am sure there are articles on this forum somewhere but I have no idea where to start looking. I would like to learn how to do this myself but not sure how steep the learning curve is. I am a sponge so as long as it is put in laymans terms, I can figure it out.

sounds simple enough, but since you understand the crank/cam relationship perhaps you will have an easier go at it than asking us engine noobs. I just whack in higher lift and duration with a little overlap and I'm happy. Look into timing with millis() and micros()... pretty sure engine speeds are no issue with Ardunio. Just pick how you want to output this signal and make sure your switching device is fast enough for a nice edge. Easy peazy.

Millis and Micros....am I looking in a particular part of the forum or.....
While I understand cam/crank relationships and what I should see on a scope, I have no understanding of Arduino and its capabilities but more than willing to learn. Just point me in the right direction. I feel like a row boat in the Atlantic Ocean if that makes sense.

do you have a picture of the scope? It might give me a better idea what we're dealing with. I'm sure it's just a matter of doing some math to figure out RPM and the pulse relationships you're looking for. There are references in the Aruduino site that explain all the functions and commands but I'm not sure if this is much closer to what you need... you should get the concepts down. Once you can answer some of the questions below, you can start to build and test it. But you need to get an overall concept of what you want. Sometimes it helps to draw out a diagram.

think about how you will control it - does it need control?

  • think about what you need to keep track of inorder to do this... time, some sort of control variable? outputs, inputs... etc.
    what you expect from it
    how it will output this behavior
    and if you need some sort of feedback from it (display?... LED blinking at this pace.... etc)

/www.arduino.cc/reference/en/language/functions/time/millis/

arduino.cc/reference/en/language/functions/time/micros/

Many Hall Effect sensors produce an 'open collector' signal. Arduino can easily simulate that without extra parts for 5V or only a few parts for 12v-15v depending on your ECM. You can start searching and learn from the various 'blink' examples. You count 60 blinks and then suppress 2 blinks etc.

You will need to learn to keep two separate counters running at the crank speed and the cam speed.

You might then want to add a simple potentiometer for easy control of RPM. Or something different you learn along the way.

After a little experience, you could try to add circuitry that would simulate the signal from a variable reluctor. That is slightly more complicated because the signal must sweep from a positive voltage through zero to a negative voltage. The arduino world kind of sticks mostly to the +5 volts to zero volt range but it's not hard.

There might be some pre-built simulators that are available for Speeduino (or similar DIY projects) with minor modification.

I repair/rebuild ECM's and Instrument clusters and would like to build a crank/cam simulator

It would be very helpful if you could attach a sketch of the pulse signals you want the Arduino to generate over one engine revolution. Changing the overall time period for different RPM is pretty straightfoward.

I don't think the OP wants to sense the position of a cam (or crank) with a sensor.

I think he wants to use an Arduino to generate the signals that would normally come from a sensor so that he can do tests without needing an engine.

...R

Hi,
I like you project, I have used Arduino in a similar way to simulate a system that used an encoder and other sensors to check for defects on a conveyor belt.

I would start by drawing a timing graph of the signals that you would need to be produced.

A 60 - 2 configuration means that there is a tone ring on the crankshaft that has spacing for 60 teeth, but only 58 are present. The two missing teeth identify the #1 cylinder at TDC. If it was 36 + 1, it would be 36 teeth on a 360 degree wheel, with #36 having an extra tooth.

This would be basic logic counting and a conditional output function.
CS_sigs1.jpg


I got these pics from this article, it does go into hardware but lists the ECU type input signals that would be encountered.
https://iopscience.iop.org/article/10.1088/1757-899X/252/1/012099/pdf

Just a thought.

Tom... :slight_smile:
PS, many many years ago I used to service Electronic Engine Analysers and I built a simple electronic engine with a LM555, 4017 decade counter and two electronic ignition modules and coils, connected to a spark plug each.

CS_sigs1.jpg

555 and 4017 must have been fun to design, changing reset pin I’m sure you would be able to get different outputs.

This would be much easier with an Arduino.

Is this 12v level or 5v logic?

Okay you guys are bang on the money. I want to simulate signals that an engine would produce, so that I do not have to build some scary unit with a motor and tone wheel. If I can do it electronically, that would be great.
I would refer to the JimStim, Ardu-Stim, and maybe Speeduino type of concept for what I am after. I am attaching a known good cam/crank waveform that I would try to emulate. I would like it to work from maybe 500 rpm to 6000 rpm or better if possible and be able to modify it to fit other signals The two gears in the post above are perfect and I do have that article although some of it is above my pay grade.
So how do I start?? You guys are awesome. Thank you for the help.

Here is the attachment.

So for 6k RPM with 60 tooth we’re talking about a 6 kHz pulse train with i = 1 to 60; low if i = 59 and 60 - pulses at 167 uSec

For 36 @ 6k it’s 3.6 kHz pulse low at 36 - pulses at 278 uSec

Using micros to step through

Would want a potentiometer to adjust rate
Speed output using 4 digit LED would be nice.

Thoughts?

OP image:

Take a look at Ardustim.
https://blogs.libreems.org/arduino-wheel-simulator/

That is exactly what I am looking for but how do I build it? Or can I build it with the UNO? Like I said, no experience programming or with UNO. Need laymans terms guidance. Electronic part not a problem.

And yes, definitely would like it to be variable speed adjustment.

What does the jpg show? The blue line is obviously counting teeth, what are the other two lines and is the Uno going to need to generate them too?

Blue line is counting camshaft gear teeth. Missing tooth is identifier.
Red line is counting crankshaft gear teeth. Double tooth is identifier
Green line is cranking motor. Disregard.

bwilliams60:
That is exactly what I am looking for but how do I build it? Or can I build it with the UNO? Like I said, no experience programming or with UNO. Need laymans terms guidance. Electronic part not a problem.

And yes, definitely would like it to be variable speed adjustment.

Before you jump into the deep end you should find some tutorials on using the Arduino.
1 Such as installing the IDE, the interface for programming the Arduino.
2 How to download your program to your Arduino.
Here is a good place to start.https://www.arduino.cc/en/Guide/HomePage
When you have done this, play with some of the examples that come with the IDE to get a feel for things.
You are not going to learn this stuff in one day.
People are here to help you with your project, not do it for you.
Also read the sticky at the top "How to use this forum", it will keep you in good graces with the members of this forum.
It is quite intimidating when you first start, but if you slowly take it step by step it will come to you.