Stitching layers between copper zones in KiCad

I’ve been working a bit with KiCad lately and have run into a problem in PCBnew with “stitching” (i.e., adding vias between) filled zones on top and bottom layers. This is something you typically do if you have flooded the unused spaces on both top and bottom of your board with copper and have connected the floods to ground or some other reference.

The KiCad FAQ outlines a process for doing this, and it works fine until you refill (i.e., re-pour) the zones — or the DRC refills them for you. When the zones are refilled, the vias you added for stitching become isolated from the zones and end up as little pads floating in space.

The problem and a workaround was discussed in a recent thread on the kicad-users mailing list. I wanted to summarize here the workaround in a slightly less terse way:

  1. Route the board and define your zones as you always have.
  2. Fill the zones as you always have.
  3. Select “Add tracks and vias” from the toolbar on the right.
  4. Click on an existing pad that’s connected to the zone’s net, drag the pointer a little bit to create a short track, then either (a) right-click and select “Place Via” or (b) type the ‘V’ shortcut.
  5. To add more stitching vias, continue to drag the pointer and type ‘V’ where you want to drop vias (or right-click and select “Place Via”).
  6. When you are done placing vias, hit the ‘End’ key on your keyboard (or right click and select “End Track”).

You can repeat this as many times as you want to create different clusters of stitches. When you refill zones, the vias will retain the connectivity information and work as expected.

Blogger blocked again

Bu siteye erisim mahkeme karariyla engellenmistir.

Oh, how we never grow tired of reading this. (Access to this site has been blocked by court order.) Here’s the BBC’s report on the absurdity that’s to blame this time.

An Imperfect Ten

When I told my Turkish “special friend” (she refused to call herself my girlfriend) that I had decided to move to Turkey to take a teaching position in Istanbul, she smirked and said I wouldn’t last more than a couple of weeks. That was almost exactly ten years ago.

Since then, I’ve lost my cat and my dad, in that order. I racked up another academic degree. I’ve lived in three different houses. I’ve been through a few more “special friends” and a couple actual girlfriends. And I’ve kept the same job.

I’ve learned a lot about Istanbul and its women. The most important thing I’ve learned about these two is that no matter how much you know it’s never enough. I’ve also learned they have a lot more in common.

One of the most striking things about Istanbul is that it seems hellbent on pumping you full of ambivalence. At first the foreignness of everything lets you deny the abusive and insane stuff, but over time you begin to lose sense of the things that you love–and that makes you feel your nose increasingly rubbed in the other stuff. This isn’t good. I arrived here with a ridiculous capacity for love–and love I did. Today, I’m not entirely sure I’m capable of the emotion.

Wait … I am capable of the emotion. I love my job–even more so than when I first arrived. Teaching really is an honor. The more you do it, the better you get at it. And the better you get at it, the more you feel you are helping. And the more you feel you are helping, the more you love what you do. I also love my students.

I have no idea what the next ten years will bring nor whether they will be brought forth here or someplace else. I just hope they are as imperfect as the last ten so I can continue to learn and share bits of it.

Vimeo: banned in Turkey

I can confirm that the ban on Vimeo reported today at TechCrunch is in effect. And unlike most bans here, which can be worked around by using a third-party DNS service (e.g., OpenDNS or Google Public DNS), this ban appears to be the same kind of full-throttle “do not allow any traffic to from any IP address that has ever served up Vimeo content whether or not it’s actually Vimeo content” that is currently in place for many Google services (including YouTube).

Got FoxyProxy?

Patents are public

I do a fair amount of open source code development, yet I am not (yet?) against the idea of software patents. I think there are significant problems with the way software patents are implemented in the US, but I don’t find the concept fundamentally odious.

However, I do find corporate bullying using patent infringement as a pretext quite reprehensible. A recent example–to which I will not link so that I don’t make things worse for the coder–really has me annoyed.

In essence, an independent coder reimplemented from scratch and for no commercial gain a program to  duplicate the functionality of a commercial product. The coder then published her/his work with the intent of releasing the code under an open source license. I am not a lawyer, but I think the general gist of a patent is that it is illegal to distribute a product that is under patent protection without first obtaining a license from the patent holder. As far as I know, it is not illegal in the USA to discuss patents in public nor to publish, for example, plans for making a better or different patent-protected Hovercraft Eel Sensor. It only becomes an issue if you try to distribute a product based on those ideas without a license. The ideas and discussion thereof are public. The use of ideas in products is protected.

The coder in our story has simply published plans (i.e., source code) for making a different version of a (possibly) patent-protected product. Nowhere does the coder indicate her/his intent to distribute a product (i.e., executable code) based on the plans. In spite of this, our coder gets a threatening email from the V.P. of the corporation that makes the commercial product citing (without specificity) that the published work infringes on their patents.

It may also be worth noting that the coder does not appear to have done any reverse engineering to discover how the software works. So if the V.P. actually means “trade secret” when he actually says, “patent,” then there’s nothing there either.

I am not a lawyer, but I utterly fail to see the grounds for the corporate entity’s gripe in this and similar cases. Also, in the particular case in question, you cannot help but notice the extreme vagueness in the communications from the corporate entity. Under these circumstances, one would easily be forgiven for thinking that the corporate entity knows it has nothing to stand on and that its strategy is simply to threaten a costly legal process against the coder. They know that  lone coders will almost certainly comply with threatening requests to spare themselves the burdens of the situation. I am not a lawyer, but in common-person speak we sometimes use the word “extortion” for this strategy.

You can’t have it both ways: patent protection and protection from public scrutiny. Patents are public.

Plugging holes and plugging mouths

Years ago, the powers that be here in Turkey decided that YouTube needed to be blocked. So they forced the (centralized) DNS servers to redirect all youtube.com requests to a “no YouTube for you” page. Then people figured out that if they use an independent DNS service (e.g., OpenDNS and later Google) the addresses would resolve as they should. And life was good. Not only were the gates to YouTube effectively re-opened, but you also gained access to myriad other banned sites (mostly pron that was speculatively banned on the basis of copyright infringement (!), but a lot of actually useful stuff as well.)

A few days ago, the powers that be decided they needed to plug this hole. So instead of merely intercepting DNS requests to youtube.com, they implemented an indiscriminate IP address ban on all (known) addresses used by Google to serve up YouTube content. The problem with this is that Google uses those same addresses to serve up non-YouTube stuff like Google Docs, Google Sites (once banned, maybe still so), etc.

Result: very little Google goodness for the good people of Turkey. Way to go.

Poor man’s code generator

A short time ago, I wanted to find a simple code generator that would run on Windows for helping me to maintain hand-rolled SPICE models files. I was a bit surprised to find none that were no-brainers to install or use. However, I did figure out that OpenOffice‘s mail merge feature can be used as a poor-man’s code generator. There’s more than one way to do it, but the process described at Worldlabel.com is the most straightforward for my brain. The key is to “print out” to several files or a single file–depending on what you are generating.

SPICE library management

The following post is all geekspeak. You have been warned.

I am trying to keep my SPICE modeling as platform and vendor-neutral as possible. To help with this, I have come up with the following structure for managing libraries. The idea is to have a file system, e.g.:

- models
    - diodes-inc
        - diodes
        - transistors
        - zeners
    - fairchild
        - transistors
    - onsemi
        - transistors

and in each category (i.e., subdirectory) store your individual model files. The file system, in addition to providing a structure to manage different kinds of parts from of different places, also helps to differentiate models for the same part from different sources.

Now here’s the fun part. So that I don’t have to have a million different .inc or .lib commands in the SPICE simulation’s source (one for each part I use, e.g.,

.lib C:\SpiceDev\models_raw\fairchild\transistors\MMBT2907A.lib

), I aggregate all the models in a given subdirectory into a single library file. Thus, C:\SpiceDev\models_raw\fairchild\transistors in addition to having several individual model files also has the file C:\SpiceDev\models_raw\fairchild\transistors\transistors.lib in it that is an aggregation of all the other files ending in .lib, .mod, or .sp3. So now if I want to use a Farchild transistors, I only need to include a single file:

.lib C:\SpiceDev\models_raw\fairchild\transistors\transistors.lib

Of course I don’t maintain the aggregate library file by hand. Instead I have written an AutoHotkey script that does the job. I place the script in a fixed place and then create links (i.e., shortcuts) to it from the directories containing the model files; but it will also work if you drop the script itself into the directory in which you want to make an aggregate library.

The script goes through each file in a directory (non-recursively) and if the file has a .lib, .mod, or .sp extension it appends its contents to a file named {directory-name}.lib . Both the extension of the output file and the list of aggregated input file extensions can be easily changed in the source code.

One important note: If you want to call the script using a shortcut, make sure the SetWorkingDir command in the code is commented out (as it is below) and also make sure the ‘Start In’ field for the shortcut is blank or points to the desired directory. Enjoy.

;
; AutoHotkey Version: 1.x
; Language:       English
; Platform:       WinXP
; Author:         Copyright (C) 2009 Mithat Konar
; License:        GNU/GPL2
;
; Script Function:
;	Copies contents of all files with extensions specified below into {directotyname}{outFileExtension}
;

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
;SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

; To use with a shortcut, make sure SetWorkingDir command above is commented out and
; make sure the 'Start In' field for the shortcut is blank or points to the desired dir.

;===============================================================================
; user-set constants
;===============================================================================
outFileExtension=.lib	; the extension for the output (with dot!)
inExtList=lib,mod,sp3	; list of valid model file extensions (without dots!)

;===============================================================================
; "Main"
;===============================================================================
SplitPath, A_WorkingDir , outFile	; get the name of the active directoty. 

; use %outFile% as working file, then move to %outFile%%outFileExtension%
FileDelete, %outFile%					; just in case, we delete any old version now
FileDelete, %outFile%%outFileExtension%	; just in case, we delete any old version now

FileAppend, *======================================================================*`n, %outFile%
FileAppend, * Generated by %A_ScriptName% on %A_NowUTC% UTC from`n, %outFile%
FileAppend, * %A_WorkingDir%`n, %outFile%
FileAppend, *======================================================================*`n`n, %outFile%
Loop, *.*
{
	if A_LoopFileExt in %inExtList%
	{
		FileAppend, *** File: %A_LoopFileFullPath% ***`n, %outFile%
		Loop, Read, %A_LoopFileFullPath% , %outFile%
		{
			FileAppend, %A_LoopReadLine%`n
		}
		FileAppend, `n`n, %outFile%
	}
}
FileMove, %outFile%, %outFile%%outFileExtension%, 1
FileDelete, %outFile%

LTspice and tube models

Linear Technology’s LTspice is becoming quite popular among audio circuit designers, both professional and amateur. There is a lot to recommend it, but there is at least one issue that is crucial to be aware of if you are planning to use vacuum tube or other third-party models based on arbitrary behavioral voltage or current sources. And that is: LTspice’s implementation of arbitrary behavioral voltage or current sources is not completely SPICE 3 compatible.

In particular (from the LTspice help files),

LTspice uses the caret character, ^, for Boolean XOR and “**” for exponentiation. … This means that when you import a 3rd party model that was targeted at a 3rd party simulator, you may need to translate the syntax such as x^y to x**y or even pwr(x,y).

I ran into exactly this issue when experimenting with SPICE 3 versions of my own tube models.

Google Sites banned

As of 24 June 2009, access to Google Sites has been blocked in Turkey.

Just for giggles, here’s the official English explanation: “The decision no 2009/392 dated 24/06/2009, which is given about this web site (sites.google.com) within the context of protection measure, of Denizli 2. Sulh Ceza Mahkemesi has been implemented by ‘Telekomünikasyon İletişim Başkanlığı’.”

Lest you think that the above is a Google translation, here it is again translated by Google from the official announcement in Turkish: “Denizli 2nd Magistrates of the Criminal Court, dated 24/06/2009 and 2009/392 in the context of this web site nolu PROTECTION MEASURES (sites.google.com) the decision about the Telecommunications Communication Başkanlığı’nca apply.”

Home Cloud

clouds
If the recent rash of netbooks is any indication, cloud computing may actually be gaining traction.

The aspect of cloud computing that’s the most attractive for me is being able to access all your stuff no matter where you are–provided you have a computer with a decent Internet connection and a fairly standard browser. However, there are two very bothersome aspects of cloud computing. First, if you cannot connect to the provider of your cloud service (e.g., your ISP is flaky, the service’s servers are ill, the site has been banned in the country you are in, etc.), you are screwed. Second, no matter what guarantees the provider gives you, your stuff is in someone else’s hands–meaning the provider can legally sniff your stuff for more effective marketing (Google) or it may be illegally hacked into.

However, there is a fairly easy approach to ameliorating both these problems, especially now that capable server hardware has become so profoundly cheap. The idea is simple: instead of having Google, Google Apps, Zoho or whomever host your Cloud apps, host them in your own home on a dedicated computer. As long as you don’t plan to open your Home Cloud to tons of users, the performance demands on the hardware will be pretty small.

When you host your Cloud apps from home, if your ISP goes nuts you will still be able to access your stuff from within your home LAN. While this won’t help you if you need to access your stuff from Starbucks, it is better than not being able to access it from anywhere. Also, when you host your Cloud apps from home, your data stays at home. It still may be open to hacking, but it won’t be available for other purposes. In addition, a would-be hacker would have to specifically target your server, whereas in a hosted situation one breach of the server may make all users’ data available to the hacker.

One downside to the Home Cloud concept is that it places the burden of backing up data on the home user. But this can be greatly simplified by appropriate Home Cloud software.

A bigger problem with the Home Cloud is what all the cool people are now calling “monetization”. In other words, how do you make money off it? End users are becoming increasingly accustomed to getting services for free. Google makes money feeding you ads. Zoho makes money by selling premium services mostly to businesses. Are users willing to pay for Home Cloud software? One possible way forward is to adopt the media server model: dedicated server hardware that’s preloaded with everything needed to make it go and that requires a minimum of user configuration. We may be living in a time where it may actually be easier to sell hardware that encapsulates a task than software.

I’m aware of only a few projects that have a Home Cloud spirit. eyeOS and Lucid Desktop are OSS home-hostable apps that give the user a virtual Web-based desktop. Another project to keep an eye on is Tiny Tiny RSS–essentially a home hostable replacement for Google Reader. All three of these projects are open source software, and it will be interesting to see where all three of these projects go.

A rare moment of accountability

skids
On my way to the office today, a white van barreling down a road that joined mine at a T junction nearly removed my car, and possibly me, from service. Fortunately, disaster was averted by some heavy breaking and staccato tire squealing on my part (no ABS on the 1997 Fiat-TOFAS Tipo).

This in itself is not news. Near-misses in traffic are a million a day here. What made this event special was that the driver pulled over at a suitable spot some 300 meters on, rolled down his window, and poking both arms and his head out of the window gestured toward me for forgiveness.

And it all happened so quickly that I didn’t have a chance to give him a warm huggie to let him know that while I was annoyed at his carelessness I still appreciated his accountability.

P.S. For those of you who thought this entry might have something to do with audio, I have no reason to think that the white van had anything to do with speaker sales.

Can’t find the word

I am looking for a word that means, “I don’t want to leave, but you are making it impossible to stay.” Does it exist?

Bloody f***ing h***


I tried keeping quiet, I really did, but Blogger.com getting banned in Turkey finally broke me down.

Silence


I’ve been experimenting with keeping quiet.

More histrionics

It should come as no surprise that there are more histrionics. Specifically, this.

I am saying nothing because I am at a loss for words.

And there was guarded rejoicing

I hope this is a sign of things to come rather than the manifest end of a potential compromise.

In/out

Out
Joining the recently banned 50Webs is the hugely huge purveyor of Internet radio, Shoutcast. I am just too tired of this to even think up a comment. YouTube is still banned.

In
It looks as though Google Groups have been restored. Ditto comment above about being tired of this.

More bannings

Yeah, I know this is getting old … but no one I know is actually maintaining a history of this deal.

YouTube is blocked again. A newcomer to the blocked list is 50Webs, a web hosting service. A court case in Ankara is responsible for the YouTube ban; a case in Erzurum for the 50Webs ban.

Google Groups are still banned, and WordPress is still accessible

Yeah, it’s getting old … but it’s no less stupid.

Google: out. WordPress: in. Maybe.

On the heels of the Google Groups ban, it appears as though access to WordPress.com (and this blog) has been restored … after an 8 month ban. Whether this lifting of the WordPress ban is a temporary glitch or a real change in policy remains to be seen. The weirdness is not letting up.

Next Page »


 

January 2012
S M T W T F S
« Nov    
1234567
891011121314
15161718192021
22232425262728
293031  

Follow

Get every new post delivered to your Inbox.