Friday, 30 April 2021

Further work on a Microbee 1248-6 mainboard

This is the definition of a long-term project. I have a bare Microbee 1248-6 mainboard. It's one of the later revisions of this board. Being blank, it's a good candidate for replication.

Some years ago I created a schematic for it in Protel, and made a PCB. The PCB wasn't particularly accurate, as I mainly just threw the autorouter at it. So (probably) functional, but not particularly exciting.

Success at getting KiCad to do beautiful curved traces reignited the spark of that particular project, so I pulled out the files and had another look.

I imaged the board at 600dpi using a scanner. Then cropped a section of that and fed it into the gimp. I played around with levels to increase the contrast between tracks and boards.

Then I put the result of that into the KiCad bmp to component converter. This tool is designed for making fancy logos, and converts a bitmap image into a bunch of vectors that can be used for gerber plotting. The file goes on the silkscreens. I have seen a board made by one of the guys at the microbee software preervation project that used this technique to create gerbers directly, but there were issues with getting board houses to accept this.

So now the next step. Trace over the image in KiCad using proper components, tracks (15 mil) and vias. It takes a while, but it's enjoyable bead therapy work. There's no need to accurately follow the original. Indeed around corners it's better to leave the round the corners plug in to do it neatly.

For the bottom layer, just process the scan the same way, then convert it to a silkscreen component, and flip it when you place it.

This makes a real board, that can be DRC checked against a netlist (when I get around to putting the schematic into KiCad), to ensure that it's correct. Finally, run the board through the round the tracks plugin to smooth things out and create absolutely stunning artwork, even better than that used to make these computers in the first place.

Edit: After a few days work, it's looking pretty cool:

And with the soldermask obscuring all the pretty curvy traces:

Finally, I did the schematic entry in KiCAD. This meant that the PCB now had net information, which then allowed me to do a meaningful DRC. There were _a lot_ of problems. Firstly, the original board has some unused gates, with floating (=oscillating if CMOS logic is used) inputs. There was also duplicated designators on the board (C33), some bits just not connected per the schematic - notably some of the clamp diodes around the serial port don't actually clamp, plus the emitter of TR4 is not connected to anything on the PCB.

Anyway, I fixed the obvious things, and mainly made the schematic agree with the PCB where it didn't matter (swapped designators, swapped pins).

So here's the final glorious thing, in a form that I can get one made. 15 thou tracks and 9 thou spaces (I know, very assymetrical). Totally ready to build.

Of course now it's digitised, it's trivial to change. Like for example replacing all the keyswitches with easy to buy Cherry ones, plus replacing the unobtanium IC16 82S123 PROM with an easily available GAL16V8...

Saturday, 24 April 2021

Microbee SuperPAK - An EPROM Expansion Board

Quite a while ago I developed hardware for a compact flash coreboard for my Microbee. This added IDE based compact flash storage, allowing massive disk storage under CP/M. Others helped out with the BIOS software. It never got to the point where I was completely happy with it. Compact Flash cards are finicky things, and the combination of a 5V system and very slow timing conspired to make things less than 100% reliable. Being a read/write thing, every time something crashed it would corrupt the directory structure and necessitate reformatting the card. This was (and is) frustrating.

I realised that the reason I wanted all the storage was just so I could have a straightforward way of loading software on the Bee that doesn't necessitate waiting for tapes to load. I've got a couple of dozen games and suchforth that I like to play every now and again, and frustrations in getting it going mean I don't play with the gear as much as I'd like.

So back in the day I had a "ROMPAK" for my bee, which was a little expansion board that could take eight 2764 EPROMS, for a whopping 64K of storage. By writing to port 0A, you could select one of the eight ROMs, and it'd appear at C000 in the memory map. We used it to allow us to have Wordbee, EDASM and the Mytek wordprocessor in the same bee without having to swap ROMs, and it was neat. I envisaged loading Emu Joust into a couple of EPROMs and writing a short routine to copy it into RAM at the corect location and then jump to it.

So this board allows you to do that, plus maybe store some other games and bits of software. I've allowed all 256 possible PAK ROM positions, using an 8-bit latch and four 27C040 EPROMs. These are current production parts that go for the princely sum of $8 or so ea, as long as you don't mind them in a OTP flavour. You can get Flash versions too.

The idea is that the first PAK location holds software with a menu, that allows you to choose what you want to run, then copy that into RAM (or leave it bee in EPROM if it's a PAK thing), and execute it. Sort of like the PC85 but on steroids. The software to do that should be a doddle, or at least much easier than writing stuff to run CP/M. Even better, there's no FPGAs and no CPLDs to worry about. all the decode is done with bog-basic 74 series parts.

Edit: I just found the "round the corners" and "teardrop" plugins for KiCad, which make boards look like they were layed out using bishop graphics and tape. I reckon it looks so nice that it's worth leaving the solder mask off and going for an ENIG finish, ala expensive Hewlett Packard boards of the 1980s.

Sunday, 17 January 2021

Suzy's Super Rosin Paste Flux.

We're in a no-clean, water-based, lead-free world, and that sucks. Electronics manufacturing is about getting product out the door with as little effort as possible, so they leave the flux on the board rather than clean it off. This "no-clean" flux isn't just a pretty pathetic flux, it's also a right pain to clean off the board afterwards, so it should really be called "can't-clean". All well and good if your standards are low, but if you care about the quality of what you make, you'll want real rosin flux.

Decent rosin paste flux is getting harder to find every time I go looking, and with the secrecy around formulations who knows what's in that stuff. The solution is to take control of the process and make our own. Before I start though here's a quick primer on what flux is, and what the various formulations for electronics work are. You have to really understand your needs to formulate a flux that's appropriate.

Flux is used to exclude air from the join while you're heating it, in order to prevent the corrosion of metals that happens when you heat them up. It also contains varying amounts and strengths of acids, which bind to the oxides present on the surface of the metal and remove them from the join, so that when you stick solder in it's able to wet the parent metal properly. You want it in either a liquid form or a paste form. Liquid flux allows you to paint it on with a brush (thick liquid) or dispense it with a pen (runny liquid) or spraycan (very runny liquid). For board assembly I like to dispense with a syringe. This allows me to use very thick paste flux that stays in place on the board. I like it to be a little tacky, so when I place surface mount components, they don't roll around. The solvents used between liquid and paste fluxes are different, but the key ingredient is still the rosin.

The various types of flux are:

  • Rosin Flux. This is the grand-daddy of fluxes. It's made from tree sap, that's had the volatiles (turpentine) boiled off. The resulting rosin is an amber crystaline solid, that breaks fairly easily. It's mildly acidic, due to the presence of abietic acid. Being a solid it needs some sort of solvent to make it useable to coat the joint with. It's mild, and perfect for board assembly where you're using good quality, reasonably fresh components. When you solder the join, most of the solvent boils off, leaving the glassy rosin behind. This is reasonably easy to remove using more solvent.
  • RA flux. Rosin Activated. This is rosin with various acids added to attack the oxides on your circuit board and component leads. It's a bit on the nasty side for most board assembly work, as we're usually working with boards and components that have been processed well (HASL or ENIG coating etc) and stored well to exclude oxides. This is used for those awful terminals that have been out in the air or on the boat for decades. It is imperative that you clean it off after soldering, as the acids will continue eating the metal and after a few years it'll stop working. The residue that's left after soldering is dark in colour, containing the oxides that have bound with the acid in the flux. It's harder to remove than the oxides from rosin flux, but still doable with a solvent and a bit of scrubbing.
  • RMA flux. Rosin Mildly Activated. Reduce the amount of acid in RA flux and you get RMA flux. It's a compromise. Good as a substitute for rosin when things aren't wetting well (old components, old boards). You need to clean it off afterwards, as it'll eventually damage the equipment otherwise. Cleaning wise, it's a mid-step between rosin and RA.
  • No-clean flux. This is a formulation made from random industrial chemicals, gelling agents, what-have you, that's supposed to mimic real flux then dry clear so the person contracting you for assembly work doesn't notice that you haven't cleaned the boards. It's motive is to skip a step, not to improve the product. Much worse though, it's often incredibly hard to clean off. The manufacturers want something that doesn't get tacky or runny in use, so they make it so that it dries hard. This equals very difficult ro remove. Don't use it. Your boards deserve better.

Here's a recipe for real rosin paste flux just like your grandma made when you were a kid, back when she worked as an industrial chemist. Nothing but the finest free-range organic ingredients, and made with love. Cook some up and gift it to that special engineer in your life, or just make a batch for your own use.

Seriously, this doesn't just resemble commercial rosin paste flux. It's the actual thing. It's not activated, which means that there are no acids added besides the naturally occurring abietic acid in the rosin. You can add additional acids if that suits your process, but I'm not particularly interested in that. Ninety percent of the time I'm happy with straight rosin, so I can use the commercial stuff for that occasional stubborn join.

This recipe makes enough to last a typical engineer a good few months. The ratio of rosin to vaseline yields a flux that's just right for syringe dispensing, with good tack.

Ingredients:

  • 15g of gum rosin, in chunks.
  • 10g vaseline.
  • Isopropyl alcohol (varies from 0g to 5g).

I just buy rosin online. It's got a huge pile of uses, both industrially and for consumers. It's usually used for making things stick, so as a powder that you can rub on your hands when doing rock climbing, playing baseball, what-have you. It's generally advertised as gum rosin, which is made from sap collected from pine trees, but there's also wood rosin, which is made from grinding up the tree roots after harvesting the pine. I believe they're the same, but I've only ever bought gum rosin. Please be sure to only buy rosin that's certified free of angry bees.

The vaseline comes from the supermarket. Bunnings sells isopropyl alcohol.

Method:

Combine the rosin and vaseline in a 48ml Kilner hexagonal preserve jar. Break up the rosin if necessary to get it into the mouth of the jar.

Heat the mixture in the oven at 120˚C for about 20 minutes. The rosin will melt and form a thick treacle layer under the vaseline, which will go perfectly clear.

Pull it out and stir to combine layers with a paddle-pop stick.

Pop it back in the oven for another few minutes, to encourage any trapped air bubbles to rise to the surface.

Take it out of the oven and let it cool for ten minutes or so before sucking into syringes, if that's your preferred dispense method. I find if I leave it too long it thickens up and is hard to draw into the syringe.

If you find it's too thick, you can add a few percent isopropyl alcohol. Isopropyl is the solvent in liquid flux, and it's probably also the solvent you use for cleaning up your boards after assembly. Go easy on the isopropyl though. As well as thinning the flux quite well, it also boils off very rapidly on the PCB when you solder, resulting in spitting when you apply the iron if you overdo it. I find the best time to add the isoproply is as the mixture is cooling. It's easy to stir in then. Don't do it too soon after taking it out of the oven though, as the temperature initially is above the boiling point of the isopropyl, so you'll only waste it.

You can reheat the flux multiple times to get it just how you like. Warm it up to 50˚C or so, so it's runny. Add a little isopropyl. Let it cool. If you overdo the isopropyl then just warm it up over 80˚C, and the isopropyl will start to boil off.

The stuff in the jar, or in the syringe, is just a lot of rosin in suspension in the vaseline. When you heat that mixture, two things happen. Firstly the rosin melts. It flows over the joint and does the good things that the rosin does. The vaseline has a boiling point of around 300˚C, so a good amount of it will boil off. This is mostly what you get in the little wisps of smoke that come off the iron, plus of course some rosin that's caught up. It's not good to inhale, so use some fume extraction. It doesn't have to be fancy. A simple muffin fan sitting near to the work on the bench is usually plenty. If you must use RMA or RA flux rather than straight rosin, definitely use fume extraction because ingesting the acids is not at all good for your lungs.