~ Let's make RAM at home, thread #2 ~
In this part:
* Power [source] struggles,
* B-H curve plotting [attempts],
* How [not] to make a magnetic core for memory
* Working "made at home, no rare components needed" DIY magnetic core memory element
๐งต
Jonathan Lamothe likes this.
Jonathan Lamothe reshared this.
Davide Bucci
in reply to Nina Kalinina • • •Nina Kalinina
in reply to Nina Kalinina • • •Recap of the previous episode:
* We are trying to make a DIY computer random access memory. It doesn't have to be awesome, but it has to work and it has to be somewhat "made at home".
* It is quite possible to use DIY valves and capacitors to store bits, but it is expensive and potentially dangerous.
* So we're exploring obsolete memory technologies to see if there is anything cool we've lost/forgotten!
* One such type of memory, magnetic core memory, used to be the dominant type of RAM in computers until 70s.
* The idea is simple: the data is stored as magnetic field in the magnetic materials (such as ferrites). A magnetic ring can be magnetized in two directions at will, and a "sense" wire can read the direction of the magnetization.
* We made a simple circuit for driving 1 bit of commercially manufactured core memory.
* We tried to make our own cores from different materials but failed.
Phew... But that was in the previous thread, and this time we had better luck!
Nina Kalinina
in reply to Nina Kalinina • • •You probably will agree that it is quite hard to improve on the materials when the experimental setup does not allow to test for the properties of said materials ๐
The properties of the DIY cores we want to evaluate are "retentivity" and "coercivity" of a magnetic material. We want material to be "retentive" (B) - storing magnetism after external field is gone, yet we want the material to be "coercive" (H) - changing its magnetic field after being affected by an external magnetic field.
The test setup for this is called "B-H curve plotter" or "B-H core prober". To plot a B-H curve (and learn the properties of our material), we generally need to:
1) Apply known alternating current to the first winding around the core,
2) Measure voltage on the second winding around the core,
3) Integrate the voltage over time and plot it as X-Y chart
And you know what, we're about to hit a major roadblock right with the step one!
Nina Kalinina
in reply to Nina Kalinina • • •In the last thread I have mentioned that commercially available cores of the late 70s require currents of around 0.5A to switch their magnetization. That does not sound like a lot (1.5V AA battery can sustain this current for 2-3 hours).
But DIY cores are bigger, and they require bigger currents. Ideally, something like 2-3 Amps to get us started. On top of that, low voltages are not very convenient to work with, so we want 5V or even 12V.
12V at 3A means that we are going to dissipate 36 Watts in peak - comparable to a small LED TV, guitar amp or an inkjet printer - over a relatively small load and relatively thin wires.
And oh did I mention it must be alternating current for B-H tests? That means we cannot use our regular lab power source. Most signal generators don't expect currents over ~100mA. Using regular 220V AC from the plug sounds risky. What do we do? What _can_ we do?
Nina Kalinina
in reply to Nina Kalinina • • •We had a step-down transformer lying around, scavenged from one thing or another. It had 5:1 transformation ratio, so we figured if we use the maximum voltage from the signal generator - 20V in amplitude, from -10V to +10V - we will get somewhat decent -2V to +2V signal from the transformer, and with the same power consumed we should get ~five times more current.
The left winding of the core connected to the signal source, and we're measuring current by measuring voltage on a known resistor - that's X axis.The right winding is connected to RC-integrator, which is what we measure for Y axis.
There is a formula for calculating the parameters of the RC integrator (clever, using passive components to do maths, because our oscilloscope cannot do maths). The only capacitor with the desired properties we had was super tiny, it was quite a challenge to solder.
Nina Kalinina
in reply to Nina Kalinina • • •We started the test bench in oscilloscope 2 channel mode, and we could clearly see "spikes" up and down in the output winding of the commercially made core that correlated with the waves of the test signal. That means running the AC current through the magnetic core keeps re-magnetizing it in a loop, and we can see it!
Switching the oscilloscope in the X-Y mode, we were hoping to see pretty B-H curve, just like on the Wikipedia page, but the voltage and the current we have are way to low and so the changes are barely registered by our scope.
It seems we cannot avoid investing in the test equipment, after all! Buying a ready-made device would cost us ยฃ200 or more, so we will try to build one ourselves.
(When I say "we" it means "my fiancee and me", by the way!)
Nina Kalinina
in reply to Nina Kalinina • • •Power struggles are not exclusive for AC currents. To control my tiny magnetically programmable and erasable memories, I need a source of current that:
1) Can be adjusted in the range of 0.5-2 amps,
2) Can be turned on for a very short time (it takes the core 1-2 microseconds to fully switch) to reduce average power consumption,
3) Turns on really fast (hundred nanoseconds ideally) so the changes in the voltage caused by the core could be measured reliably.
Last time I used a current source from a 2N2222 transistor that I controlled with Arduino. This transistor can barely stomach 0.5A, and indeed I destroyed two of these by over-current.
This time, as a current source, I wanted to try a salvaged Traco Power source that has a "switch on/off" control pin. As you can see, voltage rises to half the target really fast, but then climbs up to the target voltage for ~50 milliseconds! With this voltage curve, even the commercially manufactured core displays zero "memory" characteristics.
Nina Kalinina
in reply to Nina Kalinina • • •The AC power source/H-B core prober is in the process of making, but I still wanted to experiment with the cores I have made, as well as with some new designs. For now, I am using an analogue power source, and try to filter out the contact bounce with capacitors. The current from the source goes straight through the core, and the oscilloscope is connected to the second ("sense") winding. It is wonky, but it works as a test bench.
The steel-ferrite winding core I've made last time clearly has wrong qualities. But from what I have seen in reference books and papers, nickel core should possess the desired properties.
"Pure nickel" (as per seller description) I have used last time turned out to be "nickel silver", or 60% copper, 20% nickel and 20% zinc. This time I am moderately confident I have a strip of nickel. I need to make sure that the "core" - the ring - has no air gaps in the ring, otherwise it won't work.
It seems the simplest way to do this is drilling. I cut the ring to the shape with scissors.
Nina Kalinina
in reply to Nina Kalinina • • •The core? Doesn't work as a memory element, but works as a poor transformer.
This is a good sign. I could add the current, or I could add more turns of wire around the core, and it should improve the magnetic field we generate.
We prepare two test rings - one drilled, and one cold-hammered. I wind two windings of 10 turns each on them, using 0.38mm copper wire for transformers (should be enough for 0.5A).
๐ข ๐ข ๐ข
The windings are shorted. Edges of nickel are too sharp, they scratch the insulation around the copper wires during the winding.
I pack nickel rings in epoxy, and drill the holes in the epoxy. Epoxy is brittle, parts of it fall off immediately. I try to re-wind the cores, but the windings are shorted AGAIN.
๐ข ๐ข ๐ข ๐ข ๐ข
Nina Kalinina
in reply to Nina Kalinina • • •As a last ditch effort, I decide to make a BIGGER nickel ring and SHRINKWRAP IT.
In the hindsight, using some sort of kapton tape probably would have worked better. Having bigger nickel sheets would allow for drilling bigger air gap free ring, too.
But I use what I have. I twist the shrink wrap, and wind 15 turns, two wires.
No shorts, yatta!
Nina Kalinina
in reply to Nina Kalinina • • •It is not surprising that this magnetic core memory element works. Nickel should have coercivity comparable to ferrite magnets. It has been used as a test medium for original twistor magnetic memory.
But it is also surprising that such a makeshift memory element actually does the job. You can see the difference between "unchanged" magnetic field reads and "changed" magnetic field reads - the voltage changes much slower. With proper filtering and amplifying, it can be reliably used as a memory element.
Switching time is close to 50 microseconds - which is a hundred times worse than commercially made core and its 500 nanoseconds.
But 50 microseconds means we theoretically could switch this core up to 20,000 times per second. Running this (or a similar-made core) at 10 kHz doesn't sound impossible.
This is twice as fast as ENIAC, and about ten times as fast as Mark 1.
</thread>
The experiment isn't over yet! Harder, better, faster, stronger!
๐บ๐ฆ haxadecimal reshared this.
Janne Moren
in reply to Nina Kalinina • • •Chip
in reply to Nina Kalinina • • •๐บ๐ฆ haxadecimal
in reply to Nina Kalinina • • •Anyhow, I initially thought I wanted high inductance factor cores, but by trying eight cores of the same size but with different ferrite materials and inductance factors, it turned out that low inductance works much better for this
Nina Kalinina
in reply to ๐บ๐ฆ haxadecimal • • •๐บ๐ฆ haxadecimal
in reply to Nina Kalinina • • •Nina Kalinina
in reply to ๐บ๐ฆ haxadecimal • • •๐บ๐ฆ haxadecimal
in reply to Nina Kalinina • • •Z80 Inside
in reply to Nina Kalinina • • •Nina Kalinina
in reply to Z80 Inside • • •Zimmie
in reply to Nina Kalinina • • •Nina Kalinina
in reply to Zimmie • • •Limey_Tank
in reply to Nina Kalinina • • •Nina Kalinina
in reply to Limey_Tank • • •Jonathan Lamothe
in reply to Nina Kalinina • •@Nina Kalinina On top of this, that's 500mA per bit. If you want to update a whole octet at once, that's 4A, no?
I mean, I don't think you can typically read/write multiple bits in a ferrite core system simultaneously, but you could do this by interleaving the bits across multiple smaller banks.
Nina Kalinina likes this.
Nina Kalinina
in reply to Jonathan Lamothe • • •David Prieto (valerian32)
in reply to Nina Kalinina • • •Nina Kalinina
in reply to David Prieto (valerian32) • • •Though this only explains how some types of RAM work, like MRAM. If you want a DRAM experiment, you can make a test bench with a transistor and capacitor, and for SRAM you need to build a tiny transistor latch. Could be very interesting to compare how all those perform, even on the macro level: DRAM will be fast and low energy, but will require a refresh; SRAM will be expensive because two transistors; MRAM will be slow by comparison but non-volatile.
David Prieto (valerian32)
in reply to Nina Kalinina • • •Nina Kalinina
in reply to David Prieto (valerian32) • • •@d_prieto I'll be happy to see the photos if you'll make any!
Another thing to try is to find something like a 74xx logic in metal body, carefully decap it, and examine it under a magnifying glass - while it's used in a simple circuit to implement an RS trigger. The chip will need to be protected from the light during the operation.
aburka ๐ซฃ
in reply to Nina Kalinina • • •Mom can we buy some new RAM at microcenter?
No, we have RAM at home.
The RAM at home:
Jonathan Lamothe likes this.