Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

micro pic VW golf project.

Status
Not open for further replies.
Simtec 56.5 manual said:
CAS (Primary Trigger)
The CAS consists of a toothed disk and an two coils (exciter and modulator). The disk is attached to the crankshaft and
theoretically comprises 59 teeth set around its circumference. At a position 114° BTDC, one tooth is omitted as a reference to
TDC and so a total of 58 teeth remain on the disk. A high frequency signal of between 120 and 180 khz is delivered to the exciter
coil by the ECM.

There you go - even Siemens classifies it as a high frequency :p
 
Notice my circuit has a resistor from the opamp to the PIC, this keeps the PIC safe. Have a study of opamps, and then ask yourself why R4 is there?.

when you say the resistor after the pic protects it, do you meen it stops the pic being damaged if the opamp shorts out.

as for R4 iv got no idea, these opamps are doing my brain in. i get how to use them as a follower or how to get gain from them but just not getting the negitive side of things.

surfing the net now to try and find things out
 
do i need to worry about using the opamp to go negative like in nigels diagram or can i just use the same sort of layout i attached earlyer to one of my posts, but add filter

is the filter just to stop high frequancys being sent to the pic???
 
jay543_uk said:
do i need to worry about using the opamp to go negative like in nigels diagram or can i just use the same sort of layout i attached earlyer to one of my posts, but add filter

If your opamp is connected between 0V and 5V it can't go negative, because there's no negative voltage there. In my case the resistor from the opamp to the PIC protects it both ways.

is the filter just to stop high frequancys being sent to the pic???

It's not just a filter, part of it should be (see nyquist frequency), but it needs to stop big nasty spikes as well.
 
so are you saying my nyquist frequency has to be half the frequancy i am sampling.

how do i work out how often i need to sample a signal from the engine???

what sort of filter layout stops power spikes

im guessing after the opamp there carnt be really any spikes becoz the max it can go to is 3.2v when the rail voltage is 5v but the spike could blow the opamp so i need to protect the opamp from high spikes with the filter
 
jay543_uk said:
so are you saying my nyquist frequency has to be half the frequancy i am sampling.

It depends what you're trying to do, but the highest possible frequency entering the A2D needs to be less than half the sampling frequency - and preferably much lower than that.

how do i work out how often i need to sample a signal from the engine???

It depends what the signals are, I would suggest scoping then to see?.

what sort of filter layout stops power spikes

Think clamp more than filter, zener diodes are a common method.

im guessing after the opamp there carnt be really any spikes becoz the max it can go to is 3.2v when the rail voltage is 5v but the spike could blow the opamp so i need to protect the opamp from high spikes with the filter

Which is why I said filter before the opamp.
 
ok, i think i understand that the zener diode would stop the spikes but what would happen if you didnt filter the high frequancys going to the pic.

if i was measuring the vehicle speed sensor which is a hall effect sensor that has a 5v ref and 0v gnd and the return signal puts out a 5v square wall, would i have to filter that or would i have to work out the highist frequancy it would produce at the highist vehicle speed and then filter out any frequancys above that
 
jay543_uk said:
if i was measuring the vehicle speed sensor which is a hall effect sensor that has a 5v ref and 0v gnd and the return signal puts out a 5v square wall, would i have to filter that or would i have to work out the highist frequancy it would produce at the highist vehicle speed and then filter out any frequancys above that
You would ideally use a pin with an interrupt associated with it (Possibly RB0) and use the interrupt to trigger any code you need to run when it senses a speed pulse.

You wouldnt need to use one of the A2D channels for this as its effectively a digital signal.
 
cool well i think that bit is easy then, maybe i should just make a digital speedo for my car and forget the rest.

so what would happen if i didnt filter out high frequancys going into the pic from say the battery which has didnt frequancy being sent to it all the time by the alternator
 
jay543_uk said:
cool well i think that bit is easy then, maybe i should just make a digital speedo for my car and forget the rest.

so what would happen if i didnt filter out high frequancys going into the pic from say the battery which has didnt frequancy being sent to it all the time by the alternator

Nothing much, because there's no real AC component there, you're essentially measuring a slowly changing DC voltage - but a lowpass filter will still help to cut spikes.
 
ok iv looked at all the different things you have said and iv attached a circuit that iv made trying to take into consideration everything. am i on the right track

wrong picture, ill do it again
 

Attachments

  • sensor input.JPG
    sensor input.JPG
    13.9 KB · Views: 134
That's getting something like (I'm presuming you're just not showing the power supply capacitors and filter components?.

But like I've said before, you've still got bizarre feedback components round the opamp? - you're using it simply as a buffer for an attenuator, yet you're giving it a gain of two?. Remove both resistors and connect the output directly to the inverting input - giving a gain of one.
 
if i dont have a gain on the opamp the voltage at the a2d when the battery voltage is 16v is 1.6v,is that not to low.

when you say power supply caps and filters do you mean before the regulator because after i posted it i fault i just protect the regulator from spikes etc, could i do the same with another zener
 
jay543_uk said:
if i dont have a gain on the opamp the voltage at the a2d when the battery voltage is 16v is 1.6v,is that not to low.

Calculate the values of the attenuator to give the correct range you need, and save two resistors!. Or you could cheat (like my tutorial hardware) and make it variable gain! :)

when you say power supply caps and filters do you mean before the regulator because after i posted it i fault i just protect the regulator from spikes etc, could i do the same with another zener

You need lots of filtering, and very specific protection, on car powered items - there's been lots of threads here discussing it, it's a very complex (and argumentative) subject. But you require two capacitors on the regulator, and one across the PIC - as an absolute minimum, again check my tutorial hardware, which uses the absolute bare minimum.
 
how do i no what will effect a sensor signal, ie if i used very low resistors i am guessing it would, what would you say is the lowist value resistors i should use on the sensor signal side.
 
ok iv had a look at your tutorial processor board and i see the caps before and after the regulator, why does a cap stop the power spikes, does the cap absorb the spike because it trys to charge to the spike voltage.

im gona spend this weekend going throught the whole of your tutorials.

iv got a scope off ebay so im gona rig it up on the different sensors on the car and see what sort of spikes im getting as well.
 
just found a good web site on cap filters, shows it removing ripples from the power supplie, im guessing your cap values are low because the opamp and regulator do not have much load so a low cap value will still discharge slowly and filter out powers upplie ripply.

so if i look up on cap discharge to load i shold be able to get a rough idea of cap values depending on what circuits and loads im using.

does this make sense or am i talking ball???
 
jay543_uk said:
ok iv had a look at your tutorial processor board and i see the caps before and after the regulator, why does a cap stop the power spikes, does the cap absorb the spike because it trys to charge to the spike voltage.

The capacitors round the regulator aren't to stop spikes, they are an essential part of the regulator, and should be mounted as close as possible to it. Without them the regulator will have a tendency to oscillate, it might only be under certain conditions, but they are specified in the datasheet for good reason!. Filtering the car supply usually uses capcitors, inductors, zeners, and perhaps MOV's? - like I said it's a complex subject. It really depends if it's a 'one off' for yourself, or if you're making multiple ones.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top