Author Topic: Safe Way of Detecting EMP by MCU  (Read 23343 times)

0 Members and 1 Guest are viewing this topic.

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11694
  • Country: my
  • reassessing directives...
Safe Way of Detecting EMP by MCU
« on: June 29, 2010, 06:19:40 am »
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?
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline joelby

  • Frequent Contributor
  • **
  • Posts: 634
Re: Safe Way of Detecting EMP by MCU
« Reply #1 on: June 29, 2010, 06:32:40 am »
Clamp the signal with a diode and use an ADC input?

Comparator/Schmitt trigger?
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17829
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Safe Way of Detecting EMP by MCU
« Reply #2 on: June 29, 2010, 06:50:29 am »
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
 

Offline jahonen

  • Super Contributor
  • ***
  • Posts: 1054
  • Country: fi
Re: Safe Way of Detecting EMP by MCU
« Reply #3 on: June 29, 2010, 07:11:43 am »
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 that :P ;D

Comparator with possibly some signal conditioning before the that would make quite tweakable pulse generator to the MCU.

Regards,
Janne
 

Offline saturation

  • Super Contributor
  • ***
  • Posts: 4787
  • Country: us
  • Doveryai, no proveryai
    • NIST
Re: Safe Way of Detecting EMP by MCU
« Reply #4 on: June 29, 2010, 09:23:57 am »
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







Best Wishes,

 Saturation
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19560
  • Country: gb
  • 0999
Re: Safe Way of Detecting EMP by MCU
« Reply #5 on: June 29, 2010, 11:59:35 am »
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.
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11694
  • Country: my
  • reassessing directives...
Re: Safe Way of Detecting EMP by MCU
« Reply #6 on: June 29, 2010, 01:24:59 pm »
quite a number of reply... thanx... and sorry, i didnt mean nuclear explosion EMF, just normal household one :)

Clamp the signal with a diode and use an ADC input?
Comparator/Schmitt trigger?

you 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 pulse ??? comparator? 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.

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

i'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.

1) You basically want a radio tuned to the output frequency of your flash unit...
2) Since you are only looking to detect a burst of  specific frequency
3) band pass filter before the MCU, thus passing only the desire signal for analysis.

1) 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 :P. 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.
« Last Edit: June 29, 2010, 01:51:31 pm by shafri »
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11694
  • Country: my
  • reassessing directives...
Re: Safe Way of Detecting EMP by MCU
« Reply #7 on: June 29, 2010, 01:50:49 pm »
Do you need an MCU?
yes! coz i will need to do some routine upon pulse detection

If all you need to do is generate a pulse with a certain length or something, a logic gate IC will do.
yes! 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?
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11694
  • Country: my
  • reassessing directives...
Re: Safe Way of Detecting EMP by MCU
« Reply #8 on: June 29, 2010, 02:55:31 pm »
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 circuit
3) the signal just before the entry to the transistor (show some clamping at the top)... point 1
4) at point 2 without the cap
5) at point 3 with the cap (some noticeable attenuation, maybe becoz the resistor)
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11694
  • Country: my
  • reassessing directives...
Re: Safe Way of Detecting EMP by MCU
« Reply #9 on: June 29, 2010, 03:01:50 pm »
another...
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11694
  • Country: my
  • reassessing directives...
Re: Safe Way of Detecting EMP by MCU
« Reply #10 on: June 29, 2010, 03:47:56 pm »
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.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11694
  • Country: my
  • reassessing directives...
Re: Safe Way of Detecting EMP by MCU
« Reply #11 on: June 29, 2010, 04:18:11 pm »
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. hmmm ???
but still, the 2nd pic is more reliable in term of mcu interrupt trigger... and 1 less component :)

edited: 2 components less actually 2nd compared with 4th.
« Last Edit: June 29, 2010, 04:26:43 pm by shafri »
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline marianoapp

  • Regular Contributor
  • *
  • Posts: 67
Re: Safe Way of Detecting EMP by MCU
« Reply #12 on: June 29, 2010, 04:20:20 pm »
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
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11694
  • Country: my
  • reassessing directives...
Re: Safe Way of Detecting EMP by MCU
« Reply #13 on: June 29, 2010, 05:09:36 pm »
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?
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11694
  • Country: my
  • reassessing directives...
Re: Safe Way of Detecting EMP by MCU
« Reply #14 on: June 29, 2010, 05:15:33 pm »
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.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline scrat

  • Frequent Contributor
  • **
  • Posts: 608
  • Country: it
Re: Safe Way of Detecting EMP by MCU
« Reply #15 on: June 29, 2010, 05:30:33 pm »
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..
One machine can do the work of fifty ordinary men. No machine can do the work of one extraordinary man. - Elbert Hubbard
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11694
  • Country: my
  • reassessing directives...
Re: Safe Way of Detecting EMP by MCU
« Reply #16 on: June 29, 2010, 05:50:14 pm »
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 dog ;)

so 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. :)
« Last Edit: June 29, 2010, 06:06:17 pm by shafri »
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline marianoapp

  • Regular Contributor
  • *
  • Posts: 67
Re: Safe Way of Detecting EMP by MCU
« Reply #17 on: June 29, 2010, 06:10:19 pm »
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?

did you add a pullup resistor at the output of the comparator? (sorry i didn't include that on the schematic)
 

Offline Zad

  • Super Contributor
  • ***
  • Posts: 1013
  • Country: gb
    • Digital Wizardry, Analogue Alchemy, Software Sorcery
Re: Safe Way of Detecting EMP by MCU
« Reply #18 on: June 29, 2010, 08:51:51 pm »
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)

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19560
  • Country: gb
  • 0999
Re: Safe Way of Detecting EMP by MCU
« Reply #19 on: June 29, 2010, 10:29:35 pm »
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.
« Last Edit: June 29, 2010, 10:32:16 pm by Hero999 »
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11694
  • Country: my
  • reassessing directives...
Re: Safe Way of Detecting EMP by MCU
« Reply #20 on: June 30, 2010, 03:32:25 am »
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 why ???

seem 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.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline marianoapp

  • Regular Contributor
  • *
  • Posts: 67
Re: Safe Way of Detecting EMP by MCU
« Reply #21 on: June 30, 2010, 05:36:29 am »
arggh! you are killing me mariano! added the 10K pullup. the signal is normally high and just pulsing down a lil bit upon trigger (similar to previous pic, just reverse upside down), not what i actually wanted in the 1st place (its pulled high).

sorry that circuit was screwed up..  :-[

try the attached one  ;D
i 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 pulse


PD: zad's circuit requires an op-amp and you are using a comparator
« Last Edit: June 30, 2010, 05:38:42 am by marianoapp »
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11694
  • Country: my
  • reassessing directives...
Re: Safe Way of Detecting EMP by MCU
« Reply #22 on: June 30, 2010, 06:12:09 am »
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
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11694
  • Country: my
  • reassessing directives...
Re: Safe Way of Detecting EMP by MCU
« Reply #23 on: June 30, 2010, 06:29:48 am »
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.
« Last Edit: June 30, 2010, 06:31:30 am by shafri »
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17829
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Safe Way of Detecting EMP by MCU
« Reply #24 on: June 30, 2010, 11:45:31 am »
You don't want or need a transistor, chances are you will damage it anyhow
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf