AC mains soft start 50Hz 230VAc 10:1 transformer or HF 100kHz GDTs 12V 1:1 - Page 1
Forum section: electronics / projects

author: eneuro
author_rank: Super Contributor
timestamp: August 22, 2015, 01:44:39 pm
content: Hello,I'm looking for small SMD trasformers rated (50Hz) at 230VAC primary and few mA (10mAmax) and secondary 12VAC-24VAC also a few mA.Simple simulation shows that it could work also with 1:1 since transformer secondary doesn't have to be low voltage, so limiting primary current to lets say 10mA, will give the same output, but it could be better step down this secondary voltage to 12VAC, while I do not need more than 12DC rectified output, so probably transformer primary could be 1mAmax or so, since secondary load will be <0.1mA or even less, depending on AC mosfets switch gate resistor used.Probably, I've entered something wrong at Digikey page or TME, since I had problem find any usefull SMD transformer (small THT can be good for prototype too) with shown ratings aboveMaybe, someone used in recent projects some cheapy small 230VAC -> 12VAC very low power trafos from TME or Digikey or Mouser and could help find something capable for SMD soldering in reflow oven or rather I have to forget about SMD version and look for some THT trafo?If I will not be able to find anything cheapy, I can still use high frequency GDTs and swithing primary at 100kHz will do the job, but I've AC mains 50Hz available, so I thought that maybe some cheapy 50Hz low power trafos are available in SMD versions, but struggeling to find anything usefull....Yep, maybe low power 100kHz full bridge or flyback SMPS will be fine, after rectifing 230VAC mains and limiting current to 10mA-20mA, while I need galvanic insulated (floating) 12V-15V for AC mosfets switch from 230VAC mains, but if someone used last time small cheapy SMD 50Hz 230VAC->12VAC or 24VAC trafos let us know

author: eneuro
author_rank: Super Contributor
timestamp: August 22, 2015, 02:36:12 pm
content: OK, I've found decent trafo 230VAC->12VAC but a little bit bulkyQuoteI've forgot to search for "pulse transformers" for GDTsProbably will find something usefull for GDT 1:1 to drive AC mosfets switch gate...http://www.digikey.com/product-search/en/transformers/pulse-transformers/786982

author: eneuro
author_rank: Super Contributor
timestamp: August 22, 2015, 10:16:01 pm
content: In some projects where I'd like to slowly turn on up to 100W load probably thisPhotovoltaic MOSFET Driver with Integrated Fast Turn-Off VOM1271Tcould be fine, however it costs around $1.5-$2, which means at this price I can get... small MPU and filter toroid like my favourite ATTiny85 and maybe try make discrete isolated DC-DC, simply by replacing in my concept 230VAC-12V trafo with push pull converter like this from TI application note:Using MPU has some advantage over shown above two quad NAND2 logic gates-I can add additional logic like very precise soft start delays and programmed switch on/off based on additional RF module I'm working on for wireless control of home lights etc, so it is quite interesting option and maybe worth to try, sonce I've have a few small SOT23 N-channel mosfets and I do not expect too much converter output current needed, while I will drive 230VAC AC mosfets switch directly as shown on my first post-that is why I need floating PSU for mosfets gate.I've already programmed MPU to 100kHz to test push pull converter primary similar to this from TI analog magazine, so by limiting input current using 100nF capacitor and 100R in full-bridge configuration I was able easy transfer 3.4V to secondary and power up white diode using random filter toroid and ~20 turns on primary/secondary, so probably just connecting this thing to push pull at 12Vinput I should be able get easy 12Vout at those really small curent needed to drive directly mosfets gate which has capacitance ~10nF total @ 12VgsWe'll see what happends, but while I haven't got in hands now those photovoltaic mosfet drivers and still eg. VOM1271T has ONLY ~9V open circuit voltage and really small short currents 7uA @ 5mA input and 15uA @ 10mA input, so it looks like by adding two transistors to two MPU pins and creating puch pull isolated converted similar this from TI magazine, I will be able controll AC mosfet switch with a few lines of code on MPU and advantage is I can get as high Vgs as I want, to lower down RDSON as possible.Disadvantage in some projects might be need to solder push pull transformer and bigger footprint (more PCB space needed than quite compact VOM1271T, but I do not like ~9Vgs provided by this photovoltaic gate driver, since I'd like to use classic mosfets with Vgs 10V-15V (not logic level), so maybe implementing simple isolated push pull converter shown above will do the job, at least at home automation project, where slightly bigger size of this AC mosfets switch controll unit is not a problemThose filter toroids are very cheap and it looks like they should be fine to provide <1mA output current needed in my design

author: eneuro
author_rank: Super Contributor
timestamp: August 23, 2015, 03:47:23 pm
content: Yep, Those trafos are quite cheap < $2, and 1inch2 PCB with MPU in more advanced configuration will allow soft start of different things including automation, while MPU will be floating on secondary with AC mosfets switch gates, so endless possibilities to drive its gatesThis way I've 9VAC secondary, so after fullbridge Schotky still close to 12Vmax available at low current consumption (a few mA) to charge gate driver capacitors and step down to 5V for optional MPU (ATTINy85).Powering MPU @ 5V will allow run it at 8MHz easy for more demading tasks, like SHA256 computation in home automation project to recognize RF commands encrypted commandsThat is interesting those HAHN trafos are quite cheap-I'll source them from official distributor of course.I've trafo pinout footprint so it is time design 25mm x 25mm one side SMD PCB and trafo will be soldered on backside, since not too much elements needed even if MPU wrere needed in some projects, but analog version of soft start will be easy-just charge gate capacitor through choosen gate current limiting resistor and use AC mosfets switch as current limiters at Vgs rise to 12Vmax at time more less ~0.5s

author: NiHaoMike
author_rank: Super Contributor
timestamp: August 23, 2015, 09:03:57 pm
content: Since you're switching the mains side, could a capacitive power supply be used?

author: eneuro
author_rank: Super Contributor
timestamp: August 23, 2015, 11:57:10 pm
content: If I wanted use capacitive power supply, I had to use galvanic insulated (floating) AC mosfets switch gate driver like this slow photovoltaic or make isolated DC-DC to provide power supply for optoisolated gate driver like TLP351F, etc....Anyway, tried @ 8MHz ATTiny85 output for my full-bridge on its two pins made of discrete transistors, lets say more than 100kHz, eg. 434kHz or even 1MHz and I was puzzled for some time, since this part of C code generated not exact timings using builtin to AVR GCC_delay_us(double t ):Code:// OutputDDRB|= (1<<RPIN) | (1<<LPIN);// Setup system clock to given valuesystem_clock_init(0); // Init clock based on F_CPU setting// Full Bridgeronloff= (1<<RPIN); // Right ON, Left OFFlonroff= (1<<LPIN); // Left ON, Right ON// RJMP: 2 cycles// OUT: 1 cycle// NOP: 1 cyclefor(;;) {PORTB= ronloff;delay((double)(1.0/FREQ)/2-((double)((1)*1.0)/F_CPU) );PORTB= lonroff;nop(); // Had to insert this to get correct second delaydelay((double)(1.0/FREQ)/2-((double)((1+1+2)*1.0)/F_CPU) );} // forAVR gcc generated I think wrong delay assembler code for second delay (before RJMP to for loop), and I had to insert NOP instruction and substract in second delay, since we have to compensate for 2 clocks for RJMPNow this assembler code for 1MHz output switching frequency (for loop) looks good, since there are 3 clocks delay between each output pins update:Code:7c: 92 e0 ldi r25, 0x02 ; 27e: 80 e1 ldi r24, 0x10 ; 1680: 98 bb out 0x18, r25 ; 2482: 00 00 nop84: 00 00 nop86: 00 00 nop88: 88 bb out 0x18, r24 ; 248a: 00 00 nop8c: f9 cf rjmp .-14 ; 0x80 <main+0x2a>434kHz switching frequency looks like this for 8MHz ATTiny85-notice that AVR gcc optimized code and... reused r24 for output pins update and delay timing loopCode:7c: 82 e0 ldi r24, 0x02 ; 27e: 30 e1 ldi r19, 0x10 ; 1680: 21 e0 ldi r18, 0x01 ; 182: 88 bb out 0x18, r24 ; 2484: 98 2f mov r25, r2486: 9a 95 dec r2588: f1 f7 brne .-4 ; 0x86 <main+0x30>8a: 38 bb out 0x18, r19 ; 248c: 00 00 nop8e: 92 2f mov r25, r1890: 9a 95 dec r2592: f1 f7 brne .-4 ; 0x90 <main+0x3a>94: f6 cf rjmp .-20 ; 0x82 <main+0x2c>Update: Nope, as I counted correctly, it will be one clock more for second delay including RJMP and... we do not get symetric output waveformsUpdate2: This need more detailed investigation since BRNE instruction is not fixed cycles long, but 1 cycle if condition is false, and 2 cyccles if condition is trueHowever, we can correct this in C code, since we know at compile time switching frequency defined in FREQ constantUpdate3: Yep, probably is fine, while there is no NOP in forst delay, but 1 iteration more, so BRNE will take not 1 cycle but 2 and we get 7 MPU clocks including output pin updates, so total 14 clocks per period, so we get not 434kHz, but something close to 571kHz if I didn't missed somethingI have to verify this 434kHz output frequency code (pins PB1 and PB4 for full bridge)-it will be interesting excercise to simulate in brain AVR MPUProbably this code with simple full bridge I've developed nased on BC337/BC327 800mAmax NPN/PNP transistors using GDT to create simple isolated DC-DC could also charge at decent rate AC mosfets switch gate and for soft start sometimes it could be fine, but using trafo 230VAC->12V (or 9V) makes things simply and not such expensive since it costs less <$2 and I've floating 12VAC/9VAC which can be used to drive mosfets gate, which needs to be floating VGs in the case of AC mosfets switch.Anyway, as excercise and experiment I will try also capacitive PSU with very simple isolated DC-DC to charge mosfets gate directly using GDTs with zeners to limit VGS to 15Vz-12Vz, so that is why I was investigating this MPU code at switching frequencies close to its nominal frequency (I switch ATTiny85 on the fly in software to 8MHz, since I've 5Vcc), because at switchng frequencyat the range of half MHz, as we could see sometimes compilers can generate very strange MPU code, so analysis at assembler level and calcualtion of how many cycles in half period MPu will spend to execute code taking into account RJMP instruction which is used to repeat this loop

author: eneuro
author_rank: Super Contributor
timestamp: August 24, 2015, 01:28:33 am
content: Quote from: AcHmed99 on August 24, 2015, 12:31:06 amYep, I've finally implemented and calculated corect delays (symetric pulses which is critical for push-pull converters as I know) and this code seams to work fineCode:// Full Bridgeronloff= (1<<RPIN); // Right ON, Left OFFlonroff= (1<<LPIN); // Left ON, Right ON// RJMP: 2 cycles// OUT: 1 cycle// NOP: 1 cyclefor(;;) {// firstPORTB= ronloff;delay((double)(1.0/FREQ)/2-((double)((1+2+1)*1.0)/F_CPU) );nop();nop();nop();// secondPORTB= lonroff;//nop(); // Had to insert this to get correct second delaydelay((double)(1.0/FREQ)/2-((double)((1+2+1)*1.0)/F_CPU) );nop();} // forFor defined FREQ I get (from MPU ATTiny85 cycles calculation):100kHz ~102kHz434kHz ~400kHz1MHz exactly 1 MHz:Code:7c: 92 e0 ldi r25, 0x02 ; 27e: 80 e1 ldi r24, 0x10 ; 1680: 98 bb out 0x18, r25 ; 2482: 00 00 nop84: 00 00 nop86: 00 00 nop88: 88 bb out 0x18, r24 ; 248a: 00 00 nop8c: f9 cf rjmp .-14 ; 0x80 <main+0x2a>Full period is for defined 1MHz 8 cycles, so at 8MHz ATTiny85 MPU we should get symetric 1MHz and at other defined frequencies too (I've checked for 100kHz and 400kHz)Since, I've managedto create nice symetric high switching frequency on MPU pins (RJMP instruction from C for loop implementation on MPU could be disaster and trap for new MPU coders not looking into assembler code) , now fun part and we'll try use MPU to make isolated DC-DC to drive mosfet gate directly as shown in first post-limiting GDT output voltage to levels safe for mosfet gate 12V-15V .

author: eneuro
author_rank: Super Contributor
timestamp: August 24, 2015, 11:08:04 am
content: Quote from: NiHaoMike on August 23, 2015, 09:03:57 pmDo you mean capacitive power supply like in those 230VAC LEDs?I want put everything on 1inch2 (25mm x 25mm) PCB and maximum 10mm-15mm height, so THT 250VAC-275VAC hundred nF caps are too big and difficult to sumberge whole circuit with PCB inside nonconductive epoxyTrying to figure out if I were able use those small SMDMULTILAYER CERAMIC CAPACITORS Middle & High Voltage Series (200V to 3kV) 0603 to 1812 Sizes NP0, X7R & Y5V DielectricsThinking of this ceramic MLCC 100nF; 500V(DC); X7R; ±10%; SMD; 1812; -55÷125°C and put in parallel 2 or 3 of them to get 200nF-300nF, but in datasheet above they says:Code:Chips size 1206 and larger to use on reflow soldering process only. Capacitors with X7R dielectrics are notintended for AC line filtering applications. Capacitors may require protective surface coating to prevent external arcing.SMD 1812 is 4.5mm x 3.2mm, so less than 5mm between cap leads, so it makes sense.I will do have protective surface coating, so those tiny SMD 1812 MLCC 500VDC ceramic caps could be usable in a tens mA capacitive power supply or someone could suggest something different for 230VAC mains capacitive PSU in SMD version?BTW: I've found smaller 3mH transformer 1:5.4 ratio (but four secondary wires so ~1:2.5 between only two of them) at lower (12mm x 14mm) than 230VAC->9V I've shown above, but price still ~$2 for hundreds of them and height... 12mm, so similar to one of those HAHNUsing pulse transformer at small total PCB foot print to provide floating gate VGs in isolated DC-DC rather problematic and still classic 230VAC->9VAC transformer makes things more simply, but bigger footprint, weight, etc, but I'll test custom "pulse" transformer with toroid code and few turns on its primary and secondary-I sohould be able make it less than 10mm high-for higher volume small toroid inductors probably could be used with double winding and added a few turns for primaryMaybe this $0.11 FRH9X5X5 Ferrite: sleeve L:5mm Int.dia:5mm Out.diam:9mm FERROCORE FRH9X5X5 could be a winner (not for high volume production of course) for small prototype with capacitive PSU, since it is small easy available, but might require wind a few copper wire turns for primary and its secondaryI'll try this thing for fun first with 500V MLCC as capacitive PSU and MPU or simple cheaper two quad NAND2 333kHz oscilator to try powerup AC mosfets switch directly.Everything will be submerged in epoxy and only four external wires available to connect AC mains input and output load, so who cares what is inside if it works and will be cheap and safe-no touchable Hv elements but external terminals like KBPC 1000V bridge rectifiers?

author: eneuro
author_rank: Super Contributor
timestamp: August 24, 2015, 04:39:19 pm
content: OK, programmed MPU with implemented 400kHz switching frequency on ATTiny85 MPU pins PB1(right) and PB4 (left), where full bridge is made on BC337/BC327 transistorsI've connected to two pins MPU based full-bridge, transformer primary using two resistors 27R and 100nF ceramic capacitors in series, to ensure no short circuit can happen on transformer primary.I've used random (choke trafo I guess), where removed a few turns from its primary, so ratio is up to 1:3 and when added 12Vz zenners and 1N4148 diodes to rectify transformer secondary and limit its voltage to ~12Vmax, I've got close to 11V open circuit and white led lights up quite brightI've measured short circuit current at 2x220R load and it was close to 4mANow, lets take random filter ferrite core linked above, make few turns on primary and secondary at ratio 1:2.5 and add 1uF capacitor and 100k load to simulate AC mosfets gate ground resistor and lets try find smallest possible ferrite core which will provide enougth secondary current to keep this Vgs voltage at given 12Vgs levels (above 10Vgs)I will order also a few quad NAND2 logic gates to try replace MPU switching frequency with tfree inverters based oscilator shown in previous posts from TI insulated DC-DC concept, while it looks like simple full-bridge low current isolated DC-DC can be made with not too much discrete elements

author: eneuro
author_rank: Super Contributor
timestamp: August 24, 2015, 10:49:41 pm
content: No supprise, after reading thisUnderstanding Ferrite Beads and Applicationsferrite beads can be quite good inductors at LFI've made simple 1:2.5 ratio 8T primary and 20T secondary random ferrite bead transformer (intentionally made very poor inductive coupling between primary and secondary) to see how it works in practice and no problem what so ever @ 400kHz switching frequency I've got from 5Vcc powered ATTiny85 MPU nice 11.37VDC on 220uF cap with only small load (0.11mA) 100k resistor in parallel to output capacitor to simulate mosfets gate discharge in real AC mosfets switch with the same gate to ground 100k resistorThis simply isolated DC-DC full-bridge SMPS looks like works as expected and fits my project requirements, since very small 12Vgs gate charge current is needed, so driving AC mosfets gates directly from isolated DC-DC should work even using such bery simple 2 MPu pin based full-bridge SMPS