Monday, November 9, 2020

How to make your own laptop battery out of lithium-polymer cells.

Just thought this story may help others fix old laptops with batteries that no longer hold the charge.

A few years ago, sometime in 2016 or 2017 - I bought a really cheap laptop off of a Microsoft Store website. The laptop was Trekstor C11B - the cheapest Windows laptop you could get at the time, that wasn't a celeron or a chromebook. The laptop had a joke 32GB SSD and 4GB RAM, but a nice ergonomic design and a decent full HD touch screen. Later I upgraded it to 256GB SSD, but this story is not about the laptop.

It's about how to make a new battery yourself for basically any laptop brand no matter how old.

Disclaimer: the below instructions are provided for information purpose only, I'm not responsible for any of your attempts to fix something that may have failed, especially if you never soldered your own wires before. In other words - your mileage may vary and you are on your own. With that being said keep reading.

What happened with my Trekstor Primebook as it was getting older - the battery was getting bad. Eventually it became so bad that even touching the power connector would shut down the computer completely. The other weird thing was the laptop had problems coming up after abrupt shutdowns. I believe that was due to its power management when it detected no battery it wouldn't start up at first, but only after a few power button presses. Even worse, the battery started to overheat and expand to the point that the keyboard began to bulge. That was not only bad but really dangerous.

So I opened the laptop and removed the blown battery pack. This is what the original battery looked like (cooled down and deflated):

I thought I would buy the new battery somewhere. Tough luck. The manufacturer (Trekstor Gmbh) was done with laptops and was selling scooters. Nice. EBay or Amazon didn't seem to sell anything even remotely compatible. I even asked a buddy to post a 'helpme' message at (

It took me several months to realize that no one in the entire world except may be one aliexpress seller really sells that type of battery. Even so, the price was around $60USD and the shipping times where anywhere from 2 months to never. Not good. I never expected to get something from Microsoft Store and later realize that there is no support and you are on your own especially if the manufacturer is out of business. 

So I went ahead and (carefully!) cut the battery shell open to remove the external sticky plastic. Hey, don't cut the actual cells, because they may blow up in your face and start the fire(!). It's all because of lithium gel inside the battery which may combust if it touches the air. 

I very carefully cut and pulled the sticky plastic around the battery pack - on the concrete floor in the garage for extra safety - keeping the cells flat and not bending them at all. I didn't cut into the battery cells, just peeled the black plastic cover to separate the cells from the frame.

In my particular case there were two 3.8v battery cells inside the frame. Each cell is about 70mm by 110mm size and about by 3mm thick. Here is the photo of one of the cells after I cut its connectors out of the charging circuit:

It took me quite a bit of time to actually find a battery cell manufacturer in the continental US which could ship the cells. I found one on ebay (sorry no link, just a photo)

I emailed the seller to make sure the battery is as pictured and is close to 2.5mm rather than 25mm (1") thick. The other two dimensions - 75mm and 110mm were about right. As the matter of fact, the new battery was wider a bit than the original, so I had to adjust the frame before install.

I bought two battery cells each 3.8v to have 7.6v total. They came in a small box a few days later. Each cell came pre-charged to 3.8v and with the positive connector insulated. Each battery cell also had some circuit inside. Luckily, the cell+circuit size was not exceeding my specifications.

Next, I tested the charging circuit by connecting the battery frame to the computer and connecting each cell with crocodile connectors to the charging circuit on the frame. It seemed to work with no heating or bulging of any components, so I decided to move on to soldering the cells.

To solder the cell wires to the frame terminals you will very likely need an aluminum flux and solder kit (click for the product) such as the one I bought from Amazon. It was a tiny bit too expensive for my needs (I needed just a little of it), but it came with the applicator and the solder wire - which both turned out to be very useful. The actual product looks like this:

I am not too good at soldering things. Before this I soldered a few copper wires, never aluminum. So I decided to practice a bit. I tore off a small sheet of aluminum foil - food grade, nothing less. Heated up a small soldering iron (no more than 40W). Dropped a few drops of the liquid flux from the kit on the foil and used the solder wire from the kit. I figured that I need very little flux liquid and very little solder wire with just a touch of the solder iron for my purpose. The alum flux works nicely with temperatures lower that regular copper solder flux. That was good to know before trying to solder the battery cells to the terminals.

Even before soldering anything I tried to arrange the battery cells in the packs and close the frame. It turned out the cells were a bit too wide, so I cut and sandpapered off some plastic from the frame to allow its edge to overlap one of the cells. See photo:


Next, keeping my fingers crossed (imaginably of course) I first applied just a bit of solder alloy to the terminals without attaching the battery wires yet. The plan was to make sure the flux works well. Also, the instruction recommends washing off the excessive flux with water. I figured it's because the flux is purposefully acidic for removing aluminum oxidization, and leaving it on the surface may corrode the terminals over time. So.. I tried to apply just a bit of water on the terminals to wash off the flux. It removed some but not all. Dried it afterwards too with napkins.

This is what the frame with solder terminals looked like, the battery cells are not installed yet.

Next, I soldered the negative wire to the corresponding terminal on the frame, then removed the scotch tape from the positive (red) wire and soldered it to its terminal. Ditto for the second battery cell.

I immediately covered the electric terminals with sticky tape to prevent any accidental short circuit.


I arranged the cells within the frame and closed the frame. 


I used duct tape (white) to hold the cells within the frame:

The next photo shows what the 'final product' looked like before installing into the laptop:


The laptop worked right after install!

Subsequent tests showed that the full charge is enough for about 2 hours of work under medium load - screen on 90% brightness, active web browsing, etc. That's about the same when the laptop was new.

I hope that after a few drain and recharge cycles the computer will adjust and slightly improve its battery use time.

Monday, September 28, 2020

Visual Studio 2010 upgrade to 2017 - finally!

Latest update. I am gradually migrating from VS2010 to VS2017 for Web projects. So far, the 2017 is good for the task. It's still somewhat annoying when working with C# code with different keystrokes, popups and color highlighting, but it's way better with Javascript code parsing. It saves me tons of time when debugging JavaScript. While VS 2010 is still the tool I utilize for Windows Forms projects and other lightweight applications, for Web the 2017 is looking like the tool I can finally migrate to. And I'm doing just that.

Friday, February 28, 2020

AWS Monitor Portal and other projects.

As my grandfather used to say: no one will honor you if you don’t honor yourself.

So.. a few words about my recent accomplishments in the world of software development.

Many people heard about Elastic Cloud Gate for AWS, some may even use it. For me, seeing it was an unforgettable experience. A ‘nice’ ASP interface from the 90’s, small fonts, lots of clicking around. Their software does have a lot of functionality, most of which however duplicates AWS Console. Their killer feature for us was scheduling AMI backups and other standard AWS tasks such as reboots. The outdated used interface of the eCG remains their huge issue - if you ever used the eCG you would prefer to set it to the auto mode and never see again (here and here).

Meet the guy who single-handedly designed and developed a product to fully replace the eCloudGate for the company he works for, and for many customers of ours. This has not only saved our company $2,500+/mo, but also lots of support time and countless frustration moments. Not mentioning that we can now pocket some profits by offering the service to our customers.

I won’t go into many details here what my software can do especially if you are already familiar with the eCloudGate website. What is notable is that my product besides doing scheduled EC2 AMI and DR backups also helps people manage AWS WorkSpaces. Last time I checked the eCG did not do anything for WorkSpaces besides reboots.

AWS WorkSpaces are virtual Windows Desktop machines offered by Amazon AWS for individual and business needs. Users can run any software they want on them much as on their own Desktops, but without fear of ever losing data due to virus or encryption attacks. Superior recovery is not the only strong side of the WorkSpaces, their speedy performance and easy maintainability make them grow in demand in the corporate world.

In short, the company I work for helps customers migrate their networks to AWS VPCs and Desktops to WorkSpaces. Besides that, our company itself owns hundreds if not thousands of EC2 instances under many departmental AWS accounts. Thanks to me and my software we now have a centralized portal to support and manage thousands of machines… and even make some money on that.

A few ‘killer’ features of my AWS Monitor Tool:

- simple and responsive user interface (here and here),
- separate administrative, customer-level , and user-level accounts,
- remote control and scripting of WorkSpaces and EC2 instances (here),
- WorkSpace and EC2 instance support and management:  real-time ‘heartbeat’ and inventory, scheduled backups and other tasks,
- and a popular feature: users can reboot their own WorkSpaces via a Text Message (SMS) (here).

Some stats as of today: my AWS monitor database is gaining 2-3 million records daily into its SQL databases.

Drop me a note if you want to find out more..

outdated eCG interface
outdated eCG interface

Saturday, January 18, 2020

Happy New 2020 Year dear Visual Studio 2010!

Seven years seems to be a long break between posts, but I must admit during that time there were no dramatic changes in my job description, while of course there was some progress.

We all evolve in our work as in no way we wouldn't if we wanted to keep our jobs. We learn new skills and tools as the industry moves forward. But some things like an old boombox from the 80's just keep working. So why not to use it?

Today I'm here to say Hi to a venerable tool that many of us still use even though it's not as popular anymore. To my opinion it's one of the best ever created by Microsoft and it remains one to this day.

Ladies and Gentlemen - I welcome the Visual Studio 2010 to the podium!

It's quick to open.

Have you used the VS 2017 or 2019 lately? Did you notice that it takes anywhere from 30 seconds to 2 minutes just to open the environment on a fast Intel i5 computer with SSD and 8GB RAM? Guess what, the SQL 2019 Management Studio takes even longer on a super-fast Xeon server with even more memory! The dev tools that Microsoft gave birth in the recent years are bloated pieces of junk umm.. software.
Visual Studio 2010 opens in under 10 seconds.

It's simple.

Do you have to juggle between 4 or even 5 different languages in your VS 2017 just to add a few things to a web page? HTML, C#, JavaScript, TypeScript, and Angular? Don't you want a hint of Linq on top of that? Do you also have to do SQL in the same project? What? Are you not happy with that?
It kinda feels like doing a translation job for the United Nations - you have to bounce between English and Spanish, then Afrikaans' flavour of Dutch, then quickly jump to Chinese, then back to English. Gosh.. that's heavy.
Guess what, if you apply for a job and honestly state in your resume that you are fluent in German, they won't even interview you as they want the Southern Austro-Bavarian dialect of German for some reason. WTF?

It compiles code into very compact footprint.

Let me give you just a couple of examples.

1.5 years ago I completely redesigned one of my software projects, which happens to be also #1 in Google for its keyword. It has millions of users and 50-60GB of daily uploads.
That project has it all: C# with .NET 4.x, AngularJS, HTML, Android API, clean and fast SQL queries - all the cool stuff.

Guess what.. the DLL that does all of that is only 100Kb. It could fit on a 360Kb floppy!

Btw, what you see on the picture is the entire contents of the BIN directory. The project runs and stores files in S3 buckets, hence the 3 extra AWS DLLs to support that. That's all.

The other project I've done in the last couple of years and which I maintain on a daily basis incorporates quite a bit more functionality.
Well.. it has to, otherwise it wouldn't have over 120 thousand lines of code!

It does a lot of modern stuff including API access via JSON/REST protocols and it does a lot and I mean a lot of database talk. The average daily traffic is reflected in over 2 million daily SQL INSERT calls via just one server with occasional spikes in traffic. I didn't count how many SELECT queries it does, but I'm sure a lot.

That project is designed to do AWS infrastructure management that AWS console happens to do well, but there are some functions that the console does not do too well, specifically the WorkSpaces management and more. If you ever used AWS Console you know what I mean. But.. anyway.

The DLL that runs the whole thing - API and all - is 444Kb. Nice!

The only 3rd party DLLs in the BIN directory are AWS runtimes. No freakin 'scaffolding' or auto-generated junkware code.
For a comparison, a simple web-based "hello world" in VS 2017 eats up 15 to 60 Megabytes (!) of space for its BIN folder.

Do you have any questions or opinions? Do you want to discuss that? Post a comment.

Saturday, December 21, 2013

The simplest way to speed up your laptop

I have been going through several interesting projects lately. There were a couple of important ones which required processing large and somewhat twisted SQL databases. The other, "weekend" projects, made me dust off Eclipse and fix some cool Android code to make it work on KitKat. But this article is not about large files or databases. It's about those small but pesky JPEG files we often overlook and underestimate, but which seriously affect performance of our aging laptops.

So here is the story.

About a couple of months ago I went to our local toy Tigerdirect and bought the latest 1TB Seagate hybrid drive for my laptop. I expected it to be better than its predecessor, the Seagate Momentus XT which I used for a couple of years, but which started to show its signs of wear.

I was very happy with the new drive. For about a day or two. Then I noticed that the laptop boots up slower than before the upgrade. But the worst hit was to see web sites load noticeably slower. You know, those that unroll their galleries of high quality photos when you scroll down your mouse wheel. One of my favourite ones is the Autoblog, but it looks like all of them are now going that way in web design.

Well, you may say that the new drive is only 5400rpm while the former one is 7200, but that's not the show stopper for me.

I started thinking and decided to look at how the antivirus software works on my machine. Of course, I have MDF and LDF files excluded from active scan, for obvious reasons. What else? So I gave it a thought and decided to turn off scanning of JPEG, JPG and PNG files. Why? Because they are pictures. I don't care if they have any code in them. I don't rename them to exe and launch just to test. That would be quite foolish.

Well, now my web browser runs faster and smoother. No more stuttering on large web sites like Autoblog and others. And I can live with this new larger but slower drive until Seagate makes the faster version.


Friday, December 6, 2013

How to switch PgUp/PgDn keys with Home/End without breaking keyboard

After adding a bluetooth adapter to my Toshiba laptop, I am fully enjoying the world of bluetooth accessories. In fact, I am getting spoiled by not using the USB ports for a keyboard or mouse. Wireless peripherals and especially bluetooth ones are so much cooler than pulling wires..

Finding a decent bluetooth keyboard was a bit of a hassle for me though. I have relatively big hands, and I am used to those curvy Microsoft keyboards such as Microsoft 2000. But the 2000 model is wired, which defies the whole purpose. It's also quite big. I like my desk tidy. And I don't use the calculator side of the keyboard at all.

The only one bluetooth keyboard I really liked is Microsoft 5000. Positioned as a keyboard for mobile devices, it's lightweight but solidly made, stylish, having large keys with great feedback. It does not come with the calculator keys (you can get the 6000 model for that), but otherwise it covers my needs for 100%.

For some reason, Microsoft does not make model 5000 keyboard anymore, and it's getting increasingly hard to get one new. I recently purchased another one on eBay, it came new in a box, sealed and unopened. Now I have one at home and one at work. They are exactly the same. I do carry my laptop back and forth, and when I turn it on, it would seamlessly connect to them, without any additional clicks or switches.

But... this article is not only about this awesome keyboard. It's about how to fix some of its keys.

Perhaps one of the reasons why Microsoft stopped making the model 5000 is because it was unpopular. It was unpopular probably because it had a few of its keys defined incorrectly. The PgUp and PgDn functions were sharing the same keys with Home and End. While PgUp and PgDn were made default keys, to use Home or End you have to push and hold the Fn (function) key each time to use Home or End.

I work with a lot of text on a daily basis (I am a programmer), but I don't use PgUp or PgDn as often as I use Home and End. In fact, I almost never use page up or page down. I use my mouse wheel to scroll between lines and pages of code.

But.. where there is a will there is a way. This problem didn't stand long against one's programmer's skills. I googled up a few things and came up with two registry files. They can help you too make your PgUp and PgDn keys work as Home and End, or undo those changes, respectively. The best thing is that the PgUp/PgDn don't go away, they can now be used with Fn key. In other words, the PgUp trades places with Home, and PgDn with End. In computer language this method is called changing scancode mappings. Btw, it worked for me on both Windows XP and Windows 7.

If you had the same problem I had, and if you want to switch your keys on your keyboard the same way, simply copy (verbatim!) the portions of text below into Notepad, separately, and save them as two separate .REG files. Take twice a day... I mean, run the first one to swap the keys, and the second one to reset the keys back to default layout.

Use this to switch PgUp/PgDn with Home/End:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,05,00,00,00,47,e0,49,e0,49,e0,47,e0,\

This will reset keys back to default:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,01,00,00,00,00,00,00,00

Disclaimer: the purpose of this article is to give a solution, not to force you to change anything in your computer be it hardware or software. Always wear gloves.. er.. I mean, always pay attention and utmost care when dealing with Windows registry. Back it up, etc. Improper actions or a misspelled command may result in unstable work or even unresponsive computer. I can only show you the way, you are the one to walk it, which means I don't guarantee this method to work on your particular computer, neither may I be held responsible for any problems caused by user actions.

Credits: Remapping Windows Keys by Preston Hunt

Saturday, October 26, 2013

Why you shouldn't buy VW assembled in Mexico

Below is the photo of the tube going from the engine head to the brake cylinder. The pipe cracked in 3 places, due to bad quality of the plastic material. And no, it's not rubber.

This pipe creates vacuum in the brake cylinder to make car brakes work. If the pipe breaks, the vacuum will not be sufficient enough to stop the car.

Luckily, I caught this before leaving the garage, and replaced it with the $1.50 tube from our local Autozone. 10 minute of work saved lives..

While I may buy a VW in the future, I will never buy a VW from Mexico.