Skip to content

Stiga SD 98 ride-on lawnmower repair and mod

September 19, 2020

(Also includes how to seriously mess something up creating even bigger repair needs)

When we bought our property we also purchased a lot of the equipment the previous owner had acquired. An integral part of that is the lawnmower tractor – total size is close to two acres and most of that is covered with grass. It’s a Hurricane HTG 98 SD, which is a model also sold under many other brands. In Sweden the most known one would probably be Stiga SD 98, but in the UK it’s likely an MTD. It has a Briggs & Stratton 17.5HP engine and does a pretty good job, we use it also to transport things around, collect leaves and tidy up the driveway gravel.

A week ago it suddenly wouldn’t start. It’s been a bit finicky since we got it, but no matter what I tried it simply didn’t even engage the starter. This points to an electrical issue, right up my alley. Or so you would think. I have degrees in Mechanical Engineering and Software Engineering, but all the electronics stuff I blog about is all self taught.

I also looked forward to tearing it down. Like other ride-ons, it has a safety switch where the engine cuts out immediately when it doesn’t detect a driver in the seat. This is all good and well, I really understand why, but when you have a huge lawn there’s just no way you can walk around in preparation for mowing, getting rid of all small rocks, large twigs and the constantly falling pears and apples now during the autumn. I really need to be able to keep it running while quickly moving things out of the way.

Since I had a hunch that the reason it didn’t start was another one of the safety switches, I stripped it down and started to search for both where they originated, and where the mower made the decision to whether it was safe to engage the engine or not. Also, to figure out which one it was that was currently not enabling.

From experience, I knew that there were at least three safety signals that are all needed for the mower to start: Driver in the seat, gearbox in neutral and cutting blades not engaged.

I decided to work backwards. This component is found next to the starter. Red is always 12V, the starter gets GND from a place not pictured, and I figured the two white cables would go to 12V when the key was turned to ignition. They never were. However, I could clearly hear a clicking sound as the key was turned to pre-ignition, so next my attention was turned to what that could be. (This component, btw, is a rectifier. It supplies DC power from the AC power generated by the engine, used to charge the battery. I was way off on its purpose there).

This is a breakout coming from the ignition key. White is 12V when the key is turned to ignition, red and brown are powered when the key is switched to pre-ignition. My model doesn’t have front lights, but from that I learned I can add them as a future mod. In the background you can see the solenoid, which is the component that does the clicking. It’s a relay, taking 12V directly from the battery with a high capacity cable, allowing current to pass through when the purple wire is powered (black is GND).

And, indeed, the purple wire never went to VCC when the ignition key was turned. Since I had already seen that the white wire from the breakout did, I manually connected these together and verified that the starter engaged and the engine came to life. I now definitely knew that the issue was somewhere in when “white went purple”, which most likely was where the safety signals converged as well.

What do you know, that looks interesting. Beneath the steering wheel is a little black box with electronics. Opening it up, we can see some familiar colours:

Red and blue in opposite corners are VCC. The larger gauge purple (yes, they are different) goes to the solenoid, the smaller gauge purple is a combination of the gear box signal and the driver seat signal. Blue’s ignition key and grey comes from the cutting blades engager. Maybe I also mixed them up when trying to remember – sorry. The two takeaways for my purposes is that I could measure these and see that the problem was with the push button enabling the cutting blades and also that I only had a combined signal for two of the safety conditions. And there’s no way I would want to mod the tractor so that it could be started while in gear.

I removed the button, separated the connectors below, cleaned out any corrosion with electronics cleaning spray and put it back together. Now it was time to get to work on that driver’s seat safety switch I had in mind. I wanted to hide (we have kids) a little toggle switch somewhere so I could selectively have the function enabled or not. Interestingly, when searching for if someone had done this before, I only found videos from other tractors where this wire was easily spotted underneath the seat – but that isn’t the case here. It turns out, the detection is done underneath the bodywork, where the springs attach to the frame.

Alright, there’s the connector. VCC on one wire, and when the driver is seated it simply connects them together. Wiring up a switch here is easy, connect in parallell and short them together for the override function.

Uh oh.

That’s … not good. That’s the main drive belt from the engine to the gearbox. Somehow I had managed to catch this just in time before it broke completely – and with everything torn down already! I stopped thinking about the override switch and went to order a replacement belt.

*a few days later*

Ok. So, I had already changed the cutting deck belt some weeks earlier, so how hard could it be? The belt simply wraps around some pulleys and then …

… hmm. It needs to get to that top pulley. And there’s something in the way of that, so it seems I would need to move the lower pulley and that other thing out of the way first.

That ‘other thing’ is a PTO brake, I learned. When engaged it magnetically engages a brake on the drive shaft. Good stuff. I watched some more youtube videos and all I had to do was to remove the nut and it and the pulleys should slide down. Well, yeah. In the ideal world of Youtube. No matter how hard I pulled, even with careful use of a lever (so as not to bend the shaft) they were completely stuck.

This is where I would go down the wrong rabbit hole and seriously start messing things up. I blame lack of sleep, overwork, having three small kids and the phase of the moon.

It seemed possible to attack the shaft from the other end, so I opened up the engine cover and pulled the nut from the flywheel. My thinking here was that if I removed the flywheel, somehow that would aid me in just moving the shaft the centimeter or so needed to thread the drive belt around the guides. But just as the pulleys, the flywheel didn’t budge. And so I turned my attention to four screws on the side of the flywheel. Now, I’m of the mindset that most things you disassemble you can put together again, so I didn’t spend any time thinking about what they could be for – just that they might be the ones stopping my progress. One of the bolts came out easily, but the next three just immediately sheared. So I started drilling them out, which worked well for one of them but not the other.

At this point, I did notice that when I turned the flywheel, there was a noise I hadn’t heard before. Also, I started thinking about my knowledge of, and lack of knowledge of, flywheels.

I decided the stop messing with the flywheel, and instead see if there might be some youtube videos showing me how to pull pulleys. I had searched for how to replace a drive belt, of course, but none of them had this PTO brake and they all had it easy where they could just slide the belt either over the lower pulley, or their models had engine mounts that could be moved back and forth.

Some better search terminology and off to the hardware store to buy a three-armed puller. It took all of five minutes to then get the pulleys and PTO brake off. I had spent the better part of a day on this problem already, so I was filled with joy. Another five minutes and the belt was in place. Some quick connections and the battery temporarily in place and it was time to start the engine. I wasn’t too bothered with the two bolts I had removed from the flywheel, it seemed securely in place and I had also bought replacement bolts I could put back.

The starter engaged and I heard a big clonking sound and that was it. The positives: I had fixed the original problem, and I had a new drive belt. The negatives: The engine was dead.

Now I decided to freshen up my knowledge of flywheels. My teenage years as a souped-up thirteen-horsepower-moped gangsta all came back to me and I realized I had most likely loosened magnets on the inside of the flywheel, and they were now grinding down getting stuck. I had my finger on the button for a new 200 euro flywheel. Went to sleep.

The next morning I tried to use the puller to lift the flywheel, but that was a no-go. There are two threaded holes for some speciality equipment for this, but it wasn’t something I could find in my local stores and I was getting real tired of this tractor. I found some bush-fix suggestions where you levered some slight tension upwards and then whacked the shaft (protected by the nut) with the biggest hammer you have. Well, I have an enormous sledge hammer. Five whacks later, and the flywheel came off.

Positives: My restored knowledge about flywheels had lead me to the correct conclusion. Negatives: Those metal plates protecting the magnets were bent out of their original shape – and these rotate around fixed magnets at the tiniest of surface to surface gaps needing to be pretty perfect to work.

A lot of careful whacks and taps with a hammer later, and some drilling, I had managed to produce what actually looked pretty good. This picture was taken before I dremeled the bolts down to level though, but you get the idea.

I mounted everything back together and was greeted by a perfectly running engine. You should see the grin on my face. I had messed this up – badly – but managed to save it.

Alright, back to that safety switch.

This is where I decided to connect up my switch in parallel. If you inspect your SD 98 from the right side, you’ll see some wiring tubes coming from the rear to the middle. One of them has three wires: red, orange and gray. Red is VCC, orange is the seat safety and gray is the gearbox safety. That’s probably the easiest places to do this mod, not requiring any teardown of bodywork at all – but hey – I had already done it.

… and here’s how it looks, finally mounted in place. Easily reachable if you know where to look for it, and hopefully something the kids won’t figure out until they’re old enough to be trusted with it.

Oh, and the mower runs better than ever. I took the time to lubricate wherever suitable as I went along, and I cleaned out a lot of assorted junk from various places as well. I even think the motor sounds better, but that’s maybe wishful thinking.

-“Troed, you should have your own Youtube channel for all of this instead of blog posts!”

No thanks. I absolutely hate having to wade through someone waffling about when all I want is to quickly get to what the solution I searched for is. If you came here looking for how to mod the driver’s safety on a Stiga/HTG/MTD/etc – aren’t you glad you didn’t have to? :)

Hooked on hookes

August 31, 2020

Comparison image

Above you see two probes that came with my DSLogic Analyzer. You also see two EZ-Hook XKM-S probes bought from Digikey at 30 SEK each. The latter are vastly higher quality – and much easier to work with since you can place them closer together due to their thinner tips.

Highly recommended.

Converting DSLogic Basic to Plus

August 12, 2020
tags: ,

I bought a DSLogic Basic USB Logic Analyzer a few years back. It has worked perfectly fine for my use cases. Recently I’ve begun using a Ubuntu desktop more than my Macbook laptops in the workshop, and when it came to installing the DSView software I stumbled upon the weird fact that DreamSourceLab seem to consider their old products unsupported, and they cannot use any newer version than 0.99.

While figuring this out (no, it’s not spelled out anywhere I can see when downloading the software) I stumbled upon some forum threads detailing how the only difference between DSLogic Basic and DSLogic Plus is 256Mbit RAM and changed values in an EEPROM.


The RAM chip (MT48LC16M16A2P-6A) is $1.5 imported from China, or $10 from within Europe. I went with LittleDiode in the UK and had it in just a few days.


8 screws later.


Apply solder paste.


While using the hot air station to melt the paste, also remove the eeprom.


The previously modded TL866 works just fine to read out what was in my case an ST M24128.

Search and replace 0E 2A 21 00 for 0E 2A 20 00 (two places). Can be done directly in the MiniPro software. Write back the changed contents to the eeprom and put it back in.


Congratulations! You now have a DSLogic Plus.


Look at that massive capture buffer. I have absolutely no idea what I will ever need it for.

Oh, and no. The DSLogic Plus with this hardware revision isn’t supported by anything newer than v0.99 of the DSView software either – which was what I was hoping for. Oh well.

Wireless phone charger – Tesla

August 11, 2020

Love the Tesla Model 3. When I got it I thought the clever way to route a charger cable up from the front USB ports was nice, but after a while I got real tired of having to poke the phone onto the plug whenever I got in the car.

The Tesla M3 subreddit had a thread about adding Qi wireless phone charging to the front compartment, and there seemed to be no real competition to the product from TapTes. I’ve now had it installed for a few days and it really is completely seamless. Whenever I place the phone down in the car it charges, and the installation was relatively straight forward.

On my commute is a section of freeway that’s often backed up. I let Autopilot deal with that, while I go on working through the phone (of course hands-free, officer!). Topping it up whenever possible becomes a must.

Now I just need to find some way of wirelessly charging the Tesla itself.

Stock, with a third party 90 degree angled charger cable.

The new charger plate with its USB power cables fitting the stock holes down into the compartment.

Qi charger plate installed, still without the stock bottom slide cover.

I keep my car messy. It’s a vehicle, not a showroom. Anyway, this photo shows their Y-cable solution where you still have access to two front USB ports even though they also power the wireless charger. Also in this image is a Raspberry Pi Zero running the awesome teslausb sync-thingie.

I scratched my head for a while trying to use my iPhone to take a photo of my iPhone being wirelessly charged, but had to give up and use a Huawei. In reality this looks good.

PLCC 44 PROM programming with TL866

July 22, 2020
tags: ,

Even the retro world is moving away from the regular DIP packaging sometimes. The Atari Falcon, and third party ROM boards from Exxos, use the 27C4096 PROM in PLCC packaging to hold TOS (the operating system).

The TL866 with its DIP40 socket cannot obviously handle these, but a quick search shows us that there exists many adapter packages available to purchase that will sort out various types of popular socket formats. Including 44 pin PLCC.

However, the most common such adapter isn’t meant for PROMs, but for micro controllers (like the AT89C51 used for the example below). While the pin assignment is almost the same, for the critical purpose of programming the NC pins are swapped.


$ minipro -p AT27C4096@DIP40 -r test.bin
Found TL866A 03.2.86 (0x256)
Invalid Chip ID: expected 0x1E00F400, got 0xFFFFFFFF (unknown)
(use '-y' to continue anyway at your own risk)


If we want to program PROMs with this adapter, we need to perform a slight modification.


Comparing different PLCC44 pinouts


Simply, but carefully, bridge pins 12-13 and 33-34 on the PLCC adapter (not the DIP!) and off you go.


Pins bridged


$ minipro -p AT27C4096@DIP40 -w dualtos_swapped.img
Found TL866A 03.2.86 (0x256)

VPP=13.5V, VDD=6.5V, VCC=5V, Pulse=100us
Chip ID OK: 0x1E00F400
Writing Code... 77.79Sec OK
Reading Code... 5.58Sec OK
Verification OK


Happy programming.

TL866 firmware updater macOS support

September 28, 2019

I own a TL866CS IC programmer. Wonderful device – I truly recommend it (and I assume its successor is even better). It’s been known for many years that the company who made them had one hardware revision, and limited the CS revision compared to the A revision purely in firmware.

That limitation has of course been hacked for almost as long as the device has existed. Someone going by the name “radioman” detailed many years ago how the bootloader could be reflashed from CS version to A, after which the original software and firmware updates will see the device as the A model in all aspects. To get access to the in-circuit programming abilities, you additionally have to solder a header to the mainboard.

radioman’s software is open source, and exists for Linux (QT) and Windows (.NET/QT). People say it works great under parallells or VirtualBox for macOS users.

But that’s no fun, is it?

I spent the last week changing out libudev for macOS’ native IOKit library in the QT codebase. That’s the only change needed, since libusb has good macOS support. My macOS pull request has now also been accepted and merged into master by radioman.

Open source working as intended. And my TL866CS has become a TL866A.

Kokoon Relax headphones review

March 14, 2019

[this post has been updated, see additional edits being made at the bottom]

April 2018 I saw a Facebook ad for a pair of headphones that sounded like the perfect match for my needs. I’m a severe insomniac, and a frequent flier. I’ve had the same pair of Sony MDR-NC32NX in-ear noise canceling headphones for a decade, and I was looking for something new.

Yesterday they arrived. Now, this was originally a Kickstarter (and I have seen that not all backers have gotten theirs yet) but when I ordered they expected to ship them in July the same year. Delays happen.

Now, for the rest of this review. If you’re looking for the best sound quality, or the best noise cancelation, these are not the headphones for you. My circles tell me the Sony WH-1000XM3 would be what you’re looking for. If you’re however looking for an extremely slim profile with a focus on helping with relaxation and insomnia – keep reading.

After having unpacked them, and tried them on (wow – they’re heavy!) I charged them up and started to play around. Connecting them to my iPhone was no problem (they’re Bluetooth) and the Kokoon Relax app is nicely laid out for you to download calming soundscapes to have in the background. This worked well during the evening yesterday.

Later at night, I connected them to my Macbook Pro (again, wirelessly) when going to sleep. I listened to some tv-series and Youtube episodes, and then decided to try to go to sleep. No matter what audio source you’re listening to, they’re supposed to detect when you have fallen asleep and turn down the sound a few minutes after.

I’m a side sleeper, which Kokoon has this to say about:

Earbuds and bulky noise canceling headphones will make it difficult to sleep for side sleepers. By relocating the headphone electronics from the ear cups to the headband, we have been able to achieve the lowest possible profile, maintaining the natural shape and characteristics of the head in bed. Combining this with cushioning has enabled us to ensure the headphones are comfortable.

… yeah, no. I have the perfect pillows to support this (soft and deep) but there’s no way I can side sleep with these comfortably at home in my bed. That’s a bummer, because that was one of my hopes. However, I still need a pair of headphones for when I’m traveling, and I don’t always upgrade to business class so sit-sleeping is still a thing.

This morning (day of use #1) I was unable to connect the headphones to my phone when leaving in the morning. The battery had run flat, which I now realize is because while the headphones can detect that you take them off (and pause the audio) the ability to turn themselves off is still a feature in development. I then charged them at work, and tried again on the way home. I was still not able to connect – until I tried re-pairing them with the phone.

This caused me to believe that they can only be recognized by one device at a time – but this also turned out to be wrong. When back home, the audio kept disconnecting from the phone and at one point connected to the computer (where a Youtube video started playing automatically). So I had to turn off Bluetooth on the computer. But I still have had no luck this evening – the few times I’ve managed to connect the headphones to the phone I’ve had a few minutes at the most before they suddenly disconnect (and turn off – with a very unpleasant audible ‘pop’ in your ears) and I have problems connecting them back again.

I now tried to hard-reset (power+action buttons for some 10 seconds) them a second time but it seems the battery has run flat.

Conclusion after unpacking day and 1st day of use is: Wow, this is a very very unfinished product.

Day #2 to #4:

Alright, so I’ve learnt that whenever I want to switch between phone and computer use I need to press the action button for a few seconds and reconnect through the Bluetooth menu. That’s not extremely problematic, I can live with it. Besides that I’ve only had a single surprising issue where the headphones disconnected from the computer while I was watching a show. A press of the power button made them come back alive.

I’ve also made it a habit to charge them whenever possible since I believe they have issues when at near low charge, which I’m of the impression happens a lot quicker than I would’ve expected.

So what now? The only thing I’m currently using them for is as a pair of regular Bluetooth headphones. I can’t side sleep with them, the EEG stuff seems unfinished (I know the app claims I fell asleep once when I listened to music, which I decidedly did not) and the ANR (Automatic Noise Reduction) is barely noticeable and I’m even unsure if it’s active. In this case I compare to my old Sonys which were truly awesome at it, but also a lot more noticeable (“pressure” on the eardrums).

Additionally, they make my outer ears hurt after a while, which the headphones I use when playing Playstation VR or my precious “office headphones” didn’t. Not sure why this is yet.

Day #5 to #9:

Regular usage as Bluetooth headphones has worked fine these days, although that’s not really what I bought them for. Just now I’m unable to get them to work though, which I think is connected to having taken them off allowing the automatic music-pause to kick in. After that they’re “dead”. Can’t turn them on, can’t reconnect them to something else, charging doesn’t make a difference, even the hard-reset button combination seems to do nothing.

Will try charging them for many hours, followed by trying to deplete them completely, and see what happens. Since I’m not a Kickstarter customer I do have consumer protection to use if necessary.

Day #10 and #11:

Continuing from above, after they had stopped responding, charging didn’t work. The green led blinked as if they were charging, but after many hours it still hadn’t turned solid green indicating they were fully charge. I tried to see if anything had changed as to responding to any button presses, which it hadn’t, and then let battery run out flat instead.

That worked fine – the next day I could charge them and they went solid green in the expected timeframe. However, they’re still not responding to any keypresses (power on, hard reset by pressing both buttons for an extended amount of time etc) and there’s no LED activity whatsoever.

My conclusion is that they’re bricked. I will now contact Kokoon to let them know these headphones are going back and I expect a full refund. This will be fun.

April 10th

Final update: I today received the refund for the headphones, and I want to credit Kokoon for being swift about it. They initially wanted to send out a replacement but I simple wrote back that I wasn’t a Kickstarter backer but a regular customer, and the headphones didn’t match the spec I had been told when ordering them (besides being completely dead after 9 days).

I bought the Sony WH-1000XM3 instead a while back and they’re absolutely amazing.

GrafX2 SDL2 version for macOS 64-bit

July 2, 2018
tags: ,

update 21/7: I’ll make regular builds of this, and hope to have it completely automated soon. They can be found here (link might change in the future):

original post: 12 hours ago SDL2 support was merged into the popular retro graphics program GrafX2. Here’s a fully distributable macOS x86_64 binary (only tested on macOS High Sierra) built from that.

Thanks to evil/DHS for letting me know of the new SDL2 support, even before it was actually merged ;)

(If you try to build from source yourself there are edits I’ve done on my local branch to make it build and include the support libraries/frameworks. Ask away)

Batterieliminera Ljusbox TORLEIF från Jysk

February 19, 2018

När jag fyllde år fick jag en ljusbox från Jysk av familjen. Barnen tycker den är helfestlig eftersom man kan skriva egna saker med hjälp av de medföljande bokstäverna, och den passade alldeles utmärkt på nattduksbordet. Den är, precis, stark nog att kunna fungera som sänglampa – än har inte åldern kommit ifatt min förmåga att kunna läsa böcker i dämpat ljus.

Däremot drivs den enbart av batteri (6st AA). För att ha den som långvarig mysbelysning kändes det suboptimalt, så idag satte jag mig och byggde om den.

6st 1.5V batterier betyder att den drivs med 9V. Jag hade redan en sådan nätadapter liggande, annars kan de köpas från Kjell & Company, där jag även köpte honkontakten för chassimontage.

Här kan man stanna, om man inte längre vill ha kvar möjligheten att använda batterier. Eftersom jag har gott om DPDT-switchar liggande var det dock inte mycket merjobb att lägga till möjligheten att växla mellan nät- och batteridrift.

Efter att ha öppnat upp ljusboxen (den är knäppt på, använd en flat skruvmejsel och bänd försiktigt tills du lyckats lyfta upp en kant. Skruvarna på baksidan håller enbart fast batterihållaren och behöver inte tas bort) så ser vi snabbt att konstruktionen är väldigt enkel. Batteripacket är kopplat minus direkt till LED-slingan, och pluspolen går via strömbrytaren.

Vi återkommer strax till omkopplingen, men först sätter vi dit de nya kontakterna. Jag använder en liten dremel för den här typen av arbete, samt en nagelfil av metall för att göra fyrkantiga hål fyrkantiga. Desto mer tid man lägger ner på att få det snyggt, desto bättre blir det. Här lade jag ner medelmycket tid.

Och därmed är vi framme vid omkopplingen. Batteripackets minus samt pluspol går till de två lödöronen på ena sidan switchen, och till den andra sidan kopplar vi plus och minus från DC-honan. Mitten på switchen kopplas minus till LED-slingan, och plus kopplas via strömbrytaren.

Och sedan är vi klara. Tack vare DPDT-switchen finns det inget problem i att ha både batteri samt nätadapter inkopplade samtidigt, även om det är lämpligt att enbart ha det senare för att inte riskera att oanvända batterier ligger och läcker.

En av bilderna här är tagen med batteridrift, en med nätdrift.

(Och som ni förstår öppnade jag raskt upp ljusboxen igen och flyttade in kablarna till kanten … )

Atari ST wakestate nudger

January 14, 2018

I’ve added yet a new little description to Projects – a circuit and modification to “nudge” wakestates on Atari STs without needing to power cycle.