Category Archives: technology

Renovating VideoLogic Sirocco Stereo Speaker System, Part II

Previously I started working on renovating an old speaker system that I have. See the article here: Renovating VideoLogic Sirocco Stereo Speaker System.

I left the project at the point where I was attempting to find replacement potentiometers for the controls of the amplifier. I tried suppliers like mouser and element14 and other similar ones looking for pots but found nothing that fitted as I wanted. It seems that digital controls are causing older analogue controls to become obsolete. I have also looked on eBay, and while I can find potentiometers of the right value, I have been unable to find ones with the same shaft length and type and I can’t be sure of the quality.

Therefore I have reconsidered my plan to replace to the potentiometers. Instead, I have determined that the “Sub” and “Attitude” potentiometers are in good enough condition to reuse. The volume potentiometer is not in good condition and the wiper makes intermittent contact which is a problem. Therefore I have determined the resistances across the pins of the potentiometer when it was near maximum and will use resistors to permanently set the volume. I don’t mind doing this for three reasons:
The first is that I use a separate DAC with a volume dial (ASUS Xonar Essence One) to connect my computer to my speakers so I will be able to have control over the volume that way.
The second is that the quality of the amplifier is enough that you don’t get that annoying static hiss as you often get with computer speakers which are turned up to the maximum.
And finally, I will be putting the amplifier out of sight so a hole in the front panel where the volume pot used to be won’t be too terrible.

I have used two 20k Ohm and two 50 Ohm resistors to join up the contacts in a way that was the same as if the wiper of the potentiometer was turned up to the maximum. I’ve also resoldered the other two potentiometers back in their places, soldered bridging wires onto the headphone socket (because that was causing intermittent contact issues and adding noise to the output) and replaced the blue led with a yellow one (personal preference).

With those small jobs done, I cleaned everything up and reassembled the amplifier enclosure. I attached all the cables and powered it up and it worked a treat. Turning either of the two remaining potentiometers does not produce any crackling sound through the speakers. Both channels are again working and producing even sound. In review the speakers I replaced are, I think, producing a slightly higher frequency than the original Audax ones. Previously I would have the attitude set somewhere between half way and maximum, but now I have it set much nearer to the minimum value which to my ear is now producing a more natural sounding audio. I will soon install the speakers in a more permanent location and be using them daily.

While I decided to make some compromises with my original intentions, I regard this project as complete. This is the first project I have completed in recent years (see this for why: Depression, Weight, Finance, Responsibility, Recovery) and completing a personal project is a goal that I have set myself. I’ll be writing more about setting goals and other things soon.

Topics

Greg Young – Talk
Dino Esposito – Talk
Another Talk
RavenDB
Pluralsight course on CQRS
StackOverFlow – Composition over Inheritance
Design Patterns – log4net with dependency injection
WCF & TopShelf
Wikipedia – Single Responsibility Principle
Event Sourcing vs Command Sourcing
http://thinkbeforecoding.com/category/Domain-Driven-Design
https://blogs.msdn.microsoft.com/dotnet/2016/09/26/introducing-net-standard/

 

 

A Couple of lightweight ORMs:
http://www.toptensoftware.com/petapoco/
https://github.com/StackExchange/Dapper

Logging becomes instrumentation? – that is not only did an event happen, but metrics about the event etc
MSDN Performance Counters for .NET
Logary

A description of SAAS app methodology that makes for quality applications.
http://12factor.net/

State Machines
MSDN Blog discusses State Machines for .NET core

Other things
BDD Risk Management
Latency Sensitive Microservices
Better Naming
Interesting thoughts about meetings
10 Bullets by Tom Sachs
PI CCTV
Noiszy
Qubes OS
I bank with multiple current accounts. And other banking ideas

Too Often True:

(sorry, can’t attribute this image to anyone, don’t have any idea where it came from except a colleague forwarded it to me. He didn’t know where it came from either)

My custom setup up a server for php, mariadb, nginx

Every now and then I set up a new server and migrate a few sites onto it. I’ve often considered switching to managed hosting but never been willing to switch. I like having full root level access to the system too much.

So that aside I’ve decided to document my process for setting up a new server to serve some fairly standard php sites (e.g. wordpress/joomla/opencart) and my own custom php code.

My preferences for setup of this kind have changed a lot over the years since I first started messing about with web stuff in 2004. These days I prefer php-fpm and nginx to serve the pages and if a database is needed I was using mysql but this being the first server I’ve set up from scratch since mysql became an Oracle technology I’ve decided to switch to mariadb as it’s pretty much a drop in replacement and is not controlled by Oracle.

In terms of OS I tend to use either Debian or Ubuntu. I prefer Debian because it’s changes a bit less frequently. In the examples below I use Debian 8.

On to the setup.

I’ll assume you either know how to install the OS or like me have used a virtual server image to get started.

I start by logging in as root. It’s often considered bad practice to log on as root however I disagree as whenever I log in to the server it’s to perform some maintenance so I will need root level permissions. I would agree that it is bad practice of you are doing anything but managing the system though.

Having logged in, I like to have the command prompt reflect the name of the server I’m logged into. Therefore I edit the /etc/hostname file to contain my hostname. This is sometimes done during OS install but is often not done when installing from an image. I also edit the /etc/hosts file to reflect my hostname and fully qualified domain name. A hosts file typically looks like this (where <hostname> is your machines hostname):

127.0.0.1 localhost
127.0.1.1 <hostname>

# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Now those who have some understanding of networking may wonder why the second line is set for the hostname and why it isn’t simply combined with the first line. Having wondered this myself I read some debian docs which explain that it is basically a workaround for some bugs in some software such as gnome. It only applies if you don’t have a static IP. In my case I do have a static IP so my hosts file looks a bit like this:

127.0.0.1 localhost
<my.static.ip> <hostname> <hostname.fqdn.com>

# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

I of course put my own values in for <my.static.ip>, <hostname> and <hostname.fqdn.com>.

Then I ensure the packages installed on the system are up to date by running:

apt-get update
apt-get dist-upgrade -y

Having set up my hosts file and updated to the latest packages I typically reboot, although it isn’t really necessary.

I then move on to configure email sending from the system using nullmailer and an smtp service like Send Grid who offer a free account.

I create a new API key for the server by signing in to my SendGrid account and using their interface to create the key. It’s important to save the generated API key somewhere as you can’t retrieve it again from SendGrid. That done I’m ready to configure the server and so I install nullmailer by running the following:

apt-get install nullmailer

Then when the installation prompts for smarthosts I enter into the provided box (substituting <my-api-key> for the API key I got from SendGrid earlier):

smtp.sendgrid.com smtp --port=587 --user=apikey --pass=<my-api-key>

This should be sufficient to get nullmailer to send emails out from your system via sendgrid. At this point I also add a line to the /etc/crontab so that you get an email sent every time the server boots up. That way you’ll get an email if the server reboots unexpectedly.

Please Note. This article is a work in progress and I will be adding further steps at a later time. For now I have some notes for myself that I will be working from:

add root:email@address.com to /etc/aliases
call newaliases

configure nullmailer

add '@reboot root echo "server.name booted at $(date)"' to /etc/crontab

apt-get install mariadb-server nginx git

apt-get install screen

echo "set mouse-=a" > ~/.vimrc

echo "[client]" > ~/.my.cnf
echo "user     = root" >> ~/.my.cnf
echo "host     = localhost" >> ~/.my.cnf
echo "password = #########" >> ~/.my.cnf
echo "socket   = /var/run/mysqld/mysqld.sock" >> ~/.my.cnf