A rare item

It isn’t often that I see a thing like this in this country, and so when I found it at a car boot sale, I couldn’t resist picking it up, working or not. Needless to say it didn’t, and much fettling was involved to get it to the point of even remotely being able to see it operational. This is at least some of that story.

One Super Mario World game watch (not to be confused with the Nintendo Game & Watch, which I also own an example of), made by Zeon under license from Nintendo. Screen cracked slightly, wrist band chewed a little, no doubt by some eager canine or child. As I said before, it was found in a non working state, but I figured at the price asked (R25) I wasnt going to leave it behind. And so it was brought onto the geek bench and gingerly operated upon until it lay seperated into as many single parts as I was willing or able to endure.

So I first had to make sure I wasnt trying to fix a real dud. 1,5 v was applied to the power pins and sure enough, it sprang to life. With that confirmed, I proceeded to clean the thing. There was a lot of corrosion of the battery terminals.

I also cleaned up all the corrosion in the body and all the carbon buildup in the button sections of the board. The pictures do it no justice, but it is very small inside. Its clear that someone had done a repair job on this before.

As I didn’t want to redo that work and didn’t see the need to, it was left as is, I might have to go back and tidy up later. As the battery in the device was completely dead, another had to be sourced. It did take a while to find and purchase the A390 cell, but once it was acquired, I closed it all up and marvelled at my new toy.

There are, however, some remaining issues:

The strap will require replacement, it is barely functional and just barely fits me anyway.

More troubling is the fact that the down and left buttons seem to cause either a screen issue or a power drain problem as the screen goes completely blank when you push them, The down button is worse, and hence my thoughts on power drain, as a lengthy push on that causes a device reset 😵😡 .

The screen glass on the cover is also cracked. Unfortunately its not that easy to replace as there is a game specific edge bonded to it and at a casual glance it doesn’t appear easy to separate the two without doing damage.

Mostly due to the fact that the down and left buttons cause issues, I cannot completely play the game so I cant tell you how good it is. I am hoping to resolve the problems in due course.

Well thats it for the time being. See you later.


Prusa i3 problems, a story of madness

So in the last month or so, I have been experiencing feed problems on my RepRap Prusa I3. At first tops didn’t fill in correctly, then I started to notice wall issues and eventually large prints would not complete and every second print had to be restarted because the filament just chewed up.

It became incredibly frustrating to print anything. I assumed (incorrectly) that the problem lay with the new version of Mattercontrol (the software I used to use for slicing). Initially I thought it was the built in slicer, so I switched to their implementation of Cura. This helped initially in terms of finish, especially when I moved from 0.4mm layers to 0.1mm layers. But it wasn’t a week again until even that didn’t work nicely anymore. Switching to Cura itself did nothing to resolve the issue. Madness set in and I kept playing with settings, but with no improvement.

I did some research, and did find that their may be an issue with the hobbed bolt that the Gregs Wade extruder uses on this machine. Honestly though, I ignored that. I mean, come on, its been working all this time, why now all of a sudden. I kept playing with feed settings, new filament, but yes, eventually it sank in. I pulled the bolt form the extruder and found that inside the carved channel some of the ridges had bent because they were so thin.

My only conclusion is that over time they wear down. Strange considering you’re feeding plastic and its supposed to be a hardened M8 bolt. So I searched for a quick resolution. YouTube abounds with quick fixes using a tap mounted to a drill. Most looked kind fo dodgey, but hey it was worth a bash. I ran out to the workshop with gay abandon, fumbled a rig together in the vise and churned a new hobbing into the place where the current one was. The idea is to just deepen the “teeth” and so get a better feed.

YA RIGHT!!! Honestly this MIGHT work if you use the same tap that was used when it was first made, and its not going to work if you don’t have the right tap on hand. I didn’t. Not realising this, I brought the bolt back to its old home and again failed to print successfully. Bummer!! So I looked online for a replacement bolt. Another one would cost me 5X what a normal bolt would in the hardware store. Ok, so maybe its done properly and the issues would go away. But shipping is double the price of the bolt. Bugger that, I wont pay R150 for a R10 bolt unless I REALLY need to.

And so, the plan was hatched. Missery wasn’t going ot be my friend and my life wouldn’t be empty of 3D printing sweetness. After much thought on how to accomplish this, and many hours of real life and work, the plan was boldly implemented one Sunday morning.So looking at the bolt, I could see that many, many washers were used on either side to space the gear in such a way that the current hobbing was inline with the hotend hole.

A quick note before continuing, I wish I had taken pictures of all of this. The thought only occurred ot me after I had completed the rig to help me, and so those are the only images you will get here. Sorry. It is what it is.

Looking at those spacers, I thought I could just move those around and get free unhobbed space where I could start a fresh on the same bolt. I took a few hours to cut and massage some aluminium channel and plate. The channel was drilled to accommodate the bolt in a similar fashion as it works on the extruder, exposing the area I wanted to hob. This was then mounted to some wood, and I built a mount for my cheap Chinese knock off  rotary tool. This took some fettling but I eventually got something that I could hinge on the side of the wood. And so with bolt in the jig, and the rotary tool mounted with a cutting disc, I forged into new territory and cut line after line of tooth into the fresh unhobbed steel.

Channel piece for bolt
Mount for rotary tool
Tool mounted and ready for work
Good and bad parts

5 minutes later I was admiring the job and wondering if it was going to work. In it went and I set a few small prints off. The difference was remarkable. From poorly filled and walled prints, to nice even and closed prints with no feed problems in a Sunday morning. Needless to say I was very pleasantly surprised.

So what are my thoughts at this point? If the hobbed bolt is so prone to failure, then surely there must be a better feed design. Surely even doubling up on the bolt count should help the situation. I will be thinking long an hard on an alternative. Another thought was that I wish I had taken other possible causes into account early on. This would have brought me to the solution quicker. At least I now have a way of creating as many new bolts as I want without the cost. I am sure the jig will come in handy again.

A slight footnote here. While I was working on the bolt in the extruder, I noticed that the x-carriage had broken where one of the bearings resides, with that now sort of floating free. So while I have improved print-fu and the bearing is hacked into place, a new x-carriage is being printed.

Hope you enjoyed my tale of woe. Caio.

Model train lighting Part 3

Greetings again.

In the last post I discussed the circuit used in the model train lighting. Today well look at board layout.


Above is a completed board with the CR2477 battery, MSP430, resistors and tilt sensor wired in. This all went into a nice neat little box I designed for this project which can be found here. I used a socket for the mcu because I would like the ability to reprogram, reuse or replace it at will. Both the RESET and LED resistors were wire under the socket to save space on the board, While I didn’t need to do that for this board layout, I might want to modify the board at some point in the future.

I put the tilt sensor on a board of its own, with solid wires running into the main board. This gave me  the required horizontal alignment, but also allowed me to fine tune the angle by being able to twist the whole board ever so slightly. The original design called for two tilt sensors, but I found that I didn’t need the second one. I removed it in the code, but you could just as well keep it and bridge it or attach it to some other sort of normally closed sensor. I wired the LEDs up in parallel, an to be honest was probably a bit too arty when I did it.

I don’t have an image, but these were then glued into the roof of the unit with some tinfoil backing to provide some reflective. The wires were glued off to one side and fed through two small holes drilled in the base of the coach. They were then cut to length and glued into position and then soldered onto the board. If you look at the first image, you an just see the white wire glue into the base behind a very small wall. This way none of the wiring can be seen.

Below is a time lapse video of the test. To be honest it works exactly as I wanted it to.


Now to the lessons learnt.

  1. I need to add a switch between battery and board for longer storage times when I wont be operating the units.
  2. The units I have built so far seem to turn off the lights at slightly different times, even though the code is EXACTLY the same. I can only assume that its dependent on things like temperature, voltage, and differences between individual packages. To fix this, the design might need to include a more accurate oscillator.

Well that’s it, thanks for checking this set of posts out.


Model train lighting Part 2

Hello again and welcome to this second installment on this topic.

The last post here, dealt with the basic design and code for the MCU. Today is all about the circuit. Firstly the ability of the MSP430 to source current form a port is a little complex. It can sink a total of 48 ma over all pins in a port, but a maximum of 20 ma per pin in a port. Additionally this MCU is a push pull type where a voltage drop happens when you increase the current draw on a pin. Thankfully none of that matters here as the LED’s are quite stable and are current limited by a resistor. The point we can make here is that on the 2 port chips like the 2553, we have many open pins to run additional current sinks off. The code in the previous post can be expanded to incorporate all sorts of other cool stuff.

Lighting layout

Now on to the circuit. Its actually very simple. Battery positive attached to chip pin1, and ground to pin 20. S1 is attached to pin 6 (P1.4) and S2 is attached to pin 7 (P1.5). They are both in turn connected to ground. The LED feed is pin 4 (P1.2), and feeds a resistor (in my case I used a 100 ohm 1/4 watt, and 4 X 5mm white LED’s, who are in turn connected to ground.

MSP430 pinout

The MCU is capable of running on between 3.6v and 1.8v. To handle odd behavior you should be using a low dropout circuit to stop the source from dropping below 1.8v, however in this setup its not mission critical and you’ll just notice flicker in the cabin.

On the point of power, I would have loved to used a 3.7v Lion cell but those things are just too heavy. My next choice was to use a CR2032, which I ordered for this project, however I realized that in standby it would only provide me 18 days and 3.5 days with LED’s on. Not an option when those little suckers are not rechargeable. In its place Ill use 2xAAA rechargeable cells. HA!!! I found an even better source of power. Seems that those coin cells are varied, even more so than I had thought.


Everyone knows the CR2032, and more than likely the LR44, however there is a nice little hidden gem in the CR2477. Firstly, its 24mm in radius, and 7.7 mm high, but this little guy has 1000mah capacity. NOW WE’RE TALKING!! This is perfect. It will fit nicely in the space provided. Ok, so they are not rechargeable, but they certainly will do the job.

Another point of note, and to be honest I found this out during assembly of the test board, is don’t forget the 100k resistor between RST pin and Vcc. She just wont run right if ye dont.

Next item on the list are the tilt/vibration sensors. I settled on these little guys from Assemtech.








With a little fine tuning they should do the job nicely. The only issue is that I have to mount them on their sides, but a solid wire extension per pin should work well.

So, all thats left is to wire in the LED’s, and not forgetting the current limiting resistor, that’s about the last of it. See you on the next post.


Model train lighting.


This post is going to be the first in a multi-part post on adding custom lighting to some model train coaches.

First some background. I am currently setting up an H0 scale layout modeled on South Africa. One of the reasons for this is that I have a few of my old Lima Trans Karoo coaches from when I was young. As they are the junior version they are pretty sparse. No interiors, no glass, very basic indeed.

I bought some extra, including a baggage wagon that I had never personally owned, and wanted to make them a little better. I added some 3D interiors, which I will do a post on later, people, “glass”, and finally some lighting. Being that these units have plastic wheels, it would be impossible to run pickups from the rails for power, and I didnt want to go through the pain and cost of finding metal ones that would work.

I wanted a system that would light the moment the train starts, but would continue to burn for a short while after the train stops so that they would stay lit in stations etc. Clearly some sort of triggered timer circuit was in order, but I also wanted to be able to add customization after the fact if I could. The obvious choice was a cheap MCU, and as I have been playing with the Texas Instruments MSP430’s, it was an easy choice.

The next part was to figure out how to trigger once moving. After a couple of days on this, I settled on using a kind of vibration sensor as this would allow me to run a setup clear of track voltage. This could be a self contained system that would require battery changes every so often. For vibration sensors, I decided to use non mercury tilt switches because most of them use a little metal ball in a channel that shorts out 2 or more pins depending on their tilt. If I set the angles correctly, the slightest movement in one direction would set the ball (through inertia) onto or off their pins and so create a trigger effect.

Now I could start working on code for the MCU. It must be said here that, while I am aware that button or trigger events should be written as an interrupt and not polled in the MCU world, what I found was that when the system runs the LED’s, it draws more power in a short period of time than is saved by interrupting. It was simple to get the code to run the way I wanted in a poll situation and meant I could add as many triggers as I wanted without too much additional code. In “standby” mode, the MCU is drawing 0.47 ma anyway. On a set of 900 mah AAA cells, I would get 79 days in full standby. Interrupt code gave me no better than 0.37 ma and would result in full standby of 100 days. The figures make no difference when running with LED’s on as the draw is 2.7 ma regardless of interrupt usage.

With that out of the way, here is the code, currently running on an MSP430G2553.

Code was done in code composer studio. Test areas have been left in and commented. I have added comments inline for clarity, and will supply the code in a file attached at the end.

#include <msp430.h>

Setup the variables

//volatile unsigned int mvg; // For Test
volatile unsigned int cartrg;
volatile unsigned int offcnt;
volatile unsigned int offtrg;
volatile unsigned int stillon;

Rough estimation of time

//Static assignments
unsigned int seconds = 60;
unsigned int secsplit = 25713;

* main.c
int main(void) {
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer

// Set P1.2 for LED output
// Set P1.4 for vibration sensor1
// Set P1.5 for vibration sensor2

// Set P1.6 – LED1 for test mode – moving signal
// Set P1.0 – LED2 for test mode – not moving signal

//P1DIR |= (BIT0 | BIT6 | BIT2); // Set out at P1.0 1.6 1.2 – For Test

Using P1.2 as the LED pin. All LED’s that need to be light are powered from here. I currently use 4 LED’s and they do not overtax the amp rating of the pin.
P1DIR |= BIT2;
//P1OUT &= ~BIT6; // Switch LED at P1.6 off – For Test
P1OUT &= ~BIT2; // Switch LED at P1.2 off

Set the resistor networks at P1.4 and P1.5 on. Some of this code is useless as it is for interrupts, but it works as is so well leave it.

P1REN |= BIT4;
P1OUT |= BIT4;
P1IES |= BIT4;

P1REN |= BIT5;
P1OUT |= BIT5;
P1IES |= BIT5;

Set P1.3 P1.4 P1.5 as inputs for the vibration sensors. I kept P1.3 in as it allows us to use the dev boards button as a trigger as well.

P1IN |= (BIT3 | BIT4 | BIT5); // Set in direction at P1.3 1.4 1.5
//mvg = 0; // Set moving off – For Test
cartrg = 0;

for (;;)

// Main cycle

Here I poll the input for P1.4 and P1.5

if ((P1IN & BIT4) | (P1IN & BIT5))

If either (the | is or) triggers off (circuit open) – thats the reason we use pullup and a resistor network to hold the line high.

//mvg = 1; // For Test

This is a flag for the LED test later. In this case, cartrg is 1 which means turn on LED’s

cartrg = 1;

These reset the offtrg and offcnt so that the counter never gets above the turn off value. In other words, when the ports trigger, they reset the 1 minute counter, and the counter is always working to turn off the LED’s

offtrg = 0;
offcnt = 0;

else {

//mvg = 0; // For Test

Here the flag is 0 and so tells the LED test to begin the count down to turn off the LED’s
cartrg = 0;


// For Test
//if (mvg == 1) // Is movement detected
//P1OUT |= BIT6; // P1.6 – Test signal green on
//P1OUT &= ~BIT0; // P1.0 – Test signal red off
//cartrg = 1;
//else {
//P1OUT |= BIT0; // P1.0 – Test signal red on
//P1OUT &= ~BIT6; // P1.6 – Test signal green off
//cartrg = 0;

If the flag is set

if (cartrg == 1 )

and the LED’s are off

if (stillon == 0)

Switch them on

P1OUT |= BIT2; // Switch P1.2 – main lights on
stillon = 1;


else {

If they are on
if (stillon == 1)

increment counter

offcnt ++;
if (offcnt >= secsplit) // count the number of seconds

Count up the seconds

offcnt = 0;
if (offtrg >= seconds)

if the offtrg is larger than the amount of seconds, then turn off the lights

stillon = 0;
P1OUT &= ~BIT2; // Switch P1.2 – main lights off


As promised, here is the file: Lima-Light-Timer.


SHORT HACK – The Powerbank Torch


I recently received this cylindrical powerbank as a gift. Now, I have a few, and so I initially pondered another use for its battery. For some time, I had been eyeing the 3.7 LiPo cell I had pulled from another powerbank that would heat up to the point of searing flesh during discharge. I had wanted so see what could be causing it, but was non the wiser after the dis-assembly, and was only left with parts. Seems I had thrown this cell away, and probably rightly so as it was most likely the cause of the overheating. Continue reading “SHORT HACK – The Powerbank Torch”