I'm going to have a crack at a TZXCassette V3.
The plan is to get motor pause detection working and try to support as many systems as possible.
I have to fit all this in a shell and possibly a larger battery. Oh, and some mechanical bits too.
This is going to be fiddly! π
Speaking of mechanical bits, I'll be using magnets and a hall effect sensor on the pinch wheel.
It should detect, play, stop, motor pause (important!) And as I'll be using a second Arduino, it would be lovely to get some deck health monitoring in there too. π
To get the dimensions from the real world, I scan an object in at 1200dpi with a ruler next to it, then scale appropriately. π
Now I have an idea of the space I have left, I need to know how the hall effect sensor handles low voltage. It might need a buck boost module. π€
Getting it all in is going to take some out of the box thinking.
Working to the outside of the shell instead of limiting myself to the inside gives me an extra 3.5mm to play with vertically.
It feels like I'm cheating somehow but I'll need the space. π
I have a rough idea where things should go now. Made a jig for the Laser-Goose and I have a bunch of rejected tapes to play with.
If it pans out, I should be able to over triple the battery capacity and have room to spare. π
Got it all in with room to spare even with a larger battery. There's still some jiggling to do but it's a hugely encouraging start.
I need to learn how to program an Arduino to get the management stuff running but I suck at coding so it may take a while. π
Yay, this was much easier than I was expecting! π
I have the diagnostic status page formatted with variables used (junk values for now) I'll get to work on a test harness for the rotation sensor and get setting up the logic.
It might end up being pretty useful on its own. π
Small but significant progress!
The test rig can read from the wheel, and all the pins are soldered, it just needs the logic tapping in.
I'm no mathematician (not even a little bit) but I can handle some Pi and distance/time stuff. π₯³βΊοΈ
I've got it detecting everything! π²
I've simulated a motor pause by pulling the power on the Stunt Speccy.
It's surprisingly responsive with plenty of scope for optimization! π
Also, I've just worked out the numbers aren't as consistent as they should be as the wheel is rubbing on the sensor. π
Rotating magnets of the same orientation near a metal pin is a terrible idea - It's a great way to magnetise it!
I'm going to go with 0.5mm x 2mm magnets, double them up and alternate the poles so it'll degauss the pin instead. π
Did a bunch of tidying of the code last night, and whipped up a basic TZXduino.
I'm going to smash out the chores and then see if I can get them to talk to each other.
I'll work out the sending logic while I mop. π
It only bloody works! Plenty more to do but the general approach is sound. π
I have all the functions I need working, it's a little sluggish but that's because my code is junk. π
I'll tweak the timings and optimise the display routine then I'll need to see how it works on a battery. π
I finally managed to snap the capstan arm, it took a fair amount of force to do it too.
It has just occurred to me to eliminate the capstan detect switch. It makes no functional difference and I can make a stronger arm. π
It's easier to make a new one than scavenge. I went for two magnets, in opposition, I'll only get one read per rotation but it'll cut down on magnets and degauss while it spins.
Those bearings are 4mm, with a 1.5mm inside. I knew it would be fiddly but wow! π
The play, pause and stop are rock solid even on 2 2x0.5mm magnets so I'm moving onto the coil.
For a laugh, I did 27 turns (my go to number other than three) and actually got a partial load.
(I also need to fix my RGB lead.) π
I have a socket rigged to the back that shows what the tape deck is seeing. That output needs to be more square.
I'm guessing that I'm running to the limit of the Arduino and it isn't able to deliver a crisp waveform. More turns it is. π
(It's all guesswork, I know nothing) π
I mangled a head to take a look at the inside. Looks like more than 27 turns are needed.
I'm going to go with 100 but doubt I have the attention span to reliably count it. π
The 'it just works' curse continues. I've just loaded Ant Attack using a 10uH inductor taped to the deck.
It's overdriven and the wave form is messed up but I found a blog that details the problem exactly.
A blog post I wrote.
And forgot about. π
I used a larger inductor and a 220uf cap, the waveform is markedly less kinky so I'm having a go at Head Over Heels, it has always been my white whale, it's a tricky bugger.
Fingers crossed. π
Yes! It worked! I need to think of something other than a massive cap though. π€
I think I've been completely wrong about filtering, I've been tweaking with 1 - 3 stage RC filters for a few days and something didn't fit what I've been seeing.
I think those spikes are the inductor dumping current back into the circuit! π²
I need a diode... π€
A small diode helps massively and it all makes sense retrospectively.
That's a big signal to noise ratio and previous filtering efforts have just masked the problem.
It took me 3 years to work out that if you put an inductor in a circuit, it will induct. Heh. π
I need different diodes, it's clamping shut a little late. I was on the money with the 220uf cap though, it is enough to mush the mess together. At least now I know why it works. π
It loaded every game I threw at it but it's a fudge fix for now.
Got the diode dumping the backlash into a resistor and that's as good as I think I'll get it without some filtering.
I think the deck prefers a sine wave as opposed to a square so I'll do some testing. π
I have amassed quite the collection of filters...
I can get everything to work except for Gilligan's Gold or Gilligan's Gold and nothing else. π€
I've cracked it! I (finally) understand the issue and everything works now.
Loading is absolutely rock solid so I'll call this stage done and move on with the rest of the build. π
By way of explanation, my theory is that the induction spikes are cumulative and these spikes throw the SNR all to hell. The inductor I used is terrible which ended up being a good thing.
This makes the waveform 'Wibbly' and the cross over point is thrown out of whack.
The diode keeps the spikes in line (mostly) but using a 'proper' tape head with 220ohms absorbs it all and gives an ideal, unfettered stream.
It means that It should work better with other systems as I haven't had to tune it.
It only took me 3 years to work that out. π
I'm going to have a crack at a TZXCassette V3.
The plan is to get motor pause detection working and try to support as many systems as possible.
I have to fit all this in a shell and possibly a larger battery. Oh, and some mechanical bits too.
This is going to be fiddly! π Speaking of mechanical bits, I'll be using magnets and a hall effect sensor on the pinch wheel.
It should detect, play, stop, motor pause (important!) And as I'll be using a second Arduino, it would be lovely to get some deck health monitoring in there too. π To get the dimensions from the real world, I scan an object in at 1200dpi with a ruler next to it, then scale appropriately. π
Now I have an idea of the space I have left, I need to know how the hall effect sensor handles low voltage. It might need a buck boost module. π€ Getting it all in is going to take some out of the box thinking.
Working to the outside of the shell instead of limiting myself to the inside gives me an extra 3.5mm to play with vertically.
It feels like I'm cheating somehow but I'll need the space. π I have a rough idea where things should go now. Made a jig for the Laser-Goose and I have a bunch of rejected tapes to play with.
If it pans out, I should be able to over triple the battery capacity and have room to spare. π Got it all in with room to spare even with a larger battery. There's still some jiggling to do but it's a hugely encouraging start.
I need to learn how to program an Arduino to get the management stuff running but I suck at coding so it may take a while. π Yay, this was much easier than I was expecting! π I have the diagnostic status page formatted with variables used (junk values for now) I'll get to work on a test harness for the rotation sensor and get setting up the logic.
It might end up being pretty useful on its own. π Small but significant progress!
The test rig can read from the wheel, and all the pins are soldered, it just needs the logic tapping in.
I'm no mathematician (not even a little bit) but I can handle some Pi and distance/time stuff. π₯³βΊοΈ I've got it detecting everything! π²
I've simulated a motor pause by pulling the power on the Stunt Speccy.
It's surprisingly responsive with plenty of scope for optimization! π Also, I've just worked out the numbers aren't as consistent as they should be as the wheel is rubbing on the sensor. πRotating magnets of the same orientation near a metal pin is a terrible idea - It's a great way to magnetise it!
I'm going to go with 0.5mm x 2mm magnets, double them up and alternate the poles so it'll degauss the pin instead. π Did a bunch of tidying of the code last night, and whipped up a basic TZXduino.
I'm going to smash out the chores and then see if I can get them to talk to each other.
I'll work out the sending logic while I mop. π It only bloody works! Plenty more to do but the general approach is sound. π I have all the functions I need working, it's a little sluggish but that's because my code is junk. π
I'll tweak the timings and optimise the display routine then I'll need to see how it works on a battery. π I finally managed to snap the capstan arm, it took a fair amount of force to do it too.
It has just occurred to me to eliminate the capstan detect switch. It makes no functional difference and I can make a stronger arm. π It's easier to make a new one than scavenge. I went for two magnets, in opposition, I'll only get one read per rotation but it'll cut down on magnets and degauss while it spins.
Those bearings are 4mm, with a 1.5mm inside. I knew it would be fiddly but wow! π The play, pause and stop are rock solid even on 2 2x0.5mm magnets so I'm moving onto the coil.
For a laugh, I did 27 turns (my go to number other than three) and actually got a partial load.
(I also need to fix my RGB lead.) π I have a socket rigged to the back that shows what the tape deck is seeing. That output needs to be more square.
I'm guessing that I'm running to the limit of the Arduino and it isn't able to deliver a crisp waveform. More turns it is. π
(It's all guesswork, I know nothing) π I mangled a head to take a look at the inside. Looks like more than 27 turns are needed.
I'm going to go with 100 but doubt I have the attention span to reliably count it. π The 'it just works' curse continues. I've just loaded Ant Attack using a 10uH inductor taped to the deck.
It's overdriven and the wave form is messed up but I found a blog that details the problem exactly.
A blog post I wrote.
And forgot about. π I used a larger inductor and a 220uf cap, the waveform is markedly less kinky so I'm having a go at Head Over Heels, it has always been my white whale, it's a tricky bugger.
Fingers crossed. π Yes! It worked! I need to think of something other than a massive cap though. π€ I think I've been completely wrong about filtering, I've been tweaking with 1 - 3 stage RC filters for a few days and something didn't fit what I've been seeing.
I think those spikes are the inductor dumping current back into the circuit! π²
I need a diode... π€ A small diode helps massively and it all makes sense retrospectively.
That's a big signal to noise ratio and previous filtering efforts have just masked the problem.
It took me 3 years to work out that if you put an inductor in a circuit, it will induct. Heh. π I need different diodes, it's clamping shut a little late. I was on the money with the 220uf cap though, it is enough to mush the mess together. At least now I know why it works. π
It loaded every game I threw at it but it's a fudge fix for now. Got the diode dumping the backlash into a resistor and that's as good as I think I'll get it without some filtering.
I think the deck prefers a sine wave as opposed to a square so I'll do some testing. π I have amassed quite the collection of filters...
I can get everything to work except for Gilligan's Gold or Gilligan's Gold and nothing else. π€ I've cracked it! I (finally) understand the issue and everything works now.
Loading is absolutely rock solid so I'll call this stage done and move on with the rest of the build. π By way of explanation, my theory is that the induction spikes are cumulative and these spikes throw the SNR all to hell. The inductor I used is terrible which ended up being a good thing.
This makes the waveform 'Wibbly' and the cross over point is thrown out of whack. The diode keeps the spikes in line (mostly) but using a 'proper' tape head with 220ohms absorbs it all and gives an ideal, unfettered stream.
It means that It should work better with other systems as I haven't had to tune it.
It only took me 3 years to work that out. π