[The snake game works!!! Jump to the bottom of the post to see it in action!]
I’ve been captivated by magnetism, as I suspect many are, for a long time. My discovery of core memory at the Computer History museum in Mountain View, CA triggered the idea to create a core memory module that is interactive.
I discovered Jussi Kilpelainen’s Arduino Core Memory Shield on Tindie and that was the kick I needed. I added an LED array behind the cores to illuminate each core in real time and so I can selectively flip a bit one direction with a stylus (a small screwdriver with a magnet attached). I suspect the presence of the permanent magnet is inhibiting the “destructive read” and/or the follow-up write. The result is only being able to clear the bits at this time. The next step is to create an active stylus to allow me to choose whether I want to set or clear a bit. This will effectively enabled drawing AND erasing, to make the project more interactive. Pursuing this next step is going to bring along more learning about magnets and core memory, which is the real goal behind this project.
Here's video link showing the concept in action. It's surprisingly interactive and satisfying to use. I was happy with the result and was going to stop there. But I look forward to seeing what I learn with an active stylus.
The first step was this proof of concept:
Then I found a close physical match for the 4x8 core bits with a Neopixel 4x8 RGB Matrix FeatherWing and I made a 3D printed plastic adapter to "guide" the light from the LEDs to the cores since they don't line up perfectly.
Close up the passive "stylus" and a single affected core and a video:
I like the blue glow with the blue plastic. Now, I'll move on to the electromagnet experiments. One challenge I'll likely face is the fact the cores are not all arranged in the same orientation. They are placed in an alternating pattern to make the wiring & drive circuitry layout more efficient. If my solution ends up relying on orientation of the stylus relative to the core, I'll have to get extra-clever.
MARCH 15th UPDATE:
I've been trying to come up with a way to make a stylus work, and be able to selectively set a bit. As I investigate the signals in the sense wire, it has occurred to me that since the sense wire is shared with all cores. So it will be critical to falsely trigger the sense wire through interaction with a specific core. I can't just influence the sense wire with the stylus because the firmware would not be able to discern which bit was to be affected. This makes the challenge a little harder.
I've discovered the effect of the permanent magnet is to reduce the time the sense wire signal is above the trigger threshold for indicating that a core state has flipped. This effect is through and local to the core being affected, and results in the ability to block the sense wire from seeing a core state flip, so the logic dictates that the core must have already been set. Thus, no further action is required. And since this is a permanent magnet, and not moving, there is no influence on the copper sense wire.
I'm attempting to create a single pulse in a small coil of wire that is timed (by the same firmware doing all of the rest of the work, i.e. checking core state and controlling LEDs) to occur when a core is being read (which is actually a write... are you confused yet?) in an effort to force a pulse in the sense wire through the core.
The capture shown above shows the [styl] signal that is being sent out to trigger the stylus (which is nothing more than a 12K resistor to ground right now), the [writ] write pulse that is attempting to set the core and see if it changes state, and the [sens] sense pulse that occurs if the core is changing state. I think I will need to shorten that stylus pulse, and align it over the sense signal to have a chance of inducing the pulse in the write window of timing so the firmware will detect it as a core state change.
As I stated earlier, the sense pulse [sens] gets narrower when the permanent magnet is near the core. It is interesting that the RIGHT edge of the pulse moves towards the left. Although the left edge does move to the left ever-so-slightly, most of the movement is on the right edge, toward the left. That's an interesting observation on its own. I'm not sure what I expected, but it wasn't that. There is much to be learned around all of these details. And that's why I do this stuff!
Here's the state of the experiment:
I'm out of time for today, so I'll have to pick this work up later.
April 3 update. I've gotten the intended stylus pulse timing where I want it, and a transistor driving various coils to experiment with affecting the core. I've tried a few turns of wire, some solenoids, and a LOT of turns of wire (coil from some 80's headphones) to no avail. I'm running up to 500 mA in the coil and I can't simulate the sense pulse in the sense wire. I can affect the sense signal when the core is set, so this helps confirm the coil is alive. I've looked around the web to learn more about the current requirements of cores and I find that half-select currents are in the realm of 200-500 mA. That's a combined current of as much as 1 Amp, and that's through the center of the core so the magnetic flux is perfectly aligned with the core geometry. I think that translates to a very efficient means of magnetizing the core. Since my experiments are from the outside of the core, I may need to try much higher currents to be able to create a false sense pulse. One suggestion I received was to try a magnetic tape write head. I wonder if that creates a strong enough field? Intuitively, I don't think it will. But I should try it anyway because it is purpose built to do this sort of thing! Here's what some of the experimental coils look like:
April 9 update. After trying a wider variety of coils, I started to break through with a 30 and then 60 turn coil made from some insulated "blue" wire. I think a wind with some enamel coated wire will be better yet. Although I can't yet exert the precise control I'd like to, I am able to stimulate the sense pulse through the core. There is a pattern to the responses, and I think that's telling me something that I haven't sorted out yet. Here's a video of the interaction:
I'm now driving the coil with 4x9V and the proper NPN transistor configuration which allows a higher drive voltage to the coil than the logic (Arduino 5V). I was on the wrong path initially with a PNP configuration.
This is what a sense pulse looks like when it is triggered by a proper core state change. In other words, this is what I'm trying to simulate with the electromagnet affecting the sense wire THROUGH its interaction with the core. This is the raw signal on the sense wire, not processed through the comparator.
And this is what I've been able to simulate with the electromagnet:
The lower blue trace is the voltage pulse through the coil, and you can see that it is aligned with (and the source of) the sense signal.
The coil looks like this:
On a related note, it's interesting to see how the electromagnet drive voltage signal (and ringing tail) are affected by the presence or absence of a ferrous core. This must be how someone discovered how to make a device to measure displacement with similar technology. Early in my career I was exposed to LVDTs to measure displacement inside hydraulic cylinders. Amazing how such small displacements can be sensed that way. As long as the hydraulic fluid isn't ferromagnetic!
I'm going to go a little further with this active stylus concept, but I want to leave enough time to implement an interactive game with this set-up because I think that will be a more satisfying result than just being able to draw and erase. Oh, and I thought of another term for this whole concept of bit flipping with core memory: interactive non-volatile Video RAM. That might resonate with some readers. That's it for this update. Stay tuned.
April 15 Update:
This might be the final update prior to the closing of the contest. I've made some progress, but it's not quite to the finished point I wanted, although I've gone a lot further with the project in some ways. I'm "on the road" and failed to bring the components I need for the active stylus part of the project. So that's effectively stalled. But I did add some functionality, and two new modes of operation, including a game! The modes of operation are:
1) Simple drawing with a passive stylus magnet. This is the default start-up mode. Push a button to clear the screen.
2) Test magnetic flux indicator mode. Sweep any magnet around the screen and observe the extent of it's impact on the cores. The screen is constantly being refreshed in this mode. Align the flux correctly and you get a "back arrow" that takes you back to the first mode.
1) Recognizing characters! To enter the test mode, draw a T on the left edge of the screen. To enter game mode... you guessed!
2) Gesture feature to restart the game.
Here's the state of the snake game, which I'm working on now to see if I can get it fully functional before the deadline.
A few more hours of coding, I added more features and squashed a bug [with my brains' logic] to make the game fully functional now!
This contest was just the motivation I needed to push harder on this project. Despite not getting the active stylus fully working, I've got more ideas to enhance the present design. And I haven't given up on making the active stylus concept work. But even without the ability to selectively clear a bit, just being able to set them turns out to be far more useful functionality than I would have guessed. Not to mention that the result is way more satisfying to use than I thought it would be. Next I need to add a color picker to the left edge so that you can choose the color you want to draw in. Wait a minute... that's it!!! An alternative is to draw with "off" as a color! Then I could use the dwell time of the stylus as intensity for Red, Green, and Blue! The ideas just keep flowing. Alas, the deadline approaches, and I've already taken this project farther than I initially set out to do. Time for some sleep!
Oh, don't forget to look at the ugly code: https://github.com/ageppert/Interactive-Core-Memory-Shield