Counting Laps And Testing Products With OpenCV

It’s been about a year and a half since the Batteroo, formally known as Batteriser, was announced as a crowdfunding project. The premise is a small sleeve that goes around AA and AAA batteries, boosting the voltage to extract more life out of them. [Dave Jones] at EEVblog was one of many people to question the product, which claimed to boost battery life by 800%.

Batteroo did manage to do something many crowdfunding projects can’t: deliver a product. Now that the sleeves are arriving to backers, people are starting to test them in the wild. In fact, there’s an entire thread of tests happening over on EEVblog.

One test being run is a battery powered train, running around a track until the battery dies completely. [Frank Buss] wanted to run this test, but didn’t want to manually count the laps the train made. He whipped up a script in Python and OpenCV to automate the counting.

The script measures laps by setting two zones on the track. When the train enters the first zone, the counter is armed. When it passes through the second zone, the lap is recorded. Each lap time is kept, ensuring good data for comparing the Batteroo against a normal battery.

The script gives a good example for people wanting to play with computer vision. The source is available on Github. As for the Batteroo, we’ll await further test results before passing judgement, but we’re not holding our breath. After all, the train ran half as long when using a Batteroo.

34 thoughts on “Counting Laps And Testing Products With OpenCV

  1. Looks like it may work well, looks a bit magicless, most of my opencv projects have been automatic game playing similar to the famous guitar hero robot and something so simple may not work. I think I used model matching in the end.

    1. Right, no magic involved, like detecting the train shape and tracking it, but it demonstrates some basic features of OpenCV in a simple Python script, like video capturing, rectangle image extraction and converting to grayscale, and then accessing the individual points. Would be more code with other graphic frameworks. And that’s all you need for this task, works very reliably.

  2. One of the other videos in his series he hacked calculator and hall effect sensor (i think) together to track when a magnet attached to the train passed by. Much lower tech, but still worked.

      1. When the Indiegogo campaign started, many websites reported that it will do wonders, e.g. here:
        http://www.pcworld.com/article/2928997/batteriser-is-a-250-gadget-that-extends-disposable-battery-life-by-800-percent.html
        A Ph.D. can’t be wrong, right? And it was confirmed by Dr. Kiumars Parvin of San Jose State University, woohoo! It is sad that often these technical magazines don’t think or do some research before writing, but just copying the marketing claims of the vendors. And apparently many people believed it, that’s why they sold so much at Indiegogo.

        1. Let me rephrase then: Was anyone who can think expect the result to be any different? I’m getting so tired of this whole class of BS. This time of year in particular, I find myself getting buttonholed at social gatherings by those that want to discuss this sort of thing and invariably by those demanding I show why some claimed fantastic results are wrong (or admit they must be evidence of something revolutionary.) Worse, I must respond within the strict limits ot the rules of engagement decorum demands for discussion in these situations.

          1. seems like it is time to channel your inner BOFH, People like you described deserve a quick learning of the power of electricity. Preferably straight from the mains…

      1. Exactly.

        The toy train in the video is actually using significant amounts of current. With a typical Alkaline AA battery coming in at around 1000-1500 mAh and the toy train sans the booster is discharging the battery in ~2 hours so the current draw is all the way up to 500-750 mA which is a tremendous current for these kind of little batteries.

        The boost converter, in trying to maintain the voltage will start to draw eponentially more current and the battery voltage crashes down, and the oscillator in the boost converter simply stops. The product “fails”.

        But that’s expected, because Alkaline AAs simply can’t handle high current draw.

        More on the subject:
        http://www.powerstream.com/AA-tests.htm
        With a cutoff voltage of 0.1 Volts, a regular Duracell battery will do 2200 mAh at 100 mA, and only 1300 mAh at 500 mA so that’s 70% more Coulombs available at the lower current drain – that’s a feature of Alkaline cells. When the boost converter kicks in for the high current load of the toy train, the Coulombic efficiency of the battery simply crashes to nil.

        The test – as usual with the EEVblog guy – is rushed and sloppy and shows a general misunderstanding/confusion about the thing he’s testing. Of course, all this still means that the battery booster is a scam product that only works in devices that don’t put much of a drain on the battery in the first place.

        1. Or rather we should say, the booster has a very narrow niche in devices that draw just enough current.

          Too little current and the parasitic power consumption of the booster will reduce runtime. Too much current and the booster will kill the battery early as in the case of the toy train.

          There’s relatively few such devices though. A LED headlamp might go for 10 hours on a set of batteries, which is in the 50-100 mA range. They often have a built-in boost converter though, so the point is moot.

          1. He wrote in the forum that he will do more in-depth tests, but it is important to do some real-world tests, that everybody can understand and reproduce. The point is that Batteroo didn’t exclude any device and especially promoted it for “high-drain devices”, see their Indiegogo campaign:
            https://www.indiegogo.com/projects/batteroo-extend-battery-life-significantly#/
            So far no device is known for which Batteroo “extend Battery Life Significantly”, let alone “up to 8x”. It actually reduces battery life significantly for any device for which it was tested independently, if used from the beginning, as their FAQ says is totally ok. The opposite of what they promise.

          2. Well, the company has never specified what it means by “high drain”. 100 mA is already high drain for an Alkaline AA cell, and the toy train is very high drain. Anything that runs the battery down in two hours of use is basically just abusing the cell, and should not be using alkalines in the first place.

          3. “Well, the company has never specified what it means by ā€œhigh drainā€.”
            So what? They claim it will magically extend battery life. And they use RC toys as example applications.. And this product demonstrably fail to live up to their claim in both “high” drain and low drain applications..
            Oh, and your constant current sink would make absolutely NO difference to the conclusion…

          4. ” They claim it will magically extend battery life. ”

            The interesting part of the question is that these kinds of scams always have a kernel of truth in them to prevent people from simply suing them out of the water. There’s some use case that they can point to – within the ambiguities of their statement – which proves them “right”.

            And the interesting question is what that case is?

            The uninteresting bit is watching a squeaky monkey make an ass out of himself and demonstrating the trivially obvious fact that alkaline batteries are absolute dog shit at supplying a high current.

        2. “The test ā€“ as usual with the EEVblog guy ā€“ is rushed and sloppy and shows a general misunderstanding/confusion about the thing heā€™s testing.”
          Do elaborate on that claim… He never stated that this was anything else than a quick and dirty debunk of the product.. He has done more in debt videos on the subject before.

          1. What’s to elaborate?

            Dave did his usually semi-hysterical aussie act on a specific aspect of electronics he has repeatedly demonstrated he knows little, if anything, about.

          2. Whats your big problem with his test? Make a better on yourself then, the outcome will be the same… And this one of the applications specifically advertised by “Batteroo”, and it fails miserably to live up to their claims.. Of course there could be fringe situations with piss poor product designs that could benefit from Batteroo, but thats hardly an argument, and Dave even points that out in his video if you bothered watching it.

          3. ” Make a better on yourself then, the outcome will be the sameā€¦ ”

            That’s begging the question. How do you know the outcome will be the same? Well, you don’t without testing it.

  3. I love that this projects how easy computer vision can be! I imagined it being used to give a second life to batteries that in the bin of ‘should I throw away, or figure out where to recycle’. Thanks for clearing up that it’s for devices under a particular, seemingly low current.

  4. I’m surprised to find out that in the comments here I find people defending the product and attacking Dave while all Dave does is using it in an application just as a consumer would. If this device does work under certain conditions then these conditions should be specified properly otherwise the customer is not capable of using it properly.

    If this batteriser/batteroo thingy is successful (in the number of items sold) it is only a matter of time before they come up with an even sillier “scam” (some call it product). I predict they will come up with a device you can put in the gas tank of your car and will always keep the indicator to “full” until the last drop of gas has been used. It will make your car faster and run longer, wow, it’s amazing! But conveniently they forget to mention that this device only works properly when driving downhill.

    PS: does this “Dr. Kiumars Parvin of San Jose State University” still has his job? I find it difficult to believe that “educated” people doing claims like this educate the next generation. If this is true, well… were doomed! But I assume that this isn’t the case and that the words of the “Dr.” were twisted to suggest a different meaning and if this is true, well… were doomed!

    1. ” If this device does work under certain conditions then these conditions should be specified properly ”

      That’s the point. That information would be all that’s interesting about the product.

      Instead, Dave simply made a video just for poo-pooing the product by a use case that was doomed to fail anyways, and he did a crap job of even that by his usual arm-flailing and fumbling.

      For example, it would have been informative to see if the battery that was in the booster, which he measured to still have voltage left in it, would have moved the train further -without- the sleeve to give an unambiguous demonstration that the product is bunk, but instead he just did some sort of cup switcheroo game with the batteries to the point where I had trouble following which battery was which.

      So what I’m saying is, there’s actually two problems. 1) the product is bunk, 2) Dave is bunk.

      1. Yeah, I love watching Dave’s stuff but I just don’t understand the amount people care about this stupid batteriser thing. It’s just a boost converter, woop-dee-doo. We all know it won’t work as claimed so stop wasting time screaming SCAM and move on to more important things.

  5. I’ve observed this a few times now. A product claims something ridiculous. The product is funded and ships. Then the hacker community takes a lot of effort to prove the claim was ridiculous. Still the product is made. Profit has been made. And most likely this product will be sold for the next 10 years…

    Claiming something is easy. Producing garbage easy. Proving it’s garbage is not.

  6. Is there any battery type and device combination where the Batteriser is beneficial? Of course Dave Jones is interested in debunking the thing (either personal or by sponsorship). But there’s nothing invalid with his specific tests. However it would be interesting to see someone doing an independent (and reproducible) test that shows the thing working even remotely as advertised. If it’s all marketing hype, why bother with the expense of any circuitry at all? Just slip in a tiny lithium coin cell in parallel and call it good. And if it’s truly a fail, why bother making it at all? Seems like there’s a point behind this thing but nobody has found the application for which it was intended. All this complexity for… nothing??

      1. Not always. If the device has battery cells in series, a joule thief circuit like this can pump some of the cells to reverse voltage and if the user opts to use rechargeable batteries, that will destroy the cell.

        It’s unlikely that the manufacturer would opt to include a boost converter for every cell individually out of cost-benefit reasons, for example in a cheap headband light with 3xAAA cells in series, so if they add a booster then they have to ban the use of rechargeables and that’s not a good selling point.

        1. No, not always, however the point I was making is that where such a circuit would be of significant value it would be designed into the device. However like anything such an inclusion would have to meet cost-benefit criteria and if that wasn’t the case it is unlikely that an external device, like the Batteroo would add any value even if it provided a marginal net gain.

          That’s the bottom line here: boost converters are legitimate circuits – the insinuated claims made by this company about their capabilities are fraudulent.

          1. Well I’d like to see how fraudulent they are. It’s not news that a boost converter has a limited window of performance, outside of which it’s more harm than help.

            If the device actually manages to provide a constant output and/or extend battery life for devices within say, 10…100 mA range, then it is useful. It’s just overhyped. For the cheap 3xAAA headlight case as an example, the benefit would be constant brightness until the batteries are done for.

          2. The subject of the potential utility of joule thief circuits has been done to death in a number of technical blogs over the past several years and while there are situations where these devices deployed as external auxiliaries can be shown to have a small marginal positive effect they never seem to have a cost-benefit advantage. There is the rub: Batteroo’s claims are fraudulent even if the device is not.

Leave a Reply to Alex RossieCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.