বৃহস্পতিবার, ৯ মার্চ, ২০১৭

Android Remote Power Monitor

The power profiling is necessary to make  estimation about charging and discharging profile. There few ways to get a accurate measurement. I know two methods to do it,

1) Directly measure battery voltage and current using a very small (10-30mohm) sense resistor.
2) Directly measure battery voltage and current from charging IC using I2C interface.
3) Reading battery voltage and current from android
Method 1 is the most reliable and accurate way, however requires some hardware modification. Method 2 is time consuming and limited by the manufacturer support. Most of the battery charger IC support  I2C interface and has user access to the necessary registers. You need to go through in the datasheet to find the necessary registers. This might take sometime to write a workable script. 

Method 3 is a quick and easiest way to make a Android power profile. However, I am not sure how accurate it is. Android system has a power_supply directory where it store all the power information. I wrote a small batch script to read those android files and redirect them to a text file. During discharging, ADB using USB will not work as the same usb cable charge the unit. I use adb over tcp to over come this problem. I also read CPU temperature in this script. Here is the code,
 

মঙ্গলবার, ১০ জানুয়ারী, ২০১৭

আমি হয়তো কোনোদিন কারো বুকে


আমি হয়তো কোনোদিন কারো বুকে
জাগাতে পারিনি ভালোবাসা,
ঢালতে পারিনি কোনো বন্ধুত্বের
শিকড়ের একটু জল-
ফোটাতে পারিনি কারো একটিও আবেগের ফুল
আমি তাই অন্যের বন্ধু বলেছি;
আমার হয়তো কোনো প্রেমিকা ছিলো না,
বন্ধু ছিলো না,
ঘরবাড়ি, বংশপরিচয় কিচ্ছু ছিলো না,
আমি ভাসমান শ্যাওলা ছিলাম,
শুধু স্বপ্ন ছিলাম;
কারো প্রেমিকাকে গোপনে বুকের মধ্যে
এভাবে প্রেমিকা ভেবে,
কারো সুখকে এভাবে বুকের মধ্যে
নিজের অনন্ত সুখ ভেবে,
আমি আজো বেঁচে আছি স্বপ্নমানুষ।
তোমাদের সকলের উষ্ণ ভালোবাসা, তোমাদের
সকল প্রেম
আমি সারি সারি চারাগাছের মতন আমার বুকে
রোপণ করেছি,
একাকী সেই প্রেমের শিকড়ে আমি
ঢেলেছি অজস্র জলধারা।
সকলের বুকের মধ্যেই একেকজন নারী আছে,
প্রেম আছে,
নিসর্গ-সৌন্দর্য আছে,
অশ্রুবিন্দু আছে
আমি সেই অশ্রু, প্রেম, নারী ও স্বপ্নের জন্যে
দীর্ঘ রাত্রি একা জেগে আছি;
সকলের বুকের মধ্যে যেসব শহরতলী আছে,
সমুদ্রবন্দর আছে
সাঁকো ও সুড়ঙ্গ আছে, ঘরবাড়ি
আছে
একেকটি প্রেমিকা আছে, প্রিয় বন্ধু আছে,
ভালোবাসার প্রিয় মুখ আছে
ভালোবাসার প্রিয় মুখ আছে
সকলের বুকের মধ্যে স্বপ্নের সমুদ্রপোত আছে,
অপার্থিব ডালপালা আছে
আমি সেই প্রেম, সেই ভালোবাসা, সেই স্বপ্ন
সেই রূপকথার
জীবন্তমানুষ হয়ে আছি;
আমি সেই স্বপ্নকথা হয়ে আছি, তোমাদের
প্রেম হয়ে আছি,
তোমাদের স্বপ্নের মধ্যে ভালোবাসা হয়ে আছি
আমি হয়ে আছি সেই রূপকথার স্বপ্নমানুষ।

মঙ্গলবার, ৩ জানুয়ারী, ২০১৭

Tektronix Old Oscilloscope (TDS540A) Screen Capture (without Floppy)

I have been trying this for a while. I have a old Tektronix TDS540A oscilloscope at my work which I really like. However, the only way I can get a screen capture from this oscilloscope is using a Floppy disk. I tried several way to directly save my data to my PC. The quick convenient way is to use PrintCapture. There full version is cost 59$ USB for 1-4 PC. I want to find something free. Here is one way I found work really nice with little work around. Don't know If it will help anyone. 
Steps:
1. Change the oscilloscope setting from Shift + MENU (HARDCOPY). 
2. Select format as "EPS Color" and Port as "RS-232" 
3. Connect the PC and the oscilloscope with a USB to serial (RS-232) connector (DB-9)
3. Open Tera Term and change the Baud Rate : 9600
4. From terminal setting (Setup -> Terminal) Select Receive as "CR+LF"
5. Now the PC is ready to receive data from oscilloscope. Press "Hardcopy" button. It should fill the teraterm window with postscript data.
6. Copy all post script data and paste into a text editor. Save the file as *.EPS.
7. Clear the terminal window before each capture (clear buffer)


Now you can open the file with any EPS viewer. I use EPS Viewer to see the file. You can export the eps file to a JPG using this software. 

Now one extra note. By default, the color EPS file generate 4 different color for 4 channel. However, you can also change the color of the data line by changing the "0.00 0.00 0.00 sh" lines in the eps file. Here three 0 represent the RGB color value. 

এই ব্লগটি সন্ধান করুন