# help me design this circuit for my car

#### mark944turbo

Joined Jan 7, 2005
10
Hi everyone, this is my first post... I plan to spend a lot of time here.

I need to tap into a wire in my car that is a yes/no knock signal. Basically if there is (or isnt ,im not sure) voltage, the motor is knocking. It is a signal coming after all of the filters and whatnot, it is not actually a knock sensor output. It is filtered.

I want to be able to drive a led off of this wire, so that I can monitor knock as I drive. The problem is I know nothing of the nature of the signal in the wire. The factory manuals are useless and all the car forums dont help much. I am guessing that the signal is somewhere between 0 and 5 volts, but it could be up to 12v. I would hook it up to a scope, but I do not have one, I am using the mic input on my laptop as a scope for now, with resistors of course. Plus I have to induce knock to test it, which means driving full throttle while watching my computer, that isnt fun.

My main concern are 2 things.

1. How can I tap into this signal without "disturbing" it in any way? Its main function is to tell the ecu to retard timing, so I do not want to alter it in any way. I know I need a resistor and then an amplifier, but which ones will match and how can I build them?

2. How can I make the led stay on long enough to see it? The signal may be very fast, I dont know yet. I would like some kind of time delay for the light, so it will stay on for 1 second each time it sees any voltage from the yes/no signal.

As you can probably tell, I am new to electronics, but I plan to follow this board a lot and hopefully pick things up quickly.

Thanks!

#### dragan733

Joined Dec 12, 2004
152
Something I understood you.
For 2. Use a RS flip flop to make the led stay on long enough to see it.

#### mark944turbo

Joined Jan 7, 2005
10
Thank you! I am not sure what a RS flip flop is, but I am sure I can find out with google.

Anyone have any ideas about how to detect the signal without disturbing it? I bought some resistors and LEDs today...

#### Brandon

Joined Dec 14, 2004
306
Originally posted by mark944turbo@Jan 8 2005, 05:51 PM
Thank you! I am not sure what a RS flip flop is, but I am sure I can find out with google.

Anyone have any ideas about how to detect the signal without disturbing it? I bought some resistors and LEDs today...
[post=4476]Quoted post[/post]​
You can't. In order to check a signal you have to disturb it. No way around it.

You can limit the disturbance though. Since you want to touch the signal as little as possible, your best bet would to probably be a CMOS unity gain amplifier connected to the line you wish to monitor. This will limit the amount of disturbance as the CMOS will take no current from the line and only work based on the voltage where as BJT amplifiers require some current from the line in order to operate. Same thing if you use resistors to pull a signal from the line, it will also be pulling current.

#### mark944turbo

Joined Jan 7, 2005
10
Ok, I read up on rs flip flops......then got sucked into the explaination of how lots of different things work.

I can see how this would keep the light on (I think), but I do not know how it would reset itself. Do I have to do it manually? Also, do people make their own flip flops using transistors and a resistor or do they buy them. Like a chip that does the same function? Can someone explain what I actually do in more detail? I am new to all of this. For now I am going to try to logically figure it out from the website I have, but I have a feeling that some newer device will make life a lot easier, this is more of a history site.

About the cmos amplifier, most of them I can find seem to be intended for a small (<5v) input, for cell phones and small audio applications.

Do any exist that can handle a 12 v input just in case? Other than that, I see how they work! Will they be ok with any kind of electrical signal? AC/DC digital etc? I am pretty sure it is not a dc signal, but I could be wrong. Word is it is a "fixed digital signal". All the wiring diagram says is "yes no knock signal" Again it has to have a very fast response time as I have no idea how long this signal lasts for, and I need it to pass it on to the flip flop which will drive the LED.

BTW I am a first year college student (mechanical engineering), but I am going to sign up for some ee classes. I really like this stuff.

#### mark944turbo

Joined Jan 7, 2005
10

#### dragan733

Joined Dec 12, 2004
152
Originally posted by mark944turbo@Jan 9 2005, 07:46 AM
Ok, I read up on rs flip flops......then got sucked into the explaination of how lots of different things work.

I can see how this would keep the light on (I think), but I do not know how it would reset itself. Do I have to do it manually? Also, do people make their own flip flops using transistors and a resistor or do they buy them. Like a chip that does the same function? Can someone explain what I actually do in more detail? I am new to all of this. For now I am going to try to logically figure it out from the website I have, but I have a feeling that some newer device will make life a lot easier, this is more of a history site.

About the cmos amplifier, most of them I can find seem to be intended for a small (<5v) input, for cell phones and small audio applications.

Do any exist that can handle a 12 v input just in case? Other than that, I see how they work! Will they be ok with any kind of electrical signal? AC/DC digital etc? I am pretty sure it is not a dc signal, but I could be wrong. Word is it is a "fixed digital signal". All the wiring diagram says is "yes no knock signal" Again it has to have a very fast response time as I have no idea how long this signal lasts for, and I need it to pass it on to the flip flop which will drive the LED.

BTW I am a first year college student (mechanical engineering), but I am going to sign up for some ee classes. I really like this stuff.
[post=4489]Quoted post[/post]​
For the reset, you will do it manually, with a push button. The signal will be connected to the input Set and you will connect the push button on the other input Reset. Make a RS flip flop with two transistors, where you will connect the LED on the collector of the transistor which input is Set.
You can use other other operational amplifier. For example TL081. After the output of the operational amplifier you will use a rectifier with diodes to rectifie the AC signal and a capacitor to filtre this signal. So you will have a DC signal that will command the Set of the RS flipflop.

#### mark944turbo

Joined Jan 7, 2005
10

So this would be the general idea? This is my best chance for a setup to have an unknown digital signal trigger an led?

Any more help as far as what transistors, capacitors, etc I need would be great. As for now I will keep researching and just ask specific questions if I can not work it out.

Once again, thanks for the help, this site is awesome.

#### Maxx

Joined Oct 30, 2004
43
Originally posted by mark944turbo@Jan 8 2005, 05:48 AM
...  I am guessing that the signal is somewhere between 0 and 5 volts, but it could be up to 12v.  I would hook it up to a scope, but I do not have one, I am using the mic input on my laptop as a scope for now, with resistors of course.  Plus I have to induce knock to test it, which means driving full throttle while watching my computer, that isnt fun.
Hi Mark, I know you are being helped with this already so i won't butt in on that.

All i wanted to say was, have you thought about using your laptop like you have tried, but using some audio recording/editing software to record the output whilst you are driving? You won't need to watch the laptop and you can analyze the results later.

I own a scope, but sometimes i want to capture data signals that could have mixed amplitudes or pulse widths. I often use the sound card in a PC to do this and usually get very good acurate results.

I use an old version of "cool edit" for the software and i use a couple of resistors to form a potential divider so i don't overload the audio input on the PC.

By the way I use the audio line level input and not the mic input, this is quite important for a couple of reasons.

1) the mic input is very sensitive (less than 5 mV) Even with limiting resistors it becomes very easy to overload this input.

2) the mic input can often have a low voltage phantom power source present on it which is usually used to power a small electret condenser microphone. you can overcome this though using a capacitor in series with the wire to block DC.

3)because this input is so sensitive it is very easy for it to pick up stray interferrence and noise, which could affect the reading of the signal you are looking for.

The audio line in, is better because it usually expects an input of about half to one volt to give you a full scale reading. if you assume the lower input level and a maximum output of your knock sensor to be about 14 volts then you can calculate a value to make the resistors for the potential divider.

Be sure to make sure the audio line input is selected on in the volume control properties, this is a mistake i have made in the past and wondered why i didnt seem to be getting any signal.

Example below if you need it.
Rich (BB code):
  |------------ knock sensor signal cable
|
|
/
\   270 K resistor
/
\
|
|------------ connect to line input on PC
|
/
\  10 K resistor
/
\
|
|
|------------ Vehicle Chasis / ground and PC ground
If you record the signal you will have a better idea of the nature of the output from the sensor, when you know this it will help to create a proper circuit design to light your LED from the signal

P.S. you could use a pulse stretching circuit made from a couple of CMOS gates and just a couple of resistors and capacitors, if the signal is just a digital pulse, when the Knock occures.

If it's a varying analogue signal you will need to use somesort of threashold detector first to set a limit the the point you want the LED to trigger on.

Hope some of this helps and sorry for butting in everyone else.

Maxx

#### mark944turbo

Joined Jan 7, 2005
10
First, you are not butting in!! I need all the help I can get.

The only problem is that tapping into the signal with resistors is not as ideal as using a cmos amp, but I think it would be a good start as well. I really hope the ecu gets enough of a signal as I test knock to retard timing....I dont look forward to a blown motor.

Right now I use the mic input with a capacitor to block the 5v out, 3 100k resistors to pull down the signal, and it is working pretty good for listening to the knock output itself. Today I think I will try this exact circuit on the yes/no signal, as you suggested. I use spectrogram software to analyze the data.

Unfortuantely my laptop has no audio input. But the mic seems like it will work just as well if I use the right resistors.

Thanks for taking the time to build that circuit for me. What is the purpose of having the resistor on the ground line? Right now I have the sensor ground just attatched straight to the chassis ground, along w the mic ground wire.

Hopefully I can get some results to post tonight.

THANKS A LOT!!

#### Maxx

Joined Oct 30, 2004
43
Originally posted by mark944turbo@Jan 15 2005, 07:48 PM
What is the purpose of having the resistor on the ground line?  Right now I have the sensor ground just attatched straight to the chassis ground, along w the mic ground wire.
Ok it sounds like you just have the 3x 100k resistors in series with the mic, am i right? What you are doing, if that is the case, is using the microphone it's self like the 10 k resistor.

The line at the bottom of the drawing is common to both the mic ground and the sensor ground (the car chasis) I'm not sure if you have interpreted my drawing correctly its so hard to explain with typing.

The circuit, i posted is a standard potential divider circuit, wich works just like a volume control on a radio or TV etc. It is the ratio of the top resistor (270K) compared to the bottom (10K) resistor that sets the voltage level drop. The overall ratio being 28:1 so 14 volts in would equal 500mV out.

I didn't realise you had actually conected wires to the back of the microphone i thought you were using proper inputs on the PC.

If you want to disturb the signal to an absolute minimum you could buffer the signal with a simple unity gain voltage follower circuit. You can use an op-amp chip for this connected as a standard voltage follower. I'll try and see if i can find any drawings on the net.

If you post the results later maybe we can be of more help.

Goodluck

#### mark944turbo

Joined Jan 7, 2005
10
I understand your drawing now, thanks.

What do you mean by proper inputs on the pc? I just bought a new 3.5mm mic plug and soldered wires to it, then plugged it into the sound card. Isnt this correct? Yes you are right, the 100ks are in series.

It looks like I wont be able to post results until tomrrow, because I forgot my electrical toolbox at school.

#### Maxx

Joined Oct 30, 2004
43
It's ok i think i mis understood what you were saying earlier on when you said you had no inputs on the PC i thought you had soldered wires to the microphone it's self.

having looked a little more into knock sensors it seems they are High impedance peizo electric microphones, so on that basis DO NOT add the 10K resistor just carry on as you are for now.

or maybe even use greater resistance values in series, the loading could seriously drop the output level of the sensor so you would deffinately be best to buffer the signal with an op-amp.

#### mark944turbo

Joined Jan 7, 2005
10
Just a little clarification, I am not tapping into the knock sensor signal itself. This would not help because all that is is a microphone. I am tapping into a yes/no signal that comes after the car's computer has filtered the acual knock sensor signal itself. The computer detects if the sound is knock, then outputs a yes/no digital signal to a different computer in the car. This is the wire I will be tapping into.

I meant I had no audio input, just a mic input. Eventually I will definately be using the op-amp, but as you suggested I would like to post here what the signal looks like in a spectrogram so that you can suggest which components will work best.

#### Maxx

Joined Oct 30, 2004
43
Originally posted by mark944turbo@Jan 15 2005, 10:20 PM
Just a little clarification, I am not tapping into the knock sensor signal itself. This would not help because all that is is a microphone. I am tapping into a yes/no signal that comes after the car's computer has filtered the acual knock sensor signal itself.
Ahh i see, sorry it's my misunderstanding.

When you have the results hopefully i will be a little more help than i have been so far.

If it ends up as a plain digital signal from the ECU output then it should hopefully be quite straitforward. I'll leave it untill you have more info tho for now.

Goodluck

#### mark944turbo

Joined Jan 7, 2005
10

This is a screenshot of the constant signal coming from the wire with the car running. No knock. It appears to be between 300 and 900hz all the time. I was using the mic input with 3 100k resistors in series and a capacitor to block dc current, which there was none of anyway. I checked using a voltmeter.

I was unable to induce any knock to see how the signal changed, (too much snow on the roads ). I will get to that as soon as the roads get cleared up, but I figured I would post these initial results in case they help in any way.

#### vtech

Joined Jan 20, 2005
1
As a mechanic, I wonder why you would want to monitor the knock sensor in the first place? Are you modifying the timing or have you changed the compression ratio?

Personally, I wouldn't mess with the sensor inputs. I dont see a need for the raw data that is sent to the computer when you can monitor the data the computer is using to make fuel and timing corrections. I would monitor the data stream provided by the ECM.

Perhaps there is another aproach to your problem,
Here is a useful link: http://www.obd2.com/

Good luck

#### mark944turbo

Joined Jan 7, 2005
10
Those are some great points and ideas vtech, but I have responses to all of them

My car is an 86 porsche 944 turbo, which does not have OBD2. It is actually easier to monitor the knock yes no signal than try to interpret the timing output.

I am actually running water injection trying to make 30 plus pounds of boost reliable, so knock monitoring is certainly something I need.

It keeps snowing , so this project is going to be delayed more, but I promise to post another log file when I get it.

#### leefain

Joined Jan 26, 2005
1
Hello everyone, I need some help. I touched the hotwire; 8gage wire from my battery, to a screw on the outside of my car amp. Now, when I go to turn the car on the light on the amp; the one that indicates power is going to it, doesnt light up, thus the amp isnt working.

Does anyone have possible solutions to get this fixed? Thanks!