Shop OBEX P1 Docs P2 Docs Learn Events
Interfacing with 100 volt AC pulse — Parallax Forums

Interfacing with 100 volt AC pulse

James LongJames Long Posts: 1,181
edited 2007-01-12 16:36 in General Discussion
I need to interface with a 100 volt AC pulse signal. It maybe less...it maybe more. It is an unregulated voltage where I need to interface with it.

Could I use a clamping diode to read the signal??

Thanks,

James Long

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-01-10 17:37
    James,

    What do you need to be able to do with or get from the signal? That would help with a possible answer. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • James LongJames Long Posts: 1,181
    edited 2007-01-10 17:43
    Wow....I lacked the most important thing. I just need to get the frequency of the pulse. (how often it happens)

    Sorry Chris....I'm not all there today.

    James L
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-01-10 18:24
    Trust me, I understand that…Misread something in another thread myself…Okay, so here’s what you could do…The only part I am confused on is detecting a pulse in an AC signal, because AC is constantly driving positive and negative…Assuming you just mean a pulse of AC and measuring the frequency you could use an Optocoupler. A part such as TIL111 can be connected to the AC line using the appropriate resistor size and the output would be an open-collector output (NPN). The output could be pulled-up through a resistor and the also fed into an I/O pin and use the COUNT command to measure frequency. I hope this helps. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • James LongJames Long Posts: 1,181
    edited 2007-01-10 18:52
    Chris...

    I know your not the engineer type but can I use the following:

    TOSHIBA PHOTOCOUPLER GaAs IRED & PHOTO-TRANSISTOR 11-3A1

    I have it designed in the circuit already....



    James L
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-01-10 20:35
    James,

    My engineering days were in the 90’s through 2003…I used to design around the Z80 and 6502 and used the opto to get 60Hz into my CPU for NMI to run the software RTC and handle some other update tasks. But things haven’t changed all that much. I'm just more in hobbyist mode now. Do you have a datasheet (or a link to it) for the opto module?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • James LongJames Long Posts: 1,181
    edited 2007-01-10 21:25
    Sure...

    http://dkc3.digikey.com/PDF/T071/1969.pdf

    It is a simple device....I just couldn't find an opto that was surface mount at the time I was drawing.

    James L
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-01-10 21:53
    James,

    That catalog page doesn’t seem to have the model you specified previously, but there are a number of units that could work on the page. You will need the datasheet since this catalog page doesn’t list the forward voltage for the LED, only the forward current. But with it you can calculate the resistor required based on the maximum expected input voltage. If you use one that has the base pin brought out you can use it to fine-tune the phototransistor’s response and bias which I have found useful in this type of application.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • James LongJames Long Posts: 1,181
    edited 2007-01-11 15:16
    Chris,

    I was just making a parts list...and found the part I was planning on using is a non stock item.

    I changed to a different part, but basically the same. It has a forward diode voltage of 1.14 to 1.4.

    http://rocky.digikey.com/scripts/ProductInfo.dll?Site=US&V=51&M=PS2811-1-F3-A

    Thanks,

    James L
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-01-11 15:38
    James,

    Just about any general purpose unit should work. As long as you know the Forward Voltage and Forward Current you can use ohm’s law to calculate the necessary resistor. I was about 12 years old (seems so long ago) when I first needed to do this for a project, so I first experimented on the secondary output (12V@300mA) of a transformer I got at Radio Shack to see how this would work. That way I was working with lower voltage and the current was less. Always check the voltage on the secondary. Don’t just go by the rating if you do this. Anyway, you can then see what the output will look like to see if it is useful for your application. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • James LongJames Long Posts: 1,181
    edited 2007-01-11 15:53
    That is a great idea...a step down...will give me the real output of the pulse...well ratio wise anyway.

    Wow....I bet that was long ago, was for me.

    James L
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-01-11 17:29
    James,

    You could use the transformer direct or just for experimenting with the signals before direct connection to the 100VAC. It is your choice. Of course the transformer is safer in a sense, but you still have to connect to the 100VAC at some point, so be careful! I’ve learned a lot of respect for electricity over the years…Which also explains why I work with high voltage stuff a lot less. Let us know how you make out. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • James LongJames Long Posts: 1,181
    edited 2007-01-11 18:28
    I just thought of a problem with the resistor. I'm not sure, but I think the AC voltage changes....so I will need some kind of clamping diode as well.

    To keep the voltage within limits.

    James

    But thanks for all the help ......you have great ideas.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-01-11 18:54
    James,

    The LED inside the opto is a diode and should work as long as you have the proper resistor to limit the current. Again, this is where experimenting comes into play. Many optos will have the specification for reverse voltage but current is the bigger factor. I may have to revisit my notes from back then…

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • stamptrolstamptrol Posts: 1,731
    edited 2007-01-11 19:03
    ·· Just a·quick point. Chris is right, the led in the opto may not have a very high reverse voltage rating.

    ···There are AC type optos that use two internal leds in back-to-back configuration. Or, you can use an external diode to limit the voltage in the "unwanted" swing of the AC wave.

    · Cheers





    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-01-11 20:08
    Tom,

    Thanks for stepping in…As I said, it has been awhile…So, I did just what I did back then…A little research. I’m going to attach a couple of pics and the first quote below is an excerpt from the page these came from. Your comments are sort of covered in this too with the second diode…The second quote is from another forum regarding AC and LEDS. And finally a link to another page that deals with the topic. Hopefully this will provide enough information to approach this on a better foot. During lunch I looked at my notes and in fact I was using an opto designed for AC, though I have a schematic I didn’t list the part number (probably because it was a one-off). Anyway I hope this helps. Take care.
    Somebody said...
    The circuit below illustrates powering a LED (or two) from the 120 volt AC line using a capacitor to drop the voltage and a small resistor to limit the inrush current. Since the capacitor must pass current in both directions, a small diode is connected in parallel with the LED to provide a path for the negative half cycle and also to limit the reverse voltage across the LED. A second LED with the polarity reversed may be subsituted for the diode, or a tri-color LED could be used which would appear orange with alternating current. The circuit is fairly efficient and draws only about a half watt from the line. The resistor value (1K / half watt) was chosen to limit the worst case inrush current to about 150 mA which will drop to less than 30 mA in a millisecond as the capacitor charges. This appears to be a safe value, I have switched the circuit on and off many times without damage to the LED. The 0.47 uF capacitor has a reactance of 5600 ohms at 60 cycles so the LED current is about 20 mA half wave, or 10 mA average. A larger capacitor will increase the current and a smaller one will reduce it. The capacitor must be a non-polarized type with a voltage rating of 200 volts or more.
    Somebody else said...
    Let's approach the issue from a practical standpoint, using Ohm's Law. First, determine what resistor will provide 20mA of current through the LED.

    Assume 120 volts, and an LED drop of 4 volts. The voltage across the resistor is therefore 116 volts, so the correct resistance is 116/0.02 = 5.8K.

    Next, we need to examine the reverse characteristics, since AC is reverse voltage half the time. A typical Nichia leaks 50uA, according to http://www.nichia.co.jp/lamp-e.htm, and is rated 5 volts reverse max.

    If the backward LED leaks 50uA and can tolerate 5 volts, what is its effective resistance at breakdown? R = E/I = 5/50E-6 = 100K.

    Put a 5.8K and a 100K in series across a 120-volt source, and you get 113 volts across the 100K LED---way too much.

    What's the solution? Put a regular diode in series with the LED, one rated to handle at least 170 peak inverse volts and less than 50uA of leakage current.

    A common 1N4003 will do nicely. It typically only allows 0.05uA in the reverse direction, 10uA max. Even at 10uA, the LED only sees 1 volt, which is well below the 5 volt max.
    http://www.otherpower.com/otherpower_lighting_leds.html

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support


    Post Edited (Chris Savage (Parallax)) : 1/11/2007 8:12:42 PM GMT
    613 x 265 - 3K
    613 x 265 - 3K
  • James LongJames Long Posts: 1,181
    edited 2007-01-11 20:29
    Very interesting.......

    Thanks for the research Chip. Wow....now that is support.

    James L
  • James LongJames Long Posts: 1,181
    edited 2007-01-11 22:35
    Ok....I just switched to an AC input opto:

    http://rocky.digikey.com/scripts/ProductInfo.dll?Site=US&V=425&M=PC3H4J00000F

    It was just easier......and I'll add a resistor to limit the current.

    Thanks for all the input guys.......

    James L
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-01-11 23:15
    James,

    I was re-reading part of the beginning of the thread and was thinking maybe this got over complicated depending on if I misunderstood exactly what you were looking for in the signal. You mentioned frequency of pulse so I assumed you meant the 60Hz signal, which the circuits I mentioned are perfect for detecting. If you’re just looking to see if there is 100VAC turned on at a given time, then you can do that with a small rectifier circuit to get DC only to the LED. As the circuit is now, you’re going to be measuring the frequency of the AC sine wave. I don’t know why this just clicked in my head, but I thought I better double check. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • James LongJames Long Posts: 1,181
    edited 2007-01-12 01:27
    Chris....

    I'm trying to measure the pulses out of a special alternator on an engine. The frequency will give me the RPM. It is a magneto type. So measuring the frequency is basically what I'm tyring to do.

    I just didn't phrase my question right....which was an error on my part. The major problem is I believe the voltage changes with RPM.

    I do appreciate all the reference material. you have been a big help.

    I will try to ask the questions right from now on....to avoid confusion.

    James L
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-01-12 16:19
    Good luck with it. Let us know how it works. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Tom WalkerTom Walker Posts: 509
    edited 2007-01-12 16:36
    ...if there's no DC component, how about a zero crossing detector?...

    (mental burp)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
Sign In or Register to comment.