Connect with us

How to mesure amps at a high sample rate?

Discussion in 'General Electronics Discussion' started by Mongrel Shark, Jul 17, 2012.

Scroll to continue with content
  1. Mongrel Shark

    Mongrel Shark

    260
    21
    Jun 6, 2012
    I suspect many of the Joule thief circuits I am working with lately are fluctuating the amps at a high speed, equal to the fluctuations in voltage (Sometimes up to 300v).

    I have tried my best multimeter, which has TRMS designed for AC mains work, it has a TRMS AC+DC mode that is more accurate than anything else I have tried, but I think the the sample rate is to slow. Also I would like to see max, min, p to p amps etc.

    I have tried shunt resistors with my scope. Every time I connect the negative probe it kills the oscillation.

    So I tried using two pos probes and the add subtract Chanel a & b function. It does not show the waveform well, the peak is about 10x smaller and shorter, and there is a ton of noise from mains power etc. Also I'm not sure exactly where to put the probes, and whether I want to add A+B or Subtract A-B.... Will this work? If so how do I apply ohms law to my waveform?

    The scope is a DSO Quad 203. It's battery powered. The noise is a lot less with the usb charging cable disconnected. I do know the scope is interfering with the circuit in other ways too. Because the LED often light with only one leg attached to the circuit, when I touch the other leg with my finger, when this happens I do not need to be touching any other part of the circuit. Not sure exactly whats going on here, but wireless transmission is part of it as I can light the led from my 300v JT with just one leg connected, and no measuring kit attached, only if there are high enough voltages present. it gets a little brighter if I touch the disconnected leg. I only mention this in case someone knows how to alleviate the interference...


    Mostly I just want to be able to measure and record (with a pen if I have to) real time amps fluctuations up to around 1mhz. 500khz would still be useful. amp measurement needs no me in uA and able to read up to around an amp, maybe 10?

    I am prepared to by some new kit to do this, but budget is probably around $200 (AU/US) unless it's going to be good for other stuff as well...
    I can also do maths pretty well if I have all the right formulas.

    Any suggestions?
     
  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,505
    2,852
    Jan 21, 2010
    Your scope isn't going to be able to do measurements that fast. I have a device similar to this and above about 30kHz you start to lose resolution.

    What are you actually trying to do?

    Do you want to see the current drawn over time? or the current consumed by the circuit over time (these are very different)

    Most "Joule thieves" operate on a similar basis. A low current (whatever is available) is used to charge a capacitor. When the voltage gets high enough the circuit dumps the voltage either directly into a load, or into an inductor and the resulting spike is directed to the output (which often has a capacitor to charge up to this higher voltage).

    The input current is typically low and relatively continuous. It typically falls up to the point at which the circuit fires. When the circuit fires, it dumps the voltage across the capacitor (sometimes into another circuit, other times into an inductor). The output is a high power pulse that is slightly less than the power that was drawn from the power source during the period since the last pulse.

    Some "Joule Thieves" run continuously, these are not really joule thieves (even though the term has no real technical meaning) rather they are simple boost power supplies.

    So there are at least 4 currents you can measure:

    1) input current to the Joule Thief (current into the input capacitor)
    2) Current "used" by the Joule Thief (current out of the input capacitor)
    3) Current out of the Joule Thief (current into the output capacitor)
    4) Current into the load (current out of the joule thief)

    I suspect you're trying to measure 1 or 2

    Given that you have troubles when you use shunt resistors, I suspect it's 2 because additional resistance at this point may change the characteristics of the circuit significantly.
     
  3. Mongrel Shark

    Mongrel Shark

    260
    21
    Jun 6, 2012
    I want to be able to measure amps at any point in a circuit over time, I would have thought this would help me better understand how many amps are consumed.

    Not many of my joule thief's, or the original have a cap. sometimes it can be an advantage, depends what you want. Bright light, or long lasting dim light from low volts or low amps or a compromise of both.

    My scope has 72msps and a confirmed bandwidth of around 1-3mhz. I only give it credit for 1mhz. All my JT's are much lower, I just want 1mhz to make sure I have a little restitution up my sleeve. I agree my dso 203 is not great, but it's the best I have. I sholud probably find someone near me with a good powersuply too, as it needs calibrating, I need a supply that can be adjusted from 0v to 80v in a ton of specific steps to do this.


    Even without the cap there are more points I want to measure. When I do use a cap it is across my pot (resistor) on the transistor side of my base coil.

    I want to measure mostly current out of the battery, on the pos terminal as well as current on the negative terminal.

    I also want to measure current at all three legs of the transistor. especially on the emitter with the led reversed (anode to emitter, cathode to base or collector)

    Then I will measure current in and out out the led...

    For eg I can get some pretty bright light with the led anode on the emitter and the cathode on the base. Yet my TRMS meter says the current is going the wrong way. I can see why it light's on the scope. There is a -20v spike on the base every time it switches of and collapses the coils emf. but it only lasts for a few uS, 20uS at most... I want to know how many amps are there. Like the one I made that puts out 300v from a AA, is it dangerous? I would assume watts law still aplies, so if I get 300v from 1v, and have 100ma draw at the pos terminal, I can probably divide the 100mA by 300 and subtract a little for losses and be in the ball park (Ok I succumbed to curiosity and touched it, felt like a medium grade electric fence confirming my theory about watts law). also it was at about 5khz so pretty low risk of any serious harm.


    Like I said. some circuits show 1uA draw on a cheap meter with 3sps. but shows a flicker on my expensive trms meter, it's only doing a few hundred samples a second though. I thought about a needle meter, but that's not going to be fast enough either.


    If I can only measure a few of theses things, the ones I want most go in this order.

    1.Current in and out of the battery, on both terminals (Some of my circuits dump back emf into the batterys pos, like some kind of faux charging). both when the transistor is "on" and when it is off causing emf breakdown.

    2. current over time from the coil to the base and collector of the transistor. There are often negative spikes. some for as short as 1uS every 20uS these are of particular interest.

    3 current over time in and out of the load. as I said the LED can be lit for as little as 1 micro second

    4. If I can do the above three I will be measuring current magnitude and direction at the emitter neg terminal junction. again I need restitution that will go down to 1 micro second.


    I really only need help with the first two, after that I will be right to do the rest on my own.


    As far as definition of a joule thief. I don't believe they need to oscillate, just suck the last bit of life from a battery. ie: I can get a AA down under0.1v and have it stay there. Takes a week or two of making reading (if you hold the text close to the light) quality light after it comes out of the remote or whatever... I have not seen a non-oscillating circuit that can do this, but I'd like to. you pretty much need an oscillating inductor to do it...


    I know the approximate voltages at all these points (stupid un-calibrated sillyscope) I can find the Resistance of any part of the circuit. I can survive with a result that is not super accurate. Within 10% would be bearable, although better would be great.

    Problem is, How do I aply ohms law to a curving graph and add time to the equation?

    Or should I get some new kit? Like would a curve tracer work? Ive seen people show amps on those... Or perhaps some other bit of kit I have not heard of? If so what sort of cash do I need?
     
  4. Mongrel Shark

    Mongrel Shark

    260
    21
    Jun 6, 2012
    P.S. I have put my scope on the terminals of the battery and it shows a fluctuation. So according to ohms law the current must be fluctuating to right?
     
  5. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,505
    2,852
    Jan 21, 2010
    Can you show us a circuit diagram? I can only guess without it.
     
  6. BobK

    BobK

    7,682
    1,689
    Jan 5, 2010
    Here is the classic Joule Thief in LTSPICE. The graph is the voltage across the LED.

    There is no capacitor. It works by having the current buildup in the coil in the collector turn off the base thorugh the coupled coil, to form a blocking oscillator. It is indeed a very simple implementation of a boost converter.

    Bob
     

    Attached Files:

  7. Mongrel Shark

    Mongrel Shark

    260
    21
    Jun 6, 2012
    Bob, That is verry similar to some of my simpler circuits. although sometimes I dont have any Resistance on my pot, which is at the other end of the base winding. Although you really should look at the base on the scope with another Chanel... You need two channels to see the full picture...

    Heres one of my drawings http://ScrnSht.com/osmbkb

    Sometimes I have different windings, like a 10-1 ratio... I have 8 coils and 13 transistors I am playing with. I want to measure them all.. Sometimes I have no led or run the led on different legs of the transistor (it will work anywhere except with the anode on the base)... I want to look more at amps on all the variants....

    If you want to see scope footage I have some good video in the first two videos on my Channel

    The 25v from AA's vid is only 4min if you have poor internet. I do recomend loading up the hd version and going fullscreen to look at the scope.. the 4min one at 1080p will cost you 70mb.

    I want to measure amps on that one as well as the reverse one (with the LED in backwards)

    I just don't think my meters are fast enough to get it right... How can you get trms on 4khz with 660sps? It's got to be wrong...

    You really shouldn't need a drawing though, I just want to measure amps at a faster rate. Or use ohms law to do it with my scope (id rather not as it's poor calibration is going to mess with stuff, although i can work out how much it's out by and compensate if I must) It should not matter on the circuit. I will want to apply this to other circuits, like for eg, my antenna based energy harvester... picks up signals over 6ghz. I will need to measure those fluctuations at some point too. Obviously I'll need a much better scope to play with that much...


    After a few weeks playing with JT's I know about as much as anyone about them. the only questions I have left are relating to amps. I'm convinced my meters are not fast enough.... Why for example, does a second third fourth etc LED in parallel hardly change amp draw from the battery? How can 300v without a load light an led without blowing it? How can I draw 500ma from a 1v battery and run the led on 5v spike for days on end with out noticeable harm to the led?

    I have 4 DMM's that do amps. none of them agree.... They all have different sample rates... This seems to be the main factor in the different reading... The trms one is the most accurate, but it just dosent cut it... Something is not right.

    I really dont mind getting more kit. But I want it to be either cheapish (while still acurate) or good for more than the one task, although I will be wanting to do this a lot. so another 200-300 dollar DMM is not out of the question. Would a simple analog needle meter give a better average? I could possibly live with that...
     
  8. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,505
    2,852
    Jan 21, 2010
    As you note, a blocking oscillator, and a very simple boost converter.

    I guess my issue is that the term "joule thief" is a very loose one. This circuit requires the battery to be capable of supplying the full current for the oscillator. (However, on googling, I'll accept that this is by far the more common usage)

    In contrast we have circuits like this:

    [​IMG]
    This was also introduced to me as a Joule Thief, charging a capacitor from a high impedance source and then using that power in a single burst. This is another form of relaxation oscillator (essentially) where the frequency is determined by the RC time constant of the capacitor and the internal resistance of the voltage source, and of course the voltage available.

    Anyway, back to the original problem -- measuring the current.

    My first step would be to place a small resistor in series with the battery (say 1 ohm) and use my scope to measure the voltage across it.
     
  9. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,505
    2,852
    Jan 21, 2010
    Oh, another thing. It's well worth simulating the circuit and looking at Vbe over the cycle. A blocking oscillator can try to drive the base significantly negative with respect to the emitter. This can be very unhealthy for the poor transistor. One option is a (reverse biased) diode from base to ground.
     
  10. BobK

    BobK

    7,682
    1,689
    Jan 5, 2010
    In my simulation, the base goes to -2.4V. Is that bad? I see nothing in the datasheet about reverse voltage on BE.

    Bob
     
  11. Mongrel Shark

    Mongrel Shark

    260
    21
    Jun 6, 2012
    I've had up to -30v without harm to the transistor. Although I did have a bc447 die for no reason I could work out. I think that was on the -30v coil too...

    As I said in the first post. First thing I did was try the shunt resistor. (1k) First few times I tried it, when I put the neg probe on it the oscillation dies. Tried a few coils and transistors. Stupid sillyscope is causing to much interference. Also the shunt resistor (I tried 1k and 3.4ohm) make it so dim and change the waveform so much as to invalidate the results..

    I just had another go and got it working with the 3.4ohm resistor. Scope shots are attached.the first two are just the scope hooked up, chB is the shunt and chA is on the collector when it is positive peaks, and on the base with the negative peaks. Not conecting chA makes chb look the same as when chA is on collector. I only have one neg probe on, on the shunt (this was part of my problem, putting a neg on the battery kills oscillation, I did some reading and found it is because they are common to the scope body, lol, I should have known that). Why does changing chA invert chB? I'm thinking it has to do with the location of the neg probe.

    The 3rd & 4th pics are with the DMM hooked up as well. Normally this changes the wave more, the shunt must be reducing it. One cheap $5 DMM (I think it does 3 samples a second) says it was drawing 104ma, The true rms meter says 52ma on dc and 54ma on trms ac+dc.


    The circuit it using a 2n3904, equal coils (around 250uH from memory, I can check if need be) using .4mm wire, it has 0.75ohms of resistance to each winding, so 1.5ohms for both winding in series or 0.375ohms in parallel.

    Battery is showing 1.384v with circuit on.1.406 with circuit off (Had to use a full battery to get the shunt to work)

    Bear in mind my scope is not very accurate, Peaks across the shunt are varying from 40mv to 72mv, Since I know it mostly exaggerates by 10-12% or tells the truth, depending on range ov volts being measured, Lest say it has a 50mv average peak.

    So if .5/3.4=0.14705882352941176470588235294118 Does that mean I am seeing 147ma spikes while it is running at aprox 50ma between pulses? or would it be 50ma constant with 147ma on top? making it 200ma peaks?

    Should I ignore my DMM's since none of them agree and work out the rest this way too?

    Or have I got something drastically wrong?

    Any suggestions for doing this on low power circuits? I cant get it to work. I really want to check a "penny" ossilator running in single digit micro amps from .5-.6 of a volt.


    If I'm right I have more videos to film. That makes about 9 in the que now... LOL I hardly have any time left for experimenting...


    Thanks for the tip about the diode from base to ground, hadn't thought of that. You can light leds there too though, done that :) What about when I get negative Vce? (it's rarely over 4v) is that harmful to the transistor? Does running a reversed LED consume enough power to offer protection? Kind of like using a neon?

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]
     

    Attached Files:

    Last edited by a moderator: Jul 18, 2012
  12. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,505
    2,852
    Jan 21, 2010
    Hmmm... without harm...

    I would recommend a resistor that drops a smaller voltage, perhaps no more than 100mV, but you have results.

    You'll notice I've taken the liberty of editing your message to include the images. Using the "insert image" tool like this makes life a lot more friendly for readers.

    Yep, that would do it.

    You're reading voltage with respect to your ground probe. If you change the position of your ground probe, the signal you see will also change.

    you're best off having the ground in a location from where you can make sensible readings for both voltages.

    I would recommend that you (hmmm, do we have a circuit diagram yet...) connect the current sense resistor in the ground lead, with the ground connection to your scope connected to the side closest to the circuit (not the battery). The probes can then go on the other side of the sense resistor and the collector (or wherever).

    As you have noted, a multimeter gives you results that don't mean a lot.

    I would recommend that you carefully note the voltages you see (minimum and maximum). That will (for the current shunt) tell you what your minimum and peak currents are.

    Yeah, a lower value shunt might help as long as your scope can display the lower voltages.

    Well, I don't know what the minimum current is. I would expect that the minimum current would be much less than that.

    Are you using an AC or a DC range on the scope? We really need to see where zero is,so DC is appropriate.

    The meters are giving you a measure of something that tries to be the same as a DC voltage. The True RMS meter gives a value that is the value of a DC voltage that would have the same heating effect as this voltage. The other meter tries and fails -- it would probably work id the input voltage/current were sinusoidal, these are not.

    Yeah, see above. Main things are to note where zero is, then the min and max voltage. The true RMS voltage (or current) will allow you to get a good idea of the power being consumed though.

    Vce reversed is forward biased through BC and reverse through BE. It's almost as bad as a reversed BE (0.7V better).

    A LED there would be fine. The only issue is the capacitance of the device -- considering it will never get more than 0.7V reverse biased, it may change direction pretty smartly. Two white LEDs there should clip the voltage to one that the transistor can handle.

    The power you're sucking from there is likely to be dissipated across the reverse biased BE junction anyway, so as long as the voltage stays in a similar region (just a bit lower to protect the transistor) you won't be sucking more power from somewhere else.
     
  13. Mongrel Shark

    Mongrel Shark

    260
    21
    Jun 6, 2012
    Ok So I realized I had made a mistake or two not long after making my last post.



    I had the ground lead for the o'scope on the positive terminal and resistor.

    I've thought about this carefully and read steve's post, and I think it has to go on the negative terminal of the battery. Everywhere else in the circuit is affected by the induction coil. The neg post probably is too, but I think it would be least affected. Only way I can think to check that would be a second battery in series, and use the neg terminal on that for -1.2v then subtract the value of the battery from any readings. Although that will force me to use lower resolution to keep the image on the screen...

    Another thing I should have done is measure both sides of the resistor and look at the difference between the two.

    So I did that and took a screen shot.[​IMG]
    If you look across the top line, you can see chanel A (blue) and B (yellow) are both set to 200mv a div. Ypos on both is at the bottom of the screen, you can see the yellow tag for B, A's tag is in the same spot. Trigger is on A just below 1.2v. Time is on 5uS a div. So there is about 650mv on B and 750mv on



    This is where I started to get confused.

    The difference between the two flat parts is 300mv (approx) across a 3.4ohm resistor . So .300*3.4=0.088 = 88ma

    Which is about how much the trms meter says the circuit uses. But how do I measure the peak?


    Also worth noting, thats with the variable resistor on the base coil set to 0. Changing the base resistance changes the draw wave a lot. and something really strange is happening at really high resistance, right around the point the light drops out, but my scope is to slow to see it..

    Heres a shot at 38ohms on the base resistor. Now my battery is getting a bit lower, this shape just gets smaller as I dial in more ohms on the base.
    [​IMG]
    If I had a meter on with this much resistance on the base it would be approx 40ma draw.

    The circuit is dead standard Joule Thief. Just like bob's. but using a pot for resistor, and a 2n3904 transistor. My led is rated for 3.2-3.4 frV @ 20ma but it will light up around 2.6v.



    What am I doing wrong?
     

    Attached Files:

  14. sparkyscott1

    sparkyscott1

    4
    0
    Jul 21, 2012
    Guys this is a bit out of my league. But back in the day LOL when checking for small diviations on combat recorders (USN) TRMS meters could not be used we had to use WOW Flutter Meters. Just asking?
     
  15. Mongrel Shark

    Mongrel Shark

    260
    21
    Jun 6, 2012
    http://en.wikipedia.org/wiki/Wow_and_flutter_measurement

    I don't think one of those will help much... Mostly looking for variation under 200hz, especially in the 4hz range. I can see why you couldn't use a trms meter though. You could use a neddle meter and get the worst of the wow an flutter out though ;)
     
  16. Mongrel Shark

    Mongrel Shark

    260
    21
    Jun 6, 2012
    Been meaning to bump this one for a while. I worked out what I was missing. 1ohm resistor means amps and volts will be the same (facepalm, I knew I was missing something simple!!)... Measure the voltage drop across the resistor, with a scope, and the waveform will also represent currant through that part of the circuit. Still having issues measuring near inductors, but then I found this simulator (and worked out how to use it right): http://www.falstad.com/circuit/. It can measure volts, amps, watts, V vs I, and plot. And display scope graphs (Lots of them, I had 8 channels earlier) Of any component or wire in the circuit. No more PEBKAC errors for me (I hope) with my scope, I can check my results against the simulator now....

    It's one of the most simple and intuitive programs I have used. And it's tiny... And its free. Win win win.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-