Sunday, July 19, 2015

Cordless drill baterry lesson

I've got an interesting challenge. Black and Decker cordless drill CD12C without charger. Ok machine but obviously useless without charger. After some investigation on Internet I found suitable charge for about 60 EUR. However, believe or not I found also complete new Makita 6271DWPE with two!!! batteries and charger for 85 EUR on web store. This makes absolutely no sense! Some people call this a "business". So, why should I buy the charger for 60 EUR if whole new machine costs just 25 EUR more.

At the same time I found one Makita charger DC1414T. The question popped up: how to charge Black and Decker battery by Makita charger?

Here is the drill itself:

Here is the Makita charger, with spec. from 9,6 V up to 14,4 NiMH / NiCD batteries:

Note 5 terminals on the charger.

Here are some pictures of the Black and Decker battery. While googling it seems like that this is compatible with DeWalt batteries as well. There are only 3 terminals on this battery. After partial disassembling I found out interesting thing. The third terminal is ground (-) of 1/2 of the battery pack and NOT any thermistor as it was mentioned on some forums.

I've tried first to connect battery and charger simple way : positive to positive and negative to negative. Just to see if Makita charger would deal with it. However, the charger detected battery "temperature problem" and it wasn't charging. So, I had to cheat the charger to start charging. Thermistor is a safety part - it will stop charging if the temperature is too high. BUT, can not be that big issue if Black and Decker doesn't have such a feature at all.

I got original Makita battery pack and measured the resistance between thermistor and negative terminal at room temperature and right after charging (warm battery).

Here is a picture of battery schematic including measured values of thermistor.

So, final solution was to fake the thermistor by a fixed resistance in order to cheat the charger. I have used constant resistor of 16 kohm. Here is the final solution and yes! it's charging! (red light blinking)

Conclusion: The best is to have any charger for 9,6 - 18 V for NiMH/NiCd batteries. It's possible to charge ANY type of NiMH/NiCd battery pack using some cables and crocodile clamps. Of course, I'll modify the charger later on by soldering cables inside and make some more "comfortable" connections + clear marking of the terminals.
PS: Be extremely careful to not cross-connect some terminals, you can damage charger or battery or both.

Wednesday, May 21, 2014

Dell Precision M4800 with Ubuntu Linux 14.04 (15.04 all the way down)

I would like to share in this blog my experience with laptop Dell Precision M4800. As you might know Dell is offering several variations of this product. My configuration is here:
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor DRAM Controller (rev 06)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06)
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)
00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 04)
00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04)
00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I217-LM (rev 04)
00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d4)
00:1c.2 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 (rev d4)
00:1c.3 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #4 (rev d4)
00:1c.4 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #5 (rev d4)
00:1c.6 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #7 (rev d4)
00:1c.7 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #8 (rev d4)
00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation QM87 Express LPC Controller (rev 04)
00:1f.2 IDE interface: Intel Corporation 8 Series Chipset Family 4-port SATA Controller 1 [IDE mode] - Mobile (rev 04)
00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 04)
01:00.0 VGA compatible controller: NVIDIA Corporation GK107GLM [Quadro K1100M] (rev a1)
03:00.0 Network controller: Broadcom Corporation BCM4352 802.11ac Wireless Network Adapter (rev 03)
11:00.0 SD Host controller: O2 Micro, Inc. SD/MMC Card Reader Controller (rev 01)

Note especially wireless adapter type:
03:00.0 Network controller [0280]: Broadcom Corporation BCM4352 802.11ac Wireless Network Adapter [14e4:43b1] (rev 03)

Quick summary of the challanges:
  1. Broadcom wireless card
  2. NVIDIA Optimus system with two graphic adapters
1. I have spent quite a bit if time on the broadcom wireless card. I have basically tried all possible "advices" found on internet with various drivers and methods e.g. ndiswrapper, STA driver, pre-compiled from repositories and also I tried to compile myself. Currently, the version of STA driver is
  • ndiswrapper found the driver, but WiFi was not active, even though the driver says that device is found
  • pre-compiled driver in repositories broadcom-sta-dkms ver. discovered all networks and hardware but it was not able to connect to any network - authentication window was popping up over and over again
  • my own compilation of the driver directly from broadcom web page was not working due to some errors in the code (note, that I'm 100% sure, that all necessary packages for compilation was installed). I have used this page as a guideline:

Finally, you wouldn't believe what was the solution - installation of older driver release. I have downloaded from here:
After installation and restart of comupter everything was working like a charm!

2. At the beginning I was afraid, that NVIDIA Optimus Quadro K1100M and Intel Internal card arrangement will be an issue. After I have just downloaded NVIDIA proprietary driver and install it via command line my screen didn't turn on! My mistake! I should first google!
Than I re-installed the system and installed following packages:
  • nvidia-prime (latest revision 0.6.2) from Ubuntu repositories
  • nvidia binary driver (version 331.38) from Ubuntu repositories
Note, that there has been quite some dependencies selected automatically during the installation. After restart everything was running perfectly.
All other hardware is running out of box e.g. sound system incl. microphone, web camera, card reader etc.
I have to admit, that I haven't still tested bluetooth functionality. Once I do it, I'll update the post. Enjoy!

Just a recent update on Ubuntu 15.04:
I have installed right now fresh install of Ubuntu 15.04. As I can see from Synaptic manager there is this version of wireless driver The wireless is now working out of box and no need of downgrade is necessary. Similarly to graphics. I have just installed recommended proprietary drivers and all is working like a charm. Good job Ubuntu!

Sunday, April 13, 2014

WOT on Ubuntu Linux

This time I'll try to share some experience with WOT - World of Tanks.
Most probably it is "discovering" the wheel.
Firs of all here is my setup for playing World of Tanks:
- Play on Linux
- Worl of Tanks 8.11

A good hint is to disable the torrent download, which is due to some reason not working and it's stopping after a while with error. It is possible to disable it by clicking on small spanner button in upper right corner of initial start-up window.

The second possible reason is to download torrents updates manually and place it in folder /home/"user"/PlayOnLinux's virtual drives/WorldOfTanks/drive_c/Games/World_of_Tanks/Updates. After download of torrent just restart the game.

The only interesting part is how to run the game reply in let say comfortable way:
  1. Start your Play on Linux and select your World of Tanks installation
  2. Click Configure
  3. In tab General choose Make a new shortcut from this virtual drive and call it e.g. WorldOfTanksReplay
  4. Refer to worldoftanks.exe (not WOTlauncher!)
  5. Again under General tab use following in the Argument filed: replays/replay_last_battle.wotreplay

6. Than close and create shortcut on your desktop if you want
7. One of important settings is in WOT itself - in your settings choose Enable battle recording - Last
This means that your last game will be always recording and you can replay it by double clicking on the icon.

Monday, October 8, 2012

NAPA descriptions deeply

The following blog might be a bit too advanced for beginners. However, if users are wondering how NAPA db looks like there is a way how to look into it. By "looking into" any object in NAPA dbs you can basically access absolutely whatever data (even the one not "officially" accessible in other ways).

So what's the trick? Of course few commands. Here they are:

!MAP command is showing the content of the memory. It means it's showing all "descriptions", which are accessible at the moment in runtime memory. All these objects are flagged by so-called reference number. It's an id, which is used for handling of "descriptions".

!DML command is used for listing (showing) the "description" from the memory on the screen (into NAPA main window).

Note: If the "description" is not yet in the memory, you can easily make it accessible by DB.READ service function (or DB calculator command).

Probably the most straight forward way to show the functionality is to make an example:
E.g. you are wondering how the NAPA setup is stored in the system.

  • Let's make a setup called SET1 like this: SET,  Z=0.9, Z=5, Z=8, PROF
  • Get it into the runtime memory (rn is variable containing the reference number): @rn=DB.READ('SETUP*SET1','-',1,'-','E')
  • Now use !MAP command to see all descriptions in the memory: !MAP
     ******** DESCRIPTIONS IN MEMORY ******** 
     name                      type        date      refnr  nrec   nwords
     SETUP*SET1                   0  1539119694      22022     1       10
  • In my case the reference number is 22022. Now we can have a look at the record in NAPA db of our setup: !DML 22022
 *******************DESCRIPTION LISTING*******************

 SETUP*SET1                  TYPE:       0 DATE:   1539119694

 LISTING OF RECORD     2000   TYPE:   3   SIZE:    2
     1     SET
     2     Z=0.9, Z=5, Z=8, PROF

 *******************END OF DESCRIPTION LISTING*******************

As you can see it's not any surprise, but this is only simple example. It's much more interesting on tables or loading conditions. Someone can now ask how to access these data. For this purpose there is a calculator command REC.
!VAR LIS array
SET                   Z=0.9, Z=5, Z=8, PROF
!CAL array(2)
Z=0.9, Z=5, Z=8, PROF

As you can see from above, NAPA dbs are storing data in relatively simple way using sets of arrays. Each object (description) is matrix (vector of vectors/2D array), while descriptions are flagged by reference number and each array is flagged by so-called record number (2000 in example above). It is not always 100% clear what all "records" are containing - this is NAPA company know-how, but in many cases it is really easy to understand just by looking at the examples.

Friday, June 10, 2011

HOW TO : Panic exit in NAPA

"Panic Exit" error message is well known for all NAPA users. If I'm not wrong they've changed it in 2008 release into something like this :
Now you maybe ask yourself how long I had to wait to write this post until I managed to get the message. Answer : Not much :o)
Following procedure was tested on NAPA rel. 2010.2-3 and also 2010.2-4 but feel free to test it on other releases as well.
  1. Start NAPA
  2. Open project (e.g. use PRO command)
  4. Use open button or FILE->OPEN
  5. And now type name of existing loading condition, in my case L30
  6. In upper left corner click by mouse on either Detailed list or Properties list
  7. And afterwords click on another loading condition than you've typed before
  8. there you go - Panic Exit - enjoy
Let me some complains. It's a bit odd, that NAPA has quite high price+maintenance and at the same time the focus is not on already existing basic tools but on building new ones. Or maybe by other words, there was no improvement of text editor for years, but every year there is some "new" and "fancy" manager application. Another think is, that NAPA guys develops only the features which are asked by rich customers with high number of licenses. Other users has probably only bad ideas about NAPA.

Sunday, October 10, 2010

Simple but useful command

This blog will be very short. It will describe a command which you can use for searching in macros (DATA*) or eventually lists (LIST*) for a string. The result of command is list of macros, which contains the string you search for. This is very useful in case you are searching for some example of some command e.g. in NAPAdb. Of course, there are many other possible purposes. Difficult part of the command is syntax and proper form of apostrophes. Below is self-explaining example :
!var lis list

Saturday, October 9, 2010

Dell Precision M4500

I just got in my hands new laptop Dell Precision M4500. It is quite new model from Dell and I'm going to describe you some issues during getting Linux on it.

So I've downloaded my favorite Linux distribution Mandriva 2010.1 in its latest release. After installation and first restart I got blank (black) screen already during booting. Of course, the problem was with video card NVIDIA FX1800M and it's drivers. Than I had to start system into safe mode - command line interface.
In order to be able to install proprietary deriver from NVIDIA, it is necessary to install following packages : binutils, gcc, make, kernel-source, kernel-server-devel.
code :
su (+enter password)
urpmi --auto-update
urpmi binutils --auto-select
sh ./NVIDIA-LINUX-x86-....(use name of your driver)
Installer will guide you through the installation and after restart you should be able to start system normally. Note : if you need to uninstall some package use command urpme.

Next issue was to get working my wireless : Broadcom Corporation Device 4353 (rev 01). To find out what wireless card (+other devices) you have, you can use command lspci -nn. Do not install broadcom-wl driver, it wont work. The only way I get it working was by ndiswrapper. So go to Mandriva Control Center->Install&Remove software and install ndiswrapper. Than go to Network & Internet tab->Set up a new network interface->Wirelelss->Use a Windows driver (with ndiswrapper )->pick up file with windows driver. You should download a windows driver unpack it and find files bcmwl5.inf and bcmwl5.sys. After all this steps, you can finally configure your wireless as usually.

Let's fix the last issue...Microphone is not working neither with pulse audio neither with alsa. First I've disabled pulse audio in Mandriva Control Center->Hardware->Sound configuration->uncheck "Enable pulse audio" :
Than open console, login as root "su" (+enter password). Open e.g. midnight commander by command "mc" and go to following folder : /etc/modprobe.d/ . Create a new file there with name alsa-base.conf and insert into it following line : options snd-hda-intel model=dell-s14. Restart computer and now microphone should work. Of course also open mixer and check if the channels are not muted or too low volume.

Overall I'm quite happy with this laptop, but once again was proved, that new hardware is not well supported by Linux. I have this experience on all my laptops. All the issues was solved "out of box" later, based on users experiences and debugging. Hopefully this blog will  be useful for others as well. Let me know by mail in case of some comments or questions.