Category Archives: Computers

Ports of The Dalek

I’ve decided on what interfaces the Pi-Dalek will mounted on the rear of the case.

  • USB-B socket to accept power for chrging the internal battery (a mobile phone emergency charger. Internally the socket offers a USB-A socket which is connected to the Pi with a short USB-A-to-microUSB-B cable, then the emergency charger, then another short USB-A-to-microUSB-B cable.
  • USB-A socket for memory sticks etc. Connected to the UTG socket with a short UTG cable.
  • HDMI socket. Connected to the miniHDMI socket on the Pi with a short adapter cable.

These will be mounted on the arse-end of the Dalek.  Two on the 3rd row up of the Dalek-bumps on the rear panel (both USB ports), with the HDMI socket on one of the rear flank quarters (3rd row up).

Ideally I’d like them all on the back, but the bumps on row 1 are blocked by the motor housing, while rows 2 and 4 have far too many structual bits behind it.

This still leaves me with the issue of mounting the camera. While I’d love to have the camera mounted to the eyestalk, this is impractical.  Mainly as the eyestalk is missing, but also because the camera module is a huge square blob that wouldn’t look right.

The best I can hope is to mount the camera on the Glacis, between the Whisk and Plunger, just above the top of the skirt. It will still mean that some cutting will have to be done, but it will probably not look as awful.

I’ve also decided that instead of mounting the Pi and Motozero directly to the base chassis, I’ll mount them upside down hanging from the internal ceiling at the top of the skirt. This shortens the distance to where I want the camera to be, and means only 6 wires need to be run down to the base (motor power +/-, motor left +/- and motor right +/-). Everything else will be skirt mounted. So the 40pin GPIO header connection twixt Pi and Motozero forms the split in the arrangement.

A sort of split between the head and body, if you want to make up some sort of analogy up.

I’m sure there’ll be some photos of it when its done.

 

Installing Raspbian on a Pi-zero W

There is so simple way to do this. I’ve tried several times and failed each time. So here is my idea to make things easy.

    1. Download your prefered Raspbian Jessie version from https://www.raspberrypi.org/downloads/raspbian/ be it Lite or with Pixel.
    2. Get and install Etcher, and use that to burn your image to the microSD card.
    3. Remount the SD card and create a file on it called “ssh”.  Create another file called “wpa_supplicant.conf” with contains:
      update_config=1
      ctrl_interface=/var/run/wpa_supplicant
      
      network={
               scan_ssid=1
               ssid="yournetworkname"
               psk="yourpassword"
      }
      
    4. This should enable you to boot the Zero-W. It should then get an an address for your LAN via DHCP. All you have to do is check you router, or use Fing (or something like it ) to find it.

IT DOESN’T WORK!

Ah. Do you have another Pi with a wired connection somewhere about the place? Good.

Pop your microSD card from your new Pi-zero into an adapter and boot your other Pi (in my case one of my KODI boxes) and boot it.

Find the machine on your network and login (“pi” and “root” have the password “raspberry”).

As root, run

apt-get update
apt-get upgrade

And, while you have a wired connection, install Apache2 and PHP5.

apt-get install apache2
apt-get install php5

Set your new hostname in /etc/hostname now, so you’ll ne able to identify it later.

After thats done, shut it down, pop the card into the Pi-Zero W, and it should come up and appear on your network.

From Fing or your hub you should be able to get the MAC address and add the to your DHCP.

And it should all work.

Additional note concerning #3 above. If you are planning to use it on more that one WiFi network (example: I use my home network, and also the hotspot on my phone if I’m working on it anywhere but at home), your wpa_supplicant.conf file can contain multiple network entries.  Thusly:

update_config=1
ctrl_interface=/var/run/wpa_supplicant

network={
         scan_ssid=1
         ssid="yournetworkname"
         psk="yourpassword"
}
network={
         scan_ssid=1
         ssid="yourhotspotnetworkname"
         psk="yourhotspotpassword"
}

Put the entries in order of preference.

Resurrection of the Dalek

At last I can paraphrase a Doctor Who serial title again.

This time I’m going to be using a Raspberry Pi-Zero W with MotoZero control board. Gone are the attempts at bashing by own circuitry (which are already in the Model Railway control system anyway), and this time IT WILL WORK!

So, the ingredients for *this* incarnation of the Dalek are:

For now I’ll forego the distance sensors, as I’ve already bashed them into a sort of thermin idea.

Anyway, the key stages for this project are:

To make things easier to track, the new Category Pi-Dalek has been created.

 

Windows XP – Three Years Dead

Windows XP has now been officially dead for 3 years now. Yes it really has been that long since Microsoft cut off support for the wheezing old grampus. Has the lack of support really changed anything though?

Well, for me at least, no. I still use my aging WinXP machine every day. It may be an aging laptop (DELL Latitude X300) with a wonky screen, iffy keyboard and unreliable battery, but having long ago been re-purposed as a desktop (new screen, keyboard and mouse – total cost £35), it is still working remarkably well. Sure, I don’t play games on it (except a hooky version of WoW on my testing server – but shush about that), but nothing else has changed.

The machine itself is nearly 14 years old, which in today’s fast paced computing terms puts it about on the same level as a car built in the 1950s. And like a certain vehicle made in the 1950s, these buggers were made to last (Land Rover Series I, if you wondered).

Like an elderly car, you can’t expect miracles with a 14 year old laptop running a 15 year old operating system. You aren’t going to set any speed records, or impress anyone, but if you know your limits, you’ll be ok.

I still regard computers mainly as tools, so I enshew the bells and whistles and shiny things that attract idiots. I hated Tablets until I was given one, but thats another story.

So for the tools I use: Context, PuTTY, VB6, PhotoShop CS2, Filezilla, the Arduino IDE, OpenOffice, TightVNC and Firefox, everything works fine.

But surely, you ask, don’t you have problems with viruses? Well, in a word, no. Because I’m not an idiot.

 

Gilneas – The City That Blizzard Forgot

Back in the long long ago, the before time (ok, December 2010), Blizzard released World of Warcraft: Cataclysm, and everyone got all excited as they usually do. Then people got upset that their favourite race/class got downpowered, then they became happy that they could fly in the old lands for the first time, and that kept them busy for a while.

Alliance fanboys played rolled up Worgen characters and played their way through the new dedicated starting area.  They were amazed to see an amazing cod Victorian-Gothic land with some fantastic architecture and landscape, and of course, big fucking werewolves.

From the brooding darkness of Gilneas City, to the grandeur of Greymane Manor, the Gilneas starting zone is wonderful. It is a series of well thought out quest chains, stunning cutscenes, and… well then it ends. The character getting shuffled off to Rut’theran Village on Teldrassil, and Gilneas is never spoken of again.

Unlike the Goblin (and later Pandaren) starting areas, which are off on separate islands that can’t be returned to, Gilneas is on the Eastern Kingdoms mainland. You can go back there, but it most will have no reason to. There are no quests, no NPCs, no… anything, except a stunning and forgotten zone.

This makes is idea for roleplaying in, and, if you are in to such things, modifying to add quests and NPCs (but that is a subject for another day).

So… onward…

Get to Gilneas!

Well, to put it bluntly, one does not simply fly in to Gilneas.

Horde characters have a flightpoint at The Forsaken Front in Silverpine Forest, which is just north of the wall. (You might be lucky enough to have the Forsaken Forward Command flightpoint in Gilneas itself, but its not guaranteed).

The closest that Alliance players have to offer is Chillwind Camp in the Western Plaguelands, which is a long flight/run over/though Hillsbrad away.

Because of this faffery, if I were to be modding Cata WoW to add new content in Gilneas, I’d make it suitable for Level 60, as by that level the characters can fly in to it. Or, I’d make portals to get there. But I’m clearly not doing that as it is Against The Rules.

No matter how you get there, get there if you can.

Gilneas City

For now I’m just going to look at Gilneas City itself. The surrounding zone is the subject of another time.

So I suppose we should start with a map.

WorldMap-GilneasCity

The city, as you can see, is roughly circular and split in to five areas, which I’ll look at in turn, highlighting all the usable buildings and other features of note.

Merchant Square

WorldMap-GilneasCity-Merchant-Square

  • 1-10 denote open doors leading to small single room areas, large enough to hold maybe one NPC and some clutter.
  • 11 is a small graveyard.
  • 12 is the ruined market square.

If I were doing anything here, I’d put traders in the buildings and the square, and maybe a mourner at the graveyard.

Military District

WorldMap-GilneasCity-Military-District

  • 1  leads to a cellar full of cannons and cannonballs.
  • 2 and 3 lead to stair up and over the the roof, connecting to each other.

Greymane Court

WorldMap-GilneasCity-Graymane-Court

  • 1 leads to a tunnel that exits out in the main zone.
  • 2 & 3 are entrances to a small inn like building with a bedroom upstairs.

Cathedral Quarter

WorldMap-GilneasCity-Cathedral-Quarter

This area is a bit dull. There are no buildings to enter, just two large areas full of tents with Alliance banners by them.

Light’s Dawn Cathedral

WorldMap-GilneasCity-Cathedral

The Cathedral is just one large room. Maybe you could stage a rock festival in here, or even a wedding.

The End

So there’s your quick tour of Gilneas City. I’m sorry there are no actual screen shots, but if you want to see it go visit it yourself.

 

 

 

 

Model Railway Arduino Signals – Design

As previously explained, I’m working on the use of an Arduino and an old laptop to control the points on my very small N Gauge model railway. Well, I’m also going to control the signals too.

Working on this track plan:

Simplified Garwick Track Plan

I consulted my tame signalling engineer (some say that he once completly ruined the brakes on my MG Montego, and that he spends his spare time writing cod-1950s hard-boiled detective story versions of his work, but all we know is that he’s called The Sig), explaining to him that all the lines were bi-directional. He put on his thinking-trilby, sharpened his crayons, and came up with this idea:

timmy2

(Only the signals inside the box are to be modelled. The ones outside it are off-scene, and therefore just implied to be there and functioning.)

So, 6 signals. As I only had six remaining outputs left on the Arduino, I decided on 2-Aspect light signals.

And, lo, these were on eBay:

z0a

Six of them for £19 incl shipping, actually from http://hezhiqing.com/NSIGNAL.html (yeah, it says 5 on the website, but all the eBay listings show 6 of them).

Nominally they run off 12v but are plenty bright enough with 5v from an Arduino supplied to them. Plus, if you tie the Green line to 5v and the Black to GND, putting 5v up the Red line from the Arduino will switch the signal from green to red. This is counter-intuitive to me, as surely the signals should fail-to-Red, not fail-to-Green?

No, matter, it still make the wiring easier.

sigwires

Eagle-eyes will spot the the lights are the wrong way up.  Ah, well, it’s too late now.

Next… build up the control board for one pair of points, and one signal as a test.

 

Model Railway Arduino Point Control – Design

As stated elsewhere, I’ve mothballed the Arduino Dalek Project, and started to cannibalize bits for a new project: Arduino control of the turnout points on an N Gauge model railway layout.

For a start, heres some information about the point motors I’m using: The PECO PL-11 side mounted motors, which attach to the side of the points, like this:

PECO PL-11 (© PECO Publications)
PECO PL-11 (© PECO Publications)

These motors operate on 16v AC and require only (and indeed cannot tolerate more than) momentary current, and are currently controlled from “passing contact switches” drawing power from a Capacitor Discharge Unit.

There are currently 6 turnouts/points, arranged in pairs as below. As it would be reckless (and in real life impossible, due to interlocking) to operate either of the pair independently, I’ve decided to activate them together.

points1Thus, at all times both A and B will either both lead straight ahead, of both lead off to the left (for sets C&D and E&F it will be right not left).

As the Arduino can only throw out 5v DC, each pair of motors will need to be driven via a 5v DPDT replay. But, as we can’t leave the current on without melting the motors, each pair will actually need two relays (one for each direction of change), driven independently from different output pins. Another complication is that the relays will have to energised and then de-energised within a specific time-frame to avoid motor damage, but this is a programming issue to be dealt with later.

PL-11-CDU-Relay WiringThe above diagram shows only the 16vAC side of the wiring. The Arduino 5vDC is shown below.

Arduino-Relay Wiring

Obviously I could have chosen to just use SPDT relays, and connect the outputs together, but due to the vagaries of how the motors work and the orientation and placement of them on the layout, I thought it was safer to design and wire it this way at the outset, rather than back-fix it later when it went wrong. Plus, I had all the wiring in place, so thought I might as well use it.

Note the lack of common Ground between the two halves of the circuit. Grounding AC and DC together isn’t a good idea. Just say no.

Anyway, here is all is again on one convenient image.

Arduino-Relay-PL-11 Wiring
Click to embiggen

So now the next stage to to take that abstract squiggle and build it as a circuit.

Note – for myself, mainly: Each “pair” takes up 2 outputs, so for the three pairs of points we need 6 lines from the Arduino, out of a total of 12 (not 14, as I’d rather not use the 0 and 1 lines (RX & TX) as this could cause issues with data transfers activating the relays – something that the Dalek had problems with at first.

To be continued… with a start on Signalling!

Death to the Arduino Dalek

Here I go again, repurposing shit. In this case it is both a Doctor Who episode title and some  electronic bits.

The Arduino Dalek/Raspberry Dalek project has been on hold for some time (obviously), due to me not being arsed to sort out a niggling wiring problem that only allowed one of the motors to run in one direction.  That and the camera melting itself into slag. That didn’t help.

Anyway, today it suffered a major setback when the Arduino and relays got removed for use in another project.

But Daleks never say die, so it might come back later.

The gubbins are being reassigned to Project Railway, and will act as the point motor control system, once I’ve worked the circuit design out.