Interfacing variable voltage a/c signal with a uC

Thread Starter

gte

Joined Sep 18, 2009
357
Well the other one was built and installed and I was concentrating on getting the coding working, which takes much more time so I left it as is to concentrate on the code.

Do you mean C1 or C3 of the most recent schematic-1 ? I'm guessing you mean C3 to decouple noise from the alternator/power supply?

I do not however have C1 (I didn't even notice C1 until now for some reason?) and I chose non-polarized caps based on the schematic symbol you used ... was that correct?

I'll have to find a 100 pf cap and put that in line with the signal, non-polarized too I assume?
 

CDRIVE

Joined Jul 1, 2008
2,219
No, they're not polarized. Those are small disk or polyester caps. C3 is rather important because it's in the signal path. Your Vcc is a separate battery, so C1 shouldn't be as critical but it's good practice anyway.
 

Thread Starter

gte

Joined Sep 18, 2009
357
Good, I have c3 in place and it is non polarized.

I'm actually picking up the signal from the a/c motors computer. I don't know if it uses shielded wire, do you think I should use shielded wire from where I tap off of it?
 

CDRIVE

Joined Jul 1, 2008
2,219
Yes, that's what I meant. Also, if you add a 1KΩ in series with the input end of the shielded cable it should further reduce extraneous noise.
 

Thread Starter

gte

Joined Sep 18, 2009
357
Ok, thank you, I will try the resistor and get the most recent circuit built and tested.

I did happen to notice that it happens more at lower rpms then higher? Maybe due to a quicker rise and fall time at higher rpms? What do you think?
 

CDRIVE

Joined Jul 1, 2008
2,219
Ok, thank you, I will try the resistor and get the most recent circuit built and tested.

I did happen to notice that it happens more at lower rpms then higher? Maybe due to a quicker rise and fall time at higher rpms? What do you think?
Not certain. Is this circuit still on a protoboard? There's a limit to how much real world results you can get out of one. Bypassing caps on a protoboard are rather futile. Your hostile environment requires good grounding, shielding and bypassing techniques. ;)
 
Last edited:

Thread Starter

gte

Joined Sep 18, 2009
357
Yes it is still on a protoboard.

I understand what you mean by having little antennas all over the protoboard, that's why I was hoping I could counter them with pull down resistors.

I've never designed a PCB yet, and I'm not comfortable trying without at least getting it working satisfactory on a breadboard.

Am I in a catch 22 now?
 

Thread Starter

gte

Joined Sep 18, 2009
357
I have just written some code to the uC as a temporary work around to try and filter out false triggers, I will test it tonight.
 

CDRIVE

Joined Jul 1, 2008
2,219
By the way, I've posted so many schematics in this thread that I lost track of exactly which one you're currently using. If I'm correct the one you're using changes states with about 800mV input, while the Schmitt trigger, which I posted DC Characteristics curves for, changes state at about 3.0V. Hence, the Schmitt will have much better noise immunity.

That said, V+ decoupling, short bypass cap leads, broad ground planes, shielded case and cabling will go a log way in the hostile environment that your dealing with.
 

Thread Starter

gte

Joined Sep 18, 2009
357
Here is the current schematic I am using

http://forum.allaboutcircuits.com/attachment.php?attachmentid=41598&d=1333682378



And here is the one I plan to try and build this weekend (assuming I have all of the components)

http://forum.allaboutcircuits.com/attachment.php?attachmentid=41665&d=1333852496


Sorry about the confusion, I appreciate all of the schematics you've posted! I will work on implementing the things to try and cut down on the hostilities of my environment. I will say this, I was able to remove all of the false positives with software, but I don't believe this is the best approach for speed of the code.
 

CDRIVE

Joined Jul 1, 2008
2,219
Here is the current schematic I am using

http://forum.allaboutcircuits.com/attachment.php?attachmentid=41598&d=1333682378

And here is the one I plan to try and build this weekend (assuming I have all of the components)

http://forum.allaboutcircuits.com/attachment.php?attachmentid=41665&d=1333852496
If you add C3 (100pF) from the Schmitt Trigger circuit to your current circuit it will work as a low pass filter in conjunction with R2 - 100KΩ. I think the Schmitt Trigger is a better choice though.
 

Thread Starter

gte

Joined Sep 18, 2009
357
Sorry for the delay, new circuit is built, this was the a/c motor sensor 1 output :) ... what do you think? The next step is to enclose it all in a metal box and see if I still get a lot of "jitter" .

I may have to change the uC code a little for the gap/first tooth after the gap, which used to be split close to 50/50 and now is different, we'll see.


http://img26.imageshack.us/img26/6879/schmittnpn1.jpg (too big to display on the forum IMO)
 
Top