|Project TZXDuino Pico
|building a tiny cassette recorder replacement device that can fit inside a sinclair spectrum
For the nationaal VideoGame Museum in Zoetermeer, (https://www.nationaalvideogamemuseum.nl) I'm designing a version of the TZXDuino (a cassette replacement device) that is stripped down so much that it fits INSIDE a ZX-Spectrum. A normal TZXDuino has a row of 6 or so 6x6mm buttons, and either a 16x2 character LCD (with a I2C backpack) or a tiny I2C driver graphical screen such as were used in "candy-bar" phones like the NOKIA 3310. The tiny (1 by 1 inch) OLED screen must have an I2C interface. For my application a screen was unwanted and only two buttons (Up, and Play) were needed. Also I discovered that the LM386 speaker driver used to buffer/amplify the Cassette input signal was completely unnecessary. All Barrel and jack plug connectors were replaced with simple hard wire contacts, the "autostart" connection is not used in a spectrum, but might be used in a home computer with a built in cassette deck. Like a CPC646.
As the TZXDuino Pico is not much more than a Arduino nano coupled to a SD-Card holder, it might also be used for other uses where an Arduino with sd-card interface is needed. The TZXDuino software uses a sd-card driver library, that can be used for other projects too.
October 11, 2022 the schematic
I already had some DM3D-SF Hirose micro SD Push/Pull card holders, but the KiCad Library footprint of the schematic symbol for the cardholder was not an exact match to my DM3D-SF cardholders, so I used the below .PDF file that contains the exact pads of all used components to check the Footpad. when a .PDF is printed on a A4 paper it is exactly 100% correct dimensionally, so after printing the PDF (which wasn't as easy as it sounds) I could check if the pads of the footprint exactly fitted the real DM3D-SF, and luckily they did, so I can now start the layout.
To power the TZXDuino Pico, normally is done through its micro USB port, but I was planning to power it through the 5V line, but maybe it should be the VRAW input pin, I'm investigating that. If 5V is good enough I can power it through the Display connector, if powering via the VRAW pin is a necessity I have to add one more header.
October 26, 2022 did the PCB layout
I concluded that the PCB footprint of the SD-Card holder was suitable for the DM3D-SF, and that I could power de Arduino through the 5V line, and that the Display connecter was suitable for that, as it has GND and +5V on two adjacent pins (Pin 1 and Pin 2). So I routed the PCB, and the result can be seen in the picture above. The PCB is very small less than 1.5 by 1.9 Inch. It has optionally 6x6mm buttons , but normally small pushbuttons that can be screwed to the back of the ZX-Spectrum are used and connected to J2 and J3. J2 is to switch to another game to load, and J3 is to start playback. J4 is the cassette signal output, internally connected to the EAR input jack. J5 is not used in a Spectrum, but in a computer with a built in cassette deck it can be used to autograft playing when the play button of the cassette is pressed, J6 can be used if all the buttons are used on a small button PCB, but not used in a Spectrum. The TZXDuino Pico should be compatible with the software for normal TZXDuino's. If the absence of a display is halting the software, you can try to set the display driver to "serial", I assume that then the Built into the Arduino board's serial (USB) interface will output the text that otherwise should go to the display(s). It is still possible to attach a display, either the 20 x 2 LCD, or the 1" by 1" OLED display. Both though the I2C connection. So the simple 20 x 2 LCD needs to have an I2C "backpack". The TZXDuino Pico does not have any mounting holes, one reason is that there is no place for them, and also because there is no place to mount to inside a spectrum, instead the device is mounted and electrically isolated with ducttape. the Arduino Nano should be mounted with the micro-USB port to the same side as the sd-card, so on the "top-side" for the pictured board. This makes it possible to stick both the SD-Card and the USB port trough a side of a home computer, so you can exchange the SD-card, and monitor and upload code without having to open the computer. I uploaded production files to my GitHub page as the project TZXDuino Pico, here: https://github.com/mahjongg2/TZXDuino-Nano
December 19, 2022 TZXDuino Pico is working and used inside a Spectrum
I made a mistake because I did not notice that the SD-Card needs to be inserted from the side of it connector pads, not from the other side, So to solve this problem I stuck a thick piece of dual sided tape under the sd-card holder to lift it up above the resistors, so the card is not hindered by the resistors when inserting it, and removed one button (the "up" button closest to the sd-card. I bent the pins of the card holder down, so I should solder them to the pads below, now I could carefully insert the SD-Card. And it worked! I soldered the audio cable from the underside of the PCB, if you try to solder to the top, you damage the connector, and cannot insert the 3.5mm jack anymore. Luckily I tried with the audio out (MIC) connector, so the audio in (CAS) connecter still (also) works.I used a normal DIP socket so the height was somewhat reduced, that was just enough so I could fit the pico inside. I used angled pinheaders and dupont female cables. here you can see the TZXDuino-Pico inside a spectrum.
On the top left you see two buttons which connect to the yellow and green wire pairs. Unfortunately these black buttons happened to be of the normally closed type instead of the normally-open type. I had one button that was normally open, but it was red, so for the moment you can only start play, and not switch to another game, but besides that my built in TZXDuino works wonderfully.
January 10, 2023 Re-did as TZXDuino-pico revision 1,2
I fixed the sd-card rotation problem, and changed all resistors to 0805. The GitHub files are now all for revision 1,2 the 3D preview now looks like this:
as you can see the sd-card is now oriented with the card slot on top, and resistors are smaller with three 0805 1K8 resistors in the top row, and three 3K3 resistors in the bottom row. The card holder is an Hirose DM3D-SF (see farnell https://nl.farnell.com/hirose-hrs/dm3d-sf/connector-micro-sd-push-pull-smt/dp/1764377?st=1764377 , or mouser https://nl.mouser.com/ProductDetail/Hirose-Connector/DM3D-SF?qs=nSryOFbzj8L3f0GFYlvXkw%3D%3D )
I used two T 113A RT buttons (with different color knobs) connected to the NEXT (J2) and PLAY (J3) connections (the 6 x 6 mm buttons SW1 and SW2) are optional). J4 goes to the EAR 3.5 mm connector, make sure the cable is not reversed, so that the top (GND) pin (PIN-1) goes to the GND connection of the EAR plug, and the bottom signal pin goes to the audio in pin of the 3.5mm jack (the pin farthest into the spectrum, connecting to the TIP of a mono 3.5mm jack). If you revert the two connections you short the audio to ground. Solder to the bottom PCB side of the 3.5mm jack, not on the top metal, as this will damage the jack. J5 is used for a start/stop connection, and can be used to auto start playback when you build the TZXDuino-pico into a computer with a built in cassette deck, it is not normally used with a sinclair spectrum 16K 48K or 128K. J1 is a combined 4-pole connector, that can be, but not must be, connected to a display. And J6 optionally connects to the complete set of six buttons if you desire to built a normal TZXDuino from this base model. J1 also is used to power the TZXDuino with 5Volt from within the Spectrum, make sure to not swap +5V and GND! The left most pin of J1 (square pad) is GND, pin-2 , the next pin is for the +5V connection. Start soldering with the SD-Card holder, solder the six (of the eight available) contact pads, the outer two pins are not used), and at least one of the solder pads connected to the metal shell, for example the pad next to the top left one (next to the H1 text) and the bottom left one, so the card holder is mechanically stable soldered to the PCB. The Arduino-nano does not have to be socketed if you need to have as low a profile as possible, but not having a socket makes removing the Arduino nearly impossible, so if a low profile is not needed use a socket. in this version I indicated that the Arduino's USB connector is oriented on top. Pin 1 of the Arduino is on the bottom right.
here is a picture of the top of the PCB, so you can see how easy the soldering of the sd-card holder will be. Note that the bottom left pad is not connected to anything, as it is only for mechanical strength, but other pads connected to the shell (top left) are grounded, so the shell is also shielded.
The electrical pads from left to right are 1,2,3,4,5,6, and 7 (pad 1 and pad 8 are not connected).
July 14, 2023 corrected level converters for TZXDuino-pico revision 1,3
I was busy with my rhococo design when I noticed a mistake I made in the TZXDuino PICO, the resistor dividers for vonverting 5V levels to 3V3 levels were "backwards", !
Revision 1.3 corrects this.
the new schematic File:TZXDuino pico schematic rev 1.3.pdf
the new preview of revision 1.3. All files are uploaded to gitHub.