EveryCircuit
Contact
Reviews
Home
crake
modified 6 years ago

PWM VAPE

10
75
351
05:47:46
Final version: http://everycircuit.com/circuit/5668629878931456 Adjust the pot to control power to the coils. Press the swtch to activate the device.
published 6 years ago
Lucan01
6 years ago
What are opamp going to be?
crake
6 years ago
probably an ltc6702 comparator. i may need to add a voltage follower between the oscillator and comparator on the far right
hurz
6 years ago
take an eye on the mosfet gate capacitance, if its to high the comparator might get current porblems, a resistor is anyway a food idea between comparator and mosfet gate e. g. 47 Ohm
crake
6 years ago
I was concerned about gate capacitance. Haven't compared mosfets yet. Really, that low? 47 ohm?
crake
6 years ago
I simulated this in spice using the comparators mentioned above and IPB200N25N3 mosfet and it seems to work quiet well. I'll order these parts and build the thing for real.
2ctiby
6 years ago
That bought Mosfet sounds good. Its Rds = 0.02 which you could simulate in your setup here by turning KP to 940 uA/V^2 ... That brings the Vds to 311mV seen there with a peak current of 15.6 amp. The Power dissipation at the Mosfet is then 0.968W at your default 50% duty cycle, so that should hopefully be fine.
crake
6 years ago
Thanks 2ctiby. How are you calculating KP?
2ctiby
6 years ago
@crake ... KP can be calculated in two ways here, 1: Obtain the correct reqd. Vds as being a divider using your Rload with the Rds ... ie: your R load is 0.25 Ohm and the required rds is 0.02 Ohm ... so  Vds = {Vdd x [Rds/(Rds + Rload)]} ... so  Vds= [4.2 x (0.074)] ... so Vds = 0.311 volts. Then alter your KP until you see the required 311mV there as Vds in EC. ... You will see that when KP is thus altered to 940 uA/V^2  the Vds on EC is seen to be 311mV as required. Hence when V=iR ie: R=V/i ... so R=0.311/15.6 where 15.6 is the seen current amps there on EC. ... That R is the resistance across the Mosfet ds ... ie we have Rds= 0.02 as reqd. ........ The 2nd way is purely by maths and the final result will be slightly different. I can explain all of that too if you wish, but basically the two results merge providing Vds is extremely low ...eg if you were to increase each of your load resistors to 4 Ohm in order to obtain 2 Ohm total instead of your 0.25 Ohm total.... but then you would be reducing the current, and so then you would have to consider raising your Vdd to raise that current if reqd. for better Power. ... Note in all cases: The avg Power is determined by the rms volt or amp values with PWM. You may be wondering why we are just altering the KP here and not the W or L ... but that is another story if you are interested.
crake
6 years ago
Thanks 2ctiby and hurz. 2ctiby, this is very helpful. Ill use the first method you mentioned. I believe I have some circuits with more of your thoughts on mosfets burried somewhere in my bookmarks. Hurz, your suggestion was helpful as well. I found on articoe from TI covering capacitive loads. It looks like a 300 ohm resistor will bring the comparator output current down to +-15mA or so. Struggling to find a mosfet that will work but in TO-220 package. Everything these days is going surface mount.
hurz
6 years ago
I wont use this mosfet. Vds 250V is much to high you dont need that. The Vgsth is in worst case max 4V this is to close to your supply or even above of your usecase where the battery will drop down to 3V for an empty battery. In best case Vgsth is 2V but you do not know what you get. Typical is 3V and this is also to high. You must take another mosfet or build a voltage multiplier to lets sav at least double the voltage. So you have to drive at least a separated 6 to 8V. Another thing against this mosfet is its high input capacitance with 5.3nF ! Together wirh 300 Ohm you reach quickly the maximum working frequency and the load to an extra voltage doubler is also a question! 60k times a second charge and discharge 5.3nF is a lot energy your voltage doubler must have! The power dissipation calculation is somehow wrong, if we calculate with 50% duty cycle and 20mOhm at 15.6A means 312mV/sqrt(2)=220mVrms this multiplied with 15.6A gives 3.44Watt !! So without heatsink a little optimistic. Use a mosfet like IRLB3034 and a simple voltage doubler, also lower the frequency 60kHz seems to be much to high. You can go into the audile range, cause it will not make any noise the load is just ohmic, even its wounded like a sipral it will not make any sound. Even 488Hz arduino frequency will work fine and you dont have problems with the input capacitance. ATTINY would be an alternative, on another pin you can run the rectangulat for the voltage doubler. Supply 3 to 4.2 volt is not a problem for ATTiny85. Check them and look for another mosfet and/or use a voltage doubler.
hurz
6 years ago
here the data for IRLB3034 http://everycircuit.com/circuit/5593416008990720 1.4mOhm at Vgs 10V check the text in description i added.
crake
6 years ago
Thanks hurz. I actually have this mosfet and have used it in the past. My old homemade vape used this mosfet for years and it worked quiet well. How do you think the PSMN5R4-25YLD would perform in this role? It has much lower gate capacitance (858pF). I tested it in spice and it worked pretty well.
2ctiby
6 years ago
@crake ... If your Vth for the gate is 3v (which you should check on a simple board setup before starting) and your Vgs is 4.2v ... that gives you 1.2v clearance as your Vov (overdrive). It could do with having a bit more clearance generally so that there is a faster transition in to Ohmic state, where you need to be at all times as much as possible for switching. It would also widen the voltage gap between the Vov and the Vds which aids the need to keep the Vds as much below the Vov as possible (because if Vds goes above Vov then the Mosfet flicks out of Ohmic in to Saturation ...and you must not dwell in that Saturation for switching, partly because much higher heat dissipation will be involved there since Rds becomes insignificantly low compared with other resistance which comes in to play). Having said that ... the Transconductance of that Mosfet is 61 amps per volt minimum available shift above your Vth, so your Vov of 1.2v should handle that easily considering that your current is not getting anywhere near that high amount of current shift in that first volt rise above Vth. I am not sure why you need such a high frequency for this project... you might be better off lowering that.
2ctiby
6 years ago
@crake ... Hurz is wrong with his calculation for the Power: He has used  Vpeak/sqrt(2)  as for a.c. sine wave and then multiplied that by the i peak... which is all totally wrong. ... Here for Power we need to use [(Vpeak^2/R) x Duty Cycle]  or similarly just  [Vrms^2/R]  ... since Vrms=[Vpeak x sqrt(duty cycle)]. We are dealing with a PWM square wave. The  i rms is a similar calculation to the Vrms which I have described there ... so you could also find the Power as: P = Vrms x  i rms .... I can show the derivation of those formulae if you wish.
crake
6 years ago
I have been using Ipeak^2*R*(Duty cycle) and Vpeak^2/R*(Duty cycle)
2ctiby
6 years ago
@crake ... Your first formula is correct, but care is needed in the way that you have described the second formula: The (Duty Cycle) there should be multiplied by the Vpeak^2 ... not by the R ... you perhaps meant that, but it reads there in an ambiguous way. It would be clearer to write: P= (Vpeak^2/R)(Duty cycle) ....... Note: The i rms= i peak x sqrt(Duty cycle) .... The Vrms= Vpeak x sqrt(Duty cycle)
crake
6 years ago
yes i meant (Vpeak^2/R)*(Duty cycle)
2ctiby
6 years ago
Good ... So it looks like you are all set to go ... Good luck.
crake
6 years ago
yep, i think so. thank you 2ctiby
hurz
6 years ago
@2ctiby still struggles with his power calculations, now you have 0.968W from his first calculation where its totaly unclear where it comes from. Now its 0.312V²/0.02 Ohm*0.5Duty = 2.43W as of definition of rms the voltage of a rectangular PWM must be calculated as peak/√2= 220mV funny right. If we have the rms we do not need to apply the duty but what i missed before we have to also apply for the current 15.6A/√2= 11.03Arms and now we can multiply Urms with Irms and get the power 0.22V x 11.03A = 2.43A. I just overlooked the current to also apply √2 for a rectangular shape. But what the 0.968W from @2ctiby was totaly nonsense. Hope that help, i will check PSMN5R4-25YLD but again Vgsth for IPB200N25N3 can be according to the spec upto 4V ! and it definitive will not work. You are just lucky to get a low enough Vgsth sample.
hurz
6 years ago
This Mosfet is perfect for your application PSMN5R4-25YLD low gate capacitance maybe 20mOhm Rds at Vgs 3V but Vgsth garantie at max 2.2V and the Vgsth lowers in case its getting hot with 4.2mV/K so in case it does geg hot it does lowers the Rds and the power dissipation will also lower. That thing is perfect and im afraid will not be cheap.
hurz
6 years ago
sorry, lost the neg sign -4.2mV/K. Anyway, again this mosfet is neat i have ordered some of them, normaly i have used IRLB3034 for low voltage apps, but this one is cool with its low gate capacitance its ten times lower then IRLB3034! Rdson is higher, but still in a range which is low enough <<0.02Ohm. Whats also nice, the three pins for source and package for drain. Package as drain is standard but for e.g. source they just use in TO220 one pin, here we have three pins. I like that. Here its parameter for PSMN5R4-25YLD set them to worst case 2.2V Vgsth and not for 1.8V typ. http://everycircuit.com/circuit/5076367897788416
hurz
6 years ago
I still think you will need the voltage doubler for the gate driver voltage, if the battery drops in voltage close to 3V Rdson will be bad and the power dissipation to high without cooling, and a heatsink is the last what you need i guess. Drive it with 6V minimum or even higher.
hurz
6 years ago
BTW, what is the material of wiring you use, its Kanthal D or A or something different?
crake
6 years ago
Yeah, after hours of looking over mosfets i finally found one that i really liked. Its cheap too which surprised me. Less than the irlb3034 i used in the past.
crake
6 years ago
I use kanthal A1 24 gauge. I dont run my batteries past 3.7V so Im not too worried about running the batts past Vgs
2ctiby
6 years ago
@crake ... Your Power calculations formulae along with my similar agreed calculations were correct. The hurz rantings are an embarrassment to anyone who knows the Maths for PWM square waves. It shows how little hurz knows in this area. He needs to research and discuss my mentioned formulae there.
hurz
6 years ago
0.9W is to embarras you Mr @2cent, or any explanation where it comes from. 2.43W is correct, no thankyou needed cuz i started talking about your wring and strange value. But the way we calculate 2.43Watt is just different. I dont say your 2.43 is wrong. But you say my 2.43 are wrong. What makes my 2.43Watt wrong while your are correct, 2cent where does your 0.968Watt comes from???
hurz
6 years ago
@crake, how to you garantie to not run them on 3.7 or below. Lithium Ion start fully charged with 4.2 or 4.25V max, but quickly drop to 3.65V at keep this over a long time, if they get empty they quickly drop to 3V. How can you garantie to not run below 4.2V?
hurz
6 years ago
@crake, ok that makes 6.91cm length for 0.5Ohm, why two of them in parallel, is this a normal configuration?
crake
6 years ago
I cant gaurantee anyone that. The batteries may run below 3.7 but im not too worried about that. Worst case theyll run down to 3.5 or so... Ill know when to change my batteries just from experience. When performance drops off, which it will around 3.5-3.7 volts or so I change them out. I used to run an unregulated mod and I got a sense for when to change the batteriess from that. I carry spare batteries with me when I am away for this reason.
crake
6 years ago
I wrap about 13-14 times around the smooth part of a drill bit that is tad over 2.5mm in diameter. This gives me a coil of about 1.1 ohms each. I put them in parallel. Sometimes I build lower ~.50 ohms each wired in parallel. It just depends on how warm you want the vape to be depending in the juice you happen to be using.
crake
6 years ago
Im not sure how many linear centimeters 13-14 wraps would be. Never measured it. I cut more than I need because it is easier to wrap around the drill bit that way
hurz
6 years ago
ok, another thing i noticed, you plan to use two cells in parallel, the cells are smaller then 18650 size, so the internal resistance is around 50mOhm or even higher. Unfortunately the simulation stops with values above 10mOhm quickly CFS and the sinulation is also not proper cuz the opamps are rail2rail ones but cant track the external battery supply as max output rating, this you can do with LTspice.
crake
6 years ago
good point hurz. Have a model running with with 50m ohm internal resistance in spice now. A quick google search shows new lithium cells can have 30m ohm or more and old cells can have as much as 500m ohm. I'll check some datasheets on highend LG's, Samsung, etc cells and see what interne
crake
6 years ago
*internal resistance they have. Using 50m ohm internal resistance the comparator is producing ~3.5V to the mosfet. 4.2V-3.5V =0.7V ==> 3.5V-0.7V = 2.8V ==> 2.8V > 2.2V worst case. It should still work with a new battery
crake
6 years ago
Can't say how well it will perform with a poor quality and or old battery
2ctiby
6 years ago
@hurz ... You admitted that you made a mistake by forgetting to adjust your current by a necessary sqrt. and then you went on to alter it. My 0.968W was also a calculation mistake. ... anyone can make a calculation mistake like both of us there. But  regarding using PWM square wave formulae:  " Vrms = Vpeak × √(Duty cycle) " is correct. Using  Vpeak/√2  as you did for your Vrms is only a 'quick trick' for when the Duty cycle is specifically 0.5 ... it is best avoided.
hurz
6 years ago
if you dont like quick tricks its your problem. For the 50:50 case its as you noticed late absolut correct. But to call it "Hurz is wrong with his calculation" is just stupid and you repeat that from the past. Stop it, if you dont understand dont call it wrong. BTW, with this trick its even simpler to not apply twice divide by 1.414, just multiply the values and dived by 2 at the end and you have it for the 1:1 case. That easy and its obviouly more then your 0.968W which i just found questionable when its finaly more then a double 2.43Watt. So keep your words kind before you understand what others do. Your methode to quickly being rude is not exceptable.
2ctiby
6 years ago
The correct formula for Power is then: " P = Vrms^2/R " ... (whereby the Duty cycle has already been taken in to consideration in the Vrms). Variations on those two formulae are possible, along with similar appropriate usage of i instead of V
hurz
6 years ago
also correct is P=Irms² * R there is not a single valid formula there are many correct solutions. Take it and learn, but dont shout people are embarrasingly wrong. This is just to embarras yourself
hurz
6 years ago
or P= Irms * Vrms
2ctiby
6 years ago
Like I said ... there are variations ... I mentioned both of those earlier if you read the comments more carefully , but your earlier description gave the impression that Vpeak/√2 could be used for any Duty cycle to give Vrms ... and that is not the case.... ie: where you said "...definition of rms the voltage of a rectangular PWM must be calculated as peak/√2...".. That could easily have been mis-interpreted by readers.
hurz
6 years ago
yes, you do a lot of misinterpretations thats somehow you signature
2ctiby
6 years ago
Here is my interpretation of Vrms, perhaps you would like to point out some mis-interpretation in it?  " Vᵣₘₛ = {1/t( ₀∫ʲᵗ [Vₚ]²  dt  +  ⱼₜ∫ᵗ [Vₘ]²  dt)}¹⁄² " where j = duty decimal and t = full wave period time.
hurz
6 years ago
i know, you think you are the only one who understands integration in math. But i was talking about your interpretation about my calculation i did and you rated as to quickly as wrong, as we now found out. "Hurz is wrong with his calculation for the Power" sentences like this is a misinterpretation you have to many in the past.
hurz
6 years ago
your misinterpretation i have used ✓2 in sense of correct it for a sine wave is such a bad misinterpretation of your side "as for a.c. sine wave and then multiplied that by the i peak" Epic fail i would say
2ctiby
6 years ago
If you don't like calculus it's your problem. You are incapable of discussing the Vrms at this level. Perhaps you should stop persecuting others when you see that they are not up to your level, otherwise you must take a dose of your own medicine. You can not derive the √2 for your argument, you have simply copied it from somewhere. My derivation on the other hand is available to those who can follow it from start to finish. Stop being a fraud.
hurz
6 years ago
@crake, in your calculation you have worst case 600mV left to drive the mosfet above its Vgsth (if its just 2.2V) but 600mV above does not give you Rds as low as you might want it. All spec Rdson values are for Vgs = 10V or 4.5V at 2.8V the R will be much higher, check it but for me i would use a little voltage doubler its not much you need for it. Joule thief or 555 with diodes. Let us know if it works with such a little overdrive.
crake
6 years ago
I have been thinking about your suggestion the past two days and decided to implement a voltage doubler using a 555. It really seems to make a difference in spice and doesnt complicate the circuit all that much. Everything settles very quickly. Quicker than a user could ever notice. Im probably going to just build everything thats in spice now. Thanks for the suggestion. Very happy with this.
crake
6 years ago
After I build and test this thing irl I will post here or just make another circuit with as much that can be included in EC and post the new circuit. Either way, youll know of the results within the next two weeks, but probably less.
hurz
6 years ago
Instead of 555 you can use the rectangular output of your first comparator. The frequency as we said is maybe 1kHz? Or do you still want it at 60kHz which i think is much to high and will cause new problems with the mosfet and the gate capacitance. 555 might work but its specified till 4.5V and why build another rectangular if its already there. Ok, the comparator can not drive a lot current and might need a primitive push pull stage, two additional transistors which both drop again 0.7V, hmmmmm
hurz
6 years ago
checked 555 the CMOS version TLC555 which can run at 2V and can sink 100mA but only source 10mA, shit, maybe you should think about a joule thief for this low voltage application
hurz
6 years ago
here an idea with a joule thief http://everycircuit.com/circuit/4582833272913920
hurz
6 years ago
another idea is to use the heating fillament and the mosfet as boost stepup in voltage, its a rectangular and very low ohmic/powerful but with the disadvantage to have a unkonw pulse width, if its as i guess mire or less 50:50 of a charge cycle of one battery and not 100:0 at any time, you can use it as voltage doubler !
hurz
6 years ago
here a bootstrap version, which might has its problems, cuz it does work only if the mosfet gets high enough overdrive to bring the mosfet drain much enough to ground LOW to generate a doubled voltage. As always a boostrap mean to pull yourself at your hairs out of the mud 😉 here check this http://everycircuit.com/circuit/6279335171063808
crake
6 years ago
So far I am happy with the 555 version with amps to drive the capacitance but man, that boot strap method is awesome! I'm going to mess with that in spice after work. Thank you hurz, this is great. I have never built a joule theif before... How small is the physical transformer for this device?
crake
6 years ago
The datasheet for the comparator says Vcc max is 6V. Think this would work? http://everycircuit.com/circuit/6296801460879360
hurz
6 years ago
for the comparator max 6V and minimum is more interessting, because most are limited min 5V, LM393 can operate with 2V single supply but its perfomance... probably good enough? Which you plan to use?
hurz
6 years ago
For a joule thief i like to reuse old filter transformer, you have probably already seen them at input circuit for SMPSs there is always a little transformer directly at input. Two separated windings equal size on one core. Inductivity is from 1mH to 30mH which is perfect for a little joule thief. what you need is a very little ring core and two windings on it 10,20turns not more the frequency you can tune with the base resistor. The lower its value the lower its frequency. if you find some material with about 1mH and ten or 20 turns it might be in size small enough. But i see, size is most importante for this kind of application. How much space you have? Zylindric of is it a box?
hurz
6 years ago
Which comparator is limited to just 6V supply? All i know can handel much higher supply voltages. Probably yours is limited in input difference voltage, which chip do you use?
crake
6 years ago
I am currently using the LTC6702. The datasheet says 6V max VCC. That LM393 looks promising. Ill have to comb over that datasheet. Supply voltage alone it appears to very suitable for this circuit with voltage doubler. Speaking of voltage doubler, that bootstrap works very nicely with everything. As for the joule theif, I think it would end up consuming too much space. This circuit will need to be fitted between a dual 18650 battery holder and the side wall of my project box, and underneath a large switch. Using a different project is possible but I want to reuse what I have because it is engraved and looks rather cool. I appreciate everything you shared about the joule thief - I will be building one of those just for fun. Btw, my parts came in today and man is that mosfet tiny!
hurz
6 years ago
i also ordered some of them, the perfomance is for this size incredible!
crake
6 years ago
Dead bugged a prototype today. Everything works very well. Adjustable duty cycle functions across the full range and the bootstrap voltage doubler works too well fot this comparator. Ill probably order some comparators that can take full advantage of the bootstrap voltage doubler.
crake
6 years ago
thanks again for the bootstrap idea
crake
6 years ago
Correction, the bootstrap works best at 50% and up. Not sure what I was measuring on the low end late last night lol. Probably still going to try a 555 voltage doubler since it is independant of the the adjustable pwm.
crake
6 years ago
Also plan on scoping this thing next week.
hurz
6 years ago
what frequency are you running now?
hurz
6 years ago
and where have you applied the booster output? To the comparator supply or have you inserted an extra transistor stage between comparator and mosfet? I think you need to update this circuit here 😉
crake
6 years ago
Still running at 60kHz. The boost was applied to the comparator Vcc with no additional transistor. Ill update it after I scope this thing and know that it is fully functional. It seems to be working well with the 555 doubler now i.e. voltage supplied to the compar is consistent across all pwm settings. I need to test a more suitable driving comparator because the one I have now worries me when the supplied voltage is too high > 6V.
hurz
6 years ago
i hope you have some TL431 available to quickly build an overvoltage protecting zener, check this two resistors and ine TL431 http://everycircuit.com/circuit/5472377925009408
sparkySox
6 years ago
Them clouds doh craky bakey. Gonna wax em up boi.
crake
6 years ago
I have both the tl431 and 5.1V zener. Went with the 5.1V zener because less soldering.
hurz
6 years ago
5.1V zener and a bigger BJT you are close at 6V just to save any millivolt you have gained 😉
hurz
6 years ago
here what i mean with the power zener http://everycircuit.com/circuit/4989780618903552

EveryCircuit is an easy to use, highly interactive circuit simulator and schematic capture tool. Real-time circuit simulation, interactivity, and dynamic visualization make it a must have application for professionals and academia. EveryCircuit user community has collaboratively created the largest searchable library of circuit designs. EveryCircuit app runs online in popular browsers and on mobile phones and tablets, enabling you to capture design ideas and learn electronics on the go.

Copyright © 2026 by MuseMaze, Inc.     Terms of use     Privacy policy