Close

Processing Stages

A project log for Schrödinger's Trigger

Using the joy of electron-tunneling, this device drives one of two outputs when triggered.

legionlabsLegionlabs 04/03/2022 at 05:410 Comments

This is where we convert a raw signal to a device that does something (questionably) useful!


I considered several ways to do this. At first, it had only a single output that would be either HIGH or LOW based on the observed state of the system on trigger input rising edge.

Eventually, I realized a second output that is set to the opposite of the first output on trigger rising edge would be useful -- that way the device can be connected to two circuits down the line without extra components. I settled on this, and use a 4-pin connector to provide 5V, Ground, and the two outputs to whatever this gets connected to (coffee percolator or otherwise). I made the output latch for as long as the trigger is raised HIGH.

I also considered making it latch until a reset line is triggered, but did not implement this. My reasoning is that this device is most likely going to be connected to a toggle or knife switch, which of course provides mechanical latching! If I wanted it to work with intermittent switches (SET/RESET), I'd go back and add this feature. In case someone wants to do this in a hurry, the fastest way is probably to make the program NOP loop forever instead of going back to the start of the algorithm, then driving the RESET line of the MCU LOW via an intermittent pushbutton.

Anyway, back to the core algorithm. The full commented code is attached to this project. Overall, it's an implementation of a Von Neumann debiasing algorithm. You can read more about that here:

https://dornsifecms.usc.edu/assets/sites/520/docs/VonNeumann-ams12p36-38.pdf

If that link dies from bit rot, there's a formal reference at the end of this post.

In short, we start a timer when we see a tunneling event ending, and measure the time until the next event. Then we do it again, and measure the two times. The timer runs on something like 4Mhz +/- 1%, we just use the microcontroller internal oscillator because that's good enough here. If the first measured time is longer, we set the state ϕ = 1. If the second time is longer, we set the state ϕ = 0. If they are equal, we produce no output and try again until they are not equal.

Finally, we produce output. While the trigger input remains high, OUTPUT 1 is equal to the state ϕ, and OUTPUT 2 is always
¬(OUTPUT 1) -- in other words the opposite of OUTPUT 1. We wait idle while the trigger input remains HIGH.

That's about it! Here's that reference I promised earlier:

J. Von Neumann, “Various techniques used in connection with random digits,” Applied Math Series, Notes by G. E. Forsythe, in National Bureau of Standards, Vol. 12, pp. 36-38, 1951.


Discussions