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.

Rpm Counting

Status
Not open for further replies.
Re: Comparator circuit

TKS said:
Nigel i installed the comparator jus tlike you said.

It's NOT a comparator!, as I told you above.

Only with one 10K pot in place (to 5volts) and one 100K one.. (hysteris??)

Why?, I said not to, and it's NOTHING to do with hysteresis.

With those 2 i could adjust the signal.
But the problem is that the comparator voltage is to often 0,7 to 0,9
and then the pic's pin state changes very often and that generates wrong pulses...

I have made a program wich could make a graph about the pulses recieved. Always the best adjustment i could made.

I saw that the pulses recieved where to doubtfull sow when i give a good swing at the wheel it creates an mountain landschape with the peaks
going lower when reaching the lower speed.

When almost 0 rpm we get the doubtfull signal and it then generates a huge peak wich is impossible to his speed.
the value i recieved whas near 120pulses within 125ms.

Then i places a cap between the pic pin and the 0voltage. (1uF).
(i placed it after the other cap).

Then the values where allot better and you could see on the graph that the speed was getting lower and lower... but again when it reached alomost 0rpm it generates a huge spike....(200pulses)

the overall values was 100..pulses (sow 20 lower).

To eliminate the huge spike a changed the 1uf to 10uf but then it was unable to produce the nise moutain wich goes lower..(signal gets worse)...

I also tried with a 110K pulldown resistor and when i add that one i need to change both the pots (a lot of power is lost???).

Then the biggest surprise with the wheel from the ground i started the engine...

Then it looked like the engine noise was getting onto my circuit!!
when not turning the wheel i recieved some spikes, i could eliminate them a lot by adjusting both pots but it then it won't recieve well the signals


Question is it possible to connect the output of the TL to a NPN?
and add a pullup / pulldown with the perfect values for any voltage on the base higher then 0,6???

I need to take away the doubts from the pic/signal???

Hope you can give me some ideas

Sorry, but I haven't got the faintest idea what you're doing?, I gave you a circuit for an amplifier and you've altered it without reason, and started calling it a comparator for some bizarre reason?.

Have you now got a scope then?.
 
Nigel calm down, will try to improve my inglish aswell ok

OK, you gave me the circuit, i made it like you said i only added 3 things.

1) the zener protection
2) the 100K pot instead of the 100K resistor
3) the 10K resistance to 5volt rail replaced by a 10K pot.

Sorry that i call it a comparator.
Its just because i saw how the device works and i thought it compared the VR sensor voltage to the - pin voltage (or to the + pin voltage).

I then programmed the pic to output to me the measured details.

The pic counts pulses during 125ms. and send them out to the pc by the serial port/pins.

I then adjusted my scope program (you remember the bar graphic picture??)
sow i could plot the signal (values) from the pic.

is the situation now more clear?

i will upload an attachment as soon the limit is some bit higher need 60Kb per file... :(

else i could mail you them?

i found out that a cap at the picpin to ground of 1uF will give lower readings (lower count values) but they where super stable!! exept when reaching low pulse frequency/low rpm/low wheel speed.

i found out that a 10uF isn't usefull because it made the signal crap....

i also found out that a 110K pulldown can be usefull but that you need to adjust the pot settings allot.

I did al this kind of tries to cure the "doubt signal the pic gets"

do you untherstand what i mean with doubt signal?? I call a Sinus wave wich has a high frequency and wich max voltage is 0,9 ==> portbit high
and lowest voltage is 0,7 ==> portbit low..

untherstand the problem??

the doubt signal comes when the wheel speed is low.

then the next other problem is the spikes wich i hope came from the fact that the sensor vibrates and generates some doubt full pulses!!

surely its not prof talk but hope you untherstand ok?

Tks

i'm going to try a pc scope (DIY job) if it don't works i will buy a decent one.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top