Fixing a stereo at the Hardware Meetup

I took my briefcase stereo along to the Hardware Meetup today. They have lovely big benches with good lighting that are great for working on stuff. The Hardware Meetup also has sensible and helpful folks who can hold things up while you work on them and give you good advice so that you don’t put the circuit board back into the case in a way that smashes the ferrite rod aerial. Thanks to Ben, Ian and Brian.

This is the inside of the stereo. Fancy a guided tour? Let’s go..

This is the underneath of the cassette deck. You can see the motor at the bottom, next to the green pre-amplifier circuit board. The motor is connected via a thin rubber drive band (which is still in good condition) to the fllywheel at the top that turns the capstan that pulls the tape out of the cassette at a nice stable speed. On its way to the flywheel the band also drives a round plastic idler which turns the tape takeup spool via a felt clutch. Other idlers wheels underneath move into position to transfer the motor drive when you press the piano keys on the tape transport to fast forward and rewind.

At the very top right you can see a rectangular hole which is where the power switch is fitted. Underneath is a vertical row of rotary controls. These sit underneath the knobs that you use to control what you hear. The top control adjusts volume. There are two variable resistors stacked on top of each other, one for left and the other for right. The smaller control underneath does balance. This lets you adjust the left and right levels of your stereo speakers. Underneath balance is tone, this lets you control how much of the high frequency part of the sound you hear. Balance and tone also have two variable resistors, one for each channel.

The round thing with all the wires underneath the balance control is the input selector. The stereo has three inputs, radio, tape and record. This lets you switch between them by turning a knob. The selector is made up of multiple layers of rotary switches, all controlled by the one shaft. Some of the switches transfer signals from the inputs to the amplifier. Others do things like turn on the record player motor.

Dirty contacts and bad connections are the primary cause of failure in devices like this, so I gave all these controls a liberal dose of switch cleaner and waggled them around to get them clean. I also removed the multi-way connector you can see at the bottom of the picture and cleaned the pins on that. Let’s move on to the next part…

I didn’t do much with this part. Mainly because the radio was working fine. The thing along the bottom is a “ferrite rod”. This has coils on it that serve as radio aerials. This was the innovation that made portable transistor radios possible. Until the ferrite rod came along a radio aerial was around 20 feet long.

The square transparent plastic thing in the middle of the picture is the tuning capacitor. This is how you match the tuning frequency of the radio to that of the channel you want to hear. The little square tin things with coloured inserts in them are coils. A capacitor and a coil wired together make something that resonates at a particular frequency. By changing the value of the capacitor you can change the resonant frequency. There are lots of coils (and a sliding switch at the bottom left to connect different ones) so that the radio can work on three different frequency bands. On the bottom left is the connector which takes the audio signal into the amplifier to drive the speakers. One more place to visit…

This is the left hand-side of the case. At the bottom left we have the connection for the mains power. This is where scary voltages (in the red and white wires) that can kill you go into the device. The wires go up to a transformer which has two coils in it, a grey one on the top and a green one underneath it. The grey coil has lots more turns in it than the green one, so the voltage that comes out of the green side of the transformer is much less likely to kill you.

The low voltage wires from the transformer (the yellow ones) go into the circuit board across the middle of the picture which converts the alternating current from the transformer into 9 volt direct current, which lets you power the stereo from the mains. I’ve not used mains yet, and will do a lot more safety checking before I do. I’m using six 1.5 volt batteries, which go into the three tubes you can see the back of at the bottom of this picture.

At the bottom left of this picture you can see the sockets for the left and right speaker connections. Just above them is the switch that turns on the record player motor when you start to play a record. Above them, on the right, is the circuit which amplifies the signal from the pickup in the record player. At the top left hand side is the record player motor and a metal bracket that holds the rubber wheel which transfers rotation from the motor onto the inside of the record turntable. On the top right you can see the audio amplifier, and this is where we had a problem.

One of the speakers was not working very well. It would come and go; working fine until I put the circuit board back into the case. This screamed “bad connection to me” so we did a bit of wire waggling and discovered that some of the pins in the connector on the top right of the picture were a bit dirty. After a bit more cleaning we had proper stereo radio and tape, which was nice. The record player is still missing the left hand channel, but that might be down to a faulty pickup and is ongoing. And I won’t be putting any records on it until I’ve replaced the stylus.

I’ve given the stereo a clean, and you can see how it looks above. You can map the parts in the picture to the ones above, but remember that the I had the board upside down when I was working on it. I’m amazed that something this old (nearly half a century) could have survived as well as it has. I’m really looking forward to taking it along to the next party I go to….

Life saving note: I kind of know what I’m doing with these things, and I made sure that the stereo was powered by batteries all the time I was fiddling with it. If you fancy taking something of yours to bits, by all means have a tinker and look for bad connections. But not if it is powered by the mains.

Not in Kansas III

Last week, in the Black Friday madness, I purchased a Raspberry Pi Display Hat mini. This pops on the top of a Raspberry Pi and provides a nice looking LCD panel, a multicoloured led and four buttons. I wanted to be able to use in cases I make with webthingmaker and so I just gave Claude the url of the dimensions page provided by Pimoroni.

From this image Claude worked out the size of the board, the mounting pillar positions, where the screen hole should be and even the position of the buttons and the led. It was even able to produce the buttons that go into the case. You can see the results at the top of this post. Amazing.

IvyPod gives you your iPod back

I love my Apple iPod. I get it out every now and then and marvel at the simplicity of the design and how it does exactly what I want and never tries to sell me anything. Unlike Apple Music, which seems to think I need new kinds of experiences in my life and keeps hiding the things I want (albums, artists and playlists) in increasingly opaque ways.

Then I found the IvyPod app. This gives you what you really want, a simple way to browse your Apple Music tunes. It works a treat. It uses haptic feedback to simulate the clicky wheel of the original and it even has the music quiz and the games. Very strongly recommended.

Bambu H3C first impressions

The picture above was produced using the latest thingmaker which can now create Bambu 3mf files directly for printing, and can also read filament colour settings from 3mf files. It’s about A4 sized and the image was printed onto the print bed using the standard (i.e. the one it comes with) print surface.

I’ve had “Big Vince”, my Bambu H3C printer, for a day now. So I am of course totally qualified to give a detailed review of it. Here are some of my observations so far:

  • The printer does everything very well.

  • The baseplate is a lot smoother than the default baseplate on the P1S. You might not need to get a smooth build plate for the H3. But then again, you can’t get one anyway – we got an “engineering” one instead, which we have not fitted.

  • The layers on the prints are very hard to spot. Not sure why, but they look great.

  • I’ve put the printer is on a base which is 65mm off the ground. I can reach the top very handily. But so can other, more averagely heighted, members of the family.

  • The printer seems to dance on its feet when it is printing. They are sprung and this looks like it is normal behaviour.

  • Unloading filaments is not automatic. The default state of my P1S is all the filament unloaded and any reel can be removed just by pulling the filament out of the AMS. The default state of the H3 is that all filament is loaded. The print head has to be heated up and the filament cut before you can pull back a couple of feet of filament and hand-wind it back onto the spool. You do all this from the front screen.

  • The front screen is actually useful. This is quite unlike the P1S, where I never bothered to do anything on the printer, instead using the PC to control it. Then again, with the P1S there’s nothing much you need to do on the printer.

  • The printer camera is much, much better quality than the one in the P1S. It also updates much more smoothly too.

  • The printer still makes poop, but nowhere near as much as the P1S.

  • The printer knows when the door is open. And you don’t need to leave the door open to print PLA, it just sorts itself out.

  • The printer takes a while to start a print. This might be because our first prints involved loading the filament for the first time.

  • The top surface of prints is very smooth, and the printer printed the fine detail in the picture by putting tiny bits of filament directly onto the build plate. They all stuck very well.

More impressions later.

Hello "Big Vince"

I got my first 3D printer in 2012. Today I got another one. Things have moved on a bit. My Ultimaker would only print in one colour at a time. Eventually. I had to build it from laser cut bits of wood. It was a constant battle to keep it working. You had to level the bed, adjust the filament flow and look out for blockages. The hot end got proper hot, and you often had to take it to pieces to get it going. And yet it was magical to watch a machine on my desk produce a physical object from a design on a computer. Una the Ultimaker (as I called her) fitted very nicely into an Ikea blue bag and I took her round showing folks what the latest in technology could do.

I’ve been through a few printers since then. And we spent today setting up “Big Vince”. This is one big device. I will not be taking it around and showing it to anyone. I suppose it is still a “desktop” machine, but I think it really needs a desk of its own. It’s a Bambu H3C. It can print 9 different filaments using individual print nozzles for each filament. One of the 9 nozzles is specially set up to print extra large (2.95mm diameter) flexible TPU filament, which means that you can print a combination of hard and soft elements in the same job. Changing from one colour to another during a print takes around 6 seconds. The print bed is huge. It has a built in drier. I’ve bought cars that cost less. But I’m really looking forward to finding out just what this thing can do.

The normal first print “rite of passage” is a little boat called “Benchy”. We did indeed print one of them and it came out very well. Then we found this design on the printer, loaded up all 8 filaments and turned it loose. The print took two hours. Very impressive. They say you can print shoes with it. I’m really keen to have a go with that.

The Thingmaker now does pictures

I’ve been having a lot of fun with the “Thingmaker”. You can find it here: https://www.webthingmaker.com/ Feel free to have a go. You’ll need to use a Chrome compatible browser such as Edge, Chrome or Chromium. This because it needs access to a local folder on your computer (you set it up the first time you run it). Up until now the only thing it could make was cases for hardware. But now I’ve added pictures. You can load an image and then convert it into a 3D printable version. Your picture loses a lot of detail and colour depth, but you can get quite pleasing results. It’s definitely a work in progress, so expect things to change. If you have a go and come up with any comments or ideas I’d love to hear them.

Kodak Professional DCS Pro 14n

The Kodak Professional DCS Pro 14n is a bit of a landmark camera. It was released in 2002 when digital cameras were becoming a thing. The special thing about it is the full frame sensor. This makes the camera directly equivalent to the 35mm film cameras of the day. Professionals could use this with their existing Nikon lenses and have all the benefits of instant digital images. For only five thousand quid. You might not be surprised to discover it was not a great success. That’s not to say it is a bad camera. It takes really nice photos.

The camera can do a lot of tricks. The back is covered with buttons and there’s even a little additional text display which adds extra details of commands and lets you watch images being transferred to the two memory cards (Compact Flash and SD) that the camera supports. The photography bits are made by Nikon, which gives very solid auto focus, a great viewfinder and a great user experience. It even has an extra shutter button for use when taking portrait orientation photos. And a tiny built-in flash.

Why did I get one? Well, I wanted a bit of photographic history. And I wanted to find out how much digital photography has really come on over the years. If you want a full frame digital single lens reflex (SLR) there are much better, cheaper options that you can pick up. Ones that actually have things like spare batteries still available for sale. The Kodak is definitely an outlier. It is bulky and very slow to get going when powered on. It does have a few party tricks though. There is no anti-alias filter on the sensor. Most digital cameras have these. They spread the image over the multiple sensor sites to reduce fringing effects in pictures. They also increase blur. Leaving the filter out makes for sharper shots. The Kodak can also take pictures at stupidly low ISO values. This means you can make it a lot less sensitive to light and use large aperture lenses without messing around with extra filters. And I think it looks cool. I like using things with the word “Professional” on the front.

Should you get one? Almost certainly not. Batteries are hard to come by, it’s bulky to carry round. More modern cameras can match it for image quality, if not for old sensor dynamics. One thing to bear in mind. If you buying an old digital camera to add a bit of Charge Coupled Device (CCD) sensor magic to the red tones in your shots you should not get the Kodak. It was one of the first full frame cameras to use the Complementary Metal Oxide Silicon (CMOS) sensor design which is now used by all modern cameras. That said, the camera was set up to compete directly with the colour film of the day, and I reckon pictures from it look great. If you fancy a heavy and slow slice of history, by all means go for it.

Rather Useful Seminar learning experience

Start with some Lego

One of the golden rules for a presentation is: never do anything in front of the audience that you haven’t tested before. Today I broke that rule, and suffered as a result. My talk was all about making things with AI, and as a grand finale I thought it might be fun to show off the latest thingmaker program. So I opened the page and it crashed. Repeatedly. Of course it has been working fine for ages. It only broke when I showed it to the audience. Wah.

When I got back home I did some digging. This morning I’d added a new device type so that I can make cases for a lovely little ESP32 display I’ve been working with. I tested the changes on a local version of the site and then pushed the new site into the cloud. Then, and this is the really stupid bit, I failed to test the site on my presentation machine. I just assumed it would work like it has for ages.

Not so. It locked up and all attempts to use it failed. After some messing around we (Claude and me) have figured it out. The browser is told to cache some of the program elements locally to improve responsiveness. This works fine until you update the code on the site. Then old and new elements end up loaded together and the whole thing falls apart. If I’d been sensible enough to press CTRL+SHIRT+R during the presentation to force a complete page reload and flush the cache the site would have worked fine, and I would have wowed the audience. Rather than looking silly. But there you are. We’ve changed the names of the cached files so that they are different with each version. This should mean that updated versions won’t get picked up alongside old parts.

The audience were great, some good questions and, once one pair of brave souls had been turned into Lego, we had a few more who were keen to have a go. Of course, this was the point at which the printer battery (or something in the print chain in the camera) got stuck and broke a few prints. Oh well.

If you want to know what my session was all about you can find a screencast here.

I’m off for a lie down.

Briefcase Stereo

Someone once told me that my blog was really just a bunch of pictures of new technology that I’d just bought. I’ve decided to change that, so now I also have pictures of old technology that I’ve just bought. Hot on the heels of the Sony stereo cassette deck, we now have the Sanyo portable music centre. I have wanted one of these since I first saw one in John’s room in Needler Hall, back in my student days. The sound quality was not great even back then, but the way that the whole thing works together and looks (it packs into an attaché case) is awesome. I picked it up yesterday in Space in Harrogate. Everything works, although all the controls have an appointment with a can of contact cleaner which will be arriving tomorrow……

Human creativity is alive and well in Harrogate Yorkshire

This was just one of loads of amazing designs

Anyone worried about the rise of AI and the death of creativity should take themselves down to the Knitting and Stitching Show in Harrogate this weekend. I went along today. The amount of creativity on show there was awesome. Sure, there was a lot of technology too - some of the embroidery machines looked incredible, but there was also just a whole bunch of people who enjoy the experience of just making stuff.

Hardware Meetup with lots of hardware

We had an excellent hardware meetup tonight. We were making tiny engineers, using AI to fix eastern European guitar amplifiers from the last century, discussing AI cryptography and I also took along the wacky Instax camera to record it all. Unfortunately I forgot to bring along any of the smaller aperture holes for the lens (it’s a thing) so all the shots were super blurred. But very artistic.

The next meetup is in two weeks on December the 2nd.

JavaScript shutting the stable door after the horse has bolted?

Anyone up for some JavaScript shenanigans? Take a look at this:

<!doctype html>
<html lang="en">
<button onclick="pick()">Choose a folder</button>
<script>
async function pick() {
  const folder = await showDirectoryPicker();
  const open = indexedDB.open("demo", 1);
  open.onupgradeneeded = () => open.result.createObjectStore("handles"); // first time: make the store
  open.onsuccess = () => open.result.transaction("handles", "readwrite").objectStore("handles").put(folder, "folder");
}
</script>
</html> 

It’s a web page that contains a tiny piece of JavaScript that creates a handle for a local filesystem and stores it in an indexedDB when you press a button with the caption “Choose a folder”. Why do we need this? Well, suppose you have a web application that wants to store data on the local machine. Something that is not usually allowed, what with all the nasty sites out there. Well, the application can ask for a handle to a folder on your machine that you are happy for the browser to work with. That’s what showDirectoryPicker does. It asks the user to pick a folder where the browser can put stuff for this site. I don’t want the user to have to do this every time they use my web based application. So I need to store it locally.

I can use a local indexedDB to do that. This is not really a database, it’s more of an object store. However, it is terribly useful. So I’ll open the database and add the folder reference to the database. That’s what the code above does. But it contains some code that hurt my head for a while:

  const open = indexedDB.open("demo", 1);
  open.onupgradeneeded = () => open.result.createObjectStore("handles");// first time: make the store
  open.onsuccess = () => open.result.transaction("handles", "readwrite").objectStore("handles").put(folder, "folder");

The first statement opens a connection to a database called demo. It wants version 1. Fair enough. The second statement binds a function to the onupgradeneeded event on the connection. This fires when the database version is wrong or if the database is not there. The handler creates a new database called handles. So, if we ask for a database and it isn’t there, we make one. Lovely. The next statement creates a handler for the “happy path” - otherwise known as onsuccess. This is the code that runs once the database connection is open. When that happens we want to make an object called “folder” which contains the folder we created earlier. That’s what the transaction does. Now, when the website loads all my application has to do is look in the local database for the handle so it can use local files. Also lovely. All the code makes sense. So why did it make my head hurt?

Well, it’s because when I first looked at it I thought we were closing the stable door after the horse has bolted. The first statement does the open. And then, after that, we put the two event handlers in place to deal with what happens when the open runs. At first sight this seems wrong. How can the handlers get called when they aren’t set up at the time open runs? But it does makes sense. And it is all to do with how JavaScript in the browser does things.

The first thing you need to know is that indexedDB.open doesn’t open the database. It starts opening the database. So when open returns the database isn’t open. It’s being opened.

The second thing you need to know is that open won’t call the event handlers when it wants to fire the events. It will put the events into an ordered queue to be dealt with later. So the fact that it might not have anything assigned to deal with the events isn’t a problem.

The third thing you need to know is that when the browser finishes the code that ran when the pick button was pressed it then goes through the queue of events that have been raised and calls each one in turn. This happens when the event handlers have been assigned, so they all run and do what we want.

This makes perfect sense. In the code above the user presses the “Choose a folder” button. This calls the pick function which pops up the file picker, captures the folder and then pops it in the database. We don’t want our button handler to have to hang around waiting for the database to catch up. We want it to return to the user so that they can do other things. When the database does catch up, the events need to fire and sort everything out.

JavaScript is super clever. But it can also be super-confusing sometimes.

Achievement unlocked: Sony Portable Cassette Deck

It even has ferrite and ferrite heads!

In a rush of blood to the head I’ve gone and bought a Sony TC-153SD portable stereo cassette deck. I really, really, wanted one of these back in the day but I couldn’t afford one. But now I can. It cost less than a video game. The seller posted a video of it playing back music which sounds about right (although one of the channels is not working) and it is probably running slow. It arrives next week. I’m really looking forward to taking the back off and taking a look at all those discrete components.

Totally unrelated favourite line of the day: “I work in the civil service and at the weekends I’m rude to people”.