30hz/50% duty cycle pwm to ground

Hello folks, great source of information here! I'm hoping to get some guidance for a personal project I'm working on. I'm finishing up a personal project for myself, its a 1993 C4 Corvette 40th Anniversary that I've built into a "resto mod" installing a 6.2 liter LS3, and in order to completely bypass the vats system I need to replicate the signal that the vats sends to the ECM in order to pulse the injectors, initiate the starter, and power the fuel pump. The vats sends a 30hz 50% duty cycle signal to the ECM upon receiving a "handshake" from the vats control module. In fact, here's the instructions straight from GM...

... "To signal the ECM that a correct key resistance is sensed, the VATS and PASSKey systems use a grounding square wave at a 30Hz rate. The VATS module uses an NPN output transistor to pull down (ground) the 5 VDC reference voltage presented by the ECM on terminal B6. The reference signal must be alternately grounded and allowed to be pulled up by the ECM internal resistor 30 times per second (30 Hz) and at a 50% duty cycle. This method was selected to prevent the simple powering or grounding of an ECM input to enable the fuel injectors. The signal is only needed during cranking to enable the injectors."...

There are several aftermarket companies that manufacture a device that does this and they are very cost effective, however I am the quintessential DIYer and have done everything in this car including the engine build, the interior and upholstery, the wiring and electronics, the suspension mods, and would like the satisfaction of doing the vats bypass myself as well.

I have a Arduino Uno that I've used for several projects, finding much of my info here on this forum. I should be able to produce a 30hz pwm with 50% duty cycle wired to ground to pull down the 5v signal on the B6 terminal to ground. Do I actually need a transistor (I have some NPN transistors if needed)? It has to be pretty accurate in order to initiate a "start" command, but only for a second before the engine cranks. It doesn't refer back to that signal after the engine cranks. It seems that 30hz specifically lies on the margins of a lot of arduino libraries and programs. I originally thought to use the "tone" library to generate a signal, but 30hz is at the threshold of human hearing so the tone library will only produce signals above 30 hz. So I moved on to the "TimerOne" library and again the 30hz signal required a higher level of programming knowledge than I'm prepared for. I'm a retired mechanical engineer with better than average knowledge of electronics and tech, but I'm not a programmer. I've pored through some posts here, but I'm not getting the whole "1024 prescaler" "16mhz"processor... could I not just use like a digitalWrite command as in the example found here:

What's bothering me is what I've read about the code reading process taking up clicks of the timer in TimerOne and there being interrupts in the cycling. That's IF my understanding of this right. I don't need multiple timers or functions I only need the one 30hz square wave for a few seconds to "prove out" the vats system. To me, the simpler the better...

Come on all you geniuses out there, help an old man out!!

Great forum! Thanks in advance...

I've never messed-with the prescaler...

If the processor isn't doing anything else you can modify the Blink sketch to "blink" at 30Hz.

To test if you need the transistor, put a ~120 Ohm resistor in series with the output. That will limit the current from the Arduino keeping it "safe". If it can pull-down the input, you're good-to-go (and I'd leave the resistor in the circuit).

The automotive electrical systems are some of the worst to work with. Consider what happens if the Arduino fails? Here is some reading that will help you with your design.
Valuable Resources for Automotive Electronics:

  1. STMicroelectronics Application Note AN2689:
    This application note provides guidelines on protecting automotive electronics from electrical hazards, focusing on design and component selection. Reading this will greatly enhance your understanding of automotive circuit protection.
    Read AN2689
  2. Analog Devices: Automotive Electronics Design:
    This article distills key insights into designing automotive electronics, offering practical advice for engineers.
    Read the article
  3. Diodes Incorporated: Transient Voltage Suppression in Automotive:
    Learn about techniques to protect automotive circuits from transient voltage, which is critical for ensuring reliable operation in harsh conditions.
    Read the article
  4. AEC-100 Standards Webinar:
    This webinar from Monolithic Power Systems provides a detailed overview of AEC standards, essential for understanding automotive electronics requirements.
    Watch the webinar
  5. Understanding Automotive Electronics, An Engineering Perspective by William B. Ribbens:
    This comprehensive book offers an in-depth look into automotive electronics from an engineering perspective, making it an invaluable resource.
    Access the book

These resources should provide a strong foundation for anyone involved in automotive electronics design. If you need further help or more resources, feel free to ask!

30 Hz is so low that it is hardly worth using a timer for, even if your Arduino has other things to do.

I would include the NPN transistor, without knowing what current is required (probably low), but also to decouple the Arduino somewhat.

Great point...

I should have stated in the original post that using the arduino was strictly temporary to test whether the 30hz 50% ground signal will switch the ECM injector pulse on to crank and how to integrate it into the system. Once I knew it would work in practice, I would make a more permanent and dependable signal generator. If the ECM doesn't receive that signal, that car is not going to start, so its pretty important to be reliable... Another part of this exercise was to vary the frequency to determine the tolerance window, just to have a better understanding of the system. There are manufactured modules for that purpose for under $50, but I wanted to understand the concept. I've been a nerd like that since I was young. Knowledge of any kind has value, and I'm a hot rodder hobbiest. Any time you have to swap engines with computer controls, synching up the engine from one with the body of another, challenges arise. This is 1993 technology, an antique by any measure, but particularly so with the electronics.

I've pretty much decided the same. I have several different ones, 2N3904 was one that came to mind. I don't know the current, but I'm sure it's a signal load. Under 100 ma for sure. This one is good for 100 mhz...

Hi,
LM555 to generate the 30Hz 50% duty, simple.

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

Hello louisashley

Welcome to the best forum ever :slight_smile:

As already mentioned, you can either use an NE555 or an Arduino on which the BlinkWithOutDelay example of the IDE runs.

Its hardly a challenge for a Uno;
as has been said you can use the blink without delay sketch to generate a PWM signal of pretty much any desired frequency and M/S ratio.

so that will allow you to play with those values

And a '555 would do that job very well.

I'd suggest you measure the current to ground coming from the ECM to check what you need to do to switch it; likely a 2N3904 will work very well, but what base resistor do you need? A 470 ohm will give you aboput 10mA base current so would happily switch 100mA at the collector.

So as far as wiring it up, would I run from the B6 pin (as per the GM service manual quote in original post) to ground on the vehicle with the device wired in between the B6 connector and ground? The manual calls for a "pull down" to ground, and during the "off" cycle, the cars ECM pulls it back upto 5v..

The 555 timer has an inaccuracy margin of +/- 2%. It only needs to cycle for a few seconds, but the inaccuracy was one of my concerns with that particular ic. Whats your take on this? I guess after I find out how much wiggle room I have on the frequency. If its got to be dead on 30hz, 2% might be a problem. This is an early version of a transponder key. It has a resistor in the key that has to match the vats resistor value to initiate a start. There are 15 different values for all the keys made for those years. Once the vats module senses that the right key is used, it sends this 30hZ signal to the ECM to allow the injectors to pulse. The resistor key has a margin of nearly 10% accuracy in the resistance values, so I'm thinking the fuel injector pulse has some wiggle room in the frequency. That's why I want to try the Arduino first and see what that margin is.

From your description it seems unlikely to me that the frequency needs to be exact. The security is done elsewhere, the requirement for the PWM is to avoid a trivial bypass. If an attacker is going to inject a frequency, they will have no problem injecting an exact frequency.

It's likely the PWM just drives a RC circuit so there is a wide tolerance on the frequency.

You tune the LM555 circuit to 30Hz.
"Use a scope or a frequency counter Luke!"

Tom.... :smiley: :+1: :coffee: :australia:

You could use a trimpot to calibrate the 555 output to 480 Hz and drive a divide by 16 counter to get 30 Hz at 50% duty cycle.

Why do you think the pulse rate is dependent on the value of the key resistor? That makes little sense. Surely the function of the VATS module is to produce a 30Hz wave if and only if the correct key is instered?

Sorry but point forming the layout makes for easier reading.

The Vat frequency has nothing to do with injector pulse timing.
The VAT SIMPLY signals the rest of the vehicle that a valid key has been used and that the car can START.

LM555, simple, now get out there and build it and experiment.
Stop over thinking.

Tom.... :smiley: :+1: :coffee: :australia:

The signal is all the same to the PCM. It's 30hz if the proper resistance is detected by the vats. GM changed that to 50hz in later models. I can bypass the vats completely if I send that signal to PCM. The vats module is what determines if the right key is used, but the PCM is only looking for the 30hz pull down.

Are you having a problem with that? All you need is an arduino, a transistor and some resistors and the blink code.

Great resource! I've actually read #1 & #3 previously when I designed a "high idle" module for my F-150 in order to bring the idle up to 1200 RPMs to bring the secondary alternator to max field in order to charge the LiPo battery bank in my camper while idling. Flipping a switch would intercept the signal between the electronic gas pedal and PCM and replace the voltage signal with a predetermined voltage signal set to 1200 RPMs. I later added a pot in order to be able to adjust the idle between two points. The diodes were critical to prevent voltage from feeding back into the system. That module worked like a dream. It's still in use more than a year later.

Just wanted to follow up and thank everyone who contributed to this thread. The design worked as it was supposed to. The only issue I had was that my year model Corvette was where they changed from a 30 hz signal to 50 hz mid year. I ended up using a B547 transistor, I intercepted the signal out from the PCM, through the UNO, and into the return signal. The 30 hz didn't work even after tweaking it several percent. I reprogrammed the code for 50hz as I'd read that some builds later in the year had been upgraded to 50hz and the passkey security light went out. Car turned over and started. In the end, I purchased a plug and play module for less than $30. That was my intention all along, but i wanted to gain the knowledge which I plan on using on future builds. Thanks everyone who helped.