Homemade BRAM Backup HuCard (like Tennokoe Bank) - Hardware
Nov 20, 2019 4:07:24 GMT
gredler, Black_Tiger, and 3 more like this
Post by dshadoff on Nov 20, 2019 4:07:24 GMT
This is the first of two threads about a homemade memory backup HuCard which backs up BRAM to the card, and it describes the hardware (how to make your own HuCard).
The second thread (should be posted within a week) will elaborate on the software side.
I’ve always wanted to build my own HuCards, but the tools to do so always seemed out of reach. Thick (2.4mm) PC Boards have been limited to only a few vendors' capabilities, and the prices of the thick boards has risen quite a bit in recent years. And anyway, if you make a card using a thick PC Board, the electronics will be exposed and it will be obvious that it's homemade (as well as being more fragile than the original).
This year, I started to take another look at electronics which I had enjoyed as a child before I dove deeply into computers (electronics was an expensive hobby at the time, and resources for learning how to 'debug' one's not-quite-working projects were exceedingly scarce, so computers ended up being a less-expensive hobby overall). After 30-40 years, some things haven't changed, and others are nearly unrecognizable (in a good way) !
Flash forward to the present, where Arduino lowers the entry barrier for the uninitiated and replaces those 50-in-1 kits of days gone by, where Mouser delivers parts overnight at reasonable prices, and where PC Boards are made-to-order in China for less money than you might think is possible. No more need for toxic chemicals in your basement !
I got the inspiration to make the HuCard from reading this article in Hackaday, and I set about performing measurements for the HuCard:
hackaday.com/2019/01/18/oreo-construction-hiding-your-components-inside-the-pcb/
I have posted my design on GitHub here:
github.com/dshadoff/Megavault
And here is a picture of a completed card:
Board design:
I used the free version of EAGLE PC Board software, and included all of the custom parts in a PC-Engine.lbr library file - be sure to copy this into your EAGLE/libraries folder.
All of the decoration on the card is basically one of:
- solder mask (the background); it is white on my card.
- silkscreen (the foreground); it is black on my card
- exposed traces; since I am using ENIG finish on the outside layers, this comes out gold
Measurements and tolerances:
Standard HuCards are 2.4mm thick, so I decided on a sandwich of: 0.6mm + 1.2mm + 0.6mm, based on the following factors:
1. TSOP memory is 1.0mm thick, and up to 1.2mm high when seated on the board
2. Those are standard PCB thicknesses, so can be obtained at standard (low) prices
Note that PC Boards as delivered are usually a few percentage points thinner than these measurements, so layering these boards directly on one another would likely turn out to be 2.3mm in real life. No worries, the ‘adhesive’ we need to keep them attached will make up the difference by close to the exact amount we need to make up.
All the other measurements were taken using digital callipers - last time I was interested in getting one of these (years ago), they were $100 and more, but now you can get them for $15 on Amazon.
Parts:
I didn't want to get caught up with level-shifters or any more electronics than absolutely needed, so I searched for 5V TSOP Flash memory.
Good news, the 8Mb (1MB) version is around the same price it was 10 years ago - about $10 each.
www.mouser.ca/ProductDetail/Alliance-Memory/AS29CF800B-55TIN?qs=sGAEpiMZZMtI%252BQ06EiAoG%252B%252B%252BMGla4gm4QgIFHuukc88%3D
Even better news: If you only need 4Mb (512KB), the price is dramatically lower, at about $1.50:
www.mouser.ca/ProductDetail/Microchip-Technology/SST39SF040-55-4I-WHE?qs=sGAEpiMZZMtI%252BQ06EiAoGzAIDceP6I%2FjmmCJTBuOlXo%3D
Be careful with the TSOP Flash parts, they come in two different "widths" (looks like lengths, bit the pins run along the short edge): the body is either ~12mm or ~20mm. I have used the narrower width 4Mb Flash memory in my design.
Generally, there are 'decoupling' capacitors placed adjacent to electronic chips, especially when the following are the case:
a) The chip is more than a couple of centimetres from the power source
b) Any sort of surge of power requirement might take place due to transient demand from the chip
…Both are true in this case, so I placed 0.1uF and 1.0uF capacitors (although you could replace one with another value should you desire). I used '0603' size surface-mount, because they were sure to fit, and are still reasonably-priced for these values. While '0805' size units are easier to work with, many are taller than 1.2mm. Some people might wish to replace the 1.0uF capacitor with a 10uF; these may be difficult to find in the '0603' size, so be careful.
I did run a test without the capacitors on both my Duo and my white PC Engine, and I saw no issues during read, erase, or write cycles on multiple different classes of machine, so the values of these capacitors may not be so important.
PC Boards, makers, and cost:
China has lots of PC Board makers, and they generally compete on cost, speed, and capabilities. From an electrical or mechanical point of view, I doubt that any of them are going to let you down (assuming they carry boards of the appropriate thickness), but the aesthetics of the solder mask and silkscreen print might be something you care more about. Additionally, hard gold contacts are a factor which separates manufacturers from each other both on cost and capabilities.
You can see various manufacturers compared here:
manufacturingreports.com
In the end, I went with JLCPCB.com
For the top and bottom layers, I used "ENIG" ("electroless nickel, immersion gold") finish - this is an immersion gold treatment for the board to prevent corrosion; it is not very expensive, but is by no means as hardy as hard gold contacts. Still, I've done a couple of hundred insertion/extraction cycles with my test card, and while I see some light scoring on the contacts, it doesn't seem to have affected the finish significantly. Only time will tell about corrosion. Then I may have to clean contacts like people did with the old Nintendo cartridges. Not the end of the world.
For the middle spacer layer, I used HASL (cheapest finish, 'hot air solder levelling').
I also ordered a stencil to assist with applying solder.
Cost for a batch of 30 units (plus one stencil):
30 top layer = $16 + $16 ENIG finish = $32
30 bottom layer = $16 + $16 ENIG finish = $32
30 middle layer = $13.40
stencil = $7
shipping (DHL) = $30
Total = $114.40, or $3.81 each
The numbers get cheaper if you do larger batches, too.
With parts, about $6 each (plus labor), so not bad !
(Though admittedly, aesthetics are not as good as some of the other repro carts I’ve seen).
Assembly:
While these should theoretically be easy to assemble as surface mount and then "just bake" in a reflow oven, I found that placement of the TSOP chips was difficult, and I had solder bridges which occurred *behind the pins*, which were time-consuming to resolve. So I ended up soldering by hand (which was about the same difficulty, but slightly faster). First, I aligned the pins with the pads using a PC Board assembly microscope ($30 on AliExpress), and taped the chip in place, then soldered the pins by hand. This is a skill to be learned - not too hard, but the first few chips might be a bit discouraging. Watch some YouTube videos and you’ll see that there's a technique to it which can be mastered without too much difficulty. *JUST be sure to correctly orient the chip (pin 1)*. I put them on backwards more than once because I wasn’t paying enough attention.
I used lead solder for the parts (melting point 168C, set the soldering iron for 300C, careful to limit duration of contact).
Testing the contacts (ensuring good contacts and no shorts) is a bit of a pain though.
For fastening the boards together, I have a cheap reflow oven (T-962), and I set the reflow profile for common lead solder - but when I did this, the chip inside desoldered in more than one instance. So I moved to low-temperature solder for the edge. I use Chip-Quick T4 low-temp solder, which has a melting point of 138C and a peak reflow temperature just short of lead solder’s melting point of 168C. No failures after that.
I do 2 reflows: the first one is to apply the middle layer board to the assembled electronics, then the second one to affix the back layer. The reason for two cycles is so that I can test that the electronics is still working in-between steps.
To apply the solder, I use the stencil on the 'spacer' board, align it agains the electronics board, then use small metal binder clips like these to hold the boards in place:
www.staples.com/Staples-Small-Satin-Silver-Metal-Binder-Clips-3-4-Size-with-3-8-Capacity/product_481323
The binder clips hold up well in the heat, and don’t deposit any residue on the board, but they may grip a bit too tight, leaving slight indentations where they were holding the boards. This is a step which could be improved a bit. Perhaps chunks of metal with fixed 2.4mm routed groove would be better.
Here's a picture of where I positioned the clips (NOTE: this board is just for display; the chip is on backwards and capacitors are not soldered).
Based on my experience putting a few of these together, about $0.50 of low-temperature solder is also used per unit, so if you’re planning to make a bunch of these, be sure to include that in your bill of materials.
Finishing:
DO NOT use the board in this state, without bevelling the leading edge which enters the cartridge port. You can easily damage the connector inside the PC Engine. I use sandpaper (roughly 180 grit), and holding the board at a 45 degree angle to a sanding block, remove the sharp edge. I can't really give precise measurements on how much to remove, but it should be a visible amount, and should become uniformly smooth along that edge. Maybe 0.6mm to 0.8mm back from the edge is about right, but you’ll be able to see for yourself if you compare against an original HuCard.
Sanding the edge doesn’t help aesthetics, so this is another area where people could help contribute to the knowledge base.
Notes for future:
Aesthetics:
I did have another idea about the aesthetics - since the solder mask is a key part of the aesthetics, and it isn't applied along the edge (and is also removed along the bevel), it would be nice to have a matching white color to apply (i.e. as marker or paint), as long as it doesn’t add any appreciable thickness. But 'matching white' is a tall order, as each PC board vendor’s solder mask is bound to be slightly different.
Or, I could give up on trying to duplicate the white/black tone of the originals, and just use a matte black solder mask. The gold finish on parts would stand out more nicely. For any surface which is not masked, perhaps an indelible marker could make up for that (assuming a compatible shade of black).
Weight:
A regular HuCard is about 12 grams, but my cards came out to be about 20 grams.
Not a deal breaker, but if you want to reduce the weight a bit, you can try a second cut-out from the middle layer. Don’t cut out too much, as I feel that the middle layer is also structural and helps provide stiffness for protection of the circuit. You still won't get the total weight down to 12 grams though, as the middle layer is only about 9-10 grams total, so there isn't 8 grams of material to remove.
Ideas for Expansions:
There’s nothing stopping somebody from adding a bunch more electronics into one of these - there’s a lot of board area available inside, and again topside.
Just a few ideas might include:
-Adding sound circuitry (although sorry, only a mono return path is built into the cartridge port)
-LEDs at the edge of the card or some other type of display to show status (be careful about power consumption though)
-logic analyzer for trace/capture
-communication hardware to a PC (or network or bluetooth, keyboard, etc.)
-adding an external microcontroller and/or FPGA
-One could put a massive amount of external memory in a tiny SPI flash on-board, and load from it in a similar way to the Arcade Card, or even how CDROM loading works.
If you decide to make Flash HuCards, I'd like to hear feedback about how they turned out, and any ideas on improving the process !
Also share your ideas for expansion here.
The second thread (should be posted within a week) will elaborate on the software side.
I’ve always wanted to build my own HuCards, but the tools to do so always seemed out of reach. Thick (2.4mm) PC Boards have been limited to only a few vendors' capabilities, and the prices of the thick boards has risen quite a bit in recent years. And anyway, if you make a card using a thick PC Board, the electronics will be exposed and it will be obvious that it's homemade (as well as being more fragile than the original).
This year, I started to take another look at electronics which I had enjoyed as a child before I dove deeply into computers (electronics was an expensive hobby at the time, and resources for learning how to 'debug' one's not-quite-working projects were exceedingly scarce, so computers ended up being a less-expensive hobby overall). After 30-40 years, some things haven't changed, and others are nearly unrecognizable (in a good way) !
Flash forward to the present, where Arduino lowers the entry barrier for the uninitiated and replaces those 50-in-1 kits of days gone by, where Mouser delivers parts overnight at reasonable prices, and where PC Boards are made-to-order in China for less money than you might think is possible. No more need for toxic chemicals in your basement !
I got the inspiration to make the HuCard from reading this article in Hackaday, and I set about performing measurements for the HuCard:
hackaday.com/2019/01/18/oreo-construction-hiding-your-components-inside-the-pcb/
I have posted my design on GitHub here:
github.com/dshadoff/Megavault
And here is a picture of a completed card:
Board design:
I used the free version of EAGLE PC Board software, and included all of the custom parts in a PC-Engine.lbr library file - be sure to copy this into your EAGLE/libraries folder.
All of the decoration on the card is basically one of:
- solder mask (the background); it is white on my card.
- silkscreen (the foreground); it is black on my card
- exposed traces; since I am using ENIG finish on the outside layers, this comes out gold
Measurements and tolerances:
Standard HuCards are 2.4mm thick, so I decided on a sandwich of: 0.6mm + 1.2mm + 0.6mm, based on the following factors:
1. TSOP memory is 1.0mm thick, and up to 1.2mm high when seated on the board
2. Those are standard PCB thicknesses, so can be obtained at standard (low) prices
Note that PC Boards as delivered are usually a few percentage points thinner than these measurements, so layering these boards directly on one another would likely turn out to be 2.3mm in real life. No worries, the ‘adhesive’ we need to keep them attached will make up the difference by close to the exact amount we need to make up.
All the other measurements were taken using digital callipers - last time I was interested in getting one of these (years ago), they were $100 and more, but now you can get them for $15 on Amazon.
Parts:
I didn't want to get caught up with level-shifters or any more electronics than absolutely needed, so I searched for 5V TSOP Flash memory.
Good news, the 8Mb (1MB) version is around the same price it was 10 years ago - about $10 each.
www.mouser.ca/ProductDetail/Alliance-Memory/AS29CF800B-55TIN?qs=sGAEpiMZZMtI%252BQ06EiAoG%252B%252B%252BMGla4gm4QgIFHuukc88%3D
Even better news: If you only need 4Mb (512KB), the price is dramatically lower, at about $1.50:
www.mouser.ca/ProductDetail/Microchip-Technology/SST39SF040-55-4I-WHE?qs=sGAEpiMZZMtI%252BQ06EiAoGzAIDceP6I%2FjmmCJTBuOlXo%3D
Be careful with the TSOP Flash parts, they come in two different "widths" (looks like lengths, bit the pins run along the short edge): the body is either ~12mm or ~20mm. I have used the narrower width 4Mb Flash memory in my design.
Generally, there are 'decoupling' capacitors placed adjacent to electronic chips, especially when the following are the case:
a) The chip is more than a couple of centimetres from the power source
b) Any sort of surge of power requirement might take place due to transient demand from the chip
…Both are true in this case, so I placed 0.1uF and 1.0uF capacitors (although you could replace one with another value should you desire). I used '0603' size surface-mount, because they were sure to fit, and are still reasonably-priced for these values. While '0805' size units are easier to work with, many are taller than 1.2mm. Some people might wish to replace the 1.0uF capacitor with a 10uF; these may be difficult to find in the '0603' size, so be careful.
I did run a test without the capacitors on both my Duo and my white PC Engine, and I saw no issues during read, erase, or write cycles on multiple different classes of machine, so the values of these capacitors may not be so important.
PC Boards, makers, and cost:
China has lots of PC Board makers, and they generally compete on cost, speed, and capabilities. From an electrical or mechanical point of view, I doubt that any of them are going to let you down (assuming they carry boards of the appropriate thickness), but the aesthetics of the solder mask and silkscreen print might be something you care more about. Additionally, hard gold contacts are a factor which separates manufacturers from each other both on cost and capabilities.
You can see various manufacturers compared here:
manufacturingreports.com
In the end, I went with JLCPCB.com
For the top and bottom layers, I used "ENIG" ("electroless nickel, immersion gold") finish - this is an immersion gold treatment for the board to prevent corrosion; it is not very expensive, but is by no means as hardy as hard gold contacts. Still, I've done a couple of hundred insertion/extraction cycles with my test card, and while I see some light scoring on the contacts, it doesn't seem to have affected the finish significantly. Only time will tell about corrosion. Then I may have to clean contacts like people did with the old Nintendo cartridges. Not the end of the world.
For the middle spacer layer, I used HASL (cheapest finish, 'hot air solder levelling').
I also ordered a stencil to assist with applying solder.
Cost for a batch of 30 units (plus one stencil):
30 top layer = $16 + $16 ENIG finish = $32
30 bottom layer = $16 + $16 ENIG finish = $32
30 middle layer = $13.40
stencil = $7
shipping (DHL) = $30
Total = $114.40, or $3.81 each
The numbers get cheaper if you do larger batches, too.
With parts, about $6 each (plus labor), so not bad !
(Though admittedly, aesthetics are not as good as some of the other repro carts I’ve seen).
Assembly:
While these should theoretically be easy to assemble as surface mount and then "just bake" in a reflow oven, I found that placement of the TSOP chips was difficult, and I had solder bridges which occurred *behind the pins*, which were time-consuming to resolve. So I ended up soldering by hand (which was about the same difficulty, but slightly faster). First, I aligned the pins with the pads using a PC Board assembly microscope ($30 on AliExpress), and taped the chip in place, then soldered the pins by hand. This is a skill to be learned - not too hard, but the first few chips might be a bit discouraging. Watch some YouTube videos and you’ll see that there's a technique to it which can be mastered without too much difficulty. *JUST be sure to correctly orient the chip (pin 1)*. I put them on backwards more than once because I wasn’t paying enough attention.
I used lead solder for the parts (melting point 168C, set the soldering iron for 300C, careful to limit duration of contact).
Testing the contacts (ensuring good contacts and no shorts) is a bit of a pain though.
For fastening the boards together, I have a cheap reflow oven (T-962), and I set the reflow profile for common lead solder - but when I did this, the chip inside desoldered in more than one instance. So I moved to low-temperature solder for the edge. I use Chip-Quick T4 low-temp solder, which has a melting point of 138C and a peak reflow temperature just short of lead solder’s melting point of 168C. No failures after that.
I do 2 reflows: the first one is to apply the middle layer board to the assembled electronics, then the second one to affix the back layer. The reason for two cycles is so that I can test that the electronics is still working in-between steps.
To apply the solder, I use the stencil on the 'spacer' board, align it agains the electronics board, then use small metal binder clips like these to hold the boards in place:
www.staples.com/Staples-Small-Satin-Silver-Metal-Binder-Clips-3-4-Size-with-3-8-Capacity/product_481323
The binder clips hold up well in the heat, and don’t deposit any residue on the board, but they may grip a bit too tight, leaving slight indentations where they were holding the boards. This is a step which could be improved a bit. Perhaps chunks of metal with fixed 2.4mm routed groove would be better.
Here's a picture of where I positioned the clips (NOTE: this board is just for display; the chip is on backwards and capacitors are not soldered).
Based on my experience putting a few of these together, about $0.50 of low-temperature solder is also used per unit, so if you’re planning to make a bunch of these, be sure to include that in your bill of materials.
Finishing:
DO NOT use the board in this state, without bevelling the leading edge which enters the cartridge port. You can easily damage the connector inside the PC Engine. I use sandpaper (roughly 180 grit), and holding the board at a 45 degree angle to a sanding block, remove the sharp edge. I can't really give precise measurements on how much to remove, but it should be a visible amount, and should become uniformly smooth along that edge. Maybe 0.6mm to 0.8mm back from the edge is about right, but you’ll be able to see for yourself if you compare against an original HuCard.
Sanding the edge doesn’t help aesthetics, so this is another area where people could help contribute to the knowledge base.
Notes for future:
Aesthetics:
I did have another idea about the aesthetics - since the solder mask is a key part of the aesthetics, and it isn't applied along the edge (and is also removed along the bevel), it would be nice to have a matching white color to apply (i.e. as marker or paint), as long as it doesn’t add any appreciable thickness. But 'matching white' is a tall order, as each PC board vendor’s solder mask is bound to be slightly different.
Or, I could give up on trying to duplicate the white/black tone of the originals, and just use a matte black solder mask. The gold finish on parts would stand out more nicely. For any surface which is not masked, perhaps an indelible marker could make up for that (assuming a compatible shade of black).
Weight:
A regular HuCard is about 12 grams, but my cards came out to be about 20 grams.
Not a deal breaker, but if you want to reduce the weight a bit, you can try a second cut-out from the middle layer. Don’t cut out too much, as I feel that the middle layer is also structural and helps provide stiffness for protection of the circuit. You still won't get the total weight down to 12 grams though, as the middle layer is only about 9-10 grams total, so there isn't 8 grams of material to remove.
Ideas for Expansions:
There’s nothing stopping somebody from adding a bunch more electronics into one of these - there’s a lot of board area available inside, and again topside.
Just a few ideas might include:
-Adding sound circuitry (although sorry, only a mono return path is built into the cartridge port)
-LEDs at the edge of the card or some other type of display to show status (be careful about power consumption though)
-logic analyzer for trace/capture
-communication hardware to a PC (or network or bluetooth, keyboard, etc.)
-adding an external microcontroller and/or FPGA
-One could put a massive amount of external memory in a tiny SPI flash on-board, and load from it in a similar way to the Arcade Card, or even how CDROM loading works.
If you decide to make Flash HuCards, I'd like to hear feedback about how they turned out, and any ideas on improving the process !
Also share your ideas for expansion here.