Search This Blog

Showing posts with label milling. Show all posts
Showing posts with label milling. Show all posts

Sunday, 21 April 2019

Card Success

I like it when a plan comes together, especially when it doesn't work well at first.
The story starts way back when I saw that a long time ago Casio had brought out a programmable calculator that used magnetic cards to store programs. I had a Casio fx-502p many years ago and learnt a lot about programming using that machine. Things like how to fit a program into not a lot of space. There's a program I remember from the 1980's written by someone who's name I don't know, that played tic-tac-toe. You could only ever lose or draw playing against it. I am still looking for the listing...

Anyway, I found that there were a few calculators before the fx-502p, such as the fx-201p. After a wait of a year or so I managed to buy one of those and found it was programmed in a strange language that Casio called Fortran, but is better described as 'fortran'. Then I found the Casio PRO fx-1, which is an fx-201p with a card reader.

My Casio PRO fx-1
 
The fx-201p just forgets when you turn it off, which is an exquisite form of torture when you've just spent hours crafting a gem of a program and have no way of preserving it. The card reader makes it worth spending the time working on programs.

Card reading calculators aren't common, but there were a few. The main two were the HP41C and the TI59. The TI 59 filled the same niche as the PRO fx-1 in that it has lesser siblings that forget when power is removed. Both TI and Casio families have 'continuous memory' versions that don't forget when the power is removed as they keep a low level of power supplied to the RAM chips, but changing the batteries can be a problem with these. You also can't swap between different programs easily as you can with a card reader. HP had many card reader calculators in the line up as they make proper stuff. Later on manufacturers used cassette interfaces a lot, but they are slow and bulky on the whole.

Back to the PRO fx-1. After an ebay search finally came up with a PRO fx-1, I had to buy it. Unfortunately it didn't come with any cards. The cards are no longer sold by Casio any more (shame on you). They could probably be obtained from someone who has some, but I think you'd need to give them at least two unicorns in exchange. The cards are a bit oddball, too. From photographs I'd worked out that they were 93mm long, which is a bit bigger than a standard credit card. I hunted for cards of that size and they do exist, but they are rare and expensive. So, I figured that if I used a standard credit card and pulled it a bit slower then the calculator wouldn't know it was a shorter card than it was used to. Hopefully.

There was another, more serious, problem, though. The cards that Casio made had a strange band of stripes running the length of the card just below the magnetic stripe. They were printed in the same magnetic ink that the stripe is printed with, but this made no sense as intermittent magnetic stripes are just nonsense. As I had a calculator, I could investigate, so I dismantled my calculator and had a look. It turns out that, as people had guessed, the band of stripes was for optical synchronisation (of recording). There is an optical sensor in the top part of the calculator. This also explains why the cards are transparent.



This made more sense, the band of stripes isn't magnetic at all. This is a bit at odds with the manual which tells users that they can write protect a card by putting an 'anti-magnetic self adhesive strip' on the bottom stripe of the card. This implies that the band of stripes is part of the recording of a card, not the reading.

So, I needed to have an optical band of stripes on the cards. How do I do this? It occurred to me that instead of printing a set of stripes on a transparent card (You can get transparent cards, but they are another rarity) I could make holes in a normal card. Making 85 3mm x 0.5mm holes in a credit card sized card isn't exactly trivial, but when you have a CNC engraver it is in the realms of possibility.

I had a couple of expired credit cards so I put them on the CNC, created a quick DXF file, converted to gcode and had a go. The result was better than I expected. I tried the cards but they didn't work. I was expecting this as there are tow types of magnetic stripe (in general, there are actually many different subsets): low coercivity and high coercivity. Coercivity is a measure of how hard it is to magnetise something: if it's low corecivity (LO-CO) then it's easy to magnetise. If it's high coercivity (HI-CO) then it's harder. The units used for coercivity is Oe (Oersted) and LO-CO is around 300, HI-Co around 3000. HI-Co is used for cards that have permanent data on them, such as credit cards, as you don't want it to be accidentally erased. LO-CO is used for data that is rewritten often (more than once, really). The Casio cards are LO-CO, as you want to be able to record cards at will. HI-CO cards could have been used, but as they are harder to write data to, they take more power to write and hence battery life would be adversely affected.

So, the credit cards wouldn't work, but the optical stripe looked fine. I ordered some LO-CO CR80 sized blank PVC cards. In the meantime I had some help from the calculator community and was sent a photograph of a Casio card with a ruler nbext to it. Up until now I'd been sizing cards from parts of the calculator, which, it turns out, isn';t a good way to size things. This picture enabled me to determine that I'd got the size of the cards wrong and they were actually CR80 size. Good news.

There was bad news, though, as my PRO fx-1 seemed to have taken exception to being dismantled and had decided to stop responding to keypresses properly. After a disappointing hour or two where I thought I'd broken my calculator I determined that my calculator, even though it looked pristine, had actually had some battery leakage in the past. This seems to have caused some problems with the keyboard scanning, which I fixed by giving the keyboard PCB a good scrub.

With the keyboard reliable again, i was ready for the CR80 cards to arrive. Which they did. I put them on the CNC and milled some slots.



I used a 20 degree D cutter for this, at a low rpm to avoid melting the plastic. A 10 or 15 degree cutter is better. (Note: I have now moved to a 0.55mm end mill)


Trying the card was disappointing, as it didn't seem to work. I couldn't get a card to store a program. As a last resort before giving up, I soldered some wires on the card read/write head and looked at the recording signals on my scope. I was interested in the data format and even if I didn't get my cards working then at least I'd be able to work out what the data format was and why there were 85 slots (for 127 steps, odd number). I was also wondering if the card reader was faulty in my machine. Looking at the recording waveforms






they looked healthy, so I looked at the read waveforms. They also looked healthy:


In fact they looked very healthy, and I thought that maybe I was pulling the cards through too fast. I slowed down the pull speed and success! I managed to record and read a card. Oddly, from that point on I have had no real problems recording and reading cards. I have also tried to pull them through too fast and too slow, but they just work, so I'm not sure why I had a problem before.

So, I can make cards for the machine. They take a while to mill, I have to mill twice, once for the cut and once to clean it up, and I have to use a scalpel to clean the swarf off the slots, but they do work.

Here's a video of me using one of the cards:





Making your own

If you want to do this, here's some details:

I used:

 LO-CO cr80 blank PVC cards
 0.2mm D 20 degree cutter  (10 degree or 15 degree is better)
i have now moved to using a 0.55mm end mill to cut the slots. 

 3D printed CR80 holder
          https://www.thingiverse.com/thing:3571814
 Gcode file to cut slots (on Thingiverse page above)
 CNC 3020 (generic CNC milling/engraving machine)

         










Friday, 5 April 2019

Not My Hack

In the UK we have string pullcords on lights in bathrooms. These are usually in two pieces, joined with a plastic or metal widget that has a couple of holes, one in each end.  You put the ends of the two piece of cord in the holes and tie two knots to hold them there. then you hang a quirky thing off the end of the bottom cord. the plastic 'joiner' in a friend's house had broken, and he wondered if I could make a replacement. I thought about it for a while and made this:



Before  I had a chance to deliver the part, I was sent this photo of his solution:


This was just too good not to put up here. It's cheap and effective, and has the quirkiness required of a pull-cord. How long will it last? Who knows? But then, it doesn't matter, as you just replace it with another bottle...



Friday, 10 February 2017

Canopy Fittings Finished


The canopy fitting replacement is done, and I've reinforced the original broken one with a couple of aluminium plates.








Hopefully the newly manufactured fitting will fit the extrusion it lives in OK, and if for some reason it doesn't work then there's the reinforced original fitting that can be used instead.

Sunday, 10 July 2016

Nuts

I've been looking for 12mm T nuts with an M6 hole for a while, to use with my very small vice. I finally decided to make some as I couldn't find any. Some steel arrived and off I went.






The one on the left is the 12mm T nut with an M10 hole. Mine are on the right. They work nicely. I think I'll have to cut some bolts down to a useful length though. The mill pretty easily cut these out too, I managed to make the cuts in a single pass, which made it easier.  One I get the DRO going I'll be able to take multiple cuts more easily, I just couldn't be bothered this time.

Thursday, 28 April 2016

Vice

Up until now I've been using a large vice that I bought to use on the drill press. It's just too big though, and uses up too much of the Z axis travel when milling. So I bought a small machinist vice.


It's a quick release vice and is tightened by the knurled knob. Tightening by hand isn't enough to firmy grip, fortunately there's a hole for a bar in the knob. Unfortunately one wasn't supplied. Fortunately I had some bolts so I made a tightening bar:






It was a good chance to try out my new knurling tool. The knurl came out OK, but didn't quite mesh properly on the larger diameter.


The bar works well though:




Saturday, 13 February 2016

ZX Spectrum Edge Connector

Years back I never had a ZX spectrum, but I do now. I fancy some hardware additions to this beastie so I needed some edge connectors. Unfortunately they don't seem to be made and sold anywher ethat is easily findable on websites, so I bought a couple from the retro computer shack. They need a bit of work to make them actually fit the spectrum, so rather than the suggested hacksaw, I used the mill:






Once milled they look quite nice, you'd not know they weren't the correct size to start. Here's the before and after picture: