Guidance Needed: Attempting to Simulate/Generate an Engine Speed Sensor Signal

Thread Starter

SaMirakle

Joined Mar 6, 2012
12
Hi everyone!

So at work we have several engine simulators and for the ones we currently have engine speed sensors connected to we went about it by using a DC motor spinning a magnetic pulser disc (found here) with the sensor mounted directly in front. Though this works fine, I'd like to start building improved versions of these engine simulators from scratch due to the ones we have being a complete Frankenstein mess over the years. Instead of using moving parts I'd prefer to be able to control the engine speed signals more digitally.

Last week I purchased one of these from Amazon in high hopes that it would generate the signal I was looking for since engine control modules interpret "digital" signals. However, when playing around with the little PWM generator a bit I couldn't seem to get any engine RPMs to generate. While in data monitoring mode, the only thing that I could see change was the "Engine Speed State" parameter. The 3 values available were "High", "Low", or "Triggered." With the PWM frequency below ~30 Hz the values would bounce back and forth between High and Low. Once I surpassed ~30 Hz then it remained on "Triggered" with any frequency higher than that. The actual engine speed RPM never really registered but occasionally you could see a number value pop in there for a split second.

Note: I believe the sensor we have hooked up to it right now is a hall effect style sensor. I'm not sure how to determine what the original sensor type would be off of the original vehicle but I assume it's most likely a hall effect.

Here are my questions/concerns:

1. Is a PWM signal the correct one to generate or do I need a sine or other waveform that the engine control module would need as input in order to output to a square wave on its own?

2. Is there an easier method to simulate this?

Any help is appreciated. Thanks in advance!
 

Alec_t

Joined Sep 17, 2013
11,169
I'm not sure how to determine what the original sensor type would be off of the original vehicle but I assume it's most likely a hall effect.
The service manual for the vehicle might indicate the type.
Is a PWM signal the correct one to generate or do I need a sine or other waveform that the engine control module would need as input in order to output to a square wave on its own?
That depends on what input signal the ECM expects and what criteria (if any) the ECM uses at power-up to judge if the sensor is faulty or not.
Is the PWM- output terminal of your sig gen connected to the V- input or isolated from it?
When testing, did you have the V- or PWM- terminal of your sig gen connected to engine ground?
What is V+ of the sig gen connected to?
 

bwilliams60

Joined Nov 18, 2012
1,286
I would look at vehicle schematics for the type of sensor you need to simulate. 2 wire = variable reluctance (sine wave) and 3 wire = Hall effect (square wave).
Would an arbitrary waveform generator work for what you want to do? Something like this:
https://www.amazon.com/Koolertron-Generator-Precision-Dual-channel-Arbitrary/dp/B07211YWMK/ref=sr_1_1_sspa?crid=RA0SE0SFW8WX&keywords=arbitrary+waveform+generator&qid=1582725546&sprefix=arbitrary+waveform+,aps,163&sr=8-1-spons&psc=1&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUExTU41RFdONklBUU5OJmVuY3J5cHRlZElkPUEwMjYwNDE2Mkg4QjAzTllQSDMzWCZlbmNyeXB0ZWRBZElkPUEwNjM4MzcwM01HSTRLM0hXQ042SCZ3aWRnZXROYW1lPXNwX2F0ZiZhY3Rpb249Y2xpY2tSZWRpcmVjdCZkb05vdExvZ0NsaWNrPXRydWU=

Could I ask what setting you are using this in? School - Component Repair Facility - Home Project????
 

Thread Starter

SaMirakle

Joined Mar 6, 2012
12
Hi guys. Thanks for the replies! I'll be in the office shortly here and will reply back soon with some more information.
 

Thread Starter

SaMirakle

Joined Mar 6, 2012
12
The service manual for the vehicle might indicate the type.

Hi Alec. So I checked the service manual last night and it only describes it as a "solid-state sensor." The wiring schematic for the sensor has 3 wires: 5v+, sensor return, and signal.

That depends on what input signal the ECM expects and what criteria (if any) the ECM uses at power-up to judge if the sensor is faulty or not.
Is the PWM- output terminal of your sig gen connected to the V- input or isolated from it?
When testing, did you have the V- or PWM- terminal of your sig gen connected to engine ground?
What is V+ of the sig gen connected to?
Unfortunately, the little PWM unit fell off of the counter yesterday along with a heavy screwdriver which landed perfectly onto the display panel, cracking it, and rendering it unreadable. We won't be able to use that one anymore. Just my luck, huh? However, to answer your question this is how we had it wired up: (left side is the PWM generator)

V+ --> 5v supply
Ground --> Sensor return wire
PWM ---> Sensor signal wire



I would look at vehicle schematics for the type of sensor you need to simulate. 2 wire = variable reluctance (sine wave) and 3 wire = Hall effect (square wave).
Would an arbitrary waveform generator work for what you want to do? Something like this:
https://www.amazon.com/Koolertron-Generator-Precision-Dual-channel-Arbitrary/dp/B07211YWMK/ref=sr_1_1_sspa?crid=RA0SE0SFW8WX&keywords=arbitrary+waveform+generator&qid=1582725546&sprefix=arbitrary+waveform+,aps,163&sr=8-1-spons&psc=1&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUExTU41RFdONklBUU5OJmVuY3J5cHRlZElkPUEwMjYwNDE2Mkg4QjAzTllQSDMzWCZlbmNyeXB0ZWRBZElkPUEwNjM4MzcwM01HSTRLM0hXQ042SCZ3aWRnZXROYW1lPXNwX2F0ZiZhY3Rpb249Y2xpY2tSZWRpcmVjdCZkb05vdExvZ0NsaWNrPXRydWU=

Could I ask what setting you are using this in? School - Component Repair Facility - Home Project????
At this point I'm almost certain it's a hall effect due to a 5V supply going to the sensor.
 

MaxHeadRoom

Joined Jul 18, 2013
20,471
Note: I believe the sensor we have hooked up to it right now is a hall effect style sensor. I'm not sure how to determine what the original sensor type would be off of the original vehicle but I assume it's most likely a hall effect.
The type typically used in automotive applications are a gear wheel sensor such as Honeywell 1GT101DC , These can easily be replicated by the Honeywell miniature SS400 series.
The latter require a magnet to operate, not just ferrous metal like the 1GT....
Or any similar proximity switch.
Max.
 

Alec_t

Joined Sep 17, 2013
11,169
PWM ---> Sensor signal wire
The sig gen has 2 PWM terminals. I assume you are referring to PWM+. Where did you connect PWM- ?
At this point I'm almost certain it's a hall effect due to a 5V supply going to the sensor.
Yup.
Some Hall sensors have an inbuilt pull-up resistor or transistor which connects to the +5V supply, whereas others have an open-collector output and require an external pull-up resistor which may well exist in the ECU input circuitry.
Shame about the sig gen. Will you replace it?
 

Thread Starter

SaMirakle

Joined Mar 6, 2012
12
The sig gen has 2 PWM terminals. I assume you are referring to PWM+. Where did you connect PWM- ?

Sorry, for "Ground" I meant PWM-. The device has a little sticker in the front that had labeled it as the ground symbol. Behind it I can see that it's labeled "PWM-" on the circuit board. So we had the PWM- connected to the sensor return wire.

Yup.
Some Hall sensors have an inbuilt pull-up resistor or transistor which connects to the +5V supply, whereas others have an open-collector output and require an external pull-up resistor which may well exist in the ECU input circuitry.
Shame about the sig gen. Will you replace it?
Well, if I can get some sort of confirmation that the little PWM generator I had would suffice for the goal I'm trying to reach them sure. At this point I'm not even sure if it was the right device to use or not although my hopes were high going into this haha.
 

Thread Starter

SaMirakle

Joined Mar 6, 2012
12
The type typically used in automotive applications are a gear wheel sensor such as Honeywell 1GT101DC , These can easily be replicated by the Honeywell miniature SS400 series.
The latter require a magnet to operate, not just ferrous metal like the 1GT....
Or any similar proximity switch.
Max.
Thanks for your reply Max. I just looked up that hall effect sensor and it seems to be relatively cheap. However, I'm trying to simulate the signals processed by a hall effect sensor without the need for any moving/rotating parts. That's the goal at least
 

MaxHeadRoom

Joined Jul 18, 2013
20,471
Thanks for your reply Max. I just looked up that hall effect sensor and it seems to be relatively cheap. However, I'm trying to simulate the signals processed by a hall effect sensor without the need for any moving/rotating parts. That's the goal at least
Then the typical signal is not PWM but a varying frequency square wave, a 555 should be able to do that.
Google 555 square wave generator, more than you need.!
Max.
 

Thread Starter

SaMirakle

Joined Mar 6, 2012
12
Then the typical signal is not PWM but a varying frequency square wave, a 555 should be able to do that.
Google 555 square wave generator, more than you need.!
Max.
I looked into the 555 generator and it seems like it outputs the same thing as the little PWM generator I had bought already?? I'm not sure how this 555 would be a better option. Could you explain?

I'm having doubts that a square wave will work now. I was able to hook up the little PWM generator earlier today with a handheld oscilloscope I purchased from Amazon to double check the signal. The signal generator was definitely outputting a square wave and the diagnostic software, again, could only recognize that the sensor state was either High, Low, or Triggered. I played around with the frequencies starting from 1 Hz up to 1,000 Hz or so.

Am I missing something here? I've been trying to search for a signal generator that can create more than just a square wave. I can't use anything too large or expensive. I'd like to be able to panel mount the signal generator.
 

Alec_t

Joined Sep 17, 2013
11,169
Am I missing something here? I've been trying to search for a signal generator that can create more than just a square wave.
Your sig gen puts out a voltage signal with only a small current capability. Your ECU may be expecting instead a current sink such as would be provided by an open dain/collector transistor of a typical Hall sensor. You could try using the sig gen to drive (via a ~10k resistor) the base of an NPN transistor and connect the transistor collector to the ECU. Or a 555 pulse generator could drive the ECU via a diode to simulate an open-collector drive.
 

Thread Starter

SaMirakle

Joined Mar 6, 2012
12
If you want to replicate a prox sensor/engine speed sensor , then the format is NOT PWM, but a simple varying frequency square wave.
Max.
Pardon my ignorance here but isn't a PWM signal essentially already a square wave? How does it differ from your recommendation of a "varying frequency square wave?"


Your sig gen puts out a voltage signal with only a small current capability. Your ECU may be expecting instead a current sink such as would be provided by an open dain/collector transistor of a typical Hall sensor. You could try using the sig gen to drive (via a ~10k resistor) the base of an NPN transistor and connect the transistor collector to the ECU. Or a 555 pulse generator could drive the ECU via a diode to simulate an open-collector drive.
To actually implement this would be difficult for me with my current knowledge. Seems that I'll be needing to educate myself more on these types of components. Do you think there's anything out there that can do what you're suggesting out of the box?
 

MaxHeadRoom

Joined Jul 18, 2013
20,471
Pardon my ignorance here but isn't a PWM signal essentially already a square wave? How does it differ from your recommendation of a "varying frequency square wave?"
A PWM signal is a square wave of varying width but Constant frequency, the typical sensor would be a varying width AND varying frequency. Often edge detected.
Max.
 

Thread Starter

SaMirakle

Joined Mar 6, 2012
12
A PWM signal is a square wave of varying width but Constant frequency, the typical sensor would be a varying width AND varying frequency. Often edge detected.
Max.
Hmm. If that's the case then it seems a bit more complicated of a signal to generate. The thing that's confusing me is that we have a generic magnetic sensor hooked up to the module currently and it will detect engine speeds when magnets are passed in front of it quickly. Do you think that the physical magnets are inducing a higher current than the PWM generator is and maybe that's why it's not registering any RPMs?

(I will need to get the part number off of the generic sensor we have there to share the specs with you all)
 

MaxHeadRoom

Joined Jul 18, 2013
20,471
Usually an easier signal to generate!
So far to generate this kind of signal, Typically for RPM detection etc, I have used a magnet sensor SS40 etc, proximity switch for ferrous metal e.g. (Honeywell automotive gear sensor) , retro-reflective light sensor, Slot-Opto Light sensor.
Just for a few, all generate the same style of pulse signal.
Max.
 
Top