Bleeding it dry

Shocking!

Cor blimey I nearly blew my head off. Shorting capacitors, particularly large ones is a very scary experience. I had removed the rectification board from the mains board of the power supply project. Read more

Constructive Feedback

The Zener pre-regulator returns, and is improved

So nice to have finally set up my workbench again and I’m a flurry of pliers and screwdrivers. Following up on a semi-meh-kinda success (but sort-of fail) is a resounding success! Just what the engineer ordered.

Read more

The Milliohm Meter gets a tune up

Inexactness always bothered me. In the electronics hobby it is to be expected, given the millions of tiny variables we assume don’t exist just make our calculations take less than a year and our designs to be reasonably constructible at home.

I’m referring specifically to my milliohm meter adaptor which I’ve been fiddling with (see here and here oh and here). Last time, I cursed the inexactness of my cheap Chinese multimeter, and not having a 2A range so I could be reasonably sure of getting its output as close as possible to 1A. In addition, the accuracy (as contrasted with the resolution) was bad enough to introduce a significant grey area to my calibration.

I have laying about a bunch of 1% resistors I bought to act as current sense resistors for various projects and I went about testing them. Given the schematic from last time, the readings tended to be off (and high) by about 2.5%. For the 1Ω 1% resistors this netted a reading of 1.022-1.025 on my multimeter. In the ball park but most certainly out of spec. Having ten of these resistors, and finding them all out by the same amount, it’s easy to come to the conclusion that my current source is off calibration, rather the resistors being out of spec.

Adopting a standard

Lacking any better equipment, I decided to take these 1Ω 1% resistors as my standard and set about fixing my current source so they read within 1% of 1Ω and call it a day (as that is as good as I am going to get without better test gear).

After a bunch of fidding, I decided to remove the 15Ω resistor out of the parallel arrangement to slightly drop the current output by about 50mA. I then adjusted the pot until one of the 1Ω resistors read exactly 1.000V (i.e. 1.000Ω). This puts it (theoretically) within 1% of reality.

I then tested the other nine resistors and trimmed the pot slightly so the distribution of values all hovered within 1% of 1Ω. This means a reading beween 0.990 and 1.010V on my multimeter. I found that I was able to do this and have the results repeatable. Job done, right?

Always some fly in the lube

Though I was able to get it to repeatedly read these ten resistors within 1% of their stated values, I did notice something different when I checked a bunch of 0.1Ω 1% resistors I also had laying about. Their readings tended to be high by as much as 30%! So, for a resistor that should show up as 0.100V on my multimeter (well, okay, between 0.099 and 0.101) I was getting values around 0.120 and 0.130. Frustrating!

I checked the current output and it was (in)exactly the same as when I was testing the 1Ω resistors so it doesn’t appear as if the current regulation of the LM317 is going into crazy non-linearity. I’m a bit stumped by this one. How could it get 1Ω so right and 0.1Ω so wrong?

I did pick up the 0.1Ω resistors from a junk place, so i’m not at all confident they are what they should be, still sort of unlikely. Other culprits could be that the thing is heating up and affecting it’s performance, or the construction lends itself to be in the “noise floor” and subject to all sorts of random perturbations.

Acceptance

Given that I do not own my much coveted Fluke 87-V yet which does have the accuracy and resolution for me to tune the current output, I really can’t go any farther with this one. I could try feeding it 100mA instead of 1A and seeing if the results are more linear (indeed, this would have been in line with the original specs of the schematic I adapted this from) and if they are to replace the set resistors with the appropriate values for 100mA. This does give me the annoying problem that the volts display on my multimeter would then read in 10s of ohms which I had hoped to avoid. I could then, conceivably, add in an opamp with a gain of 10 to amplify the result, which would then doubtless introduce more error into the design.

I will also have to check this heating issue and seeing if the drift is due to the LM317 overheating. An easy fix for that would be to give it a 5V supply (instead of 12+V) to drop the voltage differential that the LM317 has to deal with and lower it’s power dissipation. I may try that now actually.

Nope, just tried it and the same result. I fear this will have to be “good enough” for now. Testing a couple of 0.75Ω resistors looked to be okay, 1Ω is okay, 0.1Ω is quite a bit off. I might try the 100mA option but otherwise I’ll just finish assembly and call it a day. I wish I had some other 0.1Ω resistors to check…

A word of warning

My design (perhaps foolishly) dumps a constant 1A into anything you connect to it. The test resistors I used were all 2W+ power resistors and this circuit will definitely (proven by experiment) melt 1/4W carbon film resistors so please do not do that. Think of that math: a 1Ω resistor with one amp running through it will drop 1V. 1V at 1A = 1W or 4x the rating of the little 1/4W resistor. So do not use this on something that can’t take it. As always, I am not responsible if you set yourself on fire. The 100mA option is looking more attractive by the minute…

An update

Because I simply love beating dead horses, and really do not like nagging problems, I chose to investigate further. I modified the circuit to produce an output of 100mA or thereabouts thinking that perhaps asking the LM317 to dump an amp might be skewing the results a tad. This also allows me to use the higher resolution 200mA DC current range on my multimeter for a clearer picture. I bypassed the parallel resistor array and whacked in a 15Ω resistor. The results were… interesting:

Resistor Current Voltage measurement
83.3mA 86.6mV
0.1Ω 83.3mA 11.9mV

Note something interesting? Well I notice a few things. According to Ohm’s law, 100mA into 1Ω should net 100mV. Likewise, 100mA into 0.1Ω should net 10mV. Since the actual current delivered is 83.3mA, then the readings measured should be 83.3mV and 8.33mV respectively. The 1Ω resistor is pretty close at an actual reading of 86.6mV, off by 3.3mV or 3.96%. The 0.1Ω resistor however is reading 11.9mA when it should (ideally) read 8.33, a difference of 3.57mV or 42.9%! Even accounting for nominal irregularities, that’s a huge difference in accuracy.

What’s most interesting about this result is – the measured current of the resistor in both cases was the same. Making the variance in results even more surprising.

Now let’s go back to the 1A current output, and this time i’ll trim it to exactly (as I can) 1A.

Resistor Current Voltage measurement
1.00A 1.066V
0.1Ω 1.00A 0.155V

Now this is very telling. Again, using Ohm’s law, 1A should equal 1V in this case (making our math much less messier than before). The actual reading in both cases for the current is 1.00A (limitation of the 10A range on my multimeter). The 1Ω resistor again acquitted itself well by being off by 6.6mV or 6.6%. The 0.1Ω resistor however is having serious trouble reading 0.155V, or 55% over it’s expected value! What on earth is wrong here?

It’s obvious since part of the trouble in both cases is that the results are shifted in a positive direction. This could easily be attributable to losses and random craziness in the project design itself and the foibles of the components that make it up. Fortunately, we can trim that. If we take our 1Ω 1% resistor as standard (and why not, it’s proven by math to at least be close to its stated value), we can trim the current so it reads exactly 1.000V and compare. Here are the results:

Resistor Current Voltage measurement
0.94A 1.000V
0.1Ω 0.94A 0.143V

Now this is much better, and you can see why I used the 1Ω for calibration. The loss of 60mA (to God knows where) is sort of incidental. The important thing is each resistor is getting identical (or within half a bee’s dick) current. The 1Ω resistor shows 1.000V exactly as it should. Look, however, at the 0.1Ω resistor. It should be reading 0.100V (or within 1% of that) now that we have trimmed out any errors in the system. Instead, it’s showing 0.143V or 43% off of what it should.

Why exactly this is happening I am unable to determine. I do not have other 0.1Ω resistors to test but it could very well mean that the batch of 0.1Ω 1% resistors I received from the junk shop are horribly off tolerance. Or it could mean that my multimeter is not reading well into the mV range (even though it has a stated accuracy of 0.5%). Since it seems that the LM317 is dutifully dumping the exact same amount of current (be it 100mA or 1A) it would follow that the results would be reasonable regardless of which resistor I used.

Conclusions

It has to be good enough for now since I lack the equipment to test further. Either the 0.1Ω resistors are way off, or my multimeter is. Either is likely but hard to say which. The easiest test would be if I grab some other 0.1Ω 1% resistors that inspire more confidence. The best test would be for me to use a good, properly calibrated multimeter (when I can afford that). The stated 0.5% accuracy of my current heap of shit meter would make it allowable for the readings to be off by a millivolt, but not 43mV! This is of course assuming it was ever calibrated of which I am doubtful.

Though exactitude is again proving elusive, I can at least measure low value resistors more accurately, at least in the range of about 0.7Ω-10Ω which is a bonus compared to what I had before.

Software Sins

Okay software developers and companies, it’s time we have a talk about our relationship. For years now you have been abusing your users and just in case you aren’t aware of it, I will detail what you have done. If you’re smart, then you’ll take note and learn something. If not, well there are always more fish in the sea.

Assuming your user is stupid

Helpful UIs, tooltips, detailed documentations are hallmarks of well constructed and respected software. Dumbing down options, removing or automating advanced features, and wasting our time with flashy eye candy is assuming your user is a child. I am not a child, stop it.

Stealing Focus

I guarantee you, whatever I’m doing is more important than what you are doing, at all times. By several orders of magnitude. Do not steal my focus, don’t flip to the front, don’t you dare interrupt what I am doing. Sit there silently until I need you, and stay out of my way. Have something important to tell me? pop a notification, once. Otherwise, shut up.

Being “Helpful”

Or the “clippy”. This ties in with assuming users are stupid. Do not auto-complete me, you insult my language. Do not select more text then I am explicitly selecting. Do not do tasks that you think is associated to what I am actually doing. In fact, do not do anything, not a single thing I don’t tell you specifically to do. You are a tool for my use, nothing more.

Wasting resources

When i’m not using you, don’t do anything. No, you may not use my internet connection, thrash my hard drive with pointless reads and writes, or leave unnecessary open threads going. I paid for my processor, memory, and storage, you use them at my pleasure. Heaven help you if you have a useless daemon running. You have no right to do anything unless I tell you.

Bloaty and Buggy

Sure, new features drive sales, but buggy bloatware drives users spare. No, we don’t need a newer faster machine. We need you to stop adding useless crap, fix outstanding bugs, and optimize your code so it runs smoothly, properly, and quickly. Make your software the best by making it work.

Subscription models

Want to make us pay every month for your crapware? Why would I ever rely on a tool I have to pay for every month? I want to install the software, use it, and forget about it when i’m not and have it right handy for when I need it. No you may not deny me the right to use what i’ve already paid for, nor extort money from me every month for nothing. I buy you, I own you and fuck your EULA and profit margins.

Update pressure

Newer is not usually better. Updates break things, and introduce new bugs from your useless new features. Don’t force me to update, you will just force me onto your kinder competitor. I do not care how many new features you are offering, I only care that it does what i bought it for and does it properly.

Conclusions

Treat your user base with respect. Though many may be novices there are an equal amount of pros who want to seriously burn down your house for treating us like dirt. Make your software right, the first time, stay out of the way of us doing real work, and don’t piss us off. We are your bottom line, never forget it.

Multimeter accuracy and calibration confusion

As a bit of a follow up to my miliiohmeter project, I’m taking a step back to assess the standard by which I measure things. Having been schooled with a science background (Chemistry, Biology, Physics, Mathematics), the importance of good data, good results, good science is deeply ingrained in me. I believe this important in every walk of life, as an assist for critical thinking and to debunk the media’s annoying tendancy to throw meaningless statistics and skewed numbers at us to convince of whatever they want to convince us of. The tin-foil hat will however remain off tonight. I’ve had three beers after all.

Like most hobbysits, I accept my multimeter as not only the gold standard for everything I do with electronics, but it is also my eyes into what those pesky electrons are actually doing in there. Without it, the study of electronics would be horribly boring. We’d see lumps of circuitry that either did what it was supposed to, or failed in a puff of acrid smelling smoke – the reek of overload.

Recap of the Problem at Hand

In my milliohmeter project, I had reached an impasse. I created the thing to enable my multimeter to measure low resistences (>10Ω) down into the 100s of micro-ohms range since pretty much all DMMs without a dedicated function for this fail badly below 10Ω and especially below 1Ω. To make it work, I need a constant current source. I chose 1A as this made everything line up nicely. Ohm and his law states that 1V = 1A x 1Ω. My DMM, with this box in-between, would clearly read mV as mΩ. I put it together in my usual way of cobbling schematics, lots of fussing and reading.

It worked, after a fashion. It gave me a reading reasonably close to anything I measured with it. Perhaps a bit higher than it’s stated value and tolerance would suggest but close and certainly far better than my multimeter could do. It seems it’s about 2.2% out of where it should be. This could be a number of things or a combination of things. The set resistor that enables the LM317 to act as a constant 1A current source is actually a bunch of parallel resistors to dial into that sweet spot. CircuitLab told me this would be 1.155Ω, the datasheet for the LM317 told me it would be 1.25Ω. The actual measured value I got was approximately 1.245V drop across the parallel arrangement which is close to where it should be, or where I think it should be. I used standard 5% carbon film resistors to make this parallel arrangement with the addition of the critical 100Ω trimpot to calibrate away any oddities in that 5% tolerance of the resistors.

This is dandy, just build it up, trim it up and the things works right? Well sort of.

The datasheet says it should be 1.25Ω, which for 1A means a voltage drop of 1.25V, 50mV off isn’t bad, it’s a 5% error but how can I be sure that will net me 1A out of the thing? The LM317 has it’s limits too based on a variety of factors and that will need to be trimmed out in addition to the 5% resistor tolerance. Then there’s the other things, losses in the protoboard I’m using, loses in the leads, stray capacitance, quantum fluctuations – it never ends.

The only thing I needed to be sure of is that the thing is outputting 1A as close to exactly bang on as possible so that I could get an accurate reading. I needed to calibrate to that.

Unfortunately, as previously chronicled, my multimeter’s current ranges are quite limited to 10A, 200mA, 20mA, 2mA. For 1A I am forced to use the 10A range which gives me an output of 01.00A. Spot on yes, but lacking in that last digit to make sure it’s within the tolerance I need. I need to read 1.000A at least. 1.0000A would be even better! Given that my readings on a 1Ω 1% resistor was 1.022Ω that makes it 2.2% off-tolerance, and I’m pretty sure that’s not the resistor.

Electronics’ Dirty Secret

One of the first things I noticed about electronics when I began playing with it as a child is that the numbers never quite add up in reality. Every time I look at my mutlimeter when I take a measurement, I always shrug and say “close enough” and this can’t be helped. It’s frustrating when one’s math on paper makes nice round exact numbers yet the reality shows us we are just a little bit off. Part of this is due to the fact that we live in the real world and all the things we normally take for granted as not existing – like the resistance of conductors and PCB traces, as well as the noise they induce being antennas, tend to add up and creep into our measurements. Add to that the (in)tolerance of parts and the meter itself you have a mess.

As always, we, the scientists and experimenters, try to minimize this “noise” by buying bigger and better test equipment calibrated by some boffins in lab coats. This is all fine, if you have money. I don’t.

All I have is my Mastech MC8222H Chinese made $70 meter and that is the most accurate instrument I own. To me, this is my de facto gold standard as I simply have nothing better to compare it to.

The Mastech MC8222H is not a bad meter especially for it’s price. It has many annoyances I am not fond of and fluctuates like hell, but it works and has all the features I need for general electronics work on my humble hobbyist bench.

It is s 2000-count 4-digit display which would make this measurement easy if not for two things: it is lacking a 2A range on the current measurement. I can measure 200mA just fine, I can measure 10A just fine, but not in-between and keep that third decimal point. That’s not even the whole story. This is merely talking of it’s display resolution which says nothing of it’s accuracy.

A cursory look at it’s badly translated manual booklet tells me something else I’m not terribly fond of. Though the DCV function has a standard 0.5% accuracy, the DCA on the 10A range has an appalling ±2%+5 accuracy in the best possible case. For those that don’t know, the +5 figure means ±5 digits, meaning the least significant digit could be off by as much as 5 in addition to the ±2% accuracy window.

Acceptance

So here I am, with a bunch of adding intolerances. The resistors to set the constant current of the LM317 can be out by ±5%, the LM317 can be out itself by a bit, the meter I’m trying to calibrate it to can be off by ±2% and then some and that’s before we even take into account all the micro anomalies in terms of materials and construction. What is one to do?

The answer for right this moment is: nothing. I cannot calibrate this thing any better unless I have one good known bit of it I can say is calibrated to within half a bee’s dick of it’s life of where it should be. To me that’s >= 0.1%.

Options

One option that is apparent is to get a 1Ω precision resistor meant for calibration. I did a quick poke about and was unable to find one but I’m sure they exist. With that, I could dial the current source down until it reads 1Ω and then know i’ll be getting the best possible measurements from it. Not counting the error my multimeter will inject of course just being it. At least it would eliminate a couple of error sources straight away.

The other option of course is buy a multimeter worth owning. A brand name, one that is respected. A company that actually calibrates their meters before shipping them out and are known for reliability. The obvious boon here apart from being calibrated are that there will be a much better accuracy on the unit in general. We’re talking at least 10x better on the DCV and at least 2x better on the DCA. If i make it a 10,000 count one, I will get my much coveted missing digit also. The less obvious boons will be a meter I can rely on for twenty years that won’t drift much and has features like auto-ranging that will annoy me far less than the Mastech. I’ll keep both of course, always need two meters at least.

The obvious brand contenders are: Fluke, Keysight (Agilent), BK Precision and a couple of others I will consider after like Extech. I haven’t a budget yet, but when I do I imagine it to be about $300.

With this, i can dial in that current in to my satisfaction. Ironically, I bet some of these more expensive meters come with a low-Ω function which completely negates the purpose of this project but hey – that’s why we do these things, to learn. As you can tell, I’ve learned a lot. Like don’t buy cheap meters.

Milliohmeter basic construction finished, and testing success.

With only some minor comedic incidents

Last post on this topic, I explained the why I needed one and how I was going to build it. Go there for schematics and function details. Finally having gone electronics shopping last week, I was able to get the one critical part I needed for this project: a 100Ω trimpot. One measly part which took me a month to get off my ass and get. Such is life :) . I also managed to grab some beefier crocodile clips to make my test leads that much more durable and awesome looking, not least because I could actually fit the rubber boot over the two wires to each clip!

Soldering was trivial and I managed not to burn myself or set anything on fire, or wreck the board. I did cut myself though when I jabbed my hand with a pair of needle nose pliers though the damage to my hand is so slight I’m only mentioning it as I take that as a sign I’m actually doing something useful if I am bleeding.

mohmeter_total

With the board now fully assembled I thought “what they heck” and decided to power it on to see if it blows up or something. To my delight, it did not blow up and worked as expected! Hooray! That never happens.

Calibration goof up

This is just funny. Remember in the last post how I thought I was being smart by setting the output current to 1A instead of 100mA so that mV = mΩ? Well that part works a treat. My multimeter does read directly in milliohms no problem. The difficulty is in calibrating the damn thing. Like most DMMs, mine comes with 2mA, 20mA, 200mA, and 10A current ranges. In order to calibrate this thing so it’s actually useful, I need to have the LM317 outputting a constant current of as close to 1A spot-on as possible to get an accurate reading. Since the output needs to be 1A, I have no choice but to use the 10A range which will only give me a reading of 1.00A, which it did. This is great at first glance, spot on 1A right? Well no. What about the third digit? Assuming it rounds it, that means that it could potentially be ±5mA and I wouldn’t even know it! Had I stuck to one original design, I could have had it set to 100mA which i could dial in to within a bee’s dick of 100.0mA (±50µA making it all the more accurate. For lack of one extra digit on my multimeter, I cannot calibrate it any better than I have it now. Unless I devise some clever plan to give it a known resistance… chicken and egg scenario, that’s what I built the damn thing for! Oh electronics will get you :) . Anyone have a multimeter than can measure 1.000mA that I could borrow for 2 minutes?

mohmeter_test

These sorts of issues will plague me until I get a better multimeter, no doubt about it. When I build the power supply those extra digits will come in handy for calibration.

I measured a bunch of low-ohm resistors I had laying about and got reasonable results according to their stated values which is nice. I know it’s still a bit off, has to be, but it will do for now. A 1Ω 1% resistor I measured read 1.025Ω making it 2% off it’s stated value, so unless this resistor is out of spec, the thing needs some tweaking. I won’t know until I calibrate it properly.

Next steps

The next part is almost trivial, almost. I just need to safely whack it in a case and call it a day. I did notice the thing heats up quite a bit and I measured 83°C on the case of the LM317 (well within it’s limit) so that’s not a big deal. I may drive it harder, by using a 10Ω load and have it up the voltage to push an amp through it and see what the temperature shoots to. The thing isn’t really required to be on for hours or anything, just enough time to test a resistance quick, so I may just try to get away with some vent holes or (depending on the temperature at 10Ω) I may add a little fan to cool the bugger.

Then it’s case drilling and mounting everything, whack in a power LED. Oh and add an appropriate power supply for it, which I still do not have. Still, hard part over.

Kanger IPOW2

So recently I’ve had a problem in vapeland. I had everything so I thought, four batteries, two chargers, a bunch of clearmoizers and plenty of liquid as well as the fixings to make more. I noticed something disturbing happening. My batteries were not lasting as long as they should. I’m not talking about thirty minutes or an hour less, I’m talking about 20% or less of their former capacity. Something was amiss. At first, I assumed it was the charger. Such things are made in China and made to be cheap so it’s more or less expected they will fail at some point. A simple failure of it’s voltage reference would cause it to say it’s done charging when it isn’t. Which was exactly what I thought was happening.

Not so in this case. The purchase of a new charger did nothing to revitalize these poor batteries which were in fact just dying as all LiON batteries with too many charging cycles wearing out the battery. So the damage is two of my batteries out of four with another one being about half working. This is kind of scary since I depend on these things.

Having to spend an entire day out of doors an away from my home made AC box mod was rather frightening, I didn’t want to run out of juice. I knew of a brick and mortar on Yonge St. named 180° Smoke so I went there looking to replace with the same old de-branded 1300mAh spinner type battery that has served me so well.

Evaluating my options, it seemed to me that the usual spinner type batteries weren’t so competitive and awesome any more. Sure they can be bought for cheap online, but they aren’t great, and actually kind of a pain in the butt in many ways. They have no display or feedback for the charge state of the battery, they are variable voltage so need frequent tweaks to get a good vape with differing atomizer resistances and battery charge levels as well as the saturation of the clearo itself. Moreover, they have no readout at all aside from the flashy button LED which tells you very little if anything. So I saw the Kanger IPOW2 and thought “ooh that’s shiny”.
IPOW2

The IPOW2

For $30-40 here’s what you get – a variable power (wattage) integrated battery with a nice display and smooth interface. What more could you ask for? The design is nice and sleek and all flush mount, the display is a nice bright (and informative!) OLED display which shows the battery charge, output power, and atomizer resistance all at once. It is a bit longer and thicker than the spinners which is no big deal really. It’s not oversized. It comes in 1000mAh, 1300mAh and 1600mAh models to suit everyone’s size vs. battery capacity taste. The thread at the top is 510 but helpfully comes with an eGo adaptor in the box. Here’s one of my favourite things about it – it charges by a micro USB cable (also included). No more stupid screw in chargers!

Theory of Function

Before, variable power (as opposed to voltage) was only available to the owners of APVs (advanced personal vaporizing devices) for quite a bit more than your standard eGo twist clone. What this means in brief is that you get a consistent output from your device no matter what the atomizer resistance or battery charge level. From first vape to last it will be consistent. With the twist/spinners, one would have to keep adjusting the knob on the bottom to continually tweak to get the desired vape out of the thing which is fiddly and annoying honestly. With this, you can set it and forget it and just enjoy your vape.

The reason variable power (wattage) is so important and why it works is quite simple and just a bit of basic electronics. The atomizer coil is just a resistor by another name. Resistors are just heaters by another name :) . If you apply a voltage across a resistor, it will pull current through it and dissipate heat according to it’s resistance value. Basic Ohm’s law: voltage = current x resistance. So if your coil is 2.2Ω and your battery is set to 3.7V it will draw 1.68A of current (re-arrange the formula: current = voltage/resistance, 3.7/2.2=1.68). Easy. So you’d think you just set it at 3.7 and always get 1.68A through your coil to get a consistent vape, no problem. Catch for young players: what if the voltage changes, or the resistance?

Fact is, the little knob on the bottom of your twist will say it’s set to 3.7V, but remember it’s not made to be a laboratory grade voltage regulator, so it could be off by who knows how much. Not only that, but it could drift off depending on the load you put on it or any number of other factors. It can also drift and even fall off as your battery drains. All voltage regulators have what’s called a “dropout” voltage, meaning it needs a bit of overhead to regulate the voltage to the desired level consistently. If your battery voltage is lower than your dropout voltage plus your setting, you will not get your desired voltage. Likewise, over their lifespan, atomizer coils can increase their resistance causing the battery to work harder for the same output. This, I believe, is through heat expansion of the coil and it being gunked up with e-juice. Eventually, the coil just becomes unusable for a variety of reasons, but one thing variable voltage battery owners find is they have to increase the voltage to get the same vape as the atomizer ages. The point is, it’s the power output that is important. Regulating that is key to a consistent vaping experience.

So what is the variable wattage about and how does it solve these issues? Well, let’s look at what wattage actually is. A Watt is a derived unit of power. It could mean electrical energy, or thermal energy, but always 1W = 1 joule per second. It is a direct measurement of the amount of energy over time that something is outputting. This is why amplifiers, heaters, microwaves, everything uses it as their rating by which you buy them. According to the formulae, 1W = (current)^2 x Resistance, or it is current x voltage. By making power what we want to regulate, we let voltage fly free and allow it to be adjusted as need be to maintain a steady output.

This is essentially what I (and probably you) were doing by fiddling with that bottom knob on the spinners. We knew, by feeling, where our perfect vape was, and would adjust this knob up or down as needed. We were varying the voltage to match the changing resistance of our coil or the battery charge level to get the same power output. The variable wattage takes care of this for us. It’s voltage regulator will sense changes in output resistance and compensate for the battery charge level and focus on keeping that steady power output regardless of these two factors. If the atomizer resistance increases, the device ups it’s voltage to compensate.

The Review

Finally, after my tedious intro rand and technobabble, I’ll finally talk about the device itself.

I’ve been using it about 30 hours and I have to say I’m suitably impressed. It is certainly more fun to use than the boring old spinners and yes I’m quite dazzled by all sorts of electronic technology so having this as my PV appeals to me. It’s thickness is greater, as I mentioned, but I actually find this more comfortable to hold in my hand than the thinner spinners. The controls and display are all nicely flush mounted which to me not only looks good but is less to break when I drop it or knock it against something. Conversely, since the button is flush I have had occasional trouble finding it when not looking at the device which is slightly annoying. Nevertheless, the fire button has a nice tactile click and is not hard to actuate. I imagine it no more or less durable than the microswitches found in other batteries so I would still suggest against mashing it. Oddly, this button is in the shape of a shield, which brings to mind anti-virus software logos. I do not know why Kanger chose this but I don’t mind it either. A clear plastic light pipe surrounds the button to indicate when it is being operated and flashes like you would expect it to when turning it on and off, when it reaches it’s max firing time, and when the battery has run flat. I do note shadows in the oddly shaped lightpipe so it’s not quite as attractive as it could be be being nice and bright and lit up. Unlike some batteries, the LED powers off instantly. Guess they didn’t want to put a cap there to make it fade. Which is neither here nor there.

The OLED display is nice and bright and blue and perfectly flush mounted on the metal tube. One thing I absolutely love is that it shows you all information at once. In one glance you get your power setting, your atomizer resistance, and battery charge level. I’ve looked about and I cannot find a device for a comparable price that does that. Even some higher end APVs only show one of the three at a time and one has to hunt through menus in an awkward operating system to see everything one wants to know. Who wants that? It brings up another point – the user interface. It is dead simple.

All that is involved in using the thing is pressing a button. If one wants to adjust the power level, simply adjust the knob on the bottom. That’s it. Usual 5 click on-off. That’s it. No menus, no bullshit, just hassle free vaping.

IPOW2disp

The knob on the bottom is great too. On the twisters, I was pretty sure I was turning a linear potentiometer and could feel the wipers scraping inside. Those would definitely wear out or get gunky over time and I also had the feeling that really they needed a log instead of linear pot since the control didn’t feel linear at all. The knob on the IPOW2 is great, it just turns endlessly in either direction while the display updates your settings in 0.5W increments. So it’s an endless rotary encoder instead of a pot, grand.

This, the display and the fact it is variable wattage tells me clearly that somewhere in there is a little microcontroller. Your vaping kept consistent by digital micro processor control, what could be better?

Another big plus of this device is it’s integrated charging circuit. I was already frustrated with failing eGo chargers and hated having to buy a specific charger with a specific thread only to have them die on me. The IPOW2 uses micro USB. Done. The little display even shows charging progress.

So here’s the summary:

Pros
  • Consistent power output
  • Sleek design, comfortable to use in the hand, smooth flush mount controls and display
  • Bright OLED display with all information at once
  • Simple operation, button and encoder, no menus to fiddle with
  • Integrated Micro-USB charger
  • Temperature protected, double protected battery, multiple vent holes for heat and battery failure
  • 3-15W regulated output
  • Cheaper than APVs with the same feature set
Cons
  • Flush button hard to find by touch
  • Non-replacable integrated battery
  • Display at bottom, counter-intuitive
  • Battery display not proportional to how long it will last (they all are)

Overall, I’d declare it a winner. It’s a lovely offering a step up from the basic eGo batteries and cheaper than the APVs. I was doing my research into an APV for myself since the batteries seem to die faster than anything else, and I thought it prudent to start using replaceable battery models. This, however, proved to be both a nice stop-gap and convenient solution. For the average vaper, it is a no fuss device that just works. I think I will buy one or two more to replace my spinners entirely.

Zener Pre-regulator further testing

Finally I was able to do some electronics shopping and got the few (trivial) parts that I needed. They weren’t even fancy, just some jumbo crocodile clips and a few resistors and miscellaneous parts. Took me only a month!

Anyway, as I returned to my bench, I noted my pre-regulator already set up and remembered I needed to run some tests. Last time I had worried I had used a PNP instead of NPN darlington transistor by mistake and found that I was indeed using NPN and it was working just fine. I also noted some disturbing voltage readings when heavily loading it.

In the last post, the pre-regulator worked just fine with a bit of voltage variation over the range of loads I could be using. If using a high resistive load, the voltage could climb too high above 30V, dangerously increasing the voltage differential the poor LM317 has to deal with (which could cause an overload even with a pass transistor taking most of it), or too low when using a low resistance load (higher current) dipping below my absolute minimum required of 26V.

The maximum user selectable voltage output of my power supply will be 24V (actually 48V as it is ±24V and there is a negative mirror of the positive side, we’re just dealing with one side for now) so the LM317 needs at least 2V of dropout (or headroom) to output a good clean 24V which is how I arrive at 26V. Of course, electronics being electronics, I know better than to call it a day once I get 26.0V, a bit of padding needs adding.

I had previously measured 25.something volts when using a ~3A load (my home made resistor) which is below the minimum I need. Most frustrating. I postulated a bit of capacitance could beef it up so I gave it a go and tried a bunch of caps before settling on 100µF which gave me a nice 27.4V which is just plain ideal! Problem solved there. For now. I checked with higher resistance loads (up to 10kΩ) and found it gave me an output of 30.4V which is still acceptable to me.

Of course, this is only one piece of the puzzle. I’m going to have to check again to see how well it fares with the current limiter, then voltage regulator, then load after that. It is more than likely some tweaking will be necessary to keep it all nice and stable and happy.

Other measurements

Of course, just getting the right voltage and current out isn’t the whole story. My DMM updates kind of slowly, and at the 200V range I have to use, it gives me only one decimal point to work with below 1V so it’s hard to see quick or small variations in voltage over time. Naturally, I fired up my ancient oscilloscope to take a peek at what it’s actually outputting. To my understanding, no power supply is perfect, and some ripple is always present. What is acceptable ripple I have no idea but I always assume the less the better. Considering a 30V output, the unfiltered ripple would be 30V which is insane. Thanks to the huge filter caps I have on the thing I can reduce that a fair deal. This is the first time I tried to measure the ripply on my power supply.

powerripple

The result seems to be approximately 6mV in a curve that screams to me capacitor which is not surprising. A quick google search turns up a ripple value for your average computer PSU of 120mV on the 12V line which is twenty times what I measured from my home made power supply! Having measured my own hacked ATX PSU it was also noisy as hell, which I hear is endemic to switch-mode supplies. Sure I had my 6mV of ripple, but at least it was clean ripple! A nice clean waveform. It seems I’m on the right path. More measurements to come later as I add other modules. The later stages and in particular the voltage regulator *should* show even less ripple. I remember a section on the LM317 on ripple rejection…

I will also probably double check my results. I do remember I saw a Fundamentals Friday episode of Dave Jone’s excellent EEV blog on the very subject of measuring ripple and noise of a power supply, found here.

Another consideration was, with how hard I’m driving my transistors by pulling 3A through them, was heat. I have zero idea on how to calculate how big a heat sink I need for a particular application and naturally assume the bigger the better. I’m sure Dave Jones has something on that also come to think of it. Time to get back to class. In the meantime, because I hate leaving the bench when I can melt things straight away, I used my indefatigable logic to conclude that I will drive it as hard as I plan to run it and take a bunch of measurements. Then I will plan for at least 20% margin above that.

I used the thermocouple that came with my multimeter to measure the case temperature of the TIP142 transistor and ran it through a 3A load. The temperature climbed steadily after a few minutes to about 120°C which is bloody hot! I’m uncertain whether or not it would have climbed higher than that given time, but it was climbing very very slowly at that point. 120°C is exactly 80% of the TIP142′s max junction temperature of 150°C which sounds just fine but I’m not really satisfied. If I left the thing running for three hours would it approach or exceed 150°C? I have no idea. Better over-safe than melted and sorry.

I will definitely be using a larger heat sink for all six pass transistors used in my design, and of course there will also be forced-air cooling as well. Pretty much all semiconductors tend to start acting badly as they approach their maximum rated temperatures so it’s a good idea to keep them as cool as possible. Easily done.

If you are a budding hobbyist reading this I recommend building your own power supply, you’ll learn a hell of a lot in the process.

Update

Have a good look at the pic of my oscilloscope reading above. Note that it is set to 2ms/division. So each of those squares on the x-axis is 2ms. Note that there are four (close enough) divisions for each wave. 4 divisions at 2ms/div is 8ms. Now think of this. The AC cycle in our houses, which I have converted to DC in my power supply, is 60Hz or oscillating 60 times per second. Because I use a full-wave bridge rectifier, that frequency doubles because it inverts the negative voltage to positive voltage so it oscillates at 120Hz. So what is the wavelength? 1 second / 120 times a second is 0.0083333ms. So it will take 8 and 1/3 ms for each wave which is exactly what you see on my ‘scope :) .

Update part two

To give you a comparison, in the video linked above about power supply ripple and noise, Dave Jones compares the data sheets for two power supplies, one a high current switchmode, the other the Rigol DP832 commercial bench supply. The former had a 10mV rms ripple rating, and the latter had a 2mV peak-peak rating. If i am reading my oscilloscope correctly, I am showing 6mV peak to peak to I am actually very happy with that result. When I have more of it built, I will have to of course test it under a wide variety of loads and get a more accurate picture of the ripple coming out of it but it is encouraging.

Milliohm Meter and why we all need one

As I am fond of mentioning, projects beget other projects. It’s just the way of things. The power supply needs a dummy load, the dummy load needs to be low-resistance, my multimeter can’t measure low resistances worth a toss, so I need a way to measure this accurately.

The why

Owners of old analog multimeters have sometimes had a low-ohm function, so they have the ability to measure low resistances. Why do we lack this with our modern DMMs that are supposed to be better in every way?

Before I realized that my DMM was unreliable below 10Ω, I had been shopping for 1Ω resistors for current measurement and was so annoyed when they measured way off, sometimes 20-50% off. It perplexed me. Why even bother making resisters that are so out of spec? The easy (yet non-intuitive answer) is that the resistors are not at fault, but my DMM is. Specifically the leads.

Try this out: take your DMM and turn it to the lowest resistance setting. Then touch the leads together. It’s not zero is it? That’s no mistake, the leads themselves have a small, yet non-zero resistance. In addition, all multimeters measure resistance by pumping a small, known amount of current into the subject in question and measure the resulting voltage drop – basic Ohm’s law. The difficulty comes in that most multimeters don’t put out enough current consistently to “amplify” the reading enough to shoot above the accuracy floor of the multimeter itself when attempting to measure low resistances. The errors of measuring very small voltage drops combined with the small resistance of the leads themselves add up to an inaccurate measurement that is utterly useless.

The solution

What is needed is to pump a stable, known current across our subject. It has to be high enough to “amplify” the reading to read well on a display or volts setting on a DMM. We also have to eliminate those pesky leads.

With that in mind we need a constant current source. What quickly jumped out at me from a bit of online research (like this and this) is that it’s quite easy to achieve this with the humble (and ubiquitous) LM317 voltage regulator. The datasheet shows in the application hints (see figure 43) of how it can be easily wired to act as a constant current source as opposed to it’s more usual use as a constant voltage source. Simply whack on a low, known resistance on the output of the LM317 and have the ADJ pin on the other end of it. It will then regulate the voltage across this resistor to maintain a constant current. Easy.

Picking the right current is the easy bit. Obviously we want something in powers of 10 to avoid any extra calculations (we do want a direct readout) and we want to choose something that lines up with the range setting on our multimeter so it’s set to the millivolts range but reading milliohms directly. One example I saw used a 100mA current which would give a display in 10s of milliohms. This works, but i found it confusing, having to do a mental calculation (even moving a decimal point) which is just plain annoying and opens up the possibility of errors and misreads if I forget.

So I chose a current of 1A, a nice round number and it magnifies the result by a factor of 10 so my millivolts display reads milliohms.

miliohm-meter-adaptor

Through a lot of bashing about in Circuit Lab, I determined that the sense resistor (sitting between the output of the LM317 and it’s ADJ pin) would need to be 1.155Ω (more accurate than the 1.2Ω quoted in the datasheet) to make the LM317 spit out precisely 1A into my subject. Again, we have the problem of low resistance and also 1.155Ω is not exactly a common value, in fact I don’t think it’s manufactured at all (why would it be?). A simple way around this is to use resistors in parallel to achieve our target value. Better yet to make one of those resistors a trimpot so we can really dial it in there accurately. See the schematic on the right.

Using the parallel resistance formula, we know that 10x 10Ω resistors = 1Ω so a bit of fiddling with other values in there would net us our target value. Also, the power rating is additive in parallel which is also handy. 10x 1/4W resistors make a 2.5W resistor! I chose the values based on what I had in my parts bin, but annoyingly I am missing a 100Ω trimpot. I had a 100Ω regular potentiometer which would have been fine had I not fried it by trying to solder it (doh!). I will need to make it downtown and grab a trimpot to finish this project. As always.

So that’s the solution for the constant current. Naturally, it will need a power supply which I calculate to have to be on the order of 14V and capable of 1.5A (just for a bit of headroom). More on that later.

Kelvin measurement

With the constant current problem taken care of, we are still left with leads that have a non-trivial resistance which when measuring such low resistances could really skew our measurement. Small problems become big ones when you need more accuracy to measure very small things.

Fortunately, there is a tried, tested and true way to do this: Kelvin measurement. The concept is simple: eliminate the leads. We still need leads to run from our constant current source and to our DMM but we can effectively eliminate them by separating the current supply from the measurement. Since we no longer are attempting to measure resistance and supply current with the same leads, the resistance of the leads is nullified. The one catch is that they do all have to meet but as close as possible to the subject under test. The solution to this is to have the multimeter lead and the current supply lead meet right at the test points for the resistor.

If we calibrate our trimpot such that 1A is being delivered right at the positive connection to the resistor, we eliminate the tiny voltage drop of the lead from the current source. Since the multimeter is just measuring voltage the length of its leads essentially also becomes trivial again. With our result nice and amplified from the 1A current, all other factors kind of fall down to the noise floor and can be safely ignored.

This is known as 4-wire or Kelvin measurement. It is commonly employed but of specific use in current sensing applications. There are even 4-wire resistors or “shunts” that are specifically designed for this, making the test points a close as possible for the most accurate measurement.

Safety Margin

One thing to watch out for of course was watching the max 15W power dissipation of the LM317. The other circuit I took the idea from had the current output at 0.1A so that was never a possibility, at 1A one has to be careful. In bashing around the calculations I made triply sure that everything was well within safety margins. Always, always, always check the power your are dissipating though your transistors, regulators, shunts and power resistors. Watch for little traps. For example, the LM317 dissipation is given by the voltage differential (in vs. out) multiplied by the current you are running through it. The datasheet says it’s capable of 40V or something differential and 1.5A but if you try that you will have a molten LM317 (60W is way way more than 15W). Watch your max power dissipation and try to never go above 80% of that, same goes for the max junction temperature (meaning use heatsinks and even fans if you need to). Really over-design your safety margins.

Even if you are below 80% of the rated maximums, check your datasheets and in particular look at the graphs. The LM317 for example loses ability to regulate voltage (and thus current) when you approach it’s maximums so make sure you are well within an acceptable range for desired operation of your product.

We’ll see if I have done my due diligence when it comes time for power up, calibration and testing.

The build

Undaunted by missing critical parts, I went ahead and soldered what I had together with the result shown here.

Just an LM317 constant current source

Just an LM317 constant current source

I’m missing the 100Ω trimpot but also suitable power supply for the thing. I have a milk crate full of salvaged wall worts and none fit the spec. I know from experience that 12V ones will have a couple of extra volts so that’s no problem, i have tons of 12V and 14V ones kicking about. None, however, can deliver more than an amp it seems. So i will have to buy a surplus one. Failing that i’ll just build a 14V power supply but i’d rather not waste parts when a simple wall wort will do.

Test leads. The left bottom is the PCB connector to the above board, the left top plugs into the DMM, the right will have alligator leads for the test subject

Test leads. The left bottom is the PCB connector to the above board, the left top plugs into the DMM, the right will have alligator leads for the test subject

I’m also short on suitable alligator clips for my test lead shown here. I have saved my clips from broken/melted alligator test leads but the small rubber boot on them won’t fit over the heavy gauge wire I am using for test leads. Seems kind of necessary to me for safety. I’ll add to the list some heavier duty alligator clips. Might as well do it right and I need to head to the shops anyway.

Also, I have a case I could use, but it’s rather large, wouldn’t hurt to have a smaller case to avoid wasting the larger one. It will be a simple adaptor box with wires coming out of it, no readouts or anything so I don’t need the extra surface area, just enough room for the board and the LM317 and it’s heatsink. The only holes in the thing will be the current wires, a 5mm LED, and the DC input jack. Easy drilling.

Expect a follow-up once I get my butt to the shops.

Zener Pre-Regular Revisit

In revisiting my power supply project I also revisited a number of unanswered questions. Chief among them is how on earth do I get rid of the excess voltage from the AC rectification? Previously, I had mentioned this was somewhat of a shock to me as a novice that a 30V AC tap from a transformer can gain 12.6V in the rectification to DC. I know part of that is the combining of the AC waveforms and the bumping up by the mammoth amount of capacitance I have on it to smooth it. I had originally tried some very dodgy and very ugly collection of series power diodes which plain just would not work. They were not only ugly, but ridiculously unsafe and would prevent the proper operation of the circuit at low currents and would be unreliable at high currents. Scrap that. I’ll consign that to the embarrassing fail bin.

The next idea was to pre-regulate the voltage down to a safe level for the downstream regulators and prevent unnecessary power dissipation. I chronicled before some shaky success but discarded that idea after it proved somewhat lacking and prone to smoke. I also thought that now three darlington transistors in the signal path was somehow wrong, there was something about it I didn’t like for some reason.

In poking about again with fresh eyes and a clear mind I decided once again to make a zener pre-regulator, having it control the base of a darlington transistor to set the output voltage to just shy of 30V. Most of the original concept stayed the same with a few little modifications to make it safer and include the proper ratings of components as well as ensuring that no datasheet “Absolute Maximum Ratings” were being flirted with. Schematic below. (please note the caveats at the bottom of this post)

pre-regulator-test-circuit

As I had been down this road before, I was tickled to discover that I already had everything I needed in my parts bins and with my 10Ω home made power resistor just completed I set to marrying it all together. Having only a few parts it was rather trivial to assemble it.

I test powered up the AC board as I had not touched it in a year and I got that delightful hum and that crazy 85.2V reading between the positive and negative rails. I kind of freaked at that moment, not only because 85.2 is a lot of volts but I realized I really need to be extra safe with this thing. Also I forgot that it was centre-tapped and i just measured the negative lead (-42.6V) unnecessarily. I cut the power to it and noticed my multimeter barely dipped. I realized that the 10 milliFarads of capacitance I had on the thing to smooth the power is not only extremely dangerous when charged, but would probably take a decade to discharge though the multimeter’s very high input impedance. Rather than touch the positive and negative wires together to discharge the caps instantly (which would have resulted in a very big and dangerous bang) I carefully placed them on a 30Ω power resistor I had to drain the caps quickly and gracefully.

This is why you are always told to never touch capacitors when opening up equipment as they could be charged still. They must be discharged. Smart is using a low value power resistor to “bleed” them dry of charge. Stupid is shorting the terminals with a screwdriver. For safety, I will include such a resistor – a “bleeder resistor” – to discharge the caps when it is switched off.

Anyway, with the AC board working great, it was time to hook up the latest candidate for a pre-regulator and try it with some loads.

The setup. From left to right: my 10Ω home made dummy load resistor, the zener pre-regulator, and the AC board

The setup. From left to right: my 10Ω home made dummy load resistor, the zener pre-regulator, and the AC board

It worked sort of fine though the numbers were of course somewhat off from my simulated circuit. For one thing the 5W 30V zener I was using led to a regulated voltage of 32ish volts which was higher than I wanted it to be. For my stuff to work well I needed it about 26-29V. I needed enough headroom for the eventual voltage regulator to make a nice steady 24V yet as low as possible to reduce the power it will dissipate due to the voltage differential. On a whim I whacked in the 1W 30V zener I had and behold – I got 28-29V. Perfect. Just what I wanted.

I tried a variety of loads including: a 1k resistor, 100Ω power resistor, 30Ω power resistor, and yes – my monster of a 10Ω resistor pictured here in glowing glory as it dissipates something like 90W of power.

IMG_0558
IMG_0559
IMG_0563

Overall I would call it a success with some caveats. I did notice a change in voltage depending on the load I was putting across it. This is not a huge deal as I do not need it to be an accurate voltage regulator, but i do need it to stay under 30V and above 26V, preferably with a bit of padding, no matter what load i draw from it. In the schematic above I added some capacitance to hopefully smooth it up a bit and keep it a bit more stable. I will test this tonight in the lab. I did get the disturbingly low reading of 25.6V (ignore my stupid multimeter it sometimes forgets decimal points) which will definitely need investigation as this is below my absolute minimum of 26V.

IMG_0565

Another problem, that I just noticed in fixing up the schematic to post on here, is I probably used the wrong transistor. On it, and from examples I had used to design it, I indicate an NPN darlington to be used and I had probably mistakenly used a PNP one. This worked just fine but I might investigate while i’m down there to see if indeed I did indeed use the TIP147 instead of the TIP142 and what, if any, effect swapping them would do.

Update

Well I just took a poke on the bench and I was indeed using the TIP142 NPN darlington like I was supposed to. I still need to investigate why the voltage dipped and if I can repeat that and take some careful measurements. I understand how to use the darlington as a current regulator, and the dip in voltage would suggest it’s limiting the current (which I do not want it to do at this stage). It makes a basic sort of sense by the 30V zener would net roughly 30V on the output (I guess) but I need to know the why and specifically the calculations involved. CircuitLab showed me that I would get around about 30V regardless of current draw, why this real-life dip I haven’t a clue – yet. I’ll try and repeat the experiment and isolate the conditions under which the voltage dips. I’ll try various other loads too to see if it goes outside the usable window. More to come.