quarta-feira, 29 de novembro de 2017

LTSPICE - How to use cursors and read values from plots

LTSpice, Reading values from plot

After you have plotted a waveform, you can left-click on the waveform node-title label at the top of the graph window which will set a cursor cross-bar and with popup a new floating window with the cursor position information.



Move your pointer over the new cross-bar and a number "1" will appear.  If you now left-click the number that is showing you will be able to move along the graph and position the cursor.

If you click again over the node-title label then you will get the second cursor (ie. the cursor number 2) which will give the absolute value at each cursor position and the difference between the two cursor positions in the popup information window.

To remove the cursor(s) just close the popup information window.

REF: https://forum.allaboutcircuits.com/threads/ltspice-reading-values-from-plot.95390/

domingo, 1 de outubro de 2017

Understanding Connector: SMA


The SMA connector(SubMiniature version A) is a 50 ohm coaxial connector. It is visually similar to an F type connector that is commonly used for audio/video communication, but has different dimensions, mechanical properties and is used for different applications such as RF communications up to 18 GHz. Due to its construction, SMA connectors provide a strong and durable connection that minimizes reflections, limiting attenuation, and makes it a great choice when working with microwave frequencies.

SMA Male Connector

The SMA male connector is identified by inside 1/4″-36 threads and a 5/16″ hex nut. A standard polarity connector will have a male pin.

SMA Male Dimensions

  • Outer Diameter: 6.35mm
  • Inner Diameter: 4.59mm
  • Pin Diameter: .97mm
  • Pin Tip Diameter: .38mm 


SMA Female Connector

The SMA female connector is identified by outside 1/4″-36 threads. A standard polarity connector will have a female sleeve.

SMA Female Dimensions
    • Outer Diameter: 5.49mm
    • Inner Diameter: 4.60mm
    • Pin Insert Diameter: 1.30m



    Reverse Polarity (RP) SMA Male Connector 

    The RP SMA male connector is identified by inside 1/4″-36 threads and a 5/16″ hex nut. It will not have a male pin, but will have a female sleeve.

    RP SMA Male Dimensions

    • Outer Diameter: 6.35mm
    • Inner Diameter: 4.59mm
    • Pin Insert Diameter: 1.30mm



    Reverse Polarity (RP) SMA Female Connector

    The SMA female connector is identified by outside 1/4″-36 threads. A standard polarity connector will not have a female sleeve, but will have a male pin.

    RP SMA Female Dimensions
    • Outer Diameter: 5.49mm
    • Inner Diameter: 4.60mm
    • Pin Diameter: .97mm
    • Pin Tip Diameter: .38mm



    REF: http://blog.showmecables.com/author/showmecables/

    sábado, 1 de julho de 2017

    Ultimate Guide for Multiboot USB - All Your CD/DVD Live on a USB

    For many years, all IT enthusiasts struggle with CD and DVD for system installations, upgrades, recovery or just to test a new release.

    Also I was always having problems with GPL, shareware, freeware, IDEs, scripts, and other initiatives that  from time to time stop working, or don't support your target distro or go buggy.

    I had a hard time dealing with BIOS/EFI/UEFI different standard, brands and approaches to bootstrap your system and startup a selected OS from a block or stream device (ie. HDD, ODD, SSD, etc.)

    To make it even more difficult, old BIOS desktops usually make USB option very difficult task (since USB is relatively new in PC world of BIOS devices).  So many updated solutions just drop support for old systems, and people like me that like to use old (but as good as new) devices that are neglected by the Y/Z generation, but in some cases are the very best to help many who can not afford continuous updates of hardware (almost every six months), specially for poor countries and community schools.  And also to have a positive environmental attitude: reduce, reuse, recycle.

    So after many years testing all options available I believe that now I have a stable (and understandable), straightforward solution.

    Dependencies:

    1. Have a working GNU distribuition (I use Ubuntu 14.04.5 i686)
    2. Syslinux - isohybrid - Postprocess ISO images for hybrid mode
    3. dd - convert, copy a file to devices
    4. gparted (and also a win32 VM with a partition program if needed)
    5. nano, vi or gedit (or any editor)

    Procedure steps:

    1. Start by downloading the Live ISO image you would usually burn a CD/DVD.

    2. Prepare the ISO to be usable on a USB/HDD/SSD by the command:

      isohybrid --partok <name_of_iso_file>

    Ref: http://www.syslinux.org/wiki/index.php?title=Isohybrid

    3. Partition a new USB (or backup it first and clean all files from it) as the following:

    3.1. Now with a clean USB you can just start by resize it using gparted or a win32 partitioning application, so that is about 512MB and leave all the rest as free space.

    Notice that you will not need to much space for the first partition because it should hold only the syslinux modules, configuration files and your customization image for background.

    3.2. Now create as many new partitions as needed to accommodate each live ISO you will want to boot, but follow this rule: use a round value always larger than the ISO file size.  Exemple: for 1.1GB ISO use a 1.5/2GB partition.  For a 220MB ISO use a 512MB partiton.  For a 640MB use a 1GB partiton.  Usually 512MB increments is a good rule, but avoid very tight choices, exemple: for a 1.9GB choose 2.5GB not 2GB.  This is just to avoid last minute problems and have to start all over again.  Remember, this takes time.  But this is not a strict order, try it out if you need to save space

    3.3.  Remember that DOS only understands 4 primary partitions and on USB only ONE, so you should a good strategy is to create a extended partition and many logical partitions (as many as you wish/need), limited to your USB available space/size, remember that sectors usually are in 512 bytes increments.

    4. Format the first partition as FAT (FAT16 not FAT32).  Sometimes FAT32 will work, but FAT16 will make first bootloader sector be on the right spot (on sector number 63) or you will hack it with fdisk and more the first sector to position 63.

    Tip:
    The bootloader must start on setor 63, which is the physical sector number (or LBA) containing the first sector of the partition (unlike the sector count used in the sectors value of CHS tuples, which counts from one, the absolute or LBA sector value starts counting from zero).

    Ref: https://en.wikipedia.org/wiki/Master_boot_record#Disk_identity


    5. Install syslinux bootloader (I use example that my USB is /dev/sdb):

      syslinux --directory /boot/syslinux/ --install /dev/sdb1

    Ref: http://www.syslinux.org/wiki/index.php?title=Install#Linux


    6. Edit the /boot/syslinux/syslinux.cfg and insert the ISO partitions you will create, one by one, following this framework at the end of the file:

    #start partition X  where X is 2,3...n
    LABEL ubuntu-sdbX
    MENU LABEL <Name the ISO>
    COM32 chain.c32
    APPEND boot X
    #end


    Example:

    You could use the following syslinux.cfg:

    # This file was created origionally by MultiBootUSB.
    default vesamenu.c32
    prompt 0
    menu title John's MultiBoot USB
    #MENU BACKGROUND image
    MENU BACKGROUND MYU-bg.png
    TIMEOUT 300
    MENU WIDTH 80
    MENU MARGIN 10
    MENU PASSWORDMARGIN 3
    MENU ROWS 12
    MENU TABMSGROW 18
    MENU CMDLINEROW 18
    MENU ENDROW -1
    MENU PASSWORDROW 11
    MENU TIMEOUTROW 20
    MENU HELPMSGROW 22
    MENU HELPMSGENDROW -1
    MENU HIDDENROW -2
    MENU HSHIFT 0
    MENU VSHIFT 0
    MENU COLOR border       30;44   #40ffffff #a0000000 std
    MENU COLOR title        1;36;44 #9033ccff #a0000000 std
    MENU COLOR sel          7;37;40 #e0ffffff #20ffffff all
    MENU COLOR unsel        37;44   #50ffffff #a0000000 std
    MENU COLOR help         37;40   #c0ffffff #a0000000 std
    MENU COLOR timeout_msg  37;40   #80ffffff #00000000 std
    MENU COLOR timeout      1;37;40 #c0ffffff #00000000 std
    MENU COLOR msg07        37;40   #90ffffff #a0000000 std
    MENU COLOR tabmsg       31;40   #30ffffff #00000000 std
    label Boot from Hard Drive
    MENU LABEL Boot from  Hard Disk
    KERNEL chain.c32
    APPEND hd1
    MENU DEFAULT

    #start extended partition 5
    LABEL ubuntu-sdb5
    MENU LABEL Ubuntu 14.04.5 i686(32bits)
    COM32 chain.c32
    APPEND boot 5
    #end ubuntu extended

    #start extended partition 6
    LABEL ubuntu-sdb6
    MENU LABEL Ubuntu 14.04.5 amd (64bits)
    COM32 chain.c32
    APPEND boot 6
    #end ubuntu extended

    #start extended partition 7
    LABEL ubuntu-sdb7
    MENU LABEL GParted Live 0.28
    COM32 chain.c32
    APPEND boot 7
    #end ubuntu extended


    REF:  http://multibootusb.org/


    7. Now lets copy the prepared ISO files (see previous procedure 2)

      dd if=<prepared ISO file name> of=/dev/sdbX bs=2048

    Please double check your device location (use df -h) and also check the correct partition to set the X variable of the command, since each partition was made with the size as a critical factor.

    That is it, you now have a MULTIPLE BOOT USB for ISO live images.

    To test the new multiboot usb use qemu with the command:

    qemu-system-i386 -enable-kvm -localtime -m 1024M \
    -vga std -drive file=/dev/sdb,cache=none,format=raw,if=virtio


    Check this screenshot of a 4GB USB stick (32/64 bits ubuntu and gparted ISOs)




    Please share your tests and help make it better.

    Cheers!

    segunda-feira, 8 de maio de 2017

    How to access your old gmail sign in (login) page

    Source: Bad Mamma Jamma - Gmail Help Forum - 28 de abr 2017

    Many people are having trouble accessing the old gmail login page as the new login page just plain SUX...

    Here is what I found and how I access the old login page:

    I found out how to get the old login page back.

    In the url section of the browser type:
    about:config

    It will warn you this will void your warranty. Just click the blue button to accept.

    Then  type, on the search bar:
    javascript.enabled

    and double click it to turn it from True to False.

    Keep that folder and open a new one (because you will need to return here to set it back to True before you login).

    So now click the "+" and open a new folder.

    Then try to login to gmail (http://gmail.com) you will see the old login page.

    Enter your login and then at the password screen (before you type it in and press ENTER), go back to previous folder and return the javascript.enabled to True again (double click). 

    If you forget this last step to enable javascript again the next page will say javascript needs to be enabled but you can choose to use the html version which is just as good.

    So choose to use Gmail's basic HTML view, which does not require JavaScript or change back the javascript.enabled to True again and choose "try again".

    Use that for Google mail login procedure. Just remember to change the about:config parameter back when you need java.

    The new gmail login page sucks and yes Google should listen to all of us bickering about it and change it back.

    They said they were making it easier for us to sign in. Bullcrap!!!...it made it harder and more annoying.

    Change it back or we all might just quit gmail (ie. look what is happening to youtube - when you don't hear your customers!).

    This new sign-in is very annoying to us, costing us time and money.  The new page is neither faster or makes it easier or beneficial for the users.

    Back when we the user could put the email and password in the same popup container was more user friendly and is more important to keep our privacy.

    quinta-feira, 30 de março de 2017

    Software-center crash problems on Ubuntu 14.04 Trusty Tahr 32bits

    I believe this is the best solution ever (tested on different Ubuntu base systems with the same problem) for software-center crash bug.

    The typical crash log (if you start software-center from terminal):
    2014-10-01 14:08:35,558 - softwarecenter.ui.gtk3.app - INFO - setting up proxy 'None'
    2014-10-01 14:08:35,681 - softwarecenter.fixme - WARNING - logs to the root logger: '('/usr/lib/python2.7/dist-packages/dbus/proxies.py', 410, '_introspect_error_handler')'
    2014-10-01 14:08:35,681 - dbus.proxies - ERROR - Introspect error on com.ubuntu.sso:/com/ubuntu/sso/credentials: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ChildExited: Process /usr/lib/ubuntu-sso-client/ubuntu-sso-login exited with status 1
    Traceback (most recent call last):
      File "/usr/bin/software-center", line 130, in <module>
        app = SoftwareCenterAppGtk3(options, args)
      File "/usr/share/software-center/softwarecenter/ui/gtk3/app.py", line 338, in __init__
        self.icons)
      File "/usr/share/software-center/softwarecenter/ui/gtk3/session/appmanager.py", line 66, in __init__
        self.oauth_token = helper.find_oauth_token_sync()
      File "/usr/share/software-center/softwarecenter/backend/ubuntusso.py", line 141, in find_oauth_token_sync
        sso.find_credentials()
      File "/usr/share/software-center/softwarecenter/backend/login_impl/login_sso.py", line 74, in find_credentials
        self.proxy.find_credentials(self.appname, self._get_params())
      File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 70, in __call__
        return self._proxy_method(*args, **keywords)
      File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 145, in __call__
        **keywords)
      File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
        message, timeout)
    dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ChildExited: Process /usr/lib/ubuntu-sso-client/ubuntu-sso-login exited with status 1
    The solution that I have found to solve this bug, after many months of research, and many misleading information found on the web/google/blogs/forums is very simple, but difficult to understand for newbies and non-coders.

    CAUTION: The Internet is full of 'false solution' (ie. or very case specific situations) to software-center bug affecting ubuntu users, and that lead to make your system even more corrupted and buggier than before, so please do take your time to understand what you are intending to "sudo" with or you will be in trouble.

    After reading around quite a bit on several similar and somewhat related bug reports, the following 2 steps solved it for me (or seem to have solved it for all the systems I could identify with same crash log - which is also misleading - caution reading logs!).

    Does not need to purge software-center or upgrade distribution or worst: DO NOT REINSTALL YOUR SYSTEM! Does not have to do with dbus or proxy or hardware problems, these are just side effects.

    I diagnosed the problem as a 'pip' bug or 'pip configuration' corruption and its consequence on python subsystem.

    So I targeted it as the result of a python 'pip' installation bug after a wrong 'pip' installation of a non standard package repository.

    The solution is in part found for the 'pip' problem here:

    REF: https://github.com/pypa/pip/issues/2686
    User: jayachar88 commented on Apr 15, 2015

    The solution is very simple at the end, just do this:
    $ sudo python -m pip install --upgrade --force setuptools
    $ sudo python -m pip install --upgrade --force pip
    Not only does this solves python exception error with pip upgrade, but also a greater bug of Ubuntu community, which is the software-center crash bug.

    Cheers!

    sábado, 18 de fevereiro de 2017

    How to save your Battery

    How to save your battery.

    Charging overnight won't degrade really. But charging while using the phone surely will.

    Every rechargeable battery has certain number of charge discharge cycles which is specific to its capacity (current output or voltage).

    The Basis for charge discharge cycles is the Reversible reaction occurring in the battery.
    • (Li+ + e- → ← Li-) ( → Charge ; ← Discharge)
    Excessive charging will not help, in the other way it corrodes the electrode enhances the degradation rate of the electrolyte.

    So, here's my suggestion - Use your phone from 100% to 5% and only then leave it for charging.

    Don't take it to 40% and put it on charge and still keep using it. Battery temperatures can reach around 40°C while you're using your phone with the charger plugged in and that's not good for you battery life.

    There are two main types: Lithium ion and Lithium polymer, both are having different chemistries and they are not same. Lithium polymer is light weight and can have more Coulombs* ratings, which means capable of giving more current than lithium ion. Lithium polymer is less likely to die quickly than lithium ion by over charging. But still both lithium ion and lithium polymer can be over charged by leaving charger on.
    • 1C = 1A ⋅ 1s
    • * The coulomb (unit symbol: C) is the International System of Units (SI) unit of electric charge. It is the charge (symbol: Q or q) transported by a constant current of one ampere (A) in one second (s):
    Also turn brightness down, remove from your device unneeded apps and emails, check which apps consume most battery or are get alerts, and in areas of bad reception do a network reset. A lot of battery life especially on iPhones are due to bad upgrade and apps in the background using your resources.


    Therefore:
    1. Don't use your phone while charging.
    2. Leaving it to charge all night is fine, given that you're following the rule above.
    3. Charge phone only when it is under 5% capacity
    4. Check what is running on your device.