Safe Way of Detecting EMP by MCU - Page 1
Forum section: electronics / beginners

author: Mechatrommer
author_rank: Super Contributor
timestamp: June 29, 2010, 06:19:40 am
content: i'm currently tried to detect my camera flash light burst by picking the EMP (EMF?) using a simple inductor. directly connecting the signal to mcu (1), is working ok as the mcu is detecting it as well. but thinking EMP might not be safe for the mcu, i try to change to (2) with a transistor and resistor in between, still DSO indicating not a clear signal in, if possible.. i want to change the ocsilating spike into something smooth like in (3).. any tought?

author: joelby
author_rank: Frequent Contributor
timestamp: June 29, 2010, 06:32:40 am
content: Clamp the signal with a diode and use an ADC input?Comparator/Schmitt trigger?

author: Simon
author_rank: Unknown
timestamp: June 29, 2010, 06:50:29 am
content: yea put a diode in series, maybe a capacitor in parallel after the diode and perhaps a 5V zenner diode in parallel with the MCU input

author: jahonen
author_rank: Super Contributor
timestamp: June 29, 2010, 07:11:43 am
content: When I first read the subject, I thought that someone really wants to find a safe way to detect the EMP pulse due to nuclear explosion in upper atmosphere, one really does not need the MCU to detect thatComparator with possibly some signal conditioning before the that would make quite tweakable pulse generator to the MCU.Regards,Janne

author: saturation
author_rank: Super Contributor
timestamp: June 29, 2010, 09:23:57 am
content: You basically want a radio tuned to the output frequency of your flash unit.So, to build it, you need an antenna, you might want to tune it to the specific frequency you want, then amplify it enough to be useful to the input stage of the MCU.Otherwise you want a spark gap style radio that just picks up anything and amplifies it, and you'll presume the strongest frequency that bursts is your flash unit. If you do not tune it, it can also pick up fairly large EMF from motors and such, and just waste energy amplifying noise.Given the voltage drop across a diode is at 0.6V or so, you need to preamp the input stage after the antenna.The goal of the preamp stage is to get enough gain to feed the MCU.Since you are only looking to detect a burst of specific frequency, you can digitize the input signal in the MCU and make a digital filter to isolate the peak or make the filter an amplified band pass filter before the MCU, thus passing only the desire signal for analysis.I see to summarize:antenna, RF pre amp, diode, optional filter, mcu

author: Zero999
author_rank: Super Contributor
timestamp: June 29, 2010, 11:59:35 am
content: Do you need an MCU?If all you need to do is generate a pulse with a certain length or something, a logic gate IC will do.

author: Mechatrommer
author_rank: Super Contributor
timestamp: June 29, 2010, 01:24:59 pm
content: quite a number of reply... thanx... and sorry, i didnt mean nuclear explosion EMF, just normal household oneQuote from: joelby on June 29, 2010, 06:32:40 amyou mean a diode just before the mcu input pin? isnt the transistor acts as a diode already? i saw a somewhat clamped signal out of trans. emitter, but still rippling within the non-saturated region, thats what it is... i think. i'm afraid ADC is too slow to detect such a very short pulsecomparator? wont i be needing another pin for that? i'm using interrupt to detect the pulse, coz i believe, thats the fastest way of detecting something that occur very short period, but correct me if i'm wrong.Quote from: Simon on June 29, 2010, 06:50:29 ami've put a 0.1uF cap parallel to resistor in (2). the signal got attenuated, and mcu sometime detecting false signal just after the real signal/pulse, maybe during the cap discharging.Quote from: saturation on June 29, 2010, 09:23:57 am1) i might pickup something else?not the signal from my flash?2) specific freq? i dont care what freq it is. i just want to know, if its happening, then its happened.3) bandpass? seem interesting, but... ehem, need to open the textbook again. analysis? as i said, no analysis is needed, i just want to know if its happening, then i'll direct the code to do something (interrupt routine)...IIRC, i've put a diode and cap parallel to inductor, but... either the EMF got attenuated or clamped but still rippling. can comparator do such thing as latching? where it converts a short period of (oscillating) pulse to a single "nearly" smoothen output for that (pulsing) period?i've tried to use optocoupler in effort to isolate the EMP pulse, but i dont think its enuf to trigger the output connection... ie (not detected any volt at output.

author: Mechatrommer
author_rank: Super Contributor
timestamp: June 29, 2010, 01:50:49 pm
content: Quote from: Hero999 on June 29, 2010, 11:59:35 amyes! coz i will need to do some routine upon pulse detectionQuote from: Hero999 on June 29, 2010, 11:59:35 amyes! i need a device/circuit that convert/isolate the oscillating pulse (EMF), into one single stable pulse during the period of oscilation and later feed to the mcu, any circuit example?

author: Mechatrommer
author_rank: Super Contributor
timestamp: June 29, 2010, 02:55:31 pm
content: the diode + cap combination is sound good, so did some testing, not promising though, but gotta try more arrangement:1) the "crude" circuit, sorry for sloppy handwriting.2) the original signal without the circuit3) the signal just before the entry to the transistor (show some clamping at the top)... point 14) at point 2 without the cap5) at point 3 with the cap (some noticeable attenuation, maybe becoz the resistor)

author: Mechatrommer
author_rank: Super Contributor
timestamp: June 29, 2010, 03:01:50 pm
content: another...

author: Mechatrommer
author_rank: Super Contributor
timestamp: June 29, 2010, 03:47:56 pm
content: more fooling around with resistor, diode and capacitor. the yellow graph is the signal from inductor coming into transistor base, blue graph is the signal just into the mcu digital input pin.my conclusion:... even though the 4th pic seem to stabilized ripple a bit, but the interrupt routine in the mcu is triggered twice, not sure why, cant even see the 2nd trigger/pulse in the DSO. so i just ended up using 2nd pic config.... so far.

author: Mechatrommer
author_rank: Super Contributor
timestamp: June 29, 2010, 04:18:11 pm
content: and sorry, i forgot... i'm using 0.1uF cap and 1K resistor. seem like the 4th pic can be improved. maybe i can lower both the resistor and cap value to avoid false trigger. hmmmbut still, the 2nd pic is more reliable in term of mcu interrupt trigger... and 1 less componentedited: 2 components less actually 2nd compared with 4th.

author: marianoapp
author_rank: Regular Contributor
timestamp: June 29, 2010, 04:20:20 pm
content: maybe you could try something like this: the (amplificated) input goes into a clamper (first cap + diode) to add a dc bias and shift the signal above ground, the second cap smooths the ripple and then into a comparator, which should give you a nice square output pulse.input |\-----||---+----+-------|+ \ _____ output| | ,--|- /| | | |/,-->|--' _|_ || -,- || | |_|_ _|_ _|_- - -you should also use a schmitt trigger input to avoid multiple interrupts

author: Mechatrommer
author_rank: Super Contributor
timestamp: June 29, 2010, 05:09:36 pm
content: thanx mariano for the schema, gotta find the comparator. sigh. i'm using ttl input, gotta change it to schmitt. can somebody explain whats the difference?

author: Mechatrommer
author_rank: Super Contributor
timestamp: June 29, 2010, 05:15:33 pm
content: i've done your circuit, this is how its looks like in and out, the interrupt does triggered, but still another some false trigger. still currently using TTL input.i'm not sure if i wired this correctly, esp the Vcc+ and Vcc- into the LM393 comparator.

author: scrat
author_rank: Frequent Contributor
timestamp: June 29, 2010, 05:30:33 pm
content: by the way: Schmitt trigger comparators have hysteresis, as some relays... In practice you get more noise rejection.Could you explain more in detail what your circuit must do and where the signal one the inductor comes from?Looking at the waveforms... why don't you simply rectify the signal, for example using four diodes or a precision rectifier (opamp + diode) and then use a Schmitt trigger to square your signal? You could do it by using your LM339, which has two opamps...If you need an indicative schematic of what I mean, just ask..

author: Mechatrommer
author_rank: Super Contributor
timestamp: June 29, 2010, 05:50:14 pm
content: well, the inductor is 1mH... as in the picture below. i learnt from the net that we can detect the light coming out of the camera flash just by simply detecting its EMP signature. when the flash is bursting light, the inductor will detect the signal as you saw in the dso (yellow graph). we also can as well, using a phototransistor do the job, but... the way that its blocking some even though just a little of light path, is not a really good idea for me.so, long story short... i need the signal to trigger the mcu to do something just after the light is flushed out of the flash, it can be whatever, your imagination can tell, maybe we can ring a big bell to annoy our neighboor's dogso if you have the schema, be pleased to post here, if.... its not bothering you too much. and sorry, i dont have 339 op-amp, i might find another type of op-amp as a replacement. and i dont want to rectify the signal so badly, i just want to:1) know when its happening.2) safe for the mcu to eat (i'm using pic16f690)as i reviewed my 1st post, i also asked if there is a way to rectify it, so... yea! please post your circuit!just... please.. if possible.. dont be too complicated. i'm not a pro in analog analysis. thats why the rest, i ask mcu to do the job. and i just want to KISS.

author: marianoapp
author_rank: Regular Contributor
timestamp: June 29, 2010, 06:10:19 pm
content: Quote from: shafri on June 29, 2010, 05:09:36 pmdid you add a pullup resistor at the output of the comparator? (sorry i didn't include that on the schematic)

author: Zad
author_rank: Super Contributor
timestamp: June 29, 2010, 08:51:51 pm
content: As you are using an op-amp, you might like to consider using it in a precision rectifier configuration. This removes the c. 0.6v drop across the diode.Yout 1k resistor seems rather low in value, presenting too much of a load. Try a lower value cap too, so the voltage integrates more quickly. (place these after the precision rectifier)

author: Zero999
author_rank: Super Contributor
timestamp: June 29, 2010, 10:29:35 pm
content: Here's how I'd do it.EDIT:Note, I know it looks like the CMOS IC's input will be subjected to negative voltage pulses but it won't because the 4000 series all have input protection diodes so the capacitively coupled input will be a stream of 5V-0.6V pulses.

author: Mechatrommer
author_rank: Super Contributor
timestamp: June 30, 2010, 03:32:25 am
content: zad's circuit:1) op-amp (LM393) V+ is feed directly by the inductor (yellow is V+ feed)2) op-amp V+ is feed by trans. out (yellow is trans base/inductor)blue is always signal coming into mcu input pin.result = false trigger occured. (about 38ms after the real trigger, same with the other previous circuit suggestions), but this one, i'm not adding cap yet.i also change to schmitt input as suggested. result = not detecting the pulse, no interrupt/no trigger, only sometime, but when it does, yea! no false trigger. conclusion = schmitt not fast enuf to detect such short EMF burst... IMO from observation. but dont know whyseem fun experimenting with your circuit guys, and now i know the difference between the schmitt and TTL, just a lil bit i think.@hero = i dont think i have the part for your logic (CD4001), i'll try yours if i found it.

author: marianoapp
author_rank: Regular Contributor
timestamp: June 30, 2010, 05:36:29 am
content: Quote from: shafri on June 29, 2010, 06:29:53 pmsorry that circuit was screwed up..try the attached onei didn't have a model for the lm393 in ltspice but the lt1018 seems to work fine.[don't forget the pullup resistor on the output of the lm393]edit: i forgot to add that R1 controls the pulse width, higher value = longer pulsePD: zad's circuit requires an op-amp and you are using a comparator

author: Mechatrommer
author_rank: Super Contributor
timestamp: June 30, 2010, 06:12:09 am
content: yup i just thought about this several minutes ago... the LTSpice! i forgot it! should do it in the 1st place!your previous circuit indicating capacitor in series just after the D1, something that i seldomly see. i think any comparator should be able to produce that, wait until tonite, i kinda sleepy and lazy during the day. thanx. the sim looks really promising. but there is some.... like 10us delay there, if the red one is the output

author: Mechatrommer
author_rank: Super Contributor
timestamp: June 30, 2010, 06:29:48 am
content: and the signal is not a sine wave, but a decaying pulse. gotta dig more on this LTSpice, never used this so seriously. and yea! i got confused with comparator op-amp thing, they just have the same symbol.

author: Simon
author_rank: Unknown
timestamp: June 30, 2010, 11:45:31 am
content: You don't want or need a transistor, chances are you will damage it anyhow

author: scrat
author_rank: Frequent Contributor
timestamp: June 30, 2010, 11:58:48 am
content: Ideally, opamps and comparators only differ in the fact that the last have saturated output.In the real world, comparators are designed to work always in saturation (high or low output) and to move very fast from one level to the opposite (while opamps are typically slow in moving from saturation), they are meant to be overdriven, even with inputs beyond their supply rails. The ones you used (LM393) have also open collector output (that's why you must put pull-up resistor).However, you can (being careful) use one in place of the other.You call them opamps when you put them with negative feedback, while you say they are comparators if there is none ore positive feedback (positive feedback means memory as an hysteresis, so you have Schmitt triggers).I think the best way to do the job is using a precision rectifier and a schmitt trigger, using an opamp for the rectifier and a comparator for the trigger (the very best would be a full-wave precision rect, but requires another opamp). If you use opamps (single supply, as LM358), eliminate the pull-up resistors at the outputs. You can set the gain on the rectifier (N multiplier), the threshold (V+ * R4/(R3+R4)) and hysteresis band (V+ * R1/(R2+R1)).

author: Mechatrommer
author_rank: Super Contributor
timestamp: June 30, 2010, 12:12:10 pm
content: olala! thanx guys! simon n scrat.mariano! i just got my signal to appear in LTSpice+my "kiddo" circuit and Vdd to simulate some sine osc. have to manually type every bit since i cannot find any option for the signal, sine+decay. not so smooth though. here's the file, later i will add the suggested circuits here. Cheers!

author: Zero999
author_rank: Super Contributor
timestamp: June 30, 2010, 01:26:45 pm
content: Quote from: shafri on June 30, 2010, 03:32:25 amIt's a very common part, it can be replaced with the HEF4001 or 74C02.You can also use NAND gates, i.e. CD4011 or 74C00 if a couple of modifications are made, see the schematic below.The circuit is simple, the first gate is configured as a linear amplifier which increases small singles to a level high enough to trigger a logic gate. The second two gates form a monostable multivibrator, which remains on for a short length of time, once triggered.

author: Mechatrommer
author_rank: Super Contributor
timestamp: June 30, 2010, 02:05:20 pm
content: @hero, i cant even find your gates in LTSpice, i only found and and or gate in digital subdir with like 5 pin. i've sim mariano and zad's circuitry in LT. here it shows.mariano's one is almost exactly as my 1st sketch (blue graph, not really apparent there in the downsampled image. except... there is some delay... 10-20 us, so far, i will try the smallest through hole cap available to me, ie 0.1uF (easily to be put on breadboard. smaller cap is much preferable as it will generate shorter "high" signal. changing the Vref and R4 will help as well.gotta put it in reality later. i want to fool around somemore

author: Mechatrommer
author_rank: Super Contributor
timestamp: June 30, 2010, 02:24:03 pm
content: btw. to my surprise, the original signal will got somehow rectified/modified just before it enters the ic/transistor. the ic is like saying STOP! you have to max out on certain +ve voltage, or min down to some certain -ve voltage. without connecting to any component (just the inductor connected to oscilloscope), the signal is like symetrical top and bottom, but when connected to trans base, or ic input, that signal will be changed, its like it saturate at some +ve volt. this happened not even i connected the trans collector and emitter yet to any device, and not even connecting the Vdd supplymaybe some electrons fooling around insidemagic! but this behaviour is not seen in LTSpice simulation.

author: Mechatrommer
author_rank: Super Contributor
timestamp: June 30, 2010, 02:43:17 pm
content: Quote from: Simon on June 30, 2010, 11:45:31 amwont it be damaging the comparator's input as well? for mariano's circuit?

author: jahonen
author_rank: Super Contributor
timestamp: June 30, 2010, 02:49:30 pm
content: Here is an example how you can make sine + decay using some primitives (not very obvious, though). You can adjust the decay by changing the properties (time constants) of the exp-voltage source.Regards,Janne

author: Mechatrommer
author_rank: Super Contributor
timestamp: June 30, 2010, 03:04:14 pm
content: thats pretty obvious. thats how should be done using formulation to composite both sine+decay/shaping. i didnt know that, thanx.

author: Zero999
author_rank: Super Contributor
timestamp: June 30, 2010, 04:25:21 pm
content: Quote from: shafri on June 30, 2010, 02:05:20 pmYou need to download them from the Yahoo group.You shouldn't need to simulate it, test it on a breadboard - it's the only way to find out it works for sure.

author: scrat
author_rank: Frequent Contributor
timestamp: June 30, 2010, 04:41:13 pm
content: Quote from: shafri on June 30, 2010, 02:24:03 pmThis is what I think is happening, just because I hardly believe in miraclesIt can be expected with the transistor, so with the IC. The strange thing is that LTspice couldn't predict it.As you connect to the BJT's base, with emitter to gnd, input resistance varies as you reach 0.6-0.7 V, when the Base-Emitter diode starts conducting. So your impedance (which has unknown, but I suppose high series impedance) "shunts" the signal portion exceeding that threshold, saturating.It is although very strange that it happens even with only the IC input connected...

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 01, 2010, 02:40:16 am
content: Quote from: Hero999 on June 30, 2010, 04:25:21 pmyou are right, maybe i shouldnt simulate it. simulating mariano's circuit give some hope, but... when i tried it in reality, the following picture tells the story. its nowhere near, not even similar in shape between sim and real. not sure whats missing, some sim parameters? my wiring error? or the nature of the "limited" sim software. i've tried it with and without pull up and down resistor.the picture shows the result of the simulation, and at the bottom right is the result of osciloscope reading the real circuit.the blue graph from osc is not showing any "high" signal even though i've tried to lower the Vref at around 0.3V.

author: Time
author_rank: Frequent Contributor
timestamp: July 01, 2010, 02:45:43 am
content: If the camera elements are not too small, I would place an integrating rogowski coil around the voltage or ground return of the flash bulb as a means of detecting the timing of the flash. This would require breaking into the camera housing though. If you are trying to make something that does not require opening the camera housing up this will not work, obviously.

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 01, 2010, 03:19:35 am
content: Quote from: Time on July 01, 2010, 02:45:43 ami prefer the non contact version. from what i see, there are prospect for this kind of non contact version of EMP detection, as someone mentioned... detecting nuclear explosion in upper space atmosphere.

author: Time
author_rank: Frequent Contributor
timestamp: July 01, 2010, 03:30:11 am
content: Quote from: shafri on July 01, 2010, 03:19:35 amA rogowski coil is a non contact probe. Its a B-dot probe, essentially.You can't really compare detecting an EMP from a nuclear explosion to detecting the faint EMI signature of your flashbulb.

author: marianoapp
author_rank: Regular Contributor
timestamp: July 01, 2010, 03:39:52 am
content: just a few things i noticed looking at the screenshot:- in the simulation the input signal has a maximum voltage of 6Vpp and lasts for 60us, and on the rigol has a maximum voltage of 2Vpp and lasts for 25us- the cap is too big, the signal probably don't even have time charge it up before it fades away. You are charging it with just 0.3V, and even if it charges up the cap voltage will alway be < 0.3Vanyway you should try amplify the signal a bit more..good luck

author: scrat
author_rank: Frequent Contributor
timestamp: July 01, 2010, 09:56:34 am
content: Mariano is right, you can amplify. But since the signal is quite strong, I'm confident that you can use a precision rectifier, even in the full-wave (but half gain) version below. A very important thing is the hysteresis within the comparator (Schmitt).However, in every circuit you will use, you must have high resistance input. I think this is the trouble in your simulation. Your source surely has high output resistance, otherwise you could extract a very high power level from it (for example, 3 Vpp/1k, as you simulated, means 1.125 mWrms, which is fairly high for a magnetic coupling like that).In the sim your input is an ideal voltage source, so you don't see the same as in real world when you load it with 1k resistance. Try to use (in the real world) a higher resistance to ground.You can even measure impedance of your real source to simulate it then in the right way: measure the input signal at open circuit with the scope (probe 10M, better than scope's input 1M) and then put a resistance, tuning it until your signal reaches half of the voltage you measured at open circuit. That value is your source's series resistance, so you can put it on Kicad.

author: Zero999
author_rank: Super Contributor
timestamp: July 01, 2010, 12:11:39 pm
content: It looks like things are becoming over engineered.Why do you need a precision rectifier?Run the op-amp off a single supply and add a clamping diode if one is not already included in the IC package.The circuit won't work with the LM193 because it will oscillate when biased in the linear region so you must use an op-amp but the LM358 won't be fast enough.Why not use the MCU's built-in comparator?I don't see the need for an amplifier. Set the reference voltage to about half the peek voltage of the signal you need to trigger and you'll get a nice square wave of about 50% duty cycle when the flash is activated.If the frequency is too high for the MCU to cope with a monostable and amplifier similar to the circuit I posted previously can be used.

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 01, 2010, 12:27:15 pm
content: @hero: i found the 7HC02, great! reviewing your circuit, ok! 0.1uF, i got that, but... whats the cap value parallel to the inductor?@mariano: yup, i agree, sometime the real signal fluctuation high, sometime low, depending on relative position of inductor to flash, i will try to change some parameters later.@scrat: i've changed to 1K resistor coz higher value one like 10K will discharge the cap so slowly that the V2 (out) high for a very long time. its hard to tune the other components to get the desirable respond. as i said, i'm currently working on breadboard, so the smallest cap i can put on is the 0.1uF, i have smaller nF pF cap, but... smd! how?. maybe i should try your "precision amp" circuit, i just found out the LM193 is actually the sibling for the LM393, and i just found my uA741 opamp, will try using that as well.

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 01, 2010, 12:33:38 pm
content: Quote from: Hero999 on July 01, 2010, 12:11:39 pmu remind me and mariano post is relevant. as i said, the pulse is varying in magnitude. its hard to set the correct Vref for a certain respond time we want, unless we just make it zero... or near zero? so the comparator will output a crazy jump between saturation pointsand still... the inductor will be connected directly to the mcu, wont this present more risk to damage the mcu if the pulse goes too high?

author: Zero999
author_rank: Super Contributor
timestamp: July 01, 2010, 01:07:59 pm
content: Quote from: shafri on July 01, 2010, 12:27:15 pmNo.You need the 74C02 or CD4001.Or you can use the schematic with NAND gates with the 74C00 or CD4011.The reason for this is that the the first gate is configured as an amplifier with the gate in its linear region causing both output transistors to conduct simultaneously. Standard CMOS gates have a low output current so not much current will flow but HC CMOS gates have a higher output current so much more current will flow which can cause the IC to overheat.QuoteThe LC tank needs to have the same resonant frequency as the the ringing generated by the flash. The inductor is a pick up coil and the capacitor is just there to cause resonance.Quote from: shafri on July 01, 2010, 12:33:38 pmSo what?You only need one pulse to trigger the comparator in the MCU indicating the flash has been activated, it doesn't matter if the pulse train stops after the first few pulses.To be pedantic the waveform is an exponential decay anyway so it theoretically never reaches zero but that doesn't matter.The reference voltage is not critical, so long as you can be certain it will be triggered when the flash goes off and it won't be triggered by noise. I suggested 50% of the peak voltage, (50% of the maximum voltage), it could by 99% but it's possible that it might not trigger, it could be 1% but noise might be a problem, I chose 50% because it seems like a safe bet.

author: scrat
author_rank: Frequent Contributor
timestamp: July 01, 2010, 01:17:33 pm
content: "precision" because it starts rectifying (reproducing input on the output) from nearly zero to -V supply (for the inverting config, while for the one Zap proposed it works from 0 to +V supply. A simpler rectifier made by only diodes will start conducting from 0.6-0.7 V, so it is more distant from an ideal rectifier. You use the "super diode" when you want to get the precise "absolute value" or envelope of a signal, or if you need to fully exploit its amplitude (as in this case, I think).The one I proposed (which is typical) allows you to either choose to precisely rectify both halfwaves with 0.5 gain (by using 50k,100k,150k as in the scheme) or have an increased gain on the negative halfwave only (by using higher R5/R6 ratio).Of course, if you cannot use smaller caps, that's a problem, but I'd try with Zap's circuit with a cap on the load, there input impedance is high (+ input of the opamp) and peak detector resistance can almost what you want...It could be over engineered... I was trying to simplify ("clean") tuning, since in this way you can decouple the various effects. I don't think there's anything wrong with that. Once you get something working, you can even simplify it... An opamp IC costs some cents (yes, LM358 will probably be too slow while a comparator could oscillate), and contains two of them, where one can be used for rectifying, the other for Schmitt comparator...

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 01, 2010, 01:33:05 pm
content: Quote from: Hero999 on July 01, 2010, 01:07:59 pmsorry typo error. its the SN74HC02-Q1 QUADRUPLE 2-INPUT POSITIVE-NOR GATE. can do?hmm.. the resonant C value? let me figure it out.@scrat: thanx for the info n suggestion.i will be playing around with the circuits proposed here.

author: Zero999
author_rank: Super Contributor
timestamp: July 01, 2010, 01:44:50 pm
content: Quote from: scrat on July 01, 2010, 01:17:33 pmWhat I was saying is that you don't need to use a precision rectifier circuit, a normal non-inverting amplifier made with a single supply op-amp will do. I only suggested the diode to protect the op-amp's input from negative voltages but it might already have it built-in.I don't see how a full wave rectifier is beneficial. The circuit you posted also has a gain of 0.5 so why not just omit it and feed the signal directly to the MCU's internal comparator?Quote from: shafri on July 01, 2010, 01:33:05 pmYes, that should do.QuoteI thought you already had an LC resonant circuit on your transistor amplifier?This circuit works on a similar principle, it just has a higher gain and higher input impedance and includes a monostable to produce nice long pulses.

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 01, 2010, 03:19:53 pm
content: Quote from: Hero999 on July 01, 2010, 01:44:50 pmi just kinda put n test, try n error, i didnt have this resonant tank idea in mind. its been too long since i read the text, or simply i seldomly practice it.and i didnt have resonant tank in my circuit, unless something in between, diode or transistor. i tried paralleling with the cap directly, the signal just got very very "overdamped" due to too high cap value i think.

author: scrat
author_rank: Frequent Contributor
timestamp: July 01, 2010, 03:28:00 pm
content: @heroI don't disagree with you, I just want to give some alternatives (0.5 gain full wave / >1 gain half wave) to solve the (quite simple) problemSimplest solutions usually work better.The opamp you propose to use must allow rail to rail inputs, otherwise it won't work with small and near zero signals (I guessed your idea was to couple directly inductor or tank to the opamp). However, there are plenty of them.Full wave is only optimal in the delay it introduces, since for signals starting with either negative or positive first half-wave the output will go positive, and also you can tune the R-C filter to be 2x faster (only on the falling envelope, in rising it depends essentially on the opamp's rated current). The drawback is low gain...

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 01, 2010, 04:14:39 pm
content: well... a constructive and informative discussion! i would like to see more circuit if any, anybody else? i'll try it all, if i have the parts, if i have the time. i'll see which is more stable and suitable for this particular application. but so far, still my circuit no 2 is the easiest and most stable that i can manage. if safety is the issue, i might put some protection fuse or device or something upfrontbut yet, seeing variaty like the mariano circuit is like wah! we can actually do this! i think this is the spirit of EE. its ok, its fun! scrat's and hero's is next, zad's and mariano's need to be adjusted further, to get the stable result.