tag:blogger.com,1999:blog-8214145805311732732024-03-05T00:48:20.001-06:00Kansas City PolymathI'm interested in a wide variety of things, and I aspire to be a polymath - one with a wide range of skills and knowledge. This blog is about the various skills and knowledge I'm working to acquire, and how I go about doing that.Kit Fenderson-Petershttp://www.blogger.com/profile/04617551268146374973noreply@blogger.comBlogger58125tag:blogger.com,1999:blog-821414580531173273.post-76987377281199274012017-09-29T17:04:00.000-05:002017-09-29T17:04:09.581-05:00Freeside Development Environment (day 1)I'm on the job market again after two wonderful years at Broadbean. Sadly, budget cuts eliminated my position and several others, but enough about that. Anyway, as part of my job search, I came upon <a href="http://freeside.biz/">Freeside</a>, which is a billing application for ISP's, CLEC's, and similar. They work on an open source, paid support model, so after discussion with Ivan, the CEO and "head geek", I thought I'd do some work "on spec" as a job application of sorts. But to begin with, I need a development environment.<br />
<br />
At Broadbean I got used to every package we worked on having its own cpanfile. This meant that, using perlbrew, all I had to do was <code>perlbrew lib create perl-<version>@<package></code>, and then <code>cpanm --installdeps .</code>, and I was set. Freeside doesn't work like that, so I'll set up a VirtualBox VM for it instead.<br />
<br />
I'm going to use Debian 8.9.0 (Jessie), as that is the version where installation instructions are completely documented in the Freeside wiki. So I've downloaded the Debian network install CD image from https://cdimage.debian.org/cdimage/archive/8.9.0/amd64/iso-cd/ and will install it into a VM. I've got Google Fiber, so this shouldn't take long.<br />
<br />
Since I intend to interact with this VM via SSH and a browser, I've selected the "web server", "SSH server", and "standard system utilities" collections. A few minutes later, the system is installed, I've rebooted the VM, and installed <code>sudo</code> (I prefer using sudo to simply doing <code>su</code>). I set up a network interface, put in my SSH key for passwordless login, and I'm ready to start setting up my development environment.<br />
<br />
First thing to install is vim. This is my preferred editor for code, and I can't abide nano. ;) Next I set up the package repositories as specified in <a href="http://freeside.biz/mediawiki/index.php/Freeside:4:Documentation:InstallingOnDebian8">the Freeside installation instructions</a> and install the Freeside packages. I'll note here that <code>aptitude</code> is recommending that I remove the packages <code>exim4</code>, <code>exim4-base</code>, <code>exim4-config</code>, and <code>exim4-daemon-light</code>, and is not installing the recommendation of the Perl <a href="https://metacpan.org/pod/EV">EV</a> package. <strike>I assume since Freeside is installing Mojolicious, it is going to be running under <a href="https://metacpan.org/pod/Mojo::IOLoop">Mojo::IOLoop</a> (which I was <i>just </i>working with at Broadbean. Freeside++!)</strike> No, I was mistaken. Only very minimal usage of Mojolicious in Freeside.<br />
<br />
OK, a few minutes later all the packages are installed and I'm setting up the database. Note where the docs say "<span style="background-color: #f9f9f9; font-family: monospace , "courier"; font-size: 12.8px;">[ as postgres/pgsql user ]"</span> they mean "user" to be the system user (from <code>/etc/passwd</code>) "postgres". I set up the database role with a crappy password (this box isn't exposed to the internet, after all) and as the "freeside" user, I execute <span style="background-color: #f9f9f9; font-family: monospace , "courier"; font-size: 12.8px;">freeside-setup -d example.com</span>. Note that the domain is important - if it's not a valid TLD, <code>freeside-setup</code> will throw an error and you'll have to blow away the <code>freeside</code> database and start over. Anyway, <code>freeside-setup</code> barfs, so now I need to figure out what I did wrong.<br />
<br />
Turns out the wiki has things in the wrong order. I need to set up the RT database <i>before </i>I run <code>freeside-setup</code>. With that done, I can move on, install the system users and so on, and I should be up and running. Sure enough, I am able to restart the Freeside daemon successfully.<br />
<br />
Since I want to hack on Freeside, I think I need to blow away the Freeside packages and set up a fresh installation via <a href="http://freeside.biz/mediawiki/index.php/Freeside:4:Documentation:Installation">the instructions on installing from source</a>. This might allow me to use <code>perlbrew</code> as well, but I'm not certain of that. But that's a task for another day.<br />
<br />
<br />
<br />
<br />Kit Fenderson-Petershttp://www.blogger.com/profile/04617551268146374973noreply@blogger.com0tag:blogger.com,1999:blog-821414580531173273.post-44846472568324285002016-10-18T18:11:00.000-05:002016-10-18T18:11:01.788-05:00Genuine, Honest-to-Ada, Taleo MTOM/XOP export exampleBecause this has been vexing me for <i>months</i>.<br />
<br />
So the key here is that you have<i> two </i>Document elements. One in the SOAP envelope, and one in the attachment. Your Attributes (gotta have those) go in the Document element in the attachment.<br />
<textarea cols="100" rows="70">
POST https://your-client-id.taleo.net/enterprise/soap?ServiceName=IntegrationManagementService HTTP/1.1
Authorization: Basic XXXXXXXXXXXXXXXXXXXX
User-Agent: libwww-perl/6.15
Content-Type: multipart/related; boundary=MIME-boundary-4180; type="application/xop+xml"; start="<xml@localhost>"; start-info="text/xml; charset=utf-8"
SOAPAction: "http://www.taleo.com/ws/integration/toolkit/2011/05/management/IntegrationManagementService#submitLargeDocument"
X-LWP-Version: 6.15
X-XML-Compile-Cache-Version: 1.04
X-XML-Compile-SOAP-Version: 3.18
X-XML-Compile-Version: 1.52
X-XML-LibXML-Version: 2.0126
--MIME-boundary-4180
Content-Type: application/xop+xml; charset="utf-8"; type="text/xml; charset=utf-8"
Content-ID: <xml@localhost>
Content-Transfer-Encoding: 8bit
<?xml version="1.0"?>
<soap11:Envelope xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/">
<soap11:Header>
<wsa:MessageID xmlns:wsa="http://www.w3.org/2005/03/addressing">Query-Export-30F84EB0-957D-11E6-BEE2-84322521867A</wsa:MessageID>
<wsa:ReplyTo xmlns:wsa="http://www.w3.org/2005/03/addressing">
<wsa:Address>http://www.taleo.com/ws/integration/toolkit/2005/07/addressing/queue</wsa:Address>
</wsa:ReplyTo>
<wsa:Action xmlns:wsa="http://www.w3.org/2005/03/addressing">http://www.taleo.com/ws/integration/toolkit/2005/07/action/export</wsa:Action>
</soap11:Header>
<soap11:Body>
<tns0:submitLargeDocument xmlns:tns0="http://www.taleo.com/ws/integration/toolkit/2011/05/management" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tns0:Document xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmime:contentType="text/xml">
<xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:1476827562@localhost"/>
</tns0:Document>
</tns0:submitLargeDocument>
</soap11:Body>
</soap11:Envelope>
--MIME-boundary-4180
Content-Type: text/xml
Content-ID: <1476827562@localhost>
Content-Transfer-Encoding: binary
<Document xmlns="http://www.taleo.com/ws/integration/toolkit/2011/05">
<Attributes>
<Attribute name="version">http://www.taleo.com/ws/tee800/2009/01</Attribute>
<Attribute name="mode">T-XML</Attribute>
</Attributes>
<Content>
<ExportQuery xmlns="http://www.taleo.com/ws/integration/toolkit/2005/07/action/export">
<query xmlns="http://www.taleo.com/ws/integration/query" projectedClass="Candidate" alias="Export_30F84EB0-957D-11E6-BEE2-84322521867A_20161018165240" preventDuplicates="false">
<projections>
<projection>
<field path="EmailAddress" localeFiltering="none"/>
</projection>
<projection>
<field path="Number" localeFiltering="none"/>
</projection>
</projections>
<filterings>
<filtering>
<equal>
<field path="Number"/>
<integer>12345</integer>
</equal>
</filtering>
</filterings>
</query>
</ExportQuery>
</Content>
</Document>
--MIME-boundary-4180--
</textarea>Kit Fenderson-Petershttp://www.blogger.com/profile/04617551268146374973noreply@blogger.com0tag:blogger.com,1999:blog-821414580531173273.post-27895504369105277042015-06-11T12:12:00.001-05:002015-06-11T12:26:57.516-05:00Freelancing againI have once again joined the ranks of the freelance developer community. It wasn't by choice, and I've been looking for full-time gigs, but nothing's panned out as of yet. So in the mean time, I'm trying to make the best of my situation, and I'm hoping this new site I've heard about, <a href="http://toptal.com/">Toptal</a>, can help.<br />
<br />
Why Toptal? A couple of reasons. First, I need the work, and the more sites I'm on where I can get work, the better. But second, and this remains to be seen, is that I'm hoping Toptal can put me in front of clients who can really challenge me as a developer. Where I can solve exciting new problems.<br />
<br />
Since I'm primarily a Perl guy, I'm joining Toptal's <a href="https://www.toptal.com/perl">Perl Developers Network</a>. I don't mind learning the latest shiny new technology - like single page Javascript, for example - but that's not my end goal. I'm not looking to learn the new technologies just to check off a box, or to add a line to my resume. I'm looking to create solutions. If there's a tool I need to learn in the process of creating a solution, that's great. But it's not an end in itself. So I'm joining their Perl network in the hope of finding clients who are less concerned with the latest HR buzzword and more concerned about getting things done.Kit Fenderson-Petershttp://www.blogger.com/profile/04617551268146374973noreply@blogger.com0tag:blogger.com,1999:blog-821414580531173273.post-23114932823847753012013-04-17T11:54:00.000-05:002013-04-17T11:55:38.186-05:00Auto-generating setters and getters in Perl with Moose<p>As part of a project for work interfacing with the RDS encoder for the radio station (an <a href="http://www.inovonicsbroadcast.com/model/730">Inovonics Model 730</a>) I thought, "wouldn't it be nice to have a Perl object that provides a complete interface to this device?" The only trouble is that the device takes a lot of different commands, and it would be really tedious to write <code>sub set_foo { ... }; sub get_foo { ... }</code> umpteen million times for every last command / datum the encoder supported, since every <code>set_foo { ... }</code> was going to boil down to:</p>
<pre><code>sub set_foo {
my ($self, $value) = @_;
return _set('foo', $value);
}
sub get_foo {
my $self = shift;
return _get('foo');
}
</code></pre>
<p>Where <code>_set()</code> and <code>_get()</code> took care of the actual business of communicating with the encoder.</p>
<p>Now, I could have done this in Vim with regular expressions - just copy/paste and use the regex to change the appropriate things. Still tedious, though. I also could have done something like this:</p>
<code><pre>
sub set_property {
my ($self, $property, $value) = @_;
return _set($property, $value);
}
sub get_property {
my ($self, $property) = @_;
return _get($property);
}
</pre></code>
<p>And that would have worked fine. I could have put some code in there to throw an exception on an invalid property, maybe something to validate the values based on the property name, all that sort of thing. But Moose gives us a nifty trick to avoid having to validate the property name:</p>
<code><pre>
package MooseSketch;
use Moose;
my $meta = __PACKAGE__->meta;
foreach my $prop (qw/foo bar baz bak/) {
$meta->add_method(qq/set_$prop/, sub {
my $self = shift;
my $value = shift;
return $self->_set($prop, $value);
}
);
$meta->add_method(qq/get_$prop/, sub {
my $self = shift;
return $self->_get($prop);
}
);
}
</pre></code>
<p>This <code>$meta</code> business comes from <a href="http://search.cpan.org/~doy/Moose-2.0604/lib/Class/MOP/Class.pm">Class::MOP::Class</a>, which allows us to do introspection and manipulation of Perl 5 objects. So with Class::MOP::Class, I can add or remove methods programatically at runtime, or even create entire classes. Neat, huh?</p>
<p>Hope you find this useful. I know I sure will. Many thanks to the good people over at <a href="http://stackoverflow.com/">Stack Overflow</a> who helped me figure this out. My original question: <a href="http://stackoverflow.com/questions/14570959/how-to-auto-generate-a-bunch-of-setters-getters-tied-to-a-network-service-in-m">How to auto-generate a bunch of setters/getters tied to a network service in Moose?</a></p>Kit Fenderson-Petershttp://www.blogger.com/profile/04617551268146374973noreply@blogger.com0tag:blogger.com,1999:blog-821414580531173273.post-33029566065176779782013-02-11T15:45:00.003-06:002013-02-11T15:49:50.575-06:00Generating a Word document with Perl and Win32::OLEI'm about to have to throw this particular bit of code away, as I'm not able to get this to work from Scheduled Tasks on Windows 7. Before I sent it to the bit bucket, however, I thought I'd post it here with the hope that someone will find it useful.<br />
<br />
<br />
<pre>
<code>
# Expects arguments as a hashref with the keys:
# # log_date: Date of the log
# # data: an arrayref of arrayrefs. First line is treated as column headings, following lines are treated as data.
#
# A double horizontal rule will be added between the column headings and the data.
#
# NB: The reason that everything gets its own object (e.g. "my $tables = $doc->Tables; my $table = $tables->Add(...);")
# is not (neccessarily) for "Law of Demeter" reasons, but rather MS recommended practice when
# automating Office applications from Visual Studio (and by extension, OLE): http://support.microsoft.com/kb/317109
# Experimentally, I have noticed instances of the Word executable remaining in memory after program exit;
# refactoring the code in this way is an attempt to deal with that issue.
# 11 Feb 2013 KP
sub _print_with_word {
my $args = shift;
if ( ref $args ne q/HASH/ ) {
croak(
sprintf q/Usage: %s <hashref>/,
( caller 0 )[$FUNCTION_NAME_POSITION]
);
}
foreach my $required_key (qw/log_date data/) {
if ( !$args->{$required_key} ) {
croak(qq/Missing required key '$required_key' in args/);
}
}
my $header = _slurp_file( $CONFIG->{'_'}{'header_file'} );
my $footer = _slurp_file( $CONFIG->{'_'}{'footer_file'} );
my @rows = @{ $args->{'data'} };
my $word = Win32::OLE->new( 'Word.Application', 'Quit' );
_debug(q/Created new Word object/);
my $doc = $word->Documents->Add();
_debug(q/Added new document/);
my $selection = $word->Selection;
_debug(q/Got Selection instance/);
my $selection_paragraph_format = $selection->ParagraphFormat;
_debug(q/Got ParagraphFormat instance for selection/);
$selection_paragraph_format->{'SpaceAfter'} = 0;
_debug(q/Set paragraph spacing for header/);
$selection->TypeText( { 'Text' => qq/$header\n\n/, } );
_debug(q/Typing header into selection/);
$selection->BoldRun();
_debug(q/started bold run/);
$selection_paragraph_format->{'Alignment'} = wdAlignParagraphRight;
_debug(q/Set date paragraph format to right/);
$selection->TypeText(
{
'Text' => Time::Piece->strptime(
$args->{'log_date'}, q|%m/%d/%Y %H:%M:%S|
)->strftime(qq/%A %B %d %Y\n\n/)
}
);
_debug(q/Typing date header into selection/);
$selection->BoldRun();
_debug(q/End bold run/);
my $range = $selection->Range;
_debug(q/Got Range instance from selection/);
my $tables = $doc->Tables;
_debug(q/Got Tables collection from document/);
my $table = $tables->Add( $range, scalar @rows, scalar @{ $rows[0] } );
_debug(q/Added new table to document/);
for my $rownum ( 0 .. $#rows ) {
my $cols = $rows[$rownum];
for my $colnum ( 0 .. $#{ $rows[$rownum] } ) {
my @cellpos = ( $rownum + 1, $colnum + 1 );
my $cell = $table->Cell(@cellpos);
_debug(qq/Got cell at ($cellpos[0], $cellpos[1]) /);
my $cell_range = $cell->Range;
_debug(qq/Got Range instance for cell at ($cellpos[0], $cellpos[1])/);
$cell_range->{'Text'} = $cols->[$colnum];
_debug(qq/Set text of Range for cell at ($cellpos[0], $cellpos[1]) to "$cols->[$colnum]"/);
}
}
my $rows = $table->Rows;
_debug(q/Got Rows collection from table/);
my $first_row = $rows->First;
_debug(q/Got first Row object (header row) from Rows collection/);
my $first_row_range = $rows->First->Range;
_debug(q/Got Range instance for header row/);
my $first_row_range_font = $first_row_range->Font;
_debug(q/Got Font instance for header row Range/);
$first_row_range_font->{'Bold'} = 1;
_debug(q/Set header row Range Font to bold/);
my $first_row_range_paragraph_format = $first_row_range->ParagraphFormat;
_debug(q/Got ParagraphFormat instance for header row/);
$first_row_range_paragraph_format->{'Alignment'} = wdAlignParagraphCenter;
_debug(q/Set alignment for table headers to center/);
my $first_row_bottom_border = $first_row->Borders(wdBorderBottom);
_debug(q/Got Border instance for bottom of header row/);
@{$first_row_bottom_border}{qw/LineStyle LineWidth/} =
( wdLineStyleDouble, wdLineWidth100pt );
_debug(q/Set bottom border of header row to 10 pt double line/);
my $paragraphs = $doc->Paragraphs;
_debug(q/Got Paragraphs collection from document/);
my $last_paragraph = $paragraphs->Last;
_debug(q/Got last paragraph from document/);
my $last_paragraph_format = $last_paragraph->Format;
_debug(q/Got Format instance for last paragraph/);
$last_paragraph_format->{'Alignment'} = wdAlignParagraphLeft;
_debug(q/Set last paragraph alignment to left/);
$last_paragraph_format->{'SpaceAfter'} = 0;
_debug(q/Set spacing on last paragraph/);
my $last_paragraph_range = $last_paragraph->Range;
_debug(q/Got Range instance for last paragraph/);
$last_paragraph_range->InsertAfter( { 'Text' => qq/\n$footer/ } );
_debug(q/Inserting footer after last paragraph range/);
#$doc->SaveAs( { 'Filename' => Cwd::getcwd . '/test.doc' } );
$doc->PrintOut();
_debug(q/Printed document/);
$doc->Close( { 'SaveChanges' => wdDoNotSaveChanges } );
_debug(q/Close document without saving/);
$word->Quit();
_debug(q/Quit Word/);
return 1;
}
</code>
</pre>
<IFRAME SRC="http://ad.doubleclick.net/adi/N7433.148119.BLOGGEREN/B6675098.9408;sz=180x150;ord=[timestamp]?;lid=41000613802463762;pid=UBM9780596003104;usg=AFHzDLtAaxZ6zBQNui-3SJKNRYGfiNlniQ;adurl=http%253A%252F%252Fwww.cdsbooksdvds.com%252Fproduct.jhtm%253Fsku%253DUBM9780596003104;pubid=620563;price=%2437.99;title=Computer+Science+%26+Per...;merc=CDS+Books+and+DVDS;imgsrc=http%3A%2F%2Fc376905.r5.cf1.rackcdn.com%2F9780596003104.jpg;width=64;height=85" WIDTH=180 HEIGHT=150 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR='#000000'></IFRAME>Kit Fenderson-Petershttp://www.blogger.com/profile/04617551268146374973noreply@blogger.com0tag:blogger.com,1999:blog-821414580531173273.post-5231510388183526432012-09-13T09:22:00.001-05:002012-09-13T09:23:43.444-05:00"Wire-to-wire" emulation with Proxy ARPIn my <a href="http://kcpolymath.blogspot.com/2012/08/setting-up-ipsec-vpn.html">previous post</a>, I stated a goal of mimicing the connectivity provided by the microwave T-1 connecting the studio and TV transmitter at my work. I'm pleased to say that I've accomplished that... mostly. There are still a few peculiar kinks to work out.<br />
<br />
It all works through the magic of <a href="http://en.wikipedia.org/wiki/Proxy_ARP">Proxy ARP</a>. Basically, what Proxy ARP does is allow one machine to answer ARP queries on behalf of another machine, saying, in effect "I'll take that packet; I know how to get to that machine". The answering machine then forwards the packet on to the appropriate machine. This differs from packet routing in that it happens in Layer 2 of IP, rather than Layer 3 (routing).<br />
<br />
In practice, what you have to do is set up static routes on the host (which is acting in this case as a bridge) doing Proxy ARP for all hosts the bridge is providing the connection for, then turn on IP forwarding in the kernel, and turn on Proxy ARP for the appropriate interfaces. Since I have an IPsec / L2TP VPN set up, the interfaces are going to be <code>ppp0</code> for the VPN (since it's L2TP <i>and</i> IPsec, PPP is involved, where with straight IPsec it wouldn't be) and <code>eth0</code> for the local network. I'm also going to have to do the same thing on the firewall out at the transmitter.<br />
<br />
So, first of all, the studio. This is based on <a href="http://www.jacco2.dds.nl/networking/linux-l2tp.html">Using Linux as an L2TP/IPsec VPN client</a> by <a href="http://www.jacco2.dds.nl/contact/index.html">Jacco de Leeuw</a>.<br />
<br />
The xl2tpd configuration file at the studio:<br />
<pre><code>
; File: /etc/xl2tpd/xl2tpd.conf at STUDIO
[lac Transmitter]
; transmitter public IP obfuscated for security reasons
lns = X.X.X.10
require chap = yes
refuse pap = yes
require authentication = yes
; Name should be the same as the username in the PPP authentication!
name = bridge
ppp debug = yes
pppoptfile = /etc/ppp/options.l2tpd.client
length bit = yes
</code>
</pre>
Note that I'm not using the <code>l2tp-secrets</code> file as it really doesn't provide any additional security, as far as I can tell. <br />
<pre></pre>
The PPP options file at the studio:<br />
<pre><code># /etc/ppp/options.l2tpd.client at STUDIO
ipcp-accept-local
ipcp-accept-remote
refuse-eap
noccp
noauth
crtscts
mtu 1410
mru 1410
nodefaultroute
debug
lock
connect-delay 5000
</code>
</pre>
PPP authentication is done in <code>/etc/ppp/chap-secrets</code>:
<br />
<pre><code>
# File: /etc/ppp/chap-secrets
# Secrets for authentication using CHAP
# client server secret IP addresses
bridge * "supersecret"
* bridge "supersecret"
</code>
</pre>
To set up the static routes, I have set up two scripts in <code>/etc/ppp/ip-up.d</code>. Scripts in this directory are executed by pppd as <a href="http://tldp.org/HOWTO/PPP-HOWTO/x1455.html">ip-up scripts</a> - scripts that are executed when the PPP interface is brought up. These set up static routing and turn on Proxy ARP.
<br />
<pre><code>
#!/bin/bash
# File: /etc/ppp/ip-up.d/0001routes
PPP_INTERFACE=$1
LOCAL_ADDR=$4
REMOTE_ADDR=$5
# These are all the hosts that should be accessible both via the VPN
HOSTS=(
10.1.1.10
10.1.1.11
10.1.1.12
10.1.1.13
)
for HOST in ${HOSTS[*]}
do
route add -host $HOST $PPP_INTERFACE
done
</code>
</pre>
<pre><code>
#!/bin/bash
# File: /etc/ppp/ip-up.d/0002proxyarp
for INTERFACE in ppp0 eth0 ; do
/sbin/sysctl -w net.ipv4.conf.${INTERFACE}.proxy_arp=1
done
</code>
</pre>
<br />
<br />
The ipsec (openswan) configuration file at the studio:<br />
<br />
<pre><code>
# File: /etc/ipsec.conf
#
config setup
protostack=netkey
conn Transmitter
#
# ----------------------------------------------------------
# Use a Preshared Key. Disable Perfect Forward Secrecy.
# Initiate rekeying.
# Connection type _must_ be Transport Mode.
#
authby=secret
pfs=no
rekey=yes
keyingtries=3
type=transport
#
# ----------------------------------------------------------
# The local Linux machine that connects as a client.
#
# The external network interface is used to connect to the server.
# If you want to use a different interface or if there is no
# defaultroute, you can use: left=your.ip.addr.ess
left=%defaultroute
#
leftprotoport=17/1701
#
# ----------------------------------------------------------
# The remote server.
#
# Connect to the server at this IP address. (obfuscated for security)
right=X.X.X.10
#
rightprotoport=17/1701
# ----------------------------------------------------------
#
# Change 'ignore' to 'add' to enable this configuration.
#
auto=add
DPDACTion=restart_by_peer
dpdtimeout=30
dpddelay=3
</code>
</pre>
Next, the transmitter side. Again, starting with xl2tpd:<br />
<br />
<br />
<pre><code>
; File: /etc/xl2tpd/xl2tpd.conf
[global]
ipsec saref = no
listen-addr = X.X.X.10
[lns default]
ip range = 10.1.1.100 - 10.1.1.255
local ip = 10.1.1.1
assign ip = yes
require chap = yes
refuse pap = yes
require authentication = yes
name = Transmitter
ppp debug = no
pppoptfile = /etc/ppp/options.xl2tpd
length bit = yes
</code>
</pre>
And now PPP:
<br />
<pre><code>
# File: /etc/ppp/options.xl2tpd
refuse-mschap-v2
refuse-mschap
ms-dns 8.8.8.8
asyncmap 0
auth
lock
hide-password
local
#debug
name l2tpd
#proxyarp
lcp-echo-interval 30
lcp-echo-failure 4
</code>
</pre>
<pre><code>
# File: /etc/ppp/chap-secrets
# Secrets for authentication using CHAP
# client server secret IP addresses
user1 * "secret1" 10.1.1.0/24
* user1 "secret1" 10.1.1.0/24
user2 * "secret2" 10.1.1.0/24
* user2 "secret2" 10.1.1.0/24
bridge * "supersecret" 10.1.1.2
* bridge "supersecret" 10.1.1.2
</code>
</pre>
Here I want to pause and note something. I have my regular "road warrior" users set up to get any address in 10.1.1.0/24, and in my xl2tpd config, I have that further restricted to addresses in the range of .100 - .255. The "bridge" user is restricted to 10.1.1.2, which is how I allow my "road warriors" and the bridge at the studio to coexist.
The appropriate scripts in <code>/etc/ppp/ip-up.d</code> at the transmitter:
<br />
<pre><code>
#!/bin/bash
# File: /etc/ppp/ip-up.d/0001routes
# The hosts here are made accessible to the transmitter network via the firewall, which is acting as a bridge similar to the one at the studio
PPP_INTERFACE=$1
LOCAL_ADDR=$4
REMOTE_ADDR=$5
# only set up the routes for the VPN bridge
case $REMOTE_ADDR in
10.1.1.2)
for HOST in 10.1.1.20 \
10.1.1.21 \
10.1.1.22 \
10.1.1.23 ; do
route add -host $HOST $1
done
esac
</code>
</pre>
<pre><code>
#!/bin/bash
PPP_INTERFACE=$1
LOCAL_ADDR=$4
REMOTE_ADDR=$5
# File: /etc/ppp/ip-up.d/0002proxyarp
# only set up Proxy ARP for the VPN bridge
case $REMOTE_ADDR in
10.1.1.2)
for INTERFACE in $PPP_INTERFACE eth0 ; do
/sbin/sysctl -w net.ipv4.conf.${INTERFACE}.proxy_arp=1
done
esac
</code>
</pre>
And finally the ipsec (openswan) configuration, based on <a href="http://blog.riobard.com/2010/04/30/l2tp-over-ipsec-ubuntu">Configure L2TP/IPSec VPN on Ubuntu</a> by <a href="http://riobard.com/">Riobard Zhan</a>:
<br />
<pre><code>
#
# File: /etc/ipsec.conf
#
# Transmitter Firewall Side
config setup
oe=off
protostack=netkey
nat_traversal=yes
conn L2TP-PSK-NAT
rightsubnet=vhost:%no
also=L2TP-PSK-noNAT
conn L2TP-PSK-noNAT
authby=secret
pfs=no
auto=add
keyingtries=3
rekey=no
ikelifetime=8h
keylife=1h
type=transport
left=X.X.X.10
leftprotoport=17/1701
right=%any
rightprotoport=17/%any
dpdaction=restart_by_peer
dpdtimeout=30
dpddelay=3
</code>
</pre>
So the way to accomplish this "wire-to-wire" emulation is with <i>two</i> bridges, one for each network to be bridged. If you want to try something like this, I wish you the best of luck, and I hope my experiences help.Kit Fenderson-Petershttp://www.blogger.com/profile/04617551268146374973noreply@blogger.com0tag:blogger.com,1999:blog-821414580531173273.post-62758788969579935302012-08-21T10:43:00.000-05:002012-09-12T16:46:02.032-05:00Setting up an IPsec VPNPosted here mostly for my own reference, but mayhap this will prove useful for someone else.<br />
<br />
The setup: a remote network at the TV transmitter, with Internet access both through a commercial provider and a dedicated, but increasingly unreliable, microwave T-1 link to the studio. <br />
<br />
The goal: mimic the behavior of the microwave T-1 (though not the unreliability, of course) using the commercial provider's service. Set up a "virtual wire" between the network at the transmitter and the transmitter at the studio.<br />
<br />
I've chosen an IPsec VPN to do this, and I've set things up largely as in <a href="http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch35_:_Configuring_Linux_VPNs">Ch. 35</a> of <a href="http://www.linuxhomenetworking.com/wiki/index.php">Linux Home Networking</a>. At the present time I've managed to achieve bidirectional communication between hosts (but not the routers/firewalls) on each network, but to do that I had to set up a private test network as shown below.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDzycdB0zMLxotOQg_1q8fmqRGVZgft_xksT0R0Fl-jhYY4zAnchPUxZfhoB9K5DFcG4MtPgLD44h97AurrtnEiL53_UCSjTk9tE3M2rOWejhaprKFIYiL_PBuNwQKU9wysyfyrPw6mSfT/s1600/VPN+test+setup+-+public.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="165" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDzycdB0zMLxotOQg_1q8fmqRGVZgft_xksT0R0Fl-jhYY4zAnchPUxZfhoB9K5DFcG4MtPgLD44h97AurrtnEiL53_UCSjTk9tE3M2rOWejhaprKFIYiL_PBuNwQKU9wysyfyrPw6mSfT/s400/VPN+test+setup+-+public.png" width="400" /></a></div>
So as you can see here, I have a couple of virtual machines set up on the 172.16.1.0/24 network, which is accessible only to those VM's. The IPsec tunnel is established between Router VM and Transmitter Firewall. Note that I have replaced Transmitter Firewall's public IP address with "X.X.X.10" for security.<br />
<br />
With this setup, I can achieve bidrectional communication between both networks. Host A can reach Client VM, and Client VM can reach Host A.<br />
<br />
Here is the relevant ipsec.conf on Router VM:<br />
<br />
<pre><code>#
# File: /etc/ipsec.conf
#
# VPN Test Router VM side
config setup
protostack=netkey
oe=off
nat_traversal=yes
# LEFT: Studio
# RIGHT: Transmitter
conn nettonet
left=192.168.152.188 # Public Internet IP address of the
# LEFT VPN device
leftsubnet=172.16.1.0/24 # Subnet protected by the LEFT VPN device
leftrsasigkey=*removed*
right=X.X.X.10 # Public Internet IP address of
# the RIGHT VPN device
rightsubnet=10.1.1.0/24 # Subnet protected by the RIGHT VPN device
rightrsasigkey=*removed*
rightnexthop=%defaultroute
auto=start
</code></pre>
<br />
<br />
Note here that I'm using RSA keys, rather than PSK's. The key signatures have been removed for security.<br />
<br />
The ipsec.conf on Transmitter Firewall is slightly different:<br />
<br />
<code>
</code>
<br />
<pre><code>#
# File: /etc/ipsec.conf
#
# Transmitter Firewall Side
config setup
oe=off
protostack=netkey
nat_traversal=yes
# LEFT: Studio
# RIGHT: Transmitter
conn nettonet
left=10.1.0.2 # Public Internet IP address of the
# LEFT VPN device
leftsubnet=172.16.1.0/24 # Subnet protected by the LEFT VPN device
leftid=192.168.152.188
leftrsasigkey=*removed*
right=X.X.X.10 # Public Internet IP address of
# the RIGHT VPN device
rightsubnet=10.1.1.0/24 # Subnet protected by the RIGHT VPN device
rightrsasigkey=*removed*
auto=start # authorizes and starts this connection
# on booting
</code></pre>
Here you'll notice that the argument to <code>left=</code> is <code>10.1.0.2</code>, which is the public (again, these IP's have been obfuscated for security's sake) address of <i>Studio Firewall</i>. This is because Router VM's ultimate path to the Internet is through Studio Firewall via NAT.<br />
<br />
Speaking of NAT, I should point out that there is <i>no</i> NAT of any kind being performed (currently) on Router VM or Transmitter Firewall. Instead, the entire 172.16.1.0/24 network is visible to the 10.1.1.0/24 network at the transmitter, <i>just as any other public network would be.</i><br />
<br />
I'll note that this does <i>not</i> accomplish the stated goal at the beginning of this post: set up a "virtual wire" between the 10.1.1.0/24 network at the studio and the 10.1.1.0/24 network at the transmitter. It may turn out to be the case that this "virtual wire" is extremely complicated with regard to routing and suchlike (since we would be using the same IP block on both ends) . What this does give us, however, is a place to work from.Kit Fenderson-Petershttp://www.blogger.com/profile/04617551268146374973noreply@blogger.com0tag:blogger.com,1999:blog-821414580531173273.post-56690074652418286612011-12-30T08:57:00.000-06:002011-12-30T08:58:37.615-06:00Making a homebrew HDTV antennaSince I work for a <a href="http://kmos.org/">TV station</a> now, and we're web-casting a lot of University sports, it behooves me to get more familiar with sports broadcasting, and one of the ways I'm doing that is to watch sports on TV. Now, I'm still too cheap to pay for cable TV, I'm on my holiday break, and most importantly I haven't built an antenna since my <a href="http://kcpolymath.blogspot.com/search/label/j-pole">J-pole</a>, so I figured I ought to build myself a TV antenna. <br />
<br />
I'm basing this antenna on plans I found for a UHF bowtie antenna <a href="http://www.tvantennaplans.com/">here</a>. Now, being the sort of guy I am, I can't just blindly follow the recipe. :) I need to screw around with it a bit, and see if I can improve on the design based on my own particular situation. <br />
<br />
I went to TV Fool's <a href="http://www.tvfool.com/index.php?option=com_wrapper&Itemid=29">signal locator</a> and put in my address. It gave me a handy list of all the TV broadcast stations in the area, along with their channel assignments (if you're following along at home, note that you need the <i>actual</i> channel assignment, not the virtual channel. Sometimes these two things are different). Next, I consulted Wikipedia for a <a href="http://en.wikipedia.org/wiki/North_American_broadcast_television_frequencies">list of TV channels and associated frequencies</a>. This told me that all the TV stations in town were in the range of 494 MHz to 698 MHz. <br />
<br />
I think it's safe to assume that the original design is tuned for a broader frequency range than I need. If I tune the design for my narrower range, maybe I can get another dB or two of gain, which will improve my signal quality. Also, it's more fun that way. :)<br />
<br />
Now for the parts. I went to the hardware store and bought some deck screws, some washers, and a 2 x 4. They didn't have any 1 x 3's or 2 x 3's, and I didn't much feel like going somewhere else to see what they had. I also bought a 75Ω to 300Ω balun, as called for in the design (this design has a 300Ω characteristic impedance). For the antenna bays, I've got some old wire hangers laying around that need to be put to a good use. I've also got wire laying around that I can use to interconnect the bays.<br />
<br />
In the design, each antenna bay is a pair of 14" wires, folded into a "V" whose ends are 3" apart (so an angle of about 25°). This is a bowtie antenna, so each side of the bay is a dipole 1/2 wavelength long. 14" gives a wavelength of about 420 MHz, well below the minimum frequency I'm looking for. <br />
<br />
Let me pause a moment to detail how I'm calculating the length of the dipole. Wavelength (λ) is equal to the speed of light (<i>c</i>) divided by the frequency (<i>f</i>). So:<br />
<br />
λ = <i>c</i>/<i>f</i> <br />
<br />
An important thing to note here is that <i>c</i> isn't always <i>c</i>, if you take my meaning. Generally speaking, if someone mentions <i>c</i> in the context of the speed of light, they mean the speed of light (or other electromagnetic radiation) in a vacuum. In (e.g.) a metal, however, electromagnetic radiation moves more slowly. So we introduce a <i>velocity factor</i>, a number that describes just how much slower electromagnetic radiation is going to move in the material than in free space. If we call the velocity factor <i>v</i>, then we get:<br />
<br />
λ = <i>cv</i>/<i>f</i><br />
<br />
This is good. By introducing the velocity factor into the equation, we can more precisely model how electromagnetic radiation (e.g. radio waves) is going to behave in the wire of the dipole. But I don't have a velocity factor for steel wire (which is what they make wire hangers out of), so I'm just going to use a value of 1 for <i>v</i>. <br />
<br />
So, back to the antenna, if I want a minimum frequency of 494 MHz, I want to start with a dipole about 12" long. I can always trim it down later if I need to.<br />
<br />
Now, let's get to building! To start with, I'm going to cut my wire hangers into 8 12" pieces. And this is tougher than it sounds. A pair of dikes (diagonal cutters) won't cut it. Tin snips won't do it. A stout pair of side-cutters (or "Kleins", electrician's pliers) might do it, but I don't have a pair of those. What I'm doing instead is taking a big pair of dikes and gripping the wire where I want it to break, then just wiggling the hanger back and forth until it breaks. Metal fatigue FTW!<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-rmcBT2L8o-M/TvzJV2dC_9I/AAAAAAAAA9A/kWY4AlbtDP0/s1600/2011-12-29_14-09-54_937.jpg" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="284" src="http://2.bp.blogspot.com/-rmcBT2L8o-M/TvzJV2dC_9I/AAAAAAAAA9A/kWY4AlbtDP0/s320/2011-12-29_14-09-54_937.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">8 12" dipoles</td></tr>
</tbody></table>
<br />
<br />
As you can see, some of these aren't exactly straight. A number of wire hangers came from the dry cleaner, and they only have metal on top - the bottom is just thick paper. So I straightened those as best I could. I also sanded the center of each dipole because I'm going to short all the dipoles along each side together at the center.<br />
<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-xw3eV-rcPDM/Tvzuhy1bpDI/AAAAAAAAA9k/Ksj-eIZEHiE/s1600/2011-12-29_16-49-28_567.jpg" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="180" src="http://4.bp.blogspot.com/-xw3eV-rcPDM/Tvzuhy1bpDI/AAAAAAAAA9k/Ksj-eIZEHiE/s320/2011-12-29_16-49-28_567.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Dipoles bent so that the distance between each leg is roughly 3"</td></tr>
</tbody></table>
<br />
<br />
<br />
<br />
<br />
<br />
Here are the bent dipoles. I've tried to keep the spacing between the two legs to about 3 inches.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Now comes the fun part: drilling the holes and mounting the dipoles. I got a cordless drill as an early Christmas present; time to put it through its paces!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-_H05dfWr7cI/Tvz3-O8z4wI/AAAAAAAAA_Y/g2YqDSREDvw/s1600/2011-12-29_17-29-24_745.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="180" src="http://1.bp.blogspot.com/-_H05dfWr7cI/Tvz3-O8z4wI/AAAAAAAAA_Y/g2YqDSREDvw/s320/2011-12-29_17-29-24_745.jpg" width="320" /></a></div>
As per the plans, I drew a line across the board at 2" from one end, then 3 more lines at 5 1/4" intervals (so marks at 2", 7.25", 12.5", and 17.75"). These lines are where the two dipoles in each antenna bay will be placed. <br />
<br />
<br />
<a href="http://3.bp.blogspot.com/-nwyJjMv4lXo/Tvz7vEHru2I/AAAAAAAAA_Y/bs1CDhvZt4U/s1600/2011-12-29_17-45-29_842.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="180" src="http://3.bp.blogspot.com/-nwyJjMv4lXo/Tvz7vEHru2I/AAAAAAAAA_Y/bs1CDhvZt4U/s320/2011-12-29_17-45-29_842.jpg" width="320" /></a><br />
<br />
Next, I made two perpendicular marks on each line, 1" apart. I like
things to be even, so I centered the marks, placing them 1.25" from each
edge (a 2 x 4 is actually 3.5" wide). I then drilled pilot holes at each mark for the deck screws.<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-ecn5AqB57uM/Tv0EiNfanuI/AAAAAAAAA_Y/g9gH_4-zYao/s1600/2011-12-29_18-23-12_918.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="180" src="http://2.bp.blogspot.com/-ecn5AqB57uM/Tv0EiNfanuI/AAAAAAAAA_Y/g9gH_4-zYao/s320/2011-12-29_18-23-12_918.jpg" width="320" /></a></div>
<a href="http://4.bp.blogspot.com/-QBz11Wp6tCU/Tv0NsQQke7I/AAAAAAAAA_Y/pi2LpxJ8h6c/s1600/2011-12-29_19-02-09_888.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="180" src="http://4.bp.blogspot.com/-QBz11Wp6tCU/Tv0NsQQke7I/AAAAAAAAA_Y/pi2LpxJ8h6c/s320/2011-12-29_19-02-09_888.jpg" width="320" /></a>Here you can see the board with the deck screws already part of the way in. This makes it easier to place the elements and the connection wire. I also have two small steel washers on each screw. The lower holds the dipole element to the board. The upper will pinch the connection wire between it and the lower washer, providing electrical connectivity.<br />
<br />
Next, I added the connection wires between each element. I used insulated wire, and I only stripped those parts of the wire that were going to be in electrical contact with an antenna element. I've also stripped a place in the center of the antenna to connect the balun. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-LTYvcTasag8/Tv0P7NIz2OI/AAAAAAAAA_Y/hY2pkCY5rzo/s1600/2011-12-29_19-09-33_964.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="180" src="http://4.bp.blogspot.com/-LTYvcTasag8/Tv0P7NIz2OI/AAAAAAAAA_Y/hY2pkCY5rzo/s320/2011-12-29_19-09-33_964.jpg" width="320" /></a></div>
<br />
Here you can see the deck screws where the balun will connect. Like the other screws, these have washers on them to improve the electrical connection between the wire and the balun.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-pmOpotXjbQY/Tv0QCe3Eh9I/AAAAAAAAA_Y/EH2pEgKojK4/s1600/2011-12-29_19-12-14_807.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="180" src="http://3.bp.blogspot.com/-pmOpotXjbQY/Tv0QCe3Eh9I/AAAAAAAAA_Y/EH2pEgKojK4/s320/2011-12-29_19-12-14_807.jpg" width="320" /></a></div>
And this is the antenna with the balun attached. This is a usable antenna right now, but it's omnidirectional. Adding a reflector, as recommended in the original plans, will increase the gain of the antenna, but you might want to try this antenna as-is and see how well it works for you. <br />
<br />
<br />
<br />
I mounted the antenna, <i>sans</i> reflector, in my basement and attached it to my TV. I'm able to pull in all the stations that <a href="http://tvfool.com/">TV Fool</a> says are available in my area, including the two analog low-power stations. But none of those transmitters are more than 30 miles from me, and I don't have any channels from further away. Once I get the antenna mounted outside, and the reflector attached, I'll report back.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />Kit Fenderson-Petershttp://www.blogger.com/profile/04617551268146374973noreply@blogger.com0tag:blogger.com,1999:blog-821414580531173273.post-33955225495912409342011-04-23T22:50:00.000-05:002011-04-23T22:50:49.102-05:00"What news from Plymouth?"Well, so far as I am aware, Plymouth continues to be in Massachusetts. If this situation should change, I hope one of you, Dear Readers, will be so good as to tell me.<br />
<br />
News in my neck of the woods has nothing to do with Plymouth at all. However, if you're stuck on Plymouth, I suggest this <a href="http://www.youtube.com/watch?v=d9aXTtVtaLA">brief riveting look at the court of Elizabeth I</a> (Plymouth was an English colony during her reign).<br />
<br />
Now, the news of your humble polymath-in-the-making. To begin with, Dear Reader, you might be wondering why the promised posts from NAB never materialized. This is because I did not go to NAB, and I will not be going to the Radio Ink Convergence Conference either. In fact, I have been disqualified altogether from the Technology Apprenticeship Program, and that's because I got a job at <a href="http://ktbg.fm/">KTBG</a> and <a href="http://kmos.org/">KMOS</a>, the public broadcasting service of the <a href="http://ucmo.edu">University of Central Missouri</a>. I'm an engineer! This is a very exciting time for me - so much to learn! Interning at KCUR taught me a bit about radio (though here we have to worry about a thing called "short-spacing" which means we have to have a cardioid antenna pattern - more on that as I learn about it) but I know <i>nothing</i> (yet) about TV.<br />
<br />
One of the things I'll be doing at KTBG/KMOS is applying my IT experience and knowledge to our setup in broadcasting. So there will be some software development for various projects in between my regular engineering duties. For example, a short-term project I have is to take the output from KTBG's automation system and feed it into our new Inovonics <a href="http://en.wikipedia.org/wiki/Radio_Data_System">RDS</a> encoder. The encoder isn't installed yet - maybe John (the chief engineer for KMOS/KTBG) will let me do that too. If this encoder is anything like the unit at KCUR (also an Inovonics) I don't foresee a lot of difficulty; Inovonics uses RS-232 to feed data to the encoder, and the command syntax should be documented in the manual. So it's just a matter of parsing out the data from the automation system and presenting it in the proper format to the RDS encoder. No sweat.<br />
<br />
This past Thursday, I made a presentation to the local SBE chapter on IP security. You can view it <a href="http://www.slideshare.net/kitpeters/ip-for-broadcast-engineers-7703864">here</a>, and maybe I'll make a blog post that elaborates on these points a little more. <br />
<br />
Today, at the <a href="http://www.hambash.com/">Ararat Hambash</a>, I took the test to upgrade my amateur radio operator's license from General to Extra (I had previously upgraded from Technician to General at the end of March) and passed! This means I now have authorization to operate on all bands and modes available to the Amateur Radio Service (certain bands and modes are reserved for operators with a given license class). Of course, I still don't have any equipment, but that will come in time.Kit Fenderson-Petershttp://www.blogger.com/profile/04617551268146374973noreply@blogger.com0tag:blogger.com,1999:blog-821414580531173273.post-76661070567317695232011-03-18T23:02:00.000-05:002011-03-18T23:02:11.035-05:00I'm going to the NAB show!I recently heard about the <a href="http://nab.org/">NAB</a>'s <A href="http://www.nabef.org/initiatives/tap.asp">Technology Apprenticeship Program</a>. Basically, this is a program for people starting out in broadcast engineering, or people with skills in other technical disciplines - "IT, digital technologies, ... or other related areas", as the website puts it - to get some hands-on experience in the field. Since that's the line of work I'm trying to get into, I applied, and I was accepted! So here's how my next few months are going to go:<br />
<br />
April 9 - 14: I'll be flying out to Las Vegas (on NAB's dime, no less) to the NAB show. There are going to be several activities geared specifically for the apprenticeship program participants, (you know what? I'm going to say "apprentices" from now on. "apprenticeship program participants" is a mouthful) and we apprentices will be meeting with leaders in broadcast technology. <br />
<br />
May 18 - 19: I'll be flying out to Silicon Valley for the <i>http://www.radioink.com/</i> <a href="http://www.radioink.com/Convergence/default.asp">Convergence Conference</a>. <br />
<br />
June - July: I complete a two month paid internship at a TV or radio station. No idea what station yet. <br />
<br />
Finally, in August, I go to DC for a week to work with NAB's Science and Technology Department to develop a presentation to be delivered via webcast at the end of my visit. If I'm permitted, I'll publish a link or something here.<br />
<br />
I'm very excited about all of this. Not only is this going to be a really interesting and unique experience, but this is going to be a great start to my broadcast engineering career.<br />
<br />
So stay tuned, Dear Reader, for more thrilling tales of broadcast engineering! ;)Kit Fenderson-Petershttp://www.blogger.com/profile/04617551268146374973noreply@blogger.com0tag:blogger.com,1999:blog-821414580531173273.post-83660300194430083612011-03-16T10:39:00.001-05:002011-03-16T10:43:11.014-05:00Constructing a dummy loadA useful thing to have around is a <a href="http://en.wikipedia.org/wiki/Dummy_load">dummy load</a>. This allows you to tune a new radio (or modifications to an existing radio) without potentially damaging your radio (transmitting without a load connected can damage a transmitter) or causing interference. <br />
<br />
Now, I could have bought myself a dummy load for thirty bucks or so. But where's the fun in that? I decided to build one instead, and I found <a href="http://www.k4eaa.com/dummy.html">a set of plans</a> for one. Thanks to <a href="http://www.k4eaa.com/">Ken Kemski, K4EAA</a> for the plans.<br />
<br />
To begin with, I went to <a href="http://www.westlakehardware.com/">Westlake Hardware</a> to pick up a 1 qt. paint can and a sheet of aluminum. The original plans recommended brass, but aluminum was cheaper, so I went with that. Little did I know that aluminum is fiendishly difficult to solder with the 60/40 Sn/Pb stuff I have. After I discovered this, I went back to the hardware store and picked up some brass, which turned out to be much nicer to solder.<br />
<br />
I then ordered a couple of banana plug posts, 20 3W (<a href="http://en.wikipedia.org/wiki/Watt">Watts</a>)1 k&Omega (1 kΩ = 1000 <a href="http://en.wikipedia.org/wiki/Ohm">Ohms</a>); <a href="http://en.wikipedia.org/wiki/Resistor">resistors</a>, a 0.01 uF ceramic <a href="http://en.wikipedia.org/wiki/Capacitor">capacitor</a>, and some BAV21 <a href="http://en.wikipedia.org/wiki/Diode">diodes</a> from <a href="http://mouser.com/">Mouser</a>, per K4EAA's part list. For resistors, I went with <a href="http://vishay.com/">Vishay</a> metal film resistors. Of the resistors I examined, these had the flattest frequency response curve<sup><a href="http://www.blogger.com/post-edit.g?blogID=821414580531173273&postID=8366030019443008361&pli=1#note1">1</a></sup>. <br />
<br />
So what's the point of all these bits? The can, obviously, is to hold everything. The resistors are to absorb the RF energy and turn it into heat. They'll be submerged in oil (some canola oil that I had laying around) to help dissipate that heat. The brass is to make a couple of plates that hold the resistors. The banana plugs, diodes, and capacitor are all for measuring your transmit power. <br />
<br />
So to begin with, let's look at a schematic of this dummy load.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYcpOa8nOBCX7jQf8mE7vueL9aEZB4gDcwIaRie5_HbU1bqI7TypStmpa8JbVY740s3Knd_hlo0OMwaXO_H8IKV_O2kGV9JgIf0G1BHFK5chENZV5v5RjkfOZUYwy-Y5AekUXc2RTtQeFz/s1600/complete+dummy+load+schematic.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="149" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYcpOa8nOBCX7jQf8mE7vueL9aEZB4gDcwIaRie5_HbU1bqI7TypStmpa8JbVY740s3Knd_hlo0OMwaXO_H8IKV_O2kGV9JgIf0G1BHFK5chENZV5v5RjkfOZUYwy-Y5AekUXc2RTtQeFz/s320/complete+dummy+load+schematic.png" width="320" /></a></div><br />
There are 20 1 kΩ resistors in parallel. This provides a total resistance of 50 Ω. As each resistor is rated for 3W of power, these resistors can safely dissipate 60 W of power without becoming damaged. Submerged in oil, they will be able to dissipate at least 100W, I expect, and probably a bit more.<br />
<br />
You'll notice two sets of terminals in the schematic. One set has the capacitor between them, and is connected to one of the plates by two diodes. These terminals are meant for measuring the peak voltage (remember that radio frequency (RF) energy is alternating current (AC), and in AC, the voltage is always changing in both magnitude and direction) the connected transmitter puts out. The diodes ensure that only the positive side of the AC comes to the capacitor, and the capacitor charges up to your peak voltage. You can then determine your transmit power from your peak voltage <sup><a href="http://www.blogger.com/post-edit.g?blogID=821414580531173273&postID=8366030019443008361&pli=1#note2">2</a></sup>. <br />
<br />
The other set of terminals is where you connect the transmitter. You can use any connector you like for this - K4EAA uses a <a href="http://en.wikipedia.org/wiki/BNC_connector">BNC</a>; I use an <a href="http://en.wikipedia.org/wiki/SO-239">SO-239</a>. Next time I might use a BNC, though.<br />
<br />
Now that we've got our schematic squared away, let's build the thing. I started out by making the brass plates that I was going to solder the resistors to. K4EAA (you'll notice a lot of hams will refer to each other by call sign, rather than given name. It's a thing.) cut his out with tin snips. That seems like an excellent idea, but I lack tin snips, and I didn't want to shell out for a pair, so I decided to repeatedly bend the metal back and forth until the metal at the bend fatigued and broke. It's not nearly as elegant, and it's not as pretty, but it works. To make the octagon shape (so that the plates would fit in the paint can) I cut off the corners using diagonal wire cutters. <br />
<br />
Next, I divided each plate into twenty sections using a Sharpie, and made an "X" near the edge of each section. I was going for a point that was as far as possible from the center of the plate while maintaining maximum separation from its neighboring points. This was fairly inexact, and I'm sure that if I had taken the time to model this mathematically, I could have found a more optimum resistor spacing. But that level of precision is not really called for here - it's a dummy load, and it's meant to absorb RF. If one resistor gets slightly hotter than its neighbors, the oil is going to go a long way towards mitigating that fact. <br />
<br />
Now that I had my "X"'s marked, it was time to start poking holes. I did this with a circular (well, tapered cylinder) needle file I had laying around, and it was pretty easy. Just put some pressure on the file and once it's punctured the metal, rotate it a little bit to widen the hole.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKWC-M__5z2Quy9Qgm4zpHmXkXBtJhfe6rbAP4RkR1nrvk-HSdw1D5Ql93D1ldXRfbobbHD4J_dZuiiw9fCHfovWDRbzgccw2n3n5zo6rgqYtbTaLqn9ZEfqDr-qteS2P3yWps0Uc4U2X3/s1600/P1010003_2.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="278" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKWC-M__5z2Quy9Qgm4zpHmXkXBtJhfe6rbAP4RkR1nrvk-HSdw1D5Ql93D1ldXRfbobbHD4J_dZuiiw9fCHfovWDRbzgccw2n3n5zo6rgqYtbTaLqn9ZEfqDr-qteS2P3yWps0Uc4U2X3/s320/P1010003_2.JPG" width="320" /></a></div><br />
Once the holes were poked, it was time to start attaching resistors. And here I may have made a mistake. Figuring that I wanted the maximum spacing between the plates, to allow for maximum heat dissipation, I only put each resistor through its hole a little bit, i.e., I left long leads on the resistors. I figured that since this was a dummy load, any stray <a href="http://en.wikipedia.org/wiki/Electrical_reactance">reactance</a> wouldn't matter. I may have incorrect in that assumption, as I'll explain later. At any rate, I soldered all twenty resistors to the bottom plate. To maximize conductivity between the resistor lead and plate, I soldered to both the top and bottom of the plate.<br />
<br />
K4EAA recommends, when attaching the top plate, that you cut one resistor lead down to your minimum lead length, then cut the rest progressively longer. That way you can insert the leads a few at a time into the top plate. Still operating under the assumption that I wanted maximum spacing between the plates, and feeling like a bit of a mechanical challenge, I decided against that, and instead managed to get all twenty resistors into the holes. It took quite a bit of fiddling. :) After I got all twenty resistors in, I soldered them to the plate, again top and bottom.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBUo1Fl80Ipdp32eT2dSWKE9BDe_oEXSyqvjXsFa2upsi0Vuljtpc5NKS7Tf16M1-yUtP2Hf6kGRxG3x5VS3Ycggi7Dv5TnpNqz3Zwu8IF7Gcd9-clNbBPf6g-BQKE9uCYJYMhQUn3j6b_/s1600/P1010004_2.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="258" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBUo1Fl80Ipdp32eT2dSWKE9BDe_oEXSyqvjXsFa2upsi0Vuljtpc5NKS7Tf16M1-yUtP2Hf6kGRxG3x5VS3Ycggi7Dv5TnpNqz3Zwu8IF7Gcd9-clNbBPf6g-BQKE9uCYJYMhQUn3j6b_/s320/P1010004_2.JPG" width="320" /></a></div><br />
I also needed a hole in the top plate for the back of the SO-239 to go into. My original plan was to push the SO-239 through the hole you see here and attach it via the included mounting nut. This did not prove feasible, however, as the banana plugs got in the way. So instead I widened the hole a bit to maintain a space for the center conductor to go through. <br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5PYMsYIMzvwTgVMHIckqJS5_u9oMNBiy-4JrMOV36UOwtGspfcP8wMvdh2Y2k17WZy1Cu6vNKlSx6nh400fDWdmLsaykTNrwDEv2KRqlRP_p9Cz9qbMqwlTaetE0B9fcgjAxfaZj8PwiC/s1600/P1010005_2.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="297" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5PYMsYIMzvwTgVMHIckqJS5_u9oMNBiy-4JrMOV36UOwtGspfcP8wMvdh2Y2k17WZy1Cu6vNKlSx6nh400fDWdmLsaykTNrwDEv2KRqlRP_p9Cz9qbMqwlTaetE0B9fcgjAxfaZj8PwiC/s320/P1010005_2.JPG" width="320" /></a></div><br />
Here you see the hole that the center conductor from the SO-239 will connect to.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUNTiPBs5JsPPrgjpq8Ya43bzDVWYYvxOOPcsan5yrsr7TfHG-VytODsWzkAHpVM-7JJY711Jk7QQ5xHBGhReYYUbP4Dtb-OZNjF8zCtNjsqFDiE3wOrYDVzYv7SXQbFhlnqV9KGxrCVzr/s1600/P1010001_2.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="281" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUNTiPBs5JsPPrgjpq8Ya43bzDVWYYvxOOPcsan5yrsr7TfHG-VytODsWzkAHpVM-7JJY711Jk7QQ5xHBGhReYYUbP4Dtb-OZNjF8zCtNjsqFDiE3wOrYDVzYv7SXQbFhlnqV9KGxrCVzr/s320/P1010001_2.JPG" width="320" /></a></div><br />
I wanted the dummy load to be grounded to the chassis - in this case the paint can. It seemed the simplest way to ensure that both the shield of the SO-239 and the black banana post were at the same ground potential. And when I poked holes (again with the needle file and, in the case of the SO-239, my small wire clippers) in the top of the can, the black banana post had an excellent connection to the can lid. The SO-239, however, didn't have as good of a connection, so I sanded away the coating on the bottom of the lid under the hole for the SO-239. That worked much better. The twisted copper wire you see here attached to the shield of the SO-239 ended up connected to the top brass plate. This ensured both a good mechanical connection from the plates to the can, and also a good electrical connection between the top plate and the can (and thus the shield of the SO-239 and the black banana plug).<br />
<br />
You'll notice a piece of insulation under the top left bolt in this picture. That's the red banana plug. Just as the black banana plug had a great electrical connection to the paint can lid, so did the red banana plug. So I widened the mounting hole for the red plug, put some bathroom caulk in it to provide a little lateral stability, then took a piece of insulation from some ladder line I had laying around and attached the red plug to that. This ensured that the red plug was electrically isolated from the can.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghhsUl_Wc4dAZ8GWqGeDEdCc9Ae6Wk4aXtVTTXAxELxpJDIsOyG1TO30DVkU0m4LdUzbAt6M_z3vR-6OcBitj74FXu3EMkygVCzFcItRJZNORGVc3Lz7TWdtX4_BbbaS2I6_Cq2sW6bIqu/s1600/P1010002_2.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="310" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghhsUl_Wc4dAZ8GWqGeDEdCc9Ae6Wk4aXtVTTXAxELxpJDIsOyG1TO30DVkU0m4LdUzbAt6M_z3vR-6OcBitj74FXu3EMkygVCzFcItRJZNORGVc3Lz7TWdtX4_BbbaS2I6_Cq2sW6bIqu/s320/P1010002_2.JPG" width="320" /></a></div><br />
Here are the banana plugs and the SO-239 attached to the can lid. The white stuff you see is bathroom caulk. Apart from insulating the red banana plug, it serves to fill in any tiny openings where oil might seep through the lid if the dummy load were to be turned on its side or upside down.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZyAZm6ki3tlVp9HJiU8WjVfqx5SZMOFNYq_FBL7HHPCbrurmNU7JhlsjYvOPm-pvzwyvudLELUFQSh6FWb9wXY_XNlzjkcZ-6pBvUB_QdYEupKC2smzVSaopnendm7JAmyT5G2lCPhk4m/s1600/P1010007_2.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="201" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZyAZm6ki3tlVp9HJiU8WjVfqx5SZMOFNYq_FBL7HHPCbrurmNU7JhlsjYvOPm-pvzwyvudLELUFQSh6FWb9wXY_XNlzjkcZ-6pBvUB_QdYEupKC2smzVSaopnendm7JAmyT5G2lCPhk4m/s320/P1010007_2.JPG" width="320" /></a></div><br />
Once the banana plugs and the SO-239 were attached to the can lid, the next step was to connect the SO-239 to the plates. I already mentioned the wire connected to the shield. I also needed a wire connected to the center conductor of the SO-239. I had some scrap ladder line laying around, so I stripped part of the conductor from that to for this purpose. <br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsFNjO_poAcP70MZVX80F5U-DoeV6OKQekQAIvnqbaozMPnhIEHcRYM3HQDLmQEbO6ZNmtCZ6rR9n-rzOym-3YxWr1QFeXkJEej727hgAPPSC7pWZEJlMLspyROF6jU87aCUAq2lH3AfI1/s1600/P1010013_2.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsFNjO_poAcP70MZVX80F5U-DoeV6OKQekQAIvnqbaozMPnhIEHcRYM3HQDLmQEbO6ZNmtCZ6rR9n-rzOym-3YxWr1QFeXkJEej727hgAPPSC7pWZEJlMLspyROF6jU87aCUAq2lH3AfI1/s320/P1010013_2.JPG" width="246" /></a></div><br />
Once I had everything in place on the lid, it was time to mate the lid assembly and the resistor assembly. I bent the shield wire and attached it to the top plate. I attached the center conductor to the bottom plate and made certain it wasn't going to hit the top plate. I then attached the diodes between the red banana jack and the bottom plate. <br />
<br />
Finally, it was time to put the lid on the can. I filled up the can with some canola oil I had laying around (I don't cook with canola any more), gently lowered the resistors into the oil, and tapped the lid shut.<br />
<br />
Now it was time to measure the performance of my dummy load. <br />
<br />
Having borrowed an <a href="http://www.mfjenterprises.com/Product.php?productid=MFJ-269">MFJ-269</a> from a friend, it was a simple matter to attach it and measure the <a href="http://en.wikipedia.org/wiki/Vswr">SWR</a> for various frequency bands. And up through about 30MHz, it was great - nearly 1:1. And here's the potential mistake I mentioned earlier: what I really wanted this for was 2 meters - 144 - 148 MHz, and there the SWR wasn't so great - between 1.5 and 2 to 1. <br />
<br />
Why, you may, ask, did the SWR change as I increased the frequency? It's not as if I'd put any capacitors or inductors in there, just resistors. But a resistor isn't just a resistor. Let's look at a more accurate schematic for the dummy load:<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixiGfM23yMNjO_YZsVYg4NLQ3F8KwrRaLLoN5xPj0cevJP8jTJdsaMtZYUNtsNLsUaYzZBoh1oo3FQdmg4sLPxSEUUSPrW-pht0XmWiO9ZiwfrPa3EjFMHVZ9x0dWDPrVuitEa7s4jjTgw/s1600/actual+dummy+load.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="125" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixiGfM23yMNjO_YZsVYg4NLQ3F8KwrRaLLoN5xPj0cevJP8jTJdsaMtZYUNtsNLsUaYzZBoh1oo3FQdmg4sLPxSEUUSPrW-pht0XmWiO9ZiwfrPa3EjFMHVZ9x0dWDPrVuitEa7s4jjTgw/s320/actual+dummy+load.png" width="320" /></a></div><br />
As I said in <a href="http://www.blogger.com/post-edit.g?blogID=821414580531173273&postID=8366030019443008361&pli=1#note1">footnote 1</a> (you do read the footnotes, don't you?) an actual resistor has some amount of parasitic reactance due to its physical construction. That reactance is made up of both capacitance (as a resistor has two conductive plates separated by some distance) and inductance (due to <a href="http://en.wikipedia.org/wiki/Lenz's_law">Lenz's Law</a>). Those values are relatively small<a href="http://www.blogger.com/post-edit.g?blogID=821414580531173273&postID=8366030019443008361&pli=1#note3"><sup>3</sup></a>, but they become significant at higher frequencies.<br />
<br />
Basically, I had neglected to account for the effects of reactance for 2 meter frequencies.<br />
<br />
So what to do? I could shorten the leads. That would reduce, to some degree, the inductance generated by the resistor leads at the cost of increasing the capacitance between the top and bottom plates (because, again, any two conductive plates have some capacitance between them. This might be a good idea, because capacitive reactance is inversely proportional to applied frequency. When I measured the total impedance with the MFJ-269, I got ~23+10j Ω at 146 MHz, and as I increased the frequency, Xs (the reactive part of the impedance) decreased. That indicates that the primary component of the reactance is capacitive. However, the resistive portion of the impedance was 23 Ω Even if I was able to cut the capacitance to zero, I would still have a resistance of 23 Ω when I want 50.<br />
<br />
For now, I'm going to stick with the dummy load the way it is. It won't be perfect for tuning a radio on the 2 meter band, but it will do until I can buy or build something better. And if I get some 10 meter gear, this will be perfect.<br />
<br />
Here are a few other approaches to building a dummy load:<br />
<br />
<ul><li><a href="http://www.worldwidedx.com/home-brew-mods/48417-700-watt-homebrew-dummy-load.html">Thread</a> on <a href="http://www.worldwidedx.com/l">Worldwide DX</a> with a couple of homebrew dummy loads. "Captain Kilowatt" in that thread makes an excellent point regarding hot air and a potential need for venting.</li>
<li><a href="http://www.qsl.net/sv1bsx/uhf/uhf_dummy.html">UHF Dummy Load</a> by <a href="http://www.qsl.net/sv1bsx/index.html">SV1BSX</a>. He neutralizes the capacitive reactance in his load with an inductor.</li>
<li><a href="http://www.qsl.net/k5lxp/projects/SaltLoad/SaltLoad.html">Saltwater Dummy Load</a> by <a href="http://www.qsl.net/k5lxp/">K5LXP</a>. I'm not sure how well this would work on 2 meters, though, as the electrodes need to remain under a "significant fraction" of a wavelength, but shorter electrodes are going to get hotter faster.</li>
</ul><div>If you've tried any (or all) of these, let me know!</div><h2>Footnotes</h2><br />
<sup><a href="http://www.blogger.com/post-edit.g?blogID=821414580531173273&postID=8366030019443008361" name="note1">1</a></sup> While an ideal resistor has the same resistance no matter what frequency of AC you put through it, real resistors have some amount of parasitic reactance that varies with applied frequency.<br />
<br />
<sup><a href="http://www.blogger.com/post-edit.g?blogID=821414580531173273&postID=8366030019443008361" name="note2">2</a></sup> P = V<sup>2</sup>/R (Power = Voltage<sup>2</sup> / Resistance). We can measure peak voltage (less an 0.4 V drop from the diodes) across these terminals. If we take the peak voltage, however, that will give us peak power, when what we really want is average power. So we take the voltage - remembering to add the 0.4V drop back in - divide it by the square root of two to obtain RMS (<a href="http://en.wikipedia.org/wiki/Root_mean_square#Average_electrical_power">root-mean-square</a>, or average) voltage, square it, and divide it by 50 Ω to obtain power.<br />
<br />
<sup><a href="http://www.blogger.com/post-edit.g?blogID=821414580531173273&postID=8366030019443008361" name="note3"></a></sup> The total inductance in the circuit will be smaller still because the total inductance of a number of inductors in parallel is less than the inductance of any one inductor. However, the total capacitance of a number of capacitors in parallel is the <b>sum</b> of all the individual capacitances.Kit Fenderson-Petershttp://www.blogger.com/profile/04617551268146374973noreply@blogger.com3tag:blogger.com,1999:blog-821414580531173273.post-83049384652775090692011-02-13T21:47:00.001-06:002011-02-13T21:52:56.003-06:00Constructing a programming interfaceA little while ago, I was given a pair of <a href="http://www.qsl.net/k0kn/schematics.html#max232">EF Johnson</a> UHF mobile radios. These put out 35 Watts of power, which is nice, but like most radios not specifically designed for amateur use (and several that are, as I understand it) you can't set the operating frequency directly from the radio. Instead, one must use a special programming cable to store a number of frequencies (in this case, about 100, in banks of 16) in the radio. And these cables aren't free - aftermarket versions run about $40 a pop. And as my motto with ham stuff has lately been "why buy a thing when you can build it?", I decided to make one of my own.<br />
<br />
There are a couple of schematics out there for this cable, all based around a <a href="http://en.wikipedia.org/wiki/MAX232">MAX232</a> IC (integrated circuit). I used one designed by <a href="http://www.qsl.net/k0kn/">Kyle Yoksh, K0KN</a>.<br />
<br />
Basically, what the MAX232 does is convert <a href="http://en.wikipedia.org/wiki/RS-232">RS-232</a> signal voltage levels to <a href="http://en.wikipedia.org/wiki/Transistor%E2%80%93transistor_logic">TTL</a> signal levels. So a lot of the work has already been done in the IC. All I had to do was solder the IC to a circuit board, attach some capacitors, attach a female DB9, and attach an appropriate connector to interface with the radio. <br />
<br />
I was able to obtain all the necessary parts from <a href="http://eskc.com/">Electronics Supply Company</a> here in town. I probably paid a little more than I would have if I'd bought from, say, <a href="http://www.mouser.com/">Mouser Electronics</a>, but I like supporting local businesses. <br />
<br />
Soldering the entire circuit together was a bit of a learning experience, which I won't recount here as it's extremely boring in the telling. I know that if I built this circuit again, I'd do it slightly differently, but I'm still pleased with the way I did it.<br />
<br />
Remember how I said "appropriate connector" above? This whole "appropriate connector" business is easier said than done. It's an 8-pin connector that looks like an RJ45, but it's more narrow. I wasn't able to find one online, so I decided to adapt a bit of Cat 5 that I had laying around instead. This also had the advantage of not requiring me to find a crimper for that weird connector. So, instead of using the Johnson connector, I'm filing down (sloooowly) the RJ45 on the end of the aforementioned Cat 5 stub. Once I've done that, I just need to secure the board and try it out. <br />
<br />
For a project box, I decided to use an old Altoids tin that I had laying around. I drilled a hole in it for the Cat 5 stub, but for the DB9, I ended up poking a hole in it with my needle nose pliers and then just working at it with a metal file and clippers for a while. I made the holes for the screws to secure the DB9 to the box using a sheet metal screw I had laying around. A bit of pressure and it poked right through the tin.<br />
<br />
OK, now for some pictures. :)<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFZiDF1yZWLc00Z4RgOfzg33z8gS27YU_bYgVDNLFpJx-jpbwZpXD3UXvSlNcj_mJm_e8kazfb-Nqz_aHFBJy8PiOC2YUffjrbtR_u1XKZXB_4xP4WIFviVHHfj3n0q340-HysWzKPuR58/s1600/P1010008.JPG" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"><img border="0" height="320" width="278" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFZiDF1yZWLc00Z4RgOfzg33z8gS27YU_bYgVDNLFpJx-jpbwZpXD3UXvSlNcj_mJm_e8kazfb-Nqz_aHFBJy8PiOC2YUffjrbtR_u1XKZXB_4xP4WIFviVHHfj3n0q340-HysWzKPuR58/s320/P1010008.JPG" /></a></div>Here's the project board inside the Altoids tin. As you can see, it's really not that complicated of a circuit - a few capacitors, a voltage regulator, and the appropriate connectors on either side, and that's it.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQs1opVYRjDj-nnzQMMJUuTirfgL4P7wC4MwsdI0KyocaI7fKHlPQ0pbUwGjQmrrHCpiiVj3CQdkdf_LX_pp-ieUn7r5nGgHwXW3CJk3LfM50UTdJkS8fj0RV_v2ASqI9zCu5jH0fp-I_w/s1600/P1010011.JPG" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"><img border="0" height="286" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQs1opVYRjDj-nnzQMMJUuTirfgL4P7wC4MwsdI0KyocaI7fKHlPQ0pbUwGjQmrrHCpiiVj3CQdkdf_LX_pp-ieUn7r5nGgHwXW3CJk3LfM50UTdJkS8fj0RV_v2ASqI9zCu5jH0fp-I_w/s320/P1010011.JPG" /></a></div>Close-up of the project board.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-I-8l9-3SRpncOv1mJL2s7LxxCGNqTr2uBY26q0HaR8gHQiXjSwtuAxsBRXTnn0s9_vrcctqXy3u1jL8o_8K0KY8293c5LutNT7vM_bkvIG7-y4lYoskjlpqJPh1iOkJGfaxvUdhJilrx/s1600/P1010013.JPG" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"><img border="0" height="320" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-I-8l9-3SRpncOv1mJL2s7LxxCGNqTr2uBY26q0HaR8gHQiXjSwtuAxsBRXTnn0s9_vrcctqXy3u1jL8o_8K0KY8293c5LutNT7vM_bkvIG7-y4lYoskjlpqJPh1iOkJGfaxvUdhJilrx/s320/P1010013.JPG" /></a></div>And this is what the thing will look like once it's finished.Kit Fenderson-Petershttp://www.blogger.com/profile/04617551268146374973noreply@blogger.com0tag:blogger.com,1999:blog-821414580531173273.post-32000136142661589442011-02-07T14:11:00.002-06:002011-02-07T14:11:57.518-06:00Kansas City Dilettante is now Kansas City Polymath!Please update your bookmarks to reference http://kcpolymath.blogspot.com/Kit Fenderson-Petershttp://www.blogger.com/profile/04617551268146374973noreply@blogger.com0tag:blogger.com,1999:blog-821414580531173273.post-78279783164451500672011-02-07T14:05:00.000-06:002011-02-07T14:05:24.019-06:00Changing my nameIt occurs to me that "Kansas City Dilettante" does not exactly convey the impression that I want to convey. I originally chose "Dilettante" to reflect the fact that I was interested in a great many things (despite the fact that most of the blog content, lately, has been about radio in one form or another, I am interested in a great many things). But "dilettante" also conveys someone who only toys with things briefly, then moves on. I'm not that person.<br />
<br />
I have often said that when I grew up, I wanted to be Benjamin Franklin. I've always admired Franklin's wide range of skills and knowledge. And a word for someone with a wide range of skills and knowledge, like Franklin, is "polymath", and that's something I aspire to be. So, effective as soon as I can figure out how to make Blogger do it, I'm changing the blog's name to "Kansas City Polymath".Kit Fenderson-Petershttp://www.blogger.com/profile/04617551268146374973noreply@blogger.com0tag:blogger.com,1999:blog-821414580531173273.post-51708223154315386952011-02-05T17:01:00.000-06:002011-02-05T17:01:55.791-06:00Adventures in J-pole constructionSo when I said that the J-pole <a href="http://kcdilettante.blogspot.com/2011/01/j-pole-is-soldered-together.html">was soldered together</a>, I neglected to mention that the coax - the thing that I connect my radio to - had <i>not</i> been connected to the antenna. <br />
<br />
To begin with, I used a borrowed antenna analyzer (a <a href="http://www.mfjenterprises.com/Product.php?productid=MFJ-259B">MFJ-259</a>) to find the point on the antenna where I got the lowest <a href="http://en.wikipedia.org/wiki/Standing_wave_ratio">SWR</a>. I then marked those points (there's a point on the 3/4 wave section, and a point on the 1/4 wave stub, and in theory they should be at equal height) on the antenna with a Sharpie. Then I screwed a chassis mount <a href="http://kcdilettante.blogspot.com/2011/01/j-pole-is-soldered-together.html">SO-239</a> connector (<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqhky0rIqGazN3OcrEJLBqqLHs9u2CB10Z5dw1_S8MxzBqGm9XRFe58Zq-luS-d_MW2ujVGM6BtB9dcnZgxPKrag9G-M2T5k-9HpvNFhEP5iSa_x2g5YY64uyZU6-vmgFZyP-Ix5tEyJwE/s320/UHF-Chassis-Mount-Female-SO-239.jpg">photo</a>) into the 1/4 wave matching stub, and added some copper wire wrapped around the base of the connector. This was intended to improve the electrical connection between the 1/4 wave stub and the side of the connector that connects to the shield of the coax. I'm not sure it was strictly necessary, though. :)<br />
<br />
I had previously soldered a piece of solid core copper wire that I had laying around to the center conductor of the SO-239. After I got the connector screwed into the 1/4 wave stub, I tried soldering the end of the wire to the 3/4 wave section of the antenna at the low SWR point I had previously marked. My soldering iron wouldn't get the copper pipe hot enough for the solder to stick - not surprising, since copper is an excellent conductor of heat - so I ended up using the blowtorch I had used to solder the antenna together to begin with. This worked much better, and when all was said and done, I had an SWR of between 1.1 and 1.2 at 146 MHz.<br />
<br />
Today I covered the wire and everything but the threads on the SO-239 with electrical tape to protect them from the elements, and to make sure that nothing could short the matching stub and the 3/4 wave section (apart from the bottom of the "J"). I then (with my upstairs neighbor's permisssion) attached a couple of U-bolts to the railing of the back staircase. They will hold the mast that the j-pole is mounted on to the railing. I might fabricate another mast out of something or other later to get some additional height - I haven't decided yet. I didn't connect any feed line to it, as I don't have a UHF -> F adapter.<br />
<br />
Soon, I will have a working outdoor antenna!Kit Fenderson-Petershttp://www.blogger.com/profile/04617551268146374973noreply@blogger.com0tag:blogger.com,1999:blog-821414580531173273.post-47273678083195989992011-01-31T21:43:00.000-06:002011-01-31T21:43:32.888-06:00The J-pole is soldered together!Tonight I soldered together the J-pole I mentioned in <a href="http://kcdilettante.blogspot.com/2011/01/adventures-in-ham-radio.html">my last post</a>.<br />
<br />
Conditions were less than ideal for this. Not having a garage, and it being awfully cold outside, I had to work in a basement. On the plus side, the basement was relatively warm. On the minus side, it was awfully dirty down there. I kept things as clean as I could, though.<br />
<br />
Another less than ideal thing was the flux I used. I purchased a kit from the hardware store that came with a small roll of solder and a small tube of flux. The tube of flux had a thick plastic lid, and I didn't have anything to puncture it with, so I ended up heating up a piece of scrap copper wire and using that to puncture the tube. I only managed this once, however, so the flux came out in a thin ribbon.<br />
<br />
But, all problems and less than ideal conditions aside, the j-pole is together! Now all I need to do is find the 75 Ohm match point and I'll be good to go. Now, experienced hams might have noticed that I said 75 Ohms in my last sentence and be a bit confused. After all, most ham equipment is designed for 50 Ohm loads, and you generally want the best impedance match you can get, so as to maximize your power output. But as it happens, I have a bunch of leftover 75 Ohm RG6 that various cable installers have left with me, and I don't want it to go to waste. So I'm going to try and use that as feedline, and try and set something up to match that impedance as best I can. It was suggested in <a href="http://forums2.qrz.com/showthread.php?282881-Uses-for-75-Ohm-RG6">this thread on QRZ</a> that if I make sure my 75 Ohm line is a multiple of 1/2 a wavelength, I can then connect a bit of 50 Ohm line at the radio end. We'll see how that goes. :)Kit Fenderson-Petershttp://www.blogger.com/profile/04617551268146374973noreply@blogger.com0tag:blogger.com,1999:blog-821414580531173273.post-52692718099204479972011-01-28T22:30:00.000-06:002011-01-28T22:30:37.880-06:00Adventures in ham radioIn my quest to become a broadcast engineer and general polymath, I've started getting into ham radio.<sup><a href="#1">1</a></sup>. I got my Technician-class license in August of last year, and started operating on <a href="http://echolink.org/">EchoLink</a>, which provides VoIP connections to other ham operators and those repeaters connected to EchoLink. I made a couple of <a href="http://en.wikipedia.org/wiki/J-pole_antenna">"Slim Jim"</a>-type antennas, one out of twin-lead, the other out of ladder-line, but didn't actually get a radio until fairly recently.<br />
<br />
My current radios are a Midland 13-505 that I bought at the last hamfest, and a pair of EF Johnson 9800 series radios that were given to me by a fellow ham. The Midland radio operates on the 2 meter band, which covers (for hams) 144 - 148 MHz. The Johnson radios operate on the 70 cm band, 420 - 450 MHz.<br />
<br />
Neither of these radios is exactly ideal. The Midland is locked (unless I can find or build a synthesizer) to those frequencies for which it has crystals installed. As the Midland dates to the early 1970s, crystals to fit it are fairly rare. The Johnson covers the entire 70 cm band, but requires a special programming cable which I do not currently possess. I have, however, found two sets of plans on the Internet for building such a cable (<a href="http://www.ccdx.org/zedyx/mods/challenger.htm">here</a> and <a href="http://www.qsl.net/k0kn/schematics.html">here</a>), so I think that I shall soon have that problem sorted.<br />
<br />
As of yet, I have not been able to make a QSL (a contact) with either radio. Several times I have heard traffic on the Midland radio, but I have yet to be heard. I have heard nothing on the Johnson. I'm hoping all that will change soon, though, as I'm building a new antenna. It's another J-Pole (note that the "Slim Jim" is a special case of the J-Pole), but this time, I'm making it out of 1/2" copper tubing.<br />
<br />
I used <a href="http://www.hamuniverse.com/jpole.html">plans by G.E. "Buck" Rogers, K4ABT</a> to get the proper lengths of copper tubing. I went to Westlake Hardware in Westport to buy the tubing, caps, tee, and elbow, and they were kind enough to cut the pipe in the lengths I needed at no charge. I haven't assembled it yet, as I don't know how to solder copper pipe together, but once I have, I plan to mount it on the railing to the stairs at the back of my house. That will give me a reasonable amount of height, especially compared to where I have my antenna now - hanging on the wall above a window in the rear of my house.<br />
<br />
That's all for now, Dear Readers. I'll keep you posted (sporadically, of course) on my further adventures in ham radio. And I've still got all manner of things to talk about at KCUR. :)<br />
<br />
<sup><a name="#1">1</a></sup>Before you ask, Dear Reader, no, I still haven't learned where the "ham" in "ham radio" comes from. I'm sure it's on the Internet somewhere.Kit Fenderson-Petershttp://www.blogger.com/profile/04617551268146374973noreply@blogger.com0tag:blogger.com,1999:blog-821414580531173273.post-27538026130466462602010-11-28T11:44:00.000-06:002010-11-28T11:44:20.248-06:00Recently at KCUREven though I haven't been posting as much of late, I'm still active at KCUR. Two weeks ago Robin and I installed a fix to the HD transmitter to prevent RF interference from the power supply. I'll note that Robin never mentioned noticing any kind of RF interference coming from the HD transmitter, but it's still a good precautionary measure to take.<br />
<br />
This fix involved putting a <a href="http://en.wikipedia.org/wiki/Ferrite_bead">ferrite</a> choke around an internal power cable<sup><a href="#ref1">1</a></sup>. The linked article discusses chokes in depth, but basically the point of a choke is to present a high impedance to RF currents. Any such currents that are generated along the cable will either be reflected up the cable or will be absorbed by the ferrite choke and dissipated as a negligible amount of heat. Also, we attached a grounding strap (a braided strip of wire) to the outside of the crossover pipe (rigid coax - where the generated RF signal comes out). Since the outside of the crossover pipe acts as a shield, I think this means that any stray currents on the outside of the pipe will be shorted to ground and won't get outside the transmitter cabinet.<br />
<br />
This whole business took something like 15 - 20 minutes. The rest of the day was spent helping Robin out with various things around the station, including installing a T-1 surge protector in the TOC. Last week I did the same thing at the transmitter.<br />
<br />
<sup><a name="ref1">1</a></sup> Looking at the <a href="http://www.bdcast.com/fgal/prod_manual/FM-10S_FMi-703_nosch_09_29_2010.pdf">manual</a>, the purpose of the cable is "current share", and I'm not sure what that means. If there's the potential for RF interference, I think it must have AC on it.Kit Fenderson-Petershttp://www.blogger.com/profile/04617551268146374973noreply@blogger.com0tag:blogger.com,1999:blog-821414580531173273.post-48768818062467584762010-10-11T19:20:00.003-05:002010-10-11T20:57:18.810-05:00Setting up a little SMTP server to interface to anotherI'd say, "Look, a non-radio post!", but this post is an elaboration of a reply I made to someone on <a href="http://pubtech.org/">Pubtech</a>, so... :)<br />
<br />
By way of background, someone on Pubtech was asking a <a href="http://nautel.com/">Nautel</a> rep when their <a href="http://nautel.com/vs_series/">VS Series</a> transmitters would support <a href="http://en.wikipedia.org/wiki/SMTP">SMTP</a> servers that require login. I replied that until such a time, you could set up your own little SMTP server and use the server that requires login as a <a href="http://en.wikipedia.org/wiki/Smart_host">smarthost</a>. Here's how you do it:<br />
<br />
Step 1: get yourself a Linux box of some sort. Since this is (presumably) going to live at a transmitter site, and it would sure be nice if you could just "set it and forget it", as it were, I would recommend something like <a href="http://www.linuxsbc.com/home.htm">EMAC's</a> <a href="http://www.linuxsbc.com/servers/linux_sib.htm">Server-in-a-Box</a> (SiB). With the SiB, It's not clear from their website whether or not it an SMTP server included in the Linux distribution it ships with, so contact the manufacturer to make sure. If it doesn't, I'm certain they can install the requisite software.<br />
<br />
Step 2: configure the SiB's SMTP server to log in to your other SMTP server. There are a variety of SMTP server software packages out there, and I can't cover them all. I'm going to use <a href="http://www.postfix.org/">Postfix</a> for this example; if you need another example, comment on this post and I'll see what I can do.<br />
<br />
This example is based heavily on the example posted <a href="http://www.cyberciti.biz/faq/postfix-smtp-authentication-for-mail-servers/">here</a>. Whenever you see <i>mail.myserver.com</i>, you should replace it with the host name of the mail server that requires login. Replace <i>myusername</i> with the username to log in to the SMTP server, and <i>myPassword</i> with the password associated with that username.<br />
<br />
Create a text file on your server called "/etc/postfix/password". This file should look like so:<br />
<br />
<code><br />
# server username:password<br />
<i>mail.myisp.com</i> <i>myusername</i>:<i>myPassword</i><br />
</code><br />
<br />
Now, execute the following commands (note the '#' is used to indicate a command prompt):<br />
<br />
<code><br />
# chown root:root /etc/postfix/password<br />
# chmod 0600 /etc/postfix/password<br />
# postmap hash:/etc/postfix/password<br />
</code><br />
<br />
Then append the following lines to /etc/postfix/main.cf:<br />
<br />
<code><br />
relayhost = <i>mail.myserver.com</i><br />
smtp_sasl_auth_enable = yes<br />
smtp_sasl_password_maps = hash:/etc/postfix/password<br />
smtp_sasl_security_options =<br />
</code><br />
<br />
Finally, restart postfix:<br />
<br />
<code><br />
# /etc/init.d/postfix reload<br />
</code><br />
<br />
Give the SiB a static IP address (how this is done is outside the scope of this post), connect it to the network, rack it up, and give the Nautel the SiB's IP address for a mail server.<br />
<br />
<b>EDIT:</b> The original poster on Pubtech replied that he couldn't have an open SMTP relay floating around. I'm not sure that I'd have my transmitter with a publicly (or semi-publicly) accessible IP, but then again, I'm not sure that I wouldn't. There are benefits and drawbacks to each, but that's a topic for another post. In his situation, I would lock down Postfix to only relay from the Nautel's IP. To do this, add these line to /etc/postfix/main.cf:<br />
<br />
<code><br />
mynetworks = 127.0.0.0/8 <i>192.168.1.23</i><br />
smtpd_client_restrictions = permit_mynetworks, reject<br />
</code><br />
<br />
Substitute <i>192.168.1.23</i> with the IP of the Nautel, of course. Reload Postfix again when you've added those lines.<br />
<br />
<br />
And thenKit Fenderson-Petershttp://www.blogger.com/profile/04617551268146374973noreply@blogger.com0tag:blogger.com,1999:blog-821414580531173273.post-91646413565103522582010-10-09T20:18:00.003-05:002010-10-09T20:54:38.278-05:00Trail of Tears Broadcast Dry RunThrough <a href="http://kcur.org/">KCUR</a>, I have been retained to engineer <a href="http://kkfi.org/">KKFI's</a> broadcast of the Trail of Tears discussion panel at the <a href="http://www.umma.net/">United Minority Media Association</a>'s <a href="http://www.umma.net/Conference.html">Midwest/Southeast Regional Conference</a>. As the <a href="/search/label/wgxc%20barn%20raising">barnraising</a> was the first time I had engineered <i>any</i> live broadcast, I thought it prudent to do a dry run today. Especially since I was using unfamiliar equipment (a <a href="http://tieline.com">TieLine</a> Commander G1). <br /><br />Earlier in the week, I collected the equipment from KCUR. Today was the first chance I had to actually set up the equipment. I thought I might need a second pair of hands for this, so I asked my friend Aubry to help. To begin with, we went over to KKFI to hook up the studio unit (the TieLine equipment is a pair of <a href="http://en.wikipedia.org/wiki/Codec">codecs</a>, a studio unit and a field unit) in the studio. This was very straightforward - all we had to do was hook up an analog phone line and run it into the board. <br /><br />We then went over to the Bruce R. Watkins Cultural Center to set up there. This was a bit more complicated as we weren't exactly sure where the event was going to be held. So we set up in the Great Hall, figuring that to be the most likely place (we later found out that we should have set up in their "broadcast room" at the Cultural Center. ah well.) We connected up the loaner mics from KKFI and I got a feel for how loud they were. Then we found an analog phone line and tried dialing in to the studio unit at KKFI. Unfortunately, while the field unit said we were connected, the studio unit said we weren't, and there was no sound on the board at KKFI. So it was pretty clear that we weren't connected. I went back to KKFI to try and diagnose things there (leaving Aubry to watch the equipment) but had no luck. <br /><br />To test KKFI's lines, I dialed the TieLine test number with the studio unit. I connected successfully at 21.6 kbps and got some cheery music. I then took the studio unit back over to the Cultural Center and was able to connect there at a slightly faster speed. So KKFI's lines and the Cultural Center's lines both appeared to be good, and yet I wasn't able to get the two units to connect. I called the studio unit from my cell phone, and the unit picked up, so it was certainly answering calls. So I'm a little perplexed, but I have a plan for further testing. The next step is to take both units to KKFI and see if the one unit will connect to the other there (KKFI has multiple analog telephone lines).Kit Fenderson-Petershttp://www.blogger.com/profile/04617551268146374973noreply@blogger.com0tag:blogger.com,1999:blog-821414580531173273.post-76556094955948057872010-10-08T20:53:00.003-05:002010-10-08T21:22:29.427-05:00Watching the KCUR TXDay 3 of the barnraising will come in due course, but I want to talk about something more recent first.<br /><br />Recently, Robin took a well-deserved vacation - in fact, he went on vacation at the same time as I was at the <a href="http://kcdilettante.blogspot.com/search/label/wgxc%20barn%20raising">barn raising</a>, though he was gone for longer. At any rate, while he was gone (and I was in town) I got to take care of the transmitter. This involved putting my number as the first one in the transmitter remote's call list, getting the password to the remote control, and a set of keys. I also received a spreadsheet of what monitors were connected to the individual channels on the remote (a Burk <a href="http://www.burk.com/Products/Arc16.aspx">ARC-16</a>), so that I knew which channels did what. <br /><br />In the time that Robin was gone, the transmitter did not blow up, and KCUR did not go off the air. Thus I am counting my first time as being the person in charge of the transmitter a success. However, I could have done a fair sight better, I think, and I plan to do better next time. First of all, voltage. A couple of times I got calls from the transmitter saying that the voltage was low. I cleared the alarm, and figured that since the transmitter didn't call me again after I cleared the alarm, the problem was transient and nothing to worry about. In fact, it was not a transient problem, and when Robin got back he had to call KCP&L to get the voltage back to where it should be. Additionally, this low voltage situation was causing the transmitter to operate inefficiently, causing the room to be overly warm. There was also a problem with the HVAC - the air conditioning wasn't blowing cold air. I got calls from the transmitter once or twice warning that the temperature was above the set level, but again, since the transmitter didn't call again after I had cleared the alarm, I figured it was a transient problem. Ultimately, it was an error in my thinking: these "transient" problems were still problems that warranted investigation.<br /><br />I also went over to the TX last Saturday, while Robin was gone, to try and get <a href="http://www.vietnamradio.com/">VINA</a>, an organization that leases a 92kHz <a href="http://en.wikipedia.org/wiki/Subcarrier">subcarrier</a> from KCUR, back on the air. They had sent a box of equipment to the station for us to install at the transmitter in place of the equipment they had been using. During the week I had been out to the TX to replace the satellite (they get their signal via a <a href="http://en.wikipedia.org/wiki/Ku_band">Ku band</a> satellite downlink) receiver they were using, but that wasn't enough to get them back on-air, so I went to replace the <a href="http://en.wikipedia.org/wiki/Low-noise_block_converter">LNB</a> on the satellite dish located on the roof of the transmitter hut. I got the LNB replaced, and I got some signal on the air, but it wasn't very strong, and it sounded distorted. It wasn't until this past Monday, when Robin came back, that we were able to get VINA on the air properly. I ended up having to rotate the LNB almost 50° from the 0° mark on the bracket, and there was some damaged wiring that needed replaced as well. <br /><br />So all in all, I'm treating my first time watching the transmitter as a lesson in proper thinking. As Robin says, you do all you can do until the job is done. If you can't do it, there's no shame in calling another engineer to assist. I'll remember that next time.Kit Fenderson-Petershttp://www.blogger.com/profile/04617551268146374973noreply@blogger.com0tag:blogger.com,1999:blog-821414580531173273.post-40142353765434507932010-10-08T20:18:00.002-05:002010-10-08T20:26:15.109-05:00Barnraising: Day 2(Posted *way* late. Sorry, I got busy. *g*)<br /><br />Day 2 of the barnraising began with me trying to find all the web streaming equipment that had been scavenged to do the stream from the Cannonball Room. This did not go very quickly, so the streaming for some of the workshops got started late. The streaming happened, though, so I must count that as a success. :)<br /><br />By the time I'd finished getting all the streaming going, I'd missed most of the morning workshop session, so I didn't get to finish the tiny transmitter I'd been working on the day before. That's all right, though - I can build my own when I get home. I bet I can even adapt the design to broadcast on ham frequencies - maybe have my own little 70-centimeter or 2-meter transceiver. <br /><br />I was going to go over to the station and help out there after the morning workshop session. Instead I spent some time checking on the web streaming. When I went in to check on the streaming in the workshop about recruiting volunteers and preventing burnout, I was immediately handed a slip of paper informing me that I was an octogenerian stockbroker who loved to dance. This was a role-playing exercise, you see, where some of us were potential volunteers and some of us were people trying to recruit volunteers. I played along, stayed for a bit of discussion, then wandered off to see what else was going on.<br /><br />One interesting feature of the barnraising was the interview booth. The idea is that two people go into the booth and one of them interviews the other. The other then returns the favor. A volunteer staffer is also in the booth, and they record the interview, along with a couple of station ID's, for later broadcast. So I and a pretty girl named Meghan went in, and she interviewed me. I talked about why I'd come to the barnraising, and how I was trying to move away from IT and into broadcast engineering, and what got me into radio in the first place (a subject that I should perhaps elaborate upon in another post). I even briefly mentioned my days as Uncle Squishy, the host of the <a href="http://www.weft.org/">WEFT</a> children's music show. (Uncle Squishy later reappeared as the occasional host of one of my <a href="http://www.weft.org/">WEFT</a> overnight shows). <br /><br />What with one thing and another, I didn't get over to the station until after lunch. I helped Sakura from Prometheus set the levels on the board, hung out while a carpenter was drilling holes for cables, and helped design a set of shelves to hold equipment until such time as a rack was obtained for said equipment. <br /><br />Let me briefly describe the way we set the levels on the board. This may well not be industry standard, but once WGXC goes on the air, they can always adjust them again. <br /><br />To start with, all the faders on the board were set to the same point. The reason we did that was to try and make sure that two given pieces of equipment would have roughly the same perceived volume when the faders on their respective channels were at the same point. When you've got a radio station, you don't want to have to remember that having the fader, say, halfway up on the CD player is fine, but having the fader halfway up on a microphone is *way* too quiet. <br /><br />Using a Behringer cable tester, we generated a test signal. This signal could be set at three preset levels (i.e. volume) - one for microphones, one for consumer-grade equipment, and one for professional-grade equipment. For each channel on the board, then, we chose the appropriate level and ran it into the board. We then adjusted the trim pots - which are these tiny potentiometers (i.e. a variable resistor, often used to control volume) that you use to adjust the levels on a particular channel. Remember what I said above about having all the equipment being at the same volume for the same fader position? The trim pots are what you use to make that happen. In the case of the six (there are three physical mic modules, but each module on that board takes an "A" and a "B" input that you can switch between) microphone channels on the board, we only adjusted one pot each, because microphones are mono devices. For everything else, we adjusted the left and right pots separately. We set each channel so that with the fader about a quarter of the way up, the VU meter was near +1<sup>1</sup>. <br /><br />I left for dinner, and when I came back, I made a couple of XLR cables and helped run wiring in the studio. I really like the way their board does things - it's an Arrakis MARC-15. The neat thing about the MARC-15 is that the A & B inputs on each channel are RJ45. They're not Ethernet, though - it's not an IP console. Instead, the pins on the RJ45 are wired such that you can fit two balanced audio channels and a contact closure relay (a dingus that shorts two electrical wires, often used for start/stop control of attached audio devices) onto one jack. I like this idea. If you do it right - only have the wires going to your connectors be a few inches long, and the rest of the wires be contained in the Cat5 sleeve - it keeps the wiring very clean and compact. I'm on a plane right now, otherwise I'd post a picture.<br /><br />Once things wrapped up at the studio, I made my way back to St. Mary's Academy and helped clean up, then went back to the Youth Center to sleep. <br /><br /><sup><a name="#note1">1</a></sup> A <a href="http://en.wikipedia.org/wiki/VU_meter">VU meter</a> (VU for "Volume Unit") is a thing on a console that tells you, effectively, how loud your broadcast is. It's an analog thing with a needle. The ranges vary from meter to meter, I expect, but I think the one on the WGXC board went from -10 to +3. That's probably a logarithmic scale.Kit Fenderson-Petershttp://www.blogger.com/profile/04617551268146374973noreply@blogger.com0tag:blogger.com,1999:blog-821414580531173273.post-36225164190753686182010-09-24T14:12:00.005-05:002010-09-27T16:27:25.055-05:00Barnraising: Day 1I got up this morning around 0700, hit the shower, and went to "Debbie's Lil' Restaurant" in Hudson for breakfast with a couple of other barnraising folks. One of them grew up in the Champaign-Urbana area - a place I spent several years - which was pretty cool. He was a <a href="http://www.weft.org/">WEFTie</a> for several years - another connection we share.<br /><br />After breakfast I volunteered to help out with the web streaming of the various workshops. There are four web streaming kits, but they don't all have the same hardware. Three of them are using Behringer UB1202 mixers and a PC or Mac laptop to stream to an Icecast (or Live365 in one case) server. One of them is using a Marantz digital recorder where the line out goes to a PC streaming to the Icecast server. Every session was recorded with a single condenser mic.<br /><br />The barnraising is largely a DIY thing when it comes to equipment. People bring what they have. So it's only to be expected that there will be a serious diversity of equipment. That doesn't make it easy, though. I had to run around to try and find 1/8" to 1/4" headphone adapters that I could plug into the headphone output of the board, for example, as none were supplied. Later, I realized that it was better to start up the media player on each laptop - that way whoever was monitoring could hear the audio as a listener would hear. Of course, it ended up that no-one <i>was</i> monitoring, because there was only me to do it, but it's good practice for tomorrow's and Sunday's sessions.<br /><br />After I had the web streaming set up, I went to Pete Tridish's workshop on building tiny transmitters. The transmitters were based on the designs of <a href="http://www.translocal.jp/radio/micro/howtotx.html">Tetsuo Kogawa</a>. There weren't enough materials to go around, so I worked with a group of two other folks. We got as far as getting the resistors soldered on. :)<br /><br />After dinner I went over to the Cannonball Factory to hear the spoken word performers. There was a Finnish girl there who read a poem entitled "The Brothers-in-Law". The poem itself I don't remember enough of to comment on. However, she read it first in Swedish (she's a member of the Finnnish minority who are native Swedophones) and I was struck by the almost musical quality of the words. <br /><br />There were two sets of spoken word performers. I left in the middle of the second set and walked over to the station to see if they needed any help over there. They were wrapping up for the night, so I went into the studio to hang out for a bit. At first I thought I was hearing some weird experimental music, but in fact it was the feed from the Cannonball Factory - the third set was a set of hip-hop performers, and the volume levels were considerably higher than the previous sets. This caused the broadcast (well, webcast) to sound like shit, so I went back and turned down the gain on the streaming PC.<br /><br />After that, I went back to the crash space and went to sleep.Kit Fenderson-Petershttp://www.blogger.com/profile/04617551268146374973noreply@blogger.com0tag:blogger.com,1999:blog-821414580531173273.post-7797143701721845312010-09-23T18:51:00.002-05:002010-09-24T09:09:57.181-05:00Barnraising: Day 0I got into Hudson about noon and met up with <a href="http://www.twitter.com/nykcsa">Chuck</a>, a fellow barnraising attendee who was raised in KC, but now lives in San Antonio. Chuck and I waited around a while, and eventually someone from WGXC came and took us from the Albany airport to Hudson. This someone was an engineer, in fact, and he gave me a few salient facts:<br /><br />WGXC will be transitioning from an LPFM station to a 3.3 kW ERP FM. They have an Energyonics 1.5 kW transmitter and a pair of log-periodic antennas. Not a whole lot of ERP, but it's a start.<br /><br />At any rate, when I got to Hudson, I got a brief tour of the studio then went over to St. Mary's Academy, where a lot of the workshops are being held. I helped out with a couple of things, including setting up the stage for the speakers, then got assigned to KP duty. ;)<br /><br />I think that I will not be sleeping out at the farm where I had arranged a couch surf. Instead I will stay in Hudson. I think I'll get more of the experience this way.Kit Fenderson-Petershttp://www.blogger.com/profile/04617551268146374973noreply@blogger.com0tag:blogger.com,1999:blog-821414580531173273.post-10183076371637698962010-09-22T21:27:00.001-05:002010-09-22T21:29:23.297-05:00Off to the barn raising!That's right, Dear Readers, I'm going to <a href="http://kcdilettante.blogspot.com/2010/07/wgxc-barnraising.html">the WGXC barnraising</a>! I'll try and post some from the event itself. I'm really looking forward to it!Kit Fenderson-Petershttp://www.blogger.com/profile/04617551268146374973noreply@blogger.com0