Square wave signal from a flyback transformer not square? - Page 1
Forum section: electronics / projects

author: icecats
author_rank: Contributor
timestamp: July 03, 2023, 10:57:44 am
content: Hi,BackgroundI am working on a project that requires a higher voltage square wave signal. I am using a 555 based flyback driver to drive a small flyback transformer (with a very high frequency square wave). I am applying a secondary lower frequency square wave signal to pin 4 of the 555 timer to toggle the whole driver on/off. To test the circuit, I have connected an oscilloscope probe to capture the input square wave and another probe (via voltage divider) to capture the high voltage square wave output by the flyback transformer. The initial results are promising and the output wave resembles the input but has a few issues.Edit:Here's some additional information.input voltage = 9voutput voltage = ~1200vpower/current = (not sure; need to measure)signal square wave frequency = 10 Hz shown in scope capture, but would like to increase to 100's or 1000's of HzIssues1) The primary issue is that the "square" wave output by the flyback transformer suffers from a long fall time that rounds out the falling edge of the wave. This distorts the signal and severely limits viable frequencies that the signal can be transmitted at. What is causing this rounding and how can it be mitigated?2) A secondary issue is that the output square wave is quite noisy. How can the erratic spikes and noise be reduced or eliminated?Circuit diagram, circuit image, and oscilloscope capture have been attached.Thanks!

author: mskeete
author_rank: Contributor
timestamp: July 03, 2023, 11:25:02 am
content: Try adding a resistor across your output capacitor.There's nothing to discharge it except your scopeOutput diode looks like a 1n400x. Not great for high frequency. Try something like a 1n4148 depending on current required and output voltage.

author: Benta
author_rank: Super Contributor
timestamp: July 03, 2023, 07:58:47 pm
content: Oh dear.A flyback is probably the very worst topology for this kind of thing.Your information is extremely skimpy.Input voltage?Output voltage?Power/current?Frequency?

author: icecats
author_rank: Contributor
timestamp: July 03, 2023, 08:07:09 pm
content: Quote from: Benta on July 03, 2023, 07:58:47 pmWhy would a flyback be the worst for this application?Here's some additional information.input voltage = 9voutput voltage = ~1200vpower/current = (not sure; need to measure)signal square wave frequency = 10 Hz shown in scope capture, but would like to increase to 100's or 1000's of Hz

author: Benta
author_rank: Super Contributor
timestamp: July 03, 2023, 09:16:53 pm
content: Quote from: icecats on July 03, 2023, 08:07:09 pmBecause you stated that you want a nice square wave ouput. The output of a flyback is dependent on load. And on the control strategy. And it very seldom looks like a nice square wave. Lots of ringing, spikes, no 50% DC etc.Stepping up from 9 V to 1200 V is certainly possible, but you're going to have lots of fun designing the magnetics..

author: Zero999
author_rank: Super Contributor
timestamp: July 04, 2023, 10:05:33 am
content: 10Hz is also far too low for a transformer, without it being huge.You're better off designing a DC:DC converter and switching the output.

author: icecats
author_rank: Contributor
timestamp: July 04, 2023, 10:43:06 am
content: Quote from: Zero999 on July 04, 2023, 10:05:33 amThe actual flyback transformer is being driven via the 555 at something on the order of 20 kHz. I am the attempting to toggle the whole device on and off via the 555 reset pin at a lower frequency (currently 10 Hz).

author: Zero999
author_rank: Super Contributor
timestamp: July 04, 2023, 10:49:13 am
content: Quote from: icecats on July 04, 2023, 10:43:06 amSory, I didn't look at the schematic.It's exactly what you should expect to happen. The output capacitor will take awhile to discharge, hence the sluggish fall time.

author: icecats
author_rank: Contributor
timestamp: July 04, 2023, 11:05:49 am
content: Ok yeah that makes sense. I think the things I have to try are:1) increasing the load across the capacitor2) a smaller capacitor3) some other form of HV generator. I've looked into Cockcroft-Walton multipliers but they seem impractical for this large of a stepup.

author: NiHaoMike
author_rank: Super Contributor
timestamp: July 04, 2023, 02:23:03 pm
content: If you need the fall time to be relatively short, have you considered a high voltage transistor of some sort switching in a relatively low value load resistor?

author: icecats
author_rank: Contributor
timestamp: July 05, 2023, 11:24:57 am
content: I added a resistor across the capacitor on the output side of the flyback and the falling edge time is much better; the output signal is looking more like a square wave!Now I need to figure out how to eliminate some of the higher frequency noise in the system... I think that a low pass filter will be what is needed here.

author: ArdWar
author_rank: Frequent Contributor
timestamp: July 05, 2023, 11:34:00 am
content: Try experimenting with different switching frequency and duty cycle.I wonder why the HF noise is periodic. Is it actually like that, or is it just scope aliasing?

author: rhb
author_rank: Super Contributor
timestamp: July 05, 2023, 02:39:24 pm
content: Quote from: icecats on July 05, 2023, 11:24:57 amMake a small diameter H field probe and use that and scope probe with no hook or ground as an E field probe to locate where it's coming from. A comb filter that only passes the odd order harmonics should give a clean square wave. Unfortunately, at the moment all I know about comb filters is they exist because my HP SAs have them.The Fourier transform of a spike train is a spike train in the other domain, close spacing in one is broad spacing in the other domain. It's an analog IIR filter.Keep us posted on your progress. You've taken on a difficult project.Have Fun!Reg

author: icecats
author_rank: Contributor
timestamp: July 07, 2023, 10:39:39 am
content: Quote from: icecats on July 05, 2023, 11:24:57 amThe resistor is great in that it discharges the capacitor quickly enough when the flyback is switched off. However, the resistor puts a sizeable voltage drop on my circuit when the flyback is switched on. Obviously this is to be expected, but any thoughts on ways to reduce the voltage drop? The bleed time and voltage drop have inverse requirements from the resistor value, so there is an optimal resistor value where the bleed time is sufficient and the voltage is dropped minimally.Quote from: NiHaoMike on July 04, 2023, 02:23:03 pm@NiHaoMike suggested switching in the resistor with a transistor. I think this is a great idea but I am having trouble finding high voltage transistors that would put up with several kV.

author: Wolfram
author_rank: Frequent Contributor
timestamp: July 07, 2023, 10:45:15 am
content: If you have some exact specifications on voltage, rise and fall time, current, and output current, it will be much easier to suggest a working solution. Even better if you can describe the problem you are trying to solve in the first place with the circuit.

author: icecats
author_rank: Contributor
timestamp: July 07, 2023, 12:40:43 pm
content: Quote from: Wolfram on July 07, 2023, 10:45:15 amYou are right. I need to better define the problem and the requirements.Problem:I have an existing single insulated wire that traverses several miles on a property. I am trying to build a single wire earth return (SWER) system that can make use of this wire for communication purposes (not power transmission). My plan is to have a transmitter on one end of the wire that can modulate a high voltage signal and send it through the wire. On the other end of the wire a receiver will receive this signal and decode it. Wireless communication methods are not practical due to hills, trees, and buildings that block signals.Specifications:Indeed your question makes me realize that I don't know the exact specifications to accomplish this. My research shows that other SWER systems typically use high voltages to overcome resistance between the device ground and earth, so I was targeting a starting voltage for my first prototype on the order of 2-3 kV. Since I will just be measuring the voltage, I believe the current requirement is very low. Therefore, I can formulate the following specs:transmitter input voltage: 9vtransmitter output voltage: 2-3 kVtransmitter output current: <100 mAtransmitter output pulse frequency: 100-1000 Hztransmitter pulse rise/fall time: dependent on frequency, <0.0001 seconds

author: DavidAlfa
author_rank: Super Contributor
timestamp: July 07, 2023, 02:17:34 pm
content: Use push-pull or load the secondary with a resistor, otherwise the "0" will be floating, having a very slow falling time.

author: rhb
author_rank: Super Contributor
timestamp: July 07, 2023, 07:41:21 pm
content: Quote from: icecats on July 07, 2023, 12:40:43 pmExcuse me, but 2-3 kV is nuts! And probably not even possible with a 9 V input. You *could* get 2 kV using a microwave oven transformer with 120 V input. But based on what you've said so far, I think you'd probably kill yourself.1 watt of RF will propagate through the free space to be readily heard 500 miles away. What is the problem you are trying to solve? It doesn't appear to me that you have properly defined your problem. Until you do that, you have only a very small chance of success.A rise and fall time of 100 microseconds requires a bandwidth 3.5 kHz. Your 1 kHz pulse frequency will look like a sinusoid with only the fundamental & 3rd harmonic.If you have a function generator that will generate a pulse modulated 1 MHz signal and couple it to the wire with a few dozen turns of wire. Then walk along the wire with a portable AM radio and see how far you can pick the signal down the wire.At 100 mA you are proposing to inject a 200-300 W signal into the line. FCC will likely pay you a visit if you're in the US and interfere with DoD VLF comms with ballistic missile subs. And if you're not in the US it might be a lot more serious, a visit from some group of special operations folks from CIA or DoD to arrange a fatal "accident".You really need to read the FCC part 97 regulations before you continue. You also should read Leo's comments about ITAR and fast rise time pulses. Above a certain voltage and less than a certain rise time it's considered a nuclear weapon part.A US Army Colonel met 3 Japanese liaison officers in Iraq. They were much enamored of the ACOG sights we were using. When the colonel got back to the US, he bought 3 at a retail store attempted to send them to Japan as gifts. US Customs intercepted them and the colonel was sent to Leavenworth penitentiary for several years.Reg

author: DavidAlfa
author_rank: Super Contributor
timestamp: July 07, 2023, 08:38:19 pm
content: Rhb, you can get 10kv from even a 1.5V batteryIt's the current what kills!

author: Zero999
author_rank: Super Contributor
timestamp: July 07, 2023, 09:28:07 pm
content: Of course it's possible to make any voltage from a 1.5V battery, in theory.There's no need to use such a high voltage in this case. If the wire is to transmit a near field, use a much higher frequency and lower voltage. The wire will act like a transmission line.

author: rhb
author_rank: Super Contributor
timestamp: July 08, 2023, 12:18:26 am
content: Quote from: DavidAlfa on July 07, 2023, 08:38:19 pmApparently you overlooked the <100 mA current. Yes, there are gag items that shock the victim with a HV pulse from a very low voltage, < 5 V but both current and pulse durations are very short and the electrodes close together. Where the current flows is what matters. Which is why people keep their weak hand in their pocket when working on HV circuits. If the requirements stated <10uA, it would be different. But that's not what it says.As shown in the chart, shock is relatively more severe as the current rises. For currents above 10 milliamps, muscular contractions are so strong that the victim cannot let go of the wire that is shocking him. At values as low as 20 milliamps, breathing becomes labored, finally ceasing completely even at values below 75 milliamps.As the current approaches 100 milliamps, ventricular fibrillation of the heart occurs - an uncoordinated twitching of the walls of the heart's ventricles which results in death.If you look at normal wire the insulation is typically only rated for 600V. Put a 2-3 kV pulse on that wire and it will result in the insulation breaking down making it very dangerous.But there is simply no justification for such high voltage signaling.BTW The OP also needs to read Part 15.Reg

author: icecats
author_rank: Contributor
timestamp: July 08, 2023, 02:05:37 am
content: RHB and others I appreciate the ideas and feedback.@RHB Your point is taken about the current. Indeed I do not need 100 mA. My research suggests that the required current would be low, so I indicated <100 mA. I now realize that in this context that is not a low current at all. I revise my current specification to something much lower, but I'm not going to put a number on it because I frankly don't know.I will be using a flyback circuit to generate the high voltage from a 9v battery.I am going to research the other ideas suggested including a lower voltage, using the wire as a transmission line, and other RF methods.This project is intended to be a learning project for me and as you can see it is becoming exactly that.Thanks for the help.

author: NiHaoMike
author_rank: Super Contributor
timestamp: July 08, 2023, 12:37:42 pm
content: Try 50V, should be plenty to stand out over the noise but still be low enough to be "low voltage" by safety standards.

author: icecats
author_rank: Contributor
timestamp: July 10, 2023, 11:15:34 am
content: Quote from: Zero999 on July 07, 2023, 09:28:07 pmCan you please expand on how this would work? Are you saying that if a low voltage but high frequency signal were sent down the wire, a radio signal would be emitted that could be picked up in close proximity to the wire? Would this type of circuit still use earth as a return current path? What is this type of system called so I can do some research?Thanks!

author: rhb
author_rank: Super Contributor
timestamp: July 12, 2023, 10:45:36 pm
content: That is precisely what I'm saying. You're trying to kill flies with a 155 mm M777 and Excalibur shells.If you don't have a function generator, buy a tinySA from a reputable source i.e.*NOT* ebay. Set it to produce a 1 MHz output with a 500 Hz 250 ms AM sweep. Connect the center lead to the wire and the shield to a good ground and walk along the wire with the radio against the wire.The signal is only 1 mW, so you may need a bit more power to get the whole distance. A quick first test would be to connect the antenna input directly to the wire at the other end. Odds are actually very good that 1 mW (0 dBm) is enough to control anything with a low data rate. You can buy dedicated line tracers from Harbor Freight and many others for <$20 US.Have Fun!Reg