Sunday, November 21, 2021

Repair of HMI of Allen-Bradley 6181P-122TSXP no display problem

 1. HMI of Allen-Bradley 6181P-122TSXP


Fig 1: The HMI make & Model 

was not showing any display when powered up. This HMI is  used in Centrifuge. The cost of this machine is around Rs Seven Lakhs. 


2. Inserted a 4 digit PC motherboard diagnostic  card in the PCI  slot and powered up the machine, the numbers on digit display in card were changing and these numbers correspond to errors on mainboard. for ex, if the numbers stopped at 01 , implies the cpu has gone faulty or 2C implies bad memory etc. However, the number did not stop at these stages and continued up-to full boot. Therefore, it was concluded that boot process was normal and problem was in LCD display. The video


shows how it is done.


3. The LCD/LED display has two connectors coming from the mainboard , one is the 20 pin LVDS signal and other the power. 


Fig 2: The Motherboard showing power & LVDS connectors

The LVDS stands for low voltage differential signalling, and has three pairs differential signal and one pair of clock signals. The LVDS signals were verified with oscilloscope, and positive (up going signal in oscilloscope) and negative (down going signal in oscilloscope) was seen in the respective + and - pins in each differential pairs. The clock signal yielded a steady 4 MHz clock.


4. Thus, the problem appears to be that of backlight in LED display. The model of the display used is G12S1-L02. 


Fig 3: The LCD display panel G121S1-L02 showing the LCD2MB PCB

The datasheet of the display was also found on net and shared here. The backlight is provided by a string of LEDs which illuminates the LCD display. The power connector pin-out is shown here 


5. To access the backlight string of LEDs, the display was opened , and indeed, the backlight was not glowing. The LCD display has two PCBs one is LCD2MB pcb (shown in fig 3) which gets the power from the mainboard and supplies the +12V power,EN signal to the E88441 PCB which generates the actual timing,control and backlight voltage for driving the LCD and backlight LEDs. 


Fig 4: The LCD display opened revealing E88441 PCB containing the backlight controller

The LED display driver in E88441 PCB was identified by using 10X magnification on mobile camera and the part number noted down. Datasheet of this IC was downloaded. and can be viewed here


6. On studying the datasheet it was found that that pin # 28 of this IC had to be supplied with EN signal, which is a 5 v PWM signal, which can also control the brightness depending on PWM on time. The EN signal was being generated by the LCD2MB card in the display panel.  There is a touch point (TP) to verify the presence of this signal, which yielded no value with multimeter, so, this signal did not reach the display driver and failure was traced  to faulty resistors (R94,R82 & R104) on board.


Fig 5:  A8501 magnified 10x

7. The circuit in and around the LED driver IC U1 was traced with the help of multimeter continuity testing and all the required transistors and MOSFET identified and re-drawn on paper to understand the working. The circuit is given <here>


Fig 6: The backlight driver power save mechanism redrawn

8. It appeared that the resistors which were damaged were part of a 'power saving' mechanism to give reduced supply voltage of 10.73 V instead of 12 V to the display driver IC in the absence of EN signal.This mechanism was built around transistor Q7 and Q14 and MOSFET Q15 .  These resistors are 1% tolerance SMD resistors following the EIA-96 pattern of naming. The reistors which were damaged were marked as 70D, and 10S which have the value of  536K and 12.4 ohm respectively.


9. These resistors could not be sourced so a workaround was found to get the EN signal directly to IC U1 by shorting a path in PCB and bypassing the 'power save' circuitary by running the driver IC at 10.73 volts as is evident by seeing the circuit diagram traced above. The repair is shown in figure 7. The resulting voltage at LED backlight end was 20 V, which was sufficient to drive the backlight LEDs.



Fig 7: The soldered portion to supply EN signal directly to backlight controller

10. Assembled everything back, the display working ok.


Fig 8: HMI giving output after the repair

4. Annexure:-

4.1  For Full HD TV, 30 pin (10 pairs) connector is used. For HDTV, 20 pin (5 pairs--> 4 data pairs & 1 clock pair , 4 data pairs give 8 bits)  connector is sufficient. The three data pairs correspond to R,G,B signal and the fourth data pair is for B+Hsync and V.  For this particular 12 inch display 3 data pairs (Rin 0,1 & 2 corresponding to R,G,B) and one clock pair is used , the unused  1 data pair (Rin3 for B+Hsync & V) the + is connected to ground and - is NC. Therefore, 3 data pairs contribute 6 bits . The more number of pairs means more bits can be shown implying higher resolution. 


4.2 Youtube video about LVDS 


4.3 Some of the ICs identified in mainboard (DS90C385A-> LVDS serializer, Chrontel CH7308B--> PLL transmitter, ISL6262CRZ--> 2 phase buck converter) 


Fig 9 : 20 pin LVDS connector pin-out


Key Learnings:

1. Details of backlight LED driver IC and its working

2. LVDS signals and 4/6/8 bit differential signalling

3. EiA -96 1% resistor naming convention

 

Saturday, January 18, 2020

Design Notes

One stop reference for all design related stuff. 
Post all design related articles in continuation by editing this post
First up, the most simple, Saturated switch using BJT and Darlington. Notes in the attached figure.


(a) Saturated Switch  using BJT

(1) The ratio of Ic/Ib < hfe (min) of the selected transistor.

(2) take care that calculated Ic is less than Ic max which can be found in the datasheet.

(3) How did we determine ic/ib < hfe for saturation?
Consider the simple circuit shown in figure, with one base resistor Rb, One collector load RL ,

 Let's assume for example RB = 1M, RL = 1k, B1 = 9V, hFE = 300 and VBE = 0.6V.
The voltage across RB will be VS-VBE=8.4V, so IB=8.4/1M=8.4µA. IC=IB·hFE=8.4µA·300=2.52mA. So the voltage across RL will be 2.52V.

Now, What will happen if in the example above, RB=100k instead of 1M?
IB=8.4/100k=84µA. You may expect that IC will be 84µA·300=25.2mA, but that isn't possible since the voltage across RL would be 25.2V which is more than B1.

 IC,max in this circuit is B1/RL=9/1k=9mA. So even if IB=84µA, IC will be 9mA. IC/IB=107, which is less than hFE. In such a case, when IC/IB < hFE, we say that the transistor has become saturated and can be considered as a closed switch (between C and E).

(b) Saturated Darlington
As explained in figure attached, if Ib loads the weak base supply, then a more powerful high beta transistor called darlington can be used. This will saturate even with tens of microamps of base current and won't load the weak base power supply.






Monday, October 29, 2018

Installing Apps to Android mobile in bulk using Laptop


Mobile phones are becoming useful sidekick apart from performing the basic function of making calls,  so much so that they are now managing various aspects of life like finances, science, day to day converters, communication and messaging , social media and so on.


A smart phone becomes a very useful tool in the hands of user depending on the apps it has been loaded with. Now here comes the problem! Apps are installed over the months and years  and if for any reason, a new phone is purchased or old one is formatted, all the apps have to be installed one by one which becomes tedious. The following steps will guide you as to how to take backup of all your apps in your laptop from your old phone  and then load them into your new phone in a single click..

Ok, so here are the steps..I have tried to keep it as simple as possible.

PREPARING THE PHONE & LAPTOP

1 Developer options have to be enabled on your phone to do this exercise. To enable developer options, open settings app, select System, scroll to bottom and select About Phone, scroll to bottom and tap Build number 7 times, return to previous screen to find Developer options near bottom

2. turn on USB Debugging in developer options.

3. Connect the phone to laptop by means of a USB cable and select USB debugging (ADB) mode., a seperate CD drive can be seen mounted in my computer containing the phone USB drivers for laptop, double click and install the drivers( this may differ from phone to phone, in some phones, you may have to download the USB drivers from manufacturers website and install)

4. download and unzip SDK platform-tools_r28.0.1 for windows in a directory , say D:\adb-fastboot\platform-tools

5. Right click my computer, go to properties, go to advanced system settings, click on environment variables button , in system variables scroll down and click on  path, click edit button, modify the path by adding a semicolon and inserting D:\adb-fastboot\platform-tools after semicolon as shown in screenshot below. click ok all the way to close the advanced system settings. This is being done so that you can run adb command from any path.
                                                 



6. reboot the laptop and open command window, and type adb, you should see something like this screenshot:-

now your laptop is ready to send commands to your phone via ADB

PREPARING THE PRINT.BAT FILE IN LAPTOP

1. Install myphone explorer app. My phone explorer is a nice nifty app which can be used to take backup of your apps, contacts, sms etc to your laptop . It also has a useful sync feature which can be used to sync files between your laptop and Phone external memory, if you happen to keep your work related stuff on your phone for ready reference.


2.  Install Myphone explorer on your laptop/PC.

3. turn on  your wifi hotspot on your mobile and connect your laptop to it.

4. open myphone explorer in both laptop and mobile phone and using the laptop app go to File-> connect to phone. click on Extras menu  -> Create backup as per the screenshot below. Now all your apps are stored in a folder in  laptop (say D:\apps-1)



5. open a command prompt window and cd to D:\apps-1. type dir /s /b > print.txt , this creates a file called print.txt in the folder. now, open this file in notepad and replace D:\ with adb install -r D:\  for all the occurrences.










6. Now, you might notice that some filenames of apps have space between them, we need to replace space with an _ (underscore) character everywhere. so we have another nifty vbscript file to do that for us. Download the file here , open the vbscript file in notepad and change the path in the Set fol line like Set fol = fso.GetFolder ("D:\apps-1"). what this vbscript file does is read each filename in
D:\apps-1 directory and find blank space in them and replace with a underscore. The reason why this is being done is the command line adb install fails on space in filenames so it has to be replaced with an underscore.
 
7. open print.txt in notepad and  click save as and enter filename as  print.bat and file type as all as shown in screenshot below. This will generate a batch file called print.bat
 
8. double click print.bat file to open a command window to install each app one by one as can be seen in screenshot below!
 

 
 
 
References:
 https://android.stackexchange.com/questions/64353/how-to-batch-install-apks-from-computer-to-android-without-actually-touching-my

 
 
 
 
 



 




 

Wednesday, June 27, 2018

Ubuntu 18.04 on old HP Compaq 6710b Laptop

HP Compaq 6710b is my oldest laptop given by ONGC way back in 2006. The laptop had windows vista initially and having a Intel core2 duo CPU @ 2.2 GHz with  2 GB RAM. It was brand new but slow as hell.

Later , installed Windows 10 under the magnanimous program of Microsoft who did not allow upgrade to Win 10 from vista but allowed to install it without activation. Updates continued to happen , everything happened, but it continued to be slow as hell.

Then, ONGC under its EPP(somewhere in 2014) allowed purchase of another HP laptop with 4 GB RAM , however this time we purchased the laptop instead of the L1 route earlier. 6710b continued working as the latest laptop evolved from win 8 to win 8.1 , windows 10 and finally to the latest April Update of Win 10 pro. However, 6710b continued to be slow as hell.

In 2018, ONGC EPP, I purchased a powerhorse, Asus FX series 16 GB RAM, Latest Nvdia card(1060 I guess), Intel 7th gen HQ CPU, 7200 rpm 1TB HDD and 128 GB SSD. Out of concern for the geriatric laptop, I purchased 2 sticks of 2 GB RAM for Rs 2000/- in total to give a 4 GB upgrade to the 6710b, However, 6710b continued to be slow as hell.

Finally, decided to give 6710b exit to windows by totally removing windows and installing Ubuntu 18.04 released this April. Now this old laptop is decent and not slow as hell

However, it did take some time to boot (3 minutes), which was odd, when the laptop is not slow as hell, why should the boot be slow as hell?
(1) here is the error it threw up during boot
(2)sudo nano /etc/default/grub
(3) 
(4) Added GRUB_CMDLINE_LINUX_DEFAULT="quiet video=SVIDEO-1:d" and removed "splash"

(5) saved and sudo update-grub

Now , boot time reduced to 20 seconds :)

Old laptop is no longer damn slow as hell :)


Note: Also came to know that boot menu can be displayed by pressing shift during boot and pressing E key against a kernel entry allows to edit it and boot with the edited entry to test before making changes permanent as mentioned in steps (2) onwards




Thursday, May 17, 2018

configuring ccproxy and internet gateway for routing internet from one network to another

CCproxy is software used to give internet connection to neighboring computers in the same network (connected to same switch or wifi network). It is simple and easy to use. 

This particular use-case is for situation when internet is required in an adjacent network (say 192.168.32.*, which say is the LAN) and the internet connected Proxy server is in another network (say 192.168.43.* which say is the jio network coming from wifi or mobile)

Steps:-
1. Open CC Proxy , do the settings as follows:-
2. Start the proxy server

3. install winpkfilter (which is the internet gateway)

(a) click the local area connection and  select the NAT status as client, meaning your LAN connection (say 192.168.32.10) will be client and click ok.

(b) click on wireless connection and NAT status will be provider, give the proper IP address of the JIO or wifi provided IP address (say 192.168.43.232) and click OK

(c) Click Start NAT as seen above

4. In one of the LAN PCs (say 192.168.32.25), add the following command in command window with admin privileges to add the IP address of JIO computer . Note that all Pcs in the LAN will be in the 192.168.32.* network.

route add 192.168.43.232 mask 255.255.255.255 192.168.32.10

5. ping the 192.168.43.232 computer, it should ping.

6. Open any browser and add proxy address as 192.168.43.232 and port as 808

7. open and browse internet in this network while your jio is connected to another network



 

Thursday, April 26, 2018

variables need to be explicitly declared even though óption explicit'option not given

INTRODUCTION
1. It is considered a good practice to use óption explicit'at the beginning of a module or code block, doing so, will need unique declaration of each variable in the module.

2. Though, this is good for organized coding, it can take the fun out of quick coding.

PROBLEM
1. I had not used option explicit anywhere, however, when a excel macro file developed elsewhere, was copied to my system, the code execution stopped at each undeclared variable. Declaring that variable solved the issue, however, code will stop at the next undeclared variable.

2. I checked the options menu in VB editor, "require variable declaration was also unchecked". This was a huge problem as I may have had dozens of undeclared variables. Why was I facing this problem in my home laptop while elsewhere it worked?

3. googled, found someone else also faced the same problem. The issue was using "References"which are not installed (Active X controls, like comctl2.ocx etc).

4. Clicked Tools-->References, and indeed there was highlighted a checkbox with "Missing: common controls (SP6). Unchecked this missing reference, and everything solved.  The code did not stop at any undeclared variable.

5. Meanwhile installed the common control active x and got the functionality was also obtained (separate blog post created for same)
 

making date time picker controls (sp6) work in Excel 2007

1. It is better to install MS office as 32 bit software even in 64 bit systems if legacy VBA code is being used in some excel files.

2. The common controls (mscomct2.ocx) will not work if office installed as 64 bit application.

3. The common control components like Microsoft Date time picker are obtained if the mscomct2.ocx active x file is added to the system.

4. Do not confuse between Mscomctl.ocx and mscomct2.ocx. The former is used for VB6 and later is used for VBA. download the correct ocx file and register to get the date time picker control in Excel VBA.

5. see this link (or google, if this does not open) for procedure to register active x controls.
https://www.ablebits.com/office-addins-blog/2016/10/12/insert-calendar-excel-datepicker-template/#Register-date-picker

6. irrespective, if your application is installed as 32 bit (meaning it is stored c:\program files (x86) ) in the 64 bit OS system , the OCX file has to be copied to C:\windows\syswow64 and then procedure as mentioned in step 5 to be applied.  The 64 bit applications are stored in normal program files folder (C:\program files)

7. By doing step 5 & 6, the date time picker control started appearing in VBA of excel.