Jump to content
  • Welcome to AutoLanka

    :action-smiley-028: We found you speeding on AutoLanka Forums without any registration! If you want the best experience, please sign in. Safe driving! 

Arduino based tuning and diagnostic toolkit


varotone
 Share

Recommended Posts

Greetings gentlemen,

I just serviced the distributor of my project A72 and wanted to check and adjust the ignition advance curve. At minimum I needed a timing light and a dwell angle meter. As expected, decent tools are expensive. So, here I am looking for a cost effective solution to buying a bunch of speciality tools. Since Arduinos are (relatively) cheap, have sufficient processing power, and has a lot of sensors, I'm trying to make some car diagnostic kit based on Arduino.

Disclaimer- With global supply chains down, it will be some time before there is any significant progress in making this. For the time being I'm using this as a note to self and thinking out loud with the hope that experienced AL members would help me realize this project.

 

Intended use

I'm building it to use on my 1970's Lancer project car. The goal is to make a cost effective, easy to build, and reliable (for personal use) toolkit for cars of the era with similar technology. This will include most petrol cars with distributor driven ignition system. Once this takes off, I will make everything free and open source for anyone to replicate.

 

Requirements

1. Timing light

2. Tachometer

3. Dwell angle meter

4. Vacuum gauge

5. Exhaust gas analyzer a la emissions test

6. Lambda sensor

 7. Compression tester

 

Construction

Using Arduino as the brains of the toolkit, peripherals like led light, induction clamp, pressure sensors and gas sensors will be hooked up to it depending on the scenario. It will be connected to a computer over serial where all the input can be displayed. Real time data will be displayed with options to record, analyze, manipulate and share data with Matlab.

 

1. Timing light

A ferrite core with a few windings is placed on the first high tension lead. After monitoring the behavior of the induced voltage with the serial plotter, mathematically determine when to fire the LED to give accurate timing. Consider any delays in the setup and hard code the lines to fire the LED at the correct time.

Problems- High induced voltage can fry the arduino. How to control a high wattage LED to give the correct strobe frequency? How fast can the arduino respond? How to address any delays?

 

2. Tachometer

Use the same input as for the timing light. Find the frequency high tension lead is fired. RPM is twice that.

Problems- same as above. How to cancel noise from other HT leads?

 

3. Dwell angle meter

A crocodile clip on the contact points with a large resistor in series could pickup the duration the contacts closes. Together with RPM the duty cycle can be calculated. Mathematically determine the dwell angle from the duty cycle. 

Problems- Will the capacitor mess with it? Protection from any voltage spikes during opening and closing?

 

4. Vacuum gauge

Sensors are pretty cheap. Adapt it to plug in to a vacuum hose.

Problems- Range, accuracy and sensitivity? will it respond quickly as analog ones to give real time data?

 

5. Exhaust gas analyzer

Carbon monoxide and hydrocarbon sensors are available. SL emissions tests look only for those two. Temperature and nitrous oxide testing can be added.

Problems- Range, accuracy and sensitivity? (will not give real time data because of the design of these sensors. That's alright.)  

 

6. Lambda sensor

These wideband oxygen sensors are available off the shelf.

problems- Cost. Reliability, accuracy and range.

maxresdefault.jpg

 

7. Compression tester

Tiny pressure transducers are cheaply available. Can drill out old spark plugs, mount the transducer and seal it. Can make 4 and run simultaneous compression tests on all 4 cylinders.

problems- Range, accuracy and precision. Will data be real time? at least all four in sync with time?

Edited by varotone
typo
  • Like 3
Link to comment
Share on other sites

Timing light

My first attempt was to wrap a few turns of wire around a spark plug HT lead and plot the analog signal using the Auduino. It produced a very noisy signal with some large spikes. It was too noisy to think about filtering and processing further.

Second attempt was to build a stand alone timing light. This circuit is from the internet. Source http://www.dragonfly75.com/motorbike/timinglight.htmlLEDtiming.gif

Following many reports of success on the internet, I built this exact one. But the leds had only a faint glow. By no means sufficient to use as a timing light. Don't know what I did wrong. Reducing the 10 ohms resistor did not make any difference in the brightness either. I want to make sure the components I used are working and try again. This sounds like a good starting point for me.

If I can get this to work, I can feed the PD across the LED as an analog signal to the Arduino to get started with the tachometer and dwell angle.

Link to comment
Share on other sites

On 5/7/2020 at 6:58 PM, varotone said:

Timing light

My first attempt was to wrap a few turns of wire around a spark plug HT lead and plot the analog signal using the Auduino. It produced a very noisy signal with some large spikes. It was too noisy to think about filtering and processing further.

 

 

I think Arduino cannot sample fast enough. Probably ur sampling frequency is bellow Nyquist frequency and that is why u get noisy signal. Why dont u try to use oscilloscope fist, to find out required sampling rate and evaluate whether ur arduino can meet it?

For effective signal reproduction, I usually use 20x nyquist sample rate. 

You can try STM32F4 or C2000 for faster sampling, processing and required robustness in a car. 

 

  • Like 1
Link to comment
Share on other sites

On 5/7/2020 at 6:28 AM, varotone said:

. It produced a very noisy signal with some large spikes. It was too noisy to think about filtering and processing further.

yes, Automotive electronics is a very "noisy" environment, many EMC disturbances coming from high frequency PLL clocks to high current low frequency actuators.you need special methods such as twisted/shielded cables, filtering circuits, coils, optocouplers etc when making measurements on a car with non-automotive equipment like Arduino.

 

11 hours ago, abiman said:

Probably ur sampling frequency is bellow Nyquist frequency and that is why u get noisy signal.

he is talking about noisy signal measurements, not signal processing issues. I dont think Nyquist frequency has anything to do with it.

 

Edited by ajm
  • Like 1
Link to comment
Share on other sites

47 minutes ago, ajm said:

 

he is talking about noisy signal measurements, not signal processing issues. I dont think Nyquist frequency has anything to do with it.

 

Noisy or otherwise, you must sample faster than Nyquist, dont you think? 

If ur sampling rate is low, you will probably wont see ignition HV and what comes out will be noise. So to see whether he only got noise or he missed real HV signal, first he must make sure he sampled fast enough (i.e.considering Nyquist) , isnt it? 

 

  • Like 1
Link to comment
Share on other sites

4 hours ago, abiman said:

Noisy or otherwise, you must sample faster than Nyquist, dont you think? 

If ur sampling rate is low, you will probably wont see ignition HV and what comes out will be noise. So to see whether he only got noise or he missed real HV signal, first he must make sure he sampled fast enough (i.e.considering Nyquist) , isnt it? 

 

Nyquist isn't the solution to every problem?

What's the sampling rate used in Arduino? I don't think Arduino can't sample a ignition signal in this range due to sampling speed. Software Sampling time used in Automotive sensors is rarely smaller than 1ms( Unless you are measuring special signals like knock or needle closing) 

  • Like 1
Link to comment
Share on other sites

3 hours ago, ajm said:

Nyquist isn't the solution to every problem?

What's the sampling rate used in Arduino? I don't think Arduino can't sample a ignition signal in this range due to sampling speed. Software Sampling time used in Automotive sensors is rarely smaller than 1ms( Unless you are measuring special signals like knock or needle closing) 

Thanks for information. Im not automotive guy so dont know about that. 

The secondary ignition waveforms I know requires sampling rate beyond 10kHz to see damped oscillations at the end of burn cycle. But I dont think even at that rate The HV spike is observable. 1ms sample rate probably mess up burn line observation too. 

Possible sampling rate of Arduino doesnt matter. It should run other code to work with each sample. (send to computer? ). What matters is sample rate we can achieve with all other processing. (which is far better in platforms I suggested) 

Anyway I thought Nyquist can explain all these easily. But it seems like I was wrong. 

 

  • Like 1
Link to comment
Share on other sites

Thanks for your input!

The ADC has a clock rate of 16MHz. Default sampling rate is clock rate divided by prescale set to 128. That means I have a default sampling rate of 125kHz.

If I'm revving up to 10,000 RPM, all what I need to measure happens 167Hz. (Ignition signal will be at 83.5Hz @ 10,000RPM). At least on paper, Arduino is well above the required Nyquist rate.

16MHz may become insufficient to work with the bunch of sensors that I'm planning to hook up. But RPM and dwell angle could be done at this rate.

 

I was thinking of using a shielded wire with the shield grounded to the chassis and Arduino ground. Using an optocoupler in parallel with the LED would help with noise. Delay in switching the optocoupler is a concern here.

 

Regarding the circuit that I'm trying to replicate, I'm clueless of what I should get from the winding around the HT lead. Is it induced EMF? Change in capacitance? I still can't understand how that part of the circuit works. Please explain if you can understand what the wire is supposed to pickup.

(After using this setup for some time, the LEDs that had a faint glow suddenly stayed on at full brightness. The MOSFET was shorted drain to source. Used another one and in no time it was also shorted. These components must be bad. So I'm looking for an alternative to 2N700)

Link to comment
Share on other sites

33 minutes ago, varotone said:

Regarding the circuit that I'm trying to replicate, I'm clueless of what I should get from the winding around the HT lead. Is it induced EMF

Should be like transformer operation.

Edited by vag2
Link to comment
Share on other sites

12 hours ago, varotone said:

Thanks for your input!

The ADC has a clock rate of 16MHz. Default sampling rate is clock rate divided by prescale set to 128. That means I have a default sampling rate of 125kHz.

If I'm revving up to 10,000 RPM, all what I need to measure happens 167Hz. (Ignition signal will be at 83.5Hz @ 10,000RPM). At least on paper, Arduino is well above the required Nyquist rate.

16MHz may become insufficient to work with the bunch of sensors that I'm planning to hook up. But RPM and dwell angle could be done at this rate.

 

I was thinking of using a shielded wire with the shield grounded to the chassis and Arduino ground. Using an optocoupler in parallel with the LED would help with noise. Delay in switching the optocoupler is a concern here.

 

Regarding the circuit that I'm trying to replicate, I'm clueless of what I should get from the winding around the HT lead. Is it induced EMF? Change in capacitance? I still can't understand how that part of the circuit works. Please explain if you can understand what the wire is supposed to pickup.

(After using this setup for some time, the LEDs that had a faint glow suddenly stayed on at full brightness. The MOSFET was shorted drain to source. Used another one and in no time it was also shorted. These components must be bad. So I'm looking for an alternative to 2N700)

Everytime the current flow changes in the spark plug cable, it will induce a voltage at the gate of FET. However the zener will ensure it doesn't go above 5V (5.10  X 100/101.8) or the FET may get damaged! It could be why your FETs fail often, maybe the zener has already failed. Check the FET datasheet for max gate voltage allowed.
Did you think of simulating your circuit  with LTspice first?  It will help to choose better resistor values at the FET gate.

Link to comment
Share on other sites

I can't wrap my head around how one end of a wire can create a voltage from the induced EMF. If it actually works on picking up EMF like a transformer, wrapping copper coil around an toroidal transformer core and placing it around the HT lead should give a strong signal minimizing noise. I'll have to try that.

 

Gate-source voltage for 2N7000 is 20V. Drain current is 200mA. Threshold voltage is 0.8-3.0V.

I thought of replacing it with IRF830AS. Gate-source voltage 30. Drain current 5A. Threshold voltage 2-5V. And replace the zener with 12V 1watt. IRF830AS is a beefy package with a heatsink. It might withstand some spikes.

 

I can't simulate the circuit without knowing the induced voltage. I have to go with trial and error.

Link to comment
Share on other sites

Made some progress!:dance2:

Finally managed to get the timing light working. LEDs don't light up at full brightness. Tried to increase the brightness by adding a transistor to operate in saturation and cutoff regions alternatively. That gave some issues with light staying on for too long. Finally attached the LEDs to a long handle so that it can be moved closer to the timing marks to illuminate well. It's working.

Added a optotransistor in series with the LED and fed a signal wave to the Arduino. Now that the arduino is galvanically isolated from the noisy bits of the circuit, signal to noise was good enough. For the time being, RPM is printed to serial. Will add a LCD after the dwell angle is done.

I documented this on instructables. https://www.instructables.com/id/Timing-Light-and-Tachometer-With-Arduino

F0UIDZQKA5CVW5M.LARGE.jpg?auto=webp&fram

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

AutoLanka Cars For Sale

Post Your Ad Free [Click Here]



×
×
  • Create New...