Click Technology

Linux, Windows, Mac it's all good
Browsing Linux Tips

This.

November14

This is why I love git. A little tricky to get the exact hang of it, but once you have it, there’s no going back!

posted under Linux Tips | Comments Off on This.

Good to (not) know

June27

Check out this tweet form Mr. Edward Snowden.  Interesting indeed.  PGP still looks intact in its raw form.  This is good news.  Assuming the end point device has not been compromised of course and the password and private key snarfed.

That said, that is something really only a state player or well financed operative will have a shot at.  For the regular folk using PGP means always having your thoughts and ideas protected.

 

If somebody gets access to your mail server, as per Hillary Clinton, at least the attacker will have squigabytes worth of nothing and nobody finds out about your involvement with Saudi, mis-handling classified documents, Libya and the Clinton Foundation.

Your email was intercepted.  Two words.  “Shit” and “Jack”.

posted under General, Linux Tips | Comments Off on Good to (not) know

Useful backup advice..

June5

It’s always a good time to remind yourself of the advantages of having a backup of your files.  Have a read of the Tao of Backup, before it’s too late!

posted under Linux Tips | No Comments »

Stack overflow gem

May29

I was looking for some info on the right way to use a regex to parse a small piece of html which had me stumped.

I found this gem on stack overflow with 4426 positive replies.  This guy gets it.

posted under Linux Tips | No Comments »

Tips and Tricks

May17

I’ve been working with PIC micro-controllers lately and found this great document from Microchip with a collection of tips and tricks that people have used with micro-controllers. That’s the first time I’ve seen a multinational publish a ‘notes-from-the-field’ document about their technologies and how to do clever stuff with them. Check the format out too; each tip is half a paragraph and gets everything summarised in a nutshell. Great document.

posted under Linux Tips | No Comments »

How to set up LTSpice IV models

May17

This is just a brief reminder on how to add third party models to LTSpice IV, the venerable electronics modelling software. My copy is running on wine, under Linux. Installs and runs first time, no fuss. In this example, I’m going to add in a new triac I’d like to use.

Step 1 : On your machine you have two folders for models. The mathematical models themselves are at

/home/username/.wine/drive_c/Program Files (x86)/LTC/LTspiceIV/lib/sub/

while the symbols for those models are at..

/home/username/.wine/drive_c/Program Files (x86)/LTC/LTspiceIV/lib/sym/

Create a folder in each of these two folders called

myspice

and, for the sake of better long term organisation, create a new sub-folder called triacs, thus

mkdir -p "$HOME/.wine/drive_c/Program Files (x86)/LTC/LTspiceIV/lib/sym/myspice/triacs"
mkdir -p "$HOME/.wine/drive_c/Program Files (x86)/LTC/LTspiceIV/lib/sub/myspice/triacs"

Your folder tree should look like this. For clarity, some subdirectories have been removed.

.
.
|-- drafts
|-- examples
|   |-- Educational
|   |   |-- contrib
|   |   |-- FRA
|   |   `-- PAsystem
|   `-- jigs
`-- lib
    |-- cmp
    |-- sub
    |   `-- myspice
    |       |-- transformers
    |       `-- triacs
    `-- sym
        |-- AutoGenerated
        |-- Comparators
        |-- Digital
        |-- FilterProducts
        |-- Misc
        |-- myspice
        |   |-- transformers
        |   `-- triacs
        |-- Opamps
        |-- Optos
        |-- PowerProducts
        |-- References
        |-- SpecialFunctions
        `-- Trafos

Step 2 : Download the triac model from here into the /lib/sub/myspice/triacs/ folder.

In this particular case, the file from the vendor appears as a .htm file, but in reality is just a text file, so rename it as

Thyristor_TRIAC_Qxx15xx_Qxx16x_Hx_A_SPICE_Model.lib

99 times in 100, this is just a plain text file and downloadable as such.

Step 3 : Start LTSpice IV.

Step 4 : Choose File, Open and navigate to /lib/sub/myspice/triacs/ and open Thyristor_TRIAC_Qxx15xx_Qxx16x_Hx_A_SPICE_Model.lib

Step 5 : Press CTRL + F to open the ‘find’ dialog box and enter the model you want to create. In this case, I would like to use the Q6016LH3, so I enter that into the search box and click OK. The term is found and the term is highlighted.

Step 6 : Now right-click the highlighted text and click ‘Create Symbol’.

The message “Do you wish to automatically create a symbol that will netlist against the subcircuit Q6016LH3 and her 2 ports?” appears. Click Yes. The visual of the model is drawn.

Step 7 : Make any changes you need to to complete the model. I’m going to make some changes to the visual so that the Gate, MT1 and MT2 are shown clearly instead of the generic terms ‘1’, ‘2’ and ‘3’. It can be seen in the model file what the terminal numbers relate to, so 1 = MT2, 2 = G and 3 = MT1. Right click each blue square terminal in turn and modify as required.

Step 8 : Choose File, Save As, navigate to your /lib/sym/myspice/triacs/ folder and save your symbol file. Incidentally, the file automatically appears in a newly created folder called AutoGenerated. Close the model file and the symbol file. Finished.

To use the new symbol and model, simply open your normal simulation circuit and click the ‘component’ button. Navigate to your new model in the myspice\triacs folder and click to select the model. The new device appears.

Finished.

posted under Linux Tips | Comments Off on How to set up LTSpice IV models
« Older Entries

I used to run Click Technology from 1995 to 2010.  Now no longer, I maintain the site with things I find interesting or are noteworthy or have some handy-tip value.