~ 17 Apr 2012, 13:06
One of the things I finished recently. 6+ months.
This time it's a small and compact measurement instrument. Not the "most useful thing on earth" though (but I guess that hardly surprises anyone).
I took a lot of photos during the development, so that I can represent an entertaining worklog of its development, from The Scratch to The Finished Product™.
It's all because of a stupid point-and-shoot camera and its stupid firmware. The battery indicator has four ticks, whose meaning is really something like:
4 ticks: you're all set, go and shoot as much as you wish!
2 ticks: I'm about to die in a minute or so!
1 tick: GOOD B—....*turns off*
I imagined it would be convenient to have a small "battery level meter", with two wires sticking out of it. Connect them to a battery, and it displays voltage and capacity remaining, in percent. Piece of cake!
It should be a small circuit board with a PIC, a 7-segment LED display, a voltage regulator converting any voltage->3.3V, and a resistor divider, so that the input voltage could be read. So, it's a battery meter which feeds on the battery under test. The readout would be then looked up in some table and the remaining capacity would be displayed. The plan was to support anything above 3.3V, which I eventually revised to 1.8V-9.3V (2÷7 cell AA/AAA NiMH, Li-Ion (1- or 2-cell); others can be added as well).
What followed was an implementation of that basic idea on a breadboard. The 3.3V voltage regulator was unavailable in a non-SMD form, so I had to solder appendages to it (as I've written earlier):
Initially, I envisioned it with a 2-digit display:
However, that part actually didn't even have a decimal point. Fractional numbers need to be printed as "3_6" instead of "3.6", and this is cumbersome (requires scrolling). So I replaced it with a 4-digit one, which I quickly transferred to a breakout board:
.
Isn't it an evil-looking monster? Like the tripods from "War of the Worlds", but having a lot more legs, and thus far more blood-thirsty, hehe (ò_ó)
In the soldering chaos that ensued, I grew quite dissatisfied with the way I was storing and organizing my electronic components. It was a box-filled-with-dozens-of-plastic-bags setup, and I moved to something a bit more civilized:
Anyway, here's that centipede beast mounted on the breadboard:
.
At this point I decided to implement an important additional feature of the tool: a discharge function (initially, just for memory effect treatment, but later it got extended quite a bit):
Right to left, we have a big resistor that handles the discharge, along with the switching transistor (it could've been a smaller part; I just have a thing for TO-220s), and finally, a pot for user input (the user selects the desired ending voltage, and the discharge current. So the discharger is not just a stupid resistor, connected across the battery).
Shortly after I (overoptimistically) "froze" the design and moved it out of the breadboard. These are the two parts of the sandwich, ready to be assembled:
The sandwich itself:
..
This would be the last thing I do on a perfboard, I swear:
With the hardware almost ready, I looked for a similarly-sized plastic box in the shop.
.
The one I settled on could've won any design competition. Bottom-up. It's basically a severely uninspired, dull and apathetic box: sporting an ugly color, ugly texture, sharp and ugly edges, and it gives off an awfull smell when melted (I'm still using the cutting metod from the previous post).
I couldn't leave it like this, so a rasp joined in:
... then some sandpaper, and a test of the marker:
In preparation for painting:
Painting - first layer:
Second layer:
Well... you get the drill:
Btw, the drying intervals between any two layers is no less than two hours :)
So, three layers later, I decided to try how the handwriting upon the painted plastic would look like. A white marker, which works well on that kind of a surface is surprisingly hard to find, and the only one I managed to get turned out being very thick:
It was okay-ish on the front face:
...but the other side was incredibly ugly...
... because I wanted to put some detailed instructions on that side, in a neat table...
So it became clear that I can't do this, this should be the job of the printing professionals, with the labels printed by a machine.
In the meantime, I did some work on the software. Having the discharge function up and running, I decided to throw in a voltage logger, and transfer-to-PC capability (the transfer is done using the PICKit2 - it has an UART tool mode). So I can get the exact discharge curves, and an approximate capacity measurement in mAh. In the end, it turned out to be a functional battery analysis tool - for example, here are some discharge curves:
Nokia BL-5C:
4xAA Eneloops (the label says 1800 mAh minimum, 2000 mAh typical).
Here's a comparison between the Nokia battery and a Canon dSLR battery (the latter has two cells, so its voltage is divided by two in the graph):
The software grew up signigicantly, to the point it did not fit in the program memory anymore. I decided it would be just better to replace the PIC chip with a bigger one (16F690->16F1829).
Back to the enclosure thing. There are a few possible ways to paint labels on a small, dark, plastic box: screen printing, laser engraving, offset printing...
Fortunately for me, a kind person that does this sort of stuff stepped in and offered me to do a screen printing of the box for me. However, I was curious enough to try the laser engraving as well (while waiting for the screen-printed version to become ready). So, I ended up in a laser engraving studio with two boxes to be printed on. One was the red-painted one, only sanded down and repainted clean from scratch; the other one was a new box without any surface treatment.
We first tried the laser on the painted one (I hoped it would turn out good, even though the guys weren't so optimistic). Indeed, the laser only does a temperature-induced displacement of the paint, and it is very sensitive to the paint thickness. The back side came out somewhat acceptable:
The other one was not so well, though:
The unpainted box came out a lot better, using the laser in low-power mode only:
..
There's a room for improvement in terms of contrast, but otherwise it's great, the fine detais are very crisp.
The other one is the one from the professionalist (Lubo):
.
The finalists (before adding varnish)
After the varnishing:
I'm not kidding. It's just that the engraving disappeared (quietly, quickly and irreversibly) on the first varnish spraying. Have you ever played with Paint/Photoshop/GIMP and tried the rubber tool? Well, the feeling was just like it :)
The label is absolutely unintelligible now:
And here's the improvised spraying station:
.
In the end: two scrapped boxes, and one surviving one, done entirely by a professional. Making enclosures sucks!
It's time for the last changes on the sandwich:
While it looks like someone took a bite, it's really a broken off edge, which otherwise interfered with the box and the sandwich wouldn't fit. I also replaced the push button with a taller one.
Time to put it into the box for the last time:
.
You can see it in action here:
Also, a local copy (H.264)
I'm going to buy a huge arsenal of batteries next week, of all brands I'm able to find (AAAs, AAs, 9-volts). Then check them and find out which one gives off most mAh for the bucks :)
If anyone has an idea of anything further to be tested with the unit, don't hesitate to put it in the comments!
#1 by Ефрем Сергеев, posted on 22 May 2012, 14:53
прочетох вашата статия много ми хареса този проект.тръгнах да направя за оловните батерии вие сте по напреднали по тая тема ако може да ми помогнете.
Мерси предварително.
#2 by Trifon, posted on 28 Jun 2012, 13:52
Страхотен си пич, браво за разработките .
#3 by Neuton, posted on 12 Jul 2012, 12:46
Уникално сполучливо изпълнение и внимание към детайла! А по повод последвалото ревю на батериите - респект към хора като теб, които разработват ревюта без грам користна маркетингова мисъл! Само така може да осъзнаем колко много всъщност плащаме допълнително заради търговската марка.
#4 by tharindu, posted on 15 Oct 2012, 08:35
i just want to make my own. i try to do it with lm3914 ic and using pic16f877a microcontroller . but it's success, i just try to display the percentage of the battery but it's not working properly. can u help me with schematic? it will be big help to me. plz reply with email junkyardthari@gmail.com
thx...
#5 by Brad4edat, posted on 22 Mar 2013, 20:58
Респект човече, от месеци следя анализите ти. Страхотно си направил сайта, пожелавам ти много успехи, щастие и здраве :)
#6 by NiK, posted on 22 Jan 2014, 11:19
Идеята и резултата са страхотни, особено заигравката с теста на различните видове батерии, които все свършват много бързо....? Замислих се какво би могъл да добавиш още /нали се стремим да стават -униварсални/ може би вход за консуматор на теста пр. крушка, халогенка,св.диоди с разл. мощност.... може и да прибавиш входно напрежение и зарядно да стане....
#7 by anrieff, posted on 22 Jan 2014, 22:20
Може, да!
Разбира се, има идея да направя уред с избираем ток и избираем режим на разреждане (т.е. дали изкуствения товар да се държи като резистор, консуматор на константен ток, или консуматор на константна мощност).
#8 by Явор Матеев, posted on 12 Apr 2016, 07:53
Страхотно изделие! Интересува ме, дали автора на проекта би споделил схемата и софтуера и при какви условия. Също така ми е интересно как са направени белите надписи на кутийката?
#9 by anrieff, posted on 16 Apr 2016, 06:23
Не бих ги споделил - срам ме е :)
Иначе белите надписи по кутийката са със ситопечат.