Back in the dark ages of engineering (i.e. when I was 13), I needed an electronic device that would indicate heading. Specifically, it had to indicate whether or not it was oriented towards either magnetic north/south, but it probably didn’t have to specify which. The circumstances behind the need for building such a thing are too vague to recall, and I am too lazy to try to organise my hazy recollections in a sufficiently coherent manner for you, the reader, to understand. Suffice to say that it was probably meant to automatically get a little toy car (which runs on batteries and a tiny DC motor) to turn around and travel in the opposite direction, and that the whole thing was a flop anyway because as you know, these were the dark ages, when ignorance had yet to be illuminated by the dawn of the age of enlightenment.
And hence was born, the ‘Directo-Scope’, a crude instrument that is the product of 1 part brilliance and ingenuity and 99 parts naive engineering:
The Directo-Scope is really just a hacked handheld compass. A compass has a needle that points towards magnetic north, regardless of how the compass is oriented. In order to determine whether the orientation of our direction-indication device is in the direction of north/south, or not, all we need to do is determine whether or not the heading of the device is in line with the needle of the compass.
To accomplish that, the transparent body of the compass was wrapped in masking tape to block out ambient light, save for 2 small slits located at the part of the device that represents its ‘front’. These slits are in line with each other and located on opposite sides of the compass. An LED is stuck to one of the slits, and it shines light through the other slit. When the device is ‘facing’ north/south, the compass needle will be in line with the slits, blocking the light from the LED to the other side. A light dependent resistor (LDR) is stuck to the other slit on the other side, and it can sense whether the compass needle is there by sensing the amount of light exiting the slit. By connecting this LDR in an appropriate electrical circuit, a voltage can be obtained that represents the amount of light sensed by it, and hence whether the Directo-Scope is currently oriented towards the north/south or not.
I never actually got down to using this device because the bigger project of which this little endeavour was part of never quite materialised, and I’ve never tested it since. With the benefit of hindsight, I think this would have made an appalling direction sensor if it was really put to use in the way I would have originally intended; the idea was probably to wire up a circuit to steer the toy car with the voltage ouput from the Directo-Scope, using a ‘bang-bang control’ method. Vibrations would have caused the compass needle to oscillate about the slits. But it might have been sufficient if all it had to do (and I can’t recall with confidence what that was!) was detect that a target orientation was reached and signal that it was time to straighten the steering on the toy car.