{"id":610,"date":"2015-09-19T23:16:59","date_gmt":"2015-09-20T04:16:59","guid":{"rendered":"http:\/\/mikesmods.com\/mm-wp\/?p=610"},"modified":"2015-09-19T23:16:59","modified_gmt":"2015-09-20T04:16:59","slug":"weekend-project-determining-operating-parameters-of-a-memory-core","status":"publish","type":"post","link":"http:\/\/mikesmods.com\/mm-wp\/?p=610","title":{"rendered":"Weekend Project: Determining Operating Parameters of a Memory Core"},"content":{"rendered":"<p>Hello again, and my apologies for the long time since the last one.\u00a0 Today I&#8217;ve got a quick topic to discuss, and although it&#8217;s fairly obvious, I don&#8217;t think it&#8217;s documented elsewhere online.<\/p>\n<p>I&#8217;m working on a project for which I&#8217;ll be building a fairly sizable core memory array (see <a title=\"Weekend Project: A Tiny Core Memory Array\" href=\"http:\/\/mikesmods.com\/mm-wp\/?p=556\">here<\/a> for the first post on this topic, which covers the construction of a small demonstration array).\u00a0 As noted in the original post, it is simple to address a huge number of cores in an array because the core material will only change magnetic state when a sufficiently large current is passed through it; any smaller current will leave the core in its initial state.\u00a0 Thus, by passing only half the necessary state change current through the core through each of two wires, and by ensuring that no two cores have the same two wires passing through them, any individual core may be selectively read from or written to based on the set of wires that are energized.<\/p>\n<p>But how much current is necessary?\u00a0 There is no standard (to my knowledge) that says all memory cores require x milliamps to flip.\u00a0 If you buy a set of random cores on eBay like I did, this is a question that needs to be answered before any further design work can take place.\u00a0 So I tried a few methods, found some things that worked and some things that didn&#8217;t work so well, and decided to share my results.<\/p>\n<p>First, recall from Amp\u00e8re&#8217;s Law that a current flowing in a wire creates a circular magnetic field around that wire.\u00a0 If the wire were pointing toward you and the current flow was coming toward you, the magnetic field would be counterclockwise &#8211; or using the common &#8220;right-hand rule&#8221;, if you wrap your right hand around the wire with your thumb pointing in the direction of the current flow, your remaining fingers determine the direction of the field.\u00a0 From the right-hand rule we can also see that if we want the magnetic field to reverse &#8211; which we need in order to change the data on the core or to read out the data that is there &#8211; we would have to flip the flow of current so it goes the other direction.<\/p>\n<p>So, I soldered a 51 ohm resistor across both ends of a piece of 36AWG magnet wire with a core threaded onto it, and then soldered one 150 ohm resistor to each end of a second piece of magnet wire which was also threaded through the core.\u00a0 Note that neither of these values were calculated nor should be critical.\u00a0 I connected an oscilloscope probe across the 51 ohm resistor, then connected the 150 ohm resistors to a handheld digital multimeter (on Current mode), then to a bench power supply and applied a few volts.\u00a0 I then tried swapping the leads on the power supply to change the direction of the current, and watched the oscilloscope.\u00a0 No matter how many times I swapped the leads, or what voltage I applied, I never got anything that resembled the clean pulse I was looking for.\u00a0 A combination of contact bounce and (as I ultimately discovered) insufficient drive strength left me only with ringing pulses after each connection.<\/p>\n<p>Figuring that contact bounce might be my problem, I disconnected the power supply leads and connected the ends of the 150 ohm resistors to a square wave generator set to a few hundred kHz, and +\/- 10V amplitude.\u00a0 Now I was getting very small pulses across the sense resistor every time the square wave switched direction, and when I shorted first one and then both 150 ohm resistors, the pulses got larger.\u00a0 Success!\u00a0 &#8230;Or was it?\u00a0 To verify the validity of the data, I reduced the amplitude of the generator output and added an offset to make the output a 0-10V square wave.\u00a0 Remember that to change the data on a core, the magnetic field must be reversed &#8211; so if one end of the drive wire is grounded (which it is on this signal generator), the other wire must swing both above and below ground to change the state of the core.\u00a0 With the signal offset to ground level, I was still getting the same pulses across the sense resistor &#8211; which indicated that the pulses were not due to the core changing state, but to some other effect (likely induced noise from the fast edges of the signal generator).<\/p>\n<p>Based on the results from the square wave generator, I now knew that what I really wanted was a push-pull type drive arrangement &#8211; I didn&#8217;t want the current across the core to be purely one way then the other, I wanted a way to push the current either way arbitrarily and to be able to push no current through the core if I wanted.\u00a0 I could have written a program for my arbitrary waveform generator to do this, but it was equally simple to do this with a few parts from the junk bin.<\/p>\n<div id=\"attachment_613\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/09\/Core_Test_Diagram.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-613\" class=\"size-medium wp-image-613\" alt=\"Crappy whiteboard drawing of my core test circuit.\" src=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/09\/Core_Test_Diagram-300x214.jpg\" width=\"300\" height=\"214\" srcset=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/09\/Core_Test_Diagram-300x214.jpg 300w, http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/09\/Core_Test_Diagram-624x445.jpg 624w, http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/09\/Core_Test_Diagram.jpg 666w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-613\" class=\"wp-caption-text\">Crappy whiteboard drawing of my core test circuit.<\/p><\/div>\n<p>Above is the circuit I ended up using.\u00a0 It employs a set of big TO-220 MOSFETs, one P-channel and one N-channel (I used SUP75P03 and IRFB4110, but you could use practically any other parts on hand).\u00a0 I used some more 150 ohm resistors (because they were already out on my bench) in series with a couple of small tactile switches\u00a0 as triggers, and put in some larger resistors from gate to source of each MOSFET to make sure they shut off when I open the switch.\u00a0 You could probably use any resistors within a decade of these values and it&#8217;d still work.<\/p>\n<p>The circuit is driven by two bench supplies.\u00a0 In my case, this is in the form of one dual-supply which has voltage tracking, a handy feature which I originally used but which I eventually disabled for reasons I&#8217;ll get into later.\u00a0 There is a 10 ohm, 10 watt ceramic resistor in series with each supply.\u00a0 This is important, because you may be playing with quite significant currents, and it is all too easy to accidentally push both buttons at once and short out your supplies across the MOSFETs.\u00a0 This is also why i used TO-220 transistors &#8211; they will usually happily take hundreds of milliamps without any heatsinking.\u00a0 By the time I was done testing, both transistors and both resistors were fairly warm to the touch.\u00a0 Finally, there is an ammeter in series with the ground line, played by a handheld multimeter.<\/p>\n<div id=\"attachment_614\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/09\/Core_Test_Setup.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-614\" class=\"size-medium wp-image-614\" alt=\"The test setup.\" src=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/09\/Core_Test_Setup-300x225.jpg\" width=\"300\" height=\"225\" srcset=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/09\/Core_Test_Setup-300x225.jpg 300w, http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/09\/Core_Test_Setup-1024x768.jpg 1024w, http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/09\/Core_Test_Setup-624x467.jpg 624w, http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/09\/Core_Test_Setup.jpg 1632w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-614\" class=\"wp-caption-text\">The test setup.<\/p><\/div>\n<p>I initially set the bench supplies to about 10 or 12 volts and held one button, then adjusted the current limit to about 800mA, a little bit shy of the experimentally determined fusing current of the 36AWG core threading wire I used.\u00a0 I then held the other button and did the same.\u00a0 Alternating button presses, I set the scope to trigger at 20mV and a timebase of 1us\/div.\u00a0 And, success!\u00a0 The scope showed clear pulses the first time either button was pressed, indicating a change to the magnetization of the core.\u00a0 Then subsequent presses of the same button produced no such pulses, and only a press of the opposite button produced a pulse as the magnetization was again flipped.<\/p>\n<p>I then attempted to find the minimum required current for changing data on the core, but I got some troubling results.\u00a0 The core seemed to work down to a few tens of milliamps sometimes, and a couple of hundred milliamps at others.\u00a0 I soon found &#8211; and this is so important a point that it inspired me to write this post &#8211; that <strong>you cannot use a current-limited supply to do this test<\/strong>.\u00a0 Any capacitance at the output of the supply can cause a brief but large current spike which can unpredictably change the state of your core.\u00a0 Instead, <strong>use a voltage-limited supply<\/strong> and rely on the series resistors to limit the current through the transistors.\u00a0 You may also find that this simple circuit may not exhibit equal current output in &#8220;push&#8221; and &#8220;pull&#8221; operation.\u00a0 This is why I eventually stopped using the tracking feature of my power supply and ended up setting the two supplies manually at each step.<\/p>\n<div id=\"attachment_615\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/09\/Core_Magnetization_Scope.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-615\" class=\"size-medium wp-image-615\" alt=\"Scope capture of the signature of a changing magnetic field.  With different component values and core material, your plot may vary.\" src=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/09\/Core_Magnetization_Scope-300x219.jpg\" width=\"300\" height=\"219\" srcset=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/09\/Core_Magnetization_Scope-300x219.jpg 300w, http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/09\/Core_Magnetization_Scope.jpg 320w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-615\" class=\"wp-caption-text\">Scope capture of the signature of a changing magnetic field. With different component values and core material, your plot may vary.<\/p><\/div>\n<p>Ultimately, through some trial and error, I found the required magnetizing current for my cores to be between 500 and 600 milliamps.\u00a0 This was a little bit disappointing, because I expected a much lower current that I could drive with small, cheap logic transistors.\u00a0 But I suppose it&#8217;s better to find out now than later.\u00a0 So now, on to the array driver design&#8230; but that&#8217;s a post for another day!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello again, and my apologies for the long time since the last one.\u00a0 Today I&#8217;ve got a quick topic to discuss, and although it&#8217;s fairly obvious, I don&#8217;t think it&#8217;s documented elsewhere online. I&#8217;m working on a project for which I&#8217;ll be building a fairly sizable core memory array (see here for the first post [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/mikesmods.com\/mm-wp\/index.php?rest_route=\/wp\/v2\/posts\/610"}],"collection":[{"href":"http:\/\/mikesmods.com\/mm-wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/mikesmods.com\/mm-wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/mikesmods.com\/mm-wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/mikesmods.com\/mm-wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=610"}],"version-history":[{"count":2,"href":"http:\/\/mikesmods.com\/mm-wp\/index.php?rest_route=\/wp\/v2\/posts\/610\/revisions"}],"predecessor-version":[{"id":617,"href":"http:\/\/mikesmods.com\/mm-wp\/index.php?rest_route=\/wp\/v2\/posts\/610\/revisions\/617"}],"wp:attachment":[{"href":"http:\/\/mikesmods.com\/mm-wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=610"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/mikesmods.com\/mm-wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=610"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/mikesmods.com\/mm-wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=610"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}