Switching one of those high voltage modules. - Page 1
Forum section: electronics / projects

author: 7kasper
author_rank: Newbie
timestamp: April 24, 2021, 11:36:20 pm
content: Hello!I am trying to electronically switch one of those goop-filled no-brand high voltage modules..To design a proper circuit for this my first step was to find a datasheet. ERRrrr no luck.While you can find these modules from many different suppliers, none of them seem to have a datasheet.If you directly contact them they say they are just resellers and don't have a datasheet (this whole thing seems sketchy to me (like the bogus 400kV claims) but yeah they are quite cheap and useful for some stuff)The next stop for me was just to try it out. Connecting such a module to a battery and a button works fine.So to switch it electronically I just slap a mosfet on it and be done right? Well probably not.I reckoned that there would probably be some inductive load on these things. According to the very limited specs on the sellers site they work on 3-7.2V drawing around 3-4Amps. So the first thing I tried was something similar to a motor switch I remembered.After hooking this up to a LED and using a microcontroller to switch it, the circuit works fine.Then I connected the module, turned it on, it went on for a few sparks and then boom everything went off.No smoke, not visible damage but the microcontroller and power supply chip are suddenly toast.Is the circuit not proper for the job? Perhaps a clamping diode is needed? Maybe the diode is not fast enough?Its really irritating because you are working with much unknowns and I am also not super experienced on this.I tried measuring the input voltage of the module and it is absoluteIn this tiny experiment I only had a 1A PSU available, so that might make it a bit different because of the current limiting. Still the input voltage jumped all over the place:To find more about the workings and then hopefully be able to switch it, without knowing the datasheet is to make the datasheet ourselves.I have recently found a teardown (https://www.instructables.com/Reverse-Engineer-Resin-Encapsulated-High-Voltage-M/) and am also planning on doing my own.Nevertheless I thought it be a good idea to ask here. Perhaps someone can shed some light on how to do this (better).Any help is much appreciated!

author: T3sl4co1l
author_rank: Super Contributor
timestamp: April 25, 2021, 05:41:21 am
content: What did your layout look like?High voltage sparks represent a tremendous amount of power. It may seem innocent enough to us squishy meatsacks, a cute pop and flash of light. But the peak power, and EMP blast, can easily destroy nearby semiconductors, especially on wires. A compact layout on ground plane is demanded, probably with protective devices on connecting wires.Best is to just avoid the intense discharge in the first place. Use a high voltage rated resistor in series with the output, to limit peak discharge current from the filter capacitors.Diode destruction is surprisingly uncommon I guess, but could easily follow capacitor failure (which is also likely under those conditions). Small HV diodes are only rated for so many amperes peak surge current, and you're asking for hundreds or thousands here.Tim

author: Terry Bites
author_rank: Super Contributor
timestamp: April 25, 2021, 10:37:02 am
content: A flyback diode is s a must.I'd put some current limiting in your circuit to protect the swich. Or combine the functions with a LTC1153 or similar.

author: fcb
author_rank: Super Contributor
timestamp: April 25, 2021, 12:19:49 pm
content: Switch the +ve side, keep the -ve side tied to your system ground. The likelyhood is that the -ve side of the module may also be the -HV.

author: 7kasper
author_rank: Newbie
timestamp: April 25, 2021, 01:42:20 pm
content: Thank you very much for your replies!Quote from: T3sl4co1l on April 25, 2021, 05:41:21 amQuote from: T3sl4co1l on April 25, 2021, 05:41:21 amYeah I suppose the power can be over 9000. The layout has a groundplane on the back also. The high voltage module is connected via JST and is quite far away from the PCB. The arching is even further away (over 15 cm currently. Later on I want to try a bit closer like 5cm but with isolation)Quote from: T3sl4co1l on April 25, 2021, 05:41:21 amHmm that is interesting. Not entirely sure yet if that would work for my application. I do need a good shock/arc to get things going, but its worth a try I guess.Quote from: T3sl4co1l on April 25, 2021, 05:41:21 amHmm they do advertise 2-5A input current (for what its worth). Do you think the surge from the low-side of the module can be so high as well? The diode (at least I think) is rated at 30A surge.Quote from: Terry Bites on April 25, 2021, 10:37:02 amD1 is the flyback. Do you think its adequate? I would prever (also) current limiting on the low voltage side.Quote from: fcb on April 25, 2021, 12:19:49 pmInteresting.. From my measurements I thought it was floating, but I might also want to ground the HV part at some point anyway.Perhaps a smart high side switch is an option. Something like the BSP752T? I'd have to find something that works at 3v3 though.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: April 25, 2021, 04:22:19 pm
content: Erm... I was hoping for a somewhat wider shot, like, the actual whole board (top and bottom), and a photo including the highvoltageybits and all connecting wires?(I'm reminded of the old joke about the guy in the hot air balloon. Though I'm not sure just yet if I'm the balloonist or the guy he's talking to.)Tim

author: 7kasper
author_rank: Newbie
timestamp: April 25, 2021, 07:24:22 pm
content: Quote from: T3sl4co1l on April 25, 2021, 04:22:19 pmOk Tim, I don't know about the balloon but I'll try to give information of useThis is the entire PCB.And the underside.I am pretty new to all of this and also layout. In fact this is my third non-perfboard PCB. So I still have many things that I don't know that I don't know if you understand what I mean. At least most of the digital stuff worked even with perhaps not ideal layout-ingHere is a video of the (yolo) experiment:Quote from: edavid on April 25, 2021, 03:36:24 pmThe large cap seen on the board is directly between the Vsys and ground. It is quite far away however... The zener transorb sounds good to have either way. I'll look into that.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: April 26, 2021, 01:33:25 am
content: Okay yeah, you've got wires everywhere... and another board, what's that? Looks like it's plugged into the... "debug" port? And one big swooping (something to orange to red) wire off it, right past the spark? It's like you wanted an antenna!Board doesn't have much ground stitching, and ground pours with a whacky outline... who knows what that's like. But those fly leads are a top priority.What's actually toast? The ESP32? Dead dead, or did it recover after power cycle? Programmer see anything on it but some pins don't work, or dead dead dead?Tim

author: 7kasper
author_rank: Newbie
timestamp: April 26, 2021, 07:07:58 pm
content: Thanks for taking the time Tim.Quote from: T3sl4co1l on April 26, 2021, 01:33:25 amYeah.. I know not very professional perhaps. The wire was a good 5cm from the actual spark but I am not sure if that is good enough.The extra board has only electronic fuses on it and is just for battery protection.Quote from: T3sl4co1l on April 26, 2021, 01:33:25 amWhat do you mean with stiching? Place more vias between the ground pours? Also yes the outline is very ugly, my rough sketch made it onto the boardDo you think its likely the sparks could have caused the issue by virtue of radiation/interference and not the power draw on the low side?In other words is it more like an EMP that is devastating? Or probably its a combination of the twoQuote from: T3sl4co1l on April 26, 2021, 01:33:25 amOk at first I thought indeed everything deaddeaddead. However it seems only the bq25895 (li-ion and power IC) is completely dead. Doesn't blink its status led (which it should do on a fault) and outputs no power.The ESP32 is another story. It does turn on with external power. Connecting the ESPProg it does interface still and a simple blink sketch worked on the onboard led. Now the interesting part. The led blinks much less bright and it keeps restarting when trying the WiFi. Perhaps that part is toast or somehow it doesnt want to draw the current. After measuring a non-fried board it seems that the fried board tries to draw 550mA for simple blink while the non-fried board draws just 50mA. Perhaps that might indicate one of the pins shorting internally or inside the mosfet?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: April 26, 2021, 07:51:19 pm
content: Yes, vias between ground pours, especially at trace/bus crossings (three or four vias), and every so often alongside traces, beside components, etc.Here's a closeup of good stitching,Note the ground in red, coming in from the top right, with a via beside a pin (just out of view, the spoke is just visible), making a peninsula down and to the left. Two vias stitch the peninsula to the bottom side copper, also stitching around the bottom side trace which makes a slot in it there. Likewise the bottom section (around the "D2" text) goes from left to right, with two vias partly to stitch around the trace exiting bottom of view, but also kinda just to have extra connectivity in the area. (These two vias, specifically, don't really need to be very close together, as the loop between vias, around that trace end, is quite small. Stitching has more value in the middle, like on the above trace.) And top-left, a bit of ground pours between pads of a component (an SOIC) with a stitching via.A board that size, will probably have a few hundred stitching vias. They can be autogenerated in some cases, though not usually very well (i.e. not paying attention to trace/bus crossings, peninsulas, etc.). Just another fiddly thing to put in the list of PCB review items.As for the EMP, it's partly proximity to the spark itself and nearby components (wires, generator), and partly the wires going to the unit (conducted).Consider: it only takes a volt or two to momentarily corrupt logic levels in a digital circuit, hundreds of volts to cause persistent upsets (that needs a power cycle to clear), and hundreds to thousands of volts (depending on condition) to cause physical damage. And your spark is tens of thousands. So there's two decades of wiggle room, to go from that high voltage spark, over to nearby circuitry, and still cause severe problems. Logarithmically, that's on the order of 40dB attenuation. Which you probably have less than, between spark and that nearby loop for example.Distance is your friend, when it comes to radiation. Simply putting the module out on longer leads (a meter or two), away from anything of significance (including any nearby metal!), may help. That at least isolates it down to (mostly) just the connecting leads. Which can be filtered (with LCs) and protected (with TVS) as others have described. There still may be problems, as the module itself can be doing nasty things with respect to its surroundings (i.e. generating common mode noise), so it's still not a slam-dunk solution -- but it at least gives your circuit a better chance of success.Closing sensitive loops is likewise helpful. Keep fly leads close to the board, and keep wires in a cable/bundle/harness/etc. close together, preferably twisted. Big open loops near the spark, big no-no.This applies within the board itself, which is why having a good, solid ground plane is so important. You don't want to have voltage offsets (even transiently) between different parts of the circuit, due to differences in ground voltage.Sparks have risetimes in the sub-nanosecond range -- it is very much meaningful to think in terms of a blast of electromagnetic radiation, expanding (propagating) at the speed of light around the offending source. The quarter-wave length of 1ns is only 75cm -- the voltage drop along a wire of the same length can be (momentarily) very high indeed (i.e., many kV, if struck directly)!It sounds like you have a pattern of at least two devices failing in some dubious manner -- there are still other possible explanations, but it sounds like this is the most likely case.And who knows what else on the board is affected; it may be worth doing a diode test between the pins of everything, see if you can find any other suspected failures.And yes, high supply current is a possible partial-fault condition in these situations. Precisely what happened, might be something like: one or just a few pins got blasted by EMP, causing the pin drivers / ESD clamp diodes / whatever to fail shorted, or at least low resistance. Much of the chip remains functional as usual in that case, but there's a surgical hole blown through certain pins, or certain functionality, etc. It wouldn't have taken much more energy for the chip to fail in a more comprehensive manner (e.g., supply shorted, multiple pins damaged, VDD overvolt causing damage to core logic functions, etc.).Semiconductors have very small structures indeed (sub-micron size); respect them carefully. It takes invisible amounts of charge to blow out such tiny things. That they put up with so much of the abuse we give them (like just ordinary handling -- even with ESD precautions, transients might be on the order of 100s V), is a testament to how reliable our processes, for the most part, are!(And yes, to be perfectly clear -- ESD is a  human-generated EMP event; albeit a small one, but no less destructive to semiconductors up close enough!)Tim

author: jonpaul
author_rank: Super Contributor
timestamp: April 26, 2021, 08:52:15 pm
content: The Chines 2$ modules are a knockoff of the classic inverter/HV transformer/ crokofft walton multipkiuer.They need a lytic and plastic cap bypass on the input and a solid and short ground (earth) retun on the minus. Only switch the plus power, never the ground.Stored energy is easily calculated as the total VM capacitance is ~ 50 ...500 pF.1/2 CVexp 2 = energy in joules.Running these is risky for more than a few minutes and continuous op guarantees blowup.Any HV device near or connected to any CPU/Arduino etc required "bulletproof" transient protection.Finally expect a lot of CM and DM HF noise back to the input DC, the Chinese dont care as long as they get some money.Enjoy,Jon

author: 7kasper
author_rank: Newbie
timestamp: April 28, 2021, 11:20:35 pm
content: I'm going to try to fix up my groundplane (stiched and better curves) and not use loose wires. Also placing the module far from the electronics.Besides that, do you think this switching circuit would work?From the scope it seems there is much action going on at around 6kHz so I thought a lowpass around 1Khz would make things better? I added the P6SMB6 TVS diode as well as making the whole thing be switched on the high side.Is current limiting and perhaps something for CM noise like a power choke also a required/good thing?Thanks many times again.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: April 29, 2021, 11:12:22 am
content: Hm, remove C9, unless you want it to momentarily start on! Maybe add a 10k between Q9 and Q8 (series gate resistor) to slow turn-on.The filter isn't really a big deal I think -- if you need to keep those frequencies out of your source, sure, but without a good reason otherwise, it probably doesn't matter.Common mode filtering, depends what you want to do with that spark. If it's only ever sparking to itself, and again, put a HV series resistor there to limit discharge current, it shouldn't be so bad; there will still be EMP from it, so it should be set aside, shielded, maybe bypassed to the shield as well (meaning some ~nF size caps from each lead to shield). This is natural if it's, like, a spark ignitor in an enclosed metal furnace or something: the metal chassis serves as shield, so the wires can be cap-bypassed to it (or one wire grounded directly if it doesn't need to be floating), and that keeps a huge amount of noise away from the circuit. A common mode choke (of some mH) might be used to clean up the rest, and the circuit can then be relatively quiet and ordinary.If you want it to spark to something else, then the return current of that spark has to flow through the cable, across your circuit and out whatever else acts as a return path. Your circuit will probably need to be shielded, so that that current can flow over the shield, away from the circuit, and similarly any wires passing through that shield must be bypassed to it, where they enter. A common mode choke is useless here: the return current has thousands of volts behind it, it will always find a route. (Seeing sparks across turns in a CMC is a common sight when testing equipment for ESD. Often spark gaps are placed under the PCB, across the CMC windings, for exactly this reason: breakdown across the PCB surface is safer than breakdown between enameled wires that will compromise the integrity of the CMC itself.)Tim

author: 7kasper
author_rank: Newbie
timestamp: April 29, 2021, 01:26:16 pm
content: Quote from: T3sl4co1l on April 29, 2021, 11:12:22 amYep that cap was a mistake already removed it. Gate resistor seems like a good idea. It is not much of a problem that the switching is a bit slow or the transistor takes a bit of heat (as long as its within spec) every now and then. The highvoltage module is only switched on briefly and at most at a frequency of like 0.3 Hz and even then more likely it will be off for hours.Quote from: T3sl4co1l on April 29, 2021, 11:12:22 amThe microcontroller is powered from LDO connected to the same VSYS so I am not entirely sure if filtering is still needed or not.Quote from: T3sl4co1l on April 29, 2021, 11:12:22 amThe circuit I am working on is not a spark igniter its more like a 'smart' electric fence. There is a sparkgap that will limit the voltage to at most around ~5kv.Besides the possible returning current for the EMP pulse of the spark its also good to shield the electronics a bit. How would you propose to bypass the shielding? Are pcb spark gaps like you mentioned being used for ESD safety an option here?With kind regards.

author: Zero999
author_rank: Super Contributor
timestamp: April 29, 2021, 02:28:29 pm
content: How about a relay?The MCU can also be powered using an isolated DC:DC converter, that way, there will be no electrical path between the high voltage module control side.