Close
0%
0%

LIGHT LOGIC - HIC SVNT DRACONES

Using a LED/LDR pair to form inverting Photonic logic gates.
The entire Boolean logic set handled by resistors and diodes! Who'd'a thunk

Similar projects worth following
I always read that inverted logic as in a Not, Nor or Nand can not be made with just diodes and resistors. Well, this might just break out of that box. A inverting Not gate can be made with just one led and two resistors with one of the resistors being a CdS LDR. As of July 2019 I have Buffer, Not, AND, NAND, OR, NOR. XOR and XNOR gates working. Not the fastest gates around and not going to change the world as they are currently designed but they do work and that's all I set out to prove in the first place. Who knows what the future will be for Light Logic.

All the logic elements are now coming together for the design and build of a fully functional processor that uses only diodes, resistors and a few capacitors. It will not be fast nor small in size but it will be cool as hack and be educational and fun to watch as the user will be able to visually watch and track the flow of data from one logic gate to the next. How cool is that.

The idea for this circuit came to my mind as a rough diagram back around October 5, 2018. I had been working on my #ColorChord - A Steampunk inspired creation  project and sat back thinking about the relationship between the led bar and the CdS cells. Then began thinking about the logic combinations possible and thought that perhaps a diode ( led ) / resistor ( ldr ) would provide the way to a inverting logic gate. In a flash the circuit was in my mind and a quick test set up proved it would work. The rest might be history......

May 31, 2019 -  I now have worked out the circuits for eight individual gates. AND, NAND, Buffer, NOT, OR, NOR, XOR and XNOR. All gates use a single Light Logic element.

  • 1 × Led Green is best but white works well
  • 1 × CdS Photo Resistor LDR
  • 1 × Switching diode 1N914 or other switching diode
  • 1 × Resistor 220 Ohm minimum, use higher values as needed

  • Sequencer with a all diode display

    Dr. Cockroach08/30/2019 at 00:24 0 comments

    Sept 29, 2019 -  I am surprised that no one has commented about a slight quirk going on with the display. Notice that when transitioning from 6 to 7 that 8 is briefly shown. Turns out that the sequencer outputs 6 and 7 are both high at the same time for a brief moment and the display diode matrix has all leds active for that short time. This might actually turn out to be a bonus as it might assist with writing to a register much like the Cardboard Computer - IO. IO's sequencer had the same effect and came in handy.

    I spent the better part of this afternoon wiring the Light Logic Sequencer to the diode display from the IO project. The display counts from 1 through 7 for this circuit and loops back to 1. Not bad considering only diodes, resistors and caps are used.

  • HIC SVNT DRACONES

    Dr. Cockroach08/20/2019 at 12:58 0 comments

    Here Be Dragons - Sounds about right for Light Logic about now. I am realizing how much in uncharted waters I have become with the development of LL. The individual gates are fairly straight forward digital in and digital out but with the design and construction of the sequencer, I see analog and digital blending and twisting around into a mesmerizing light show. Is it a part of the processor I want to design and build or is it a stand alone piece of art. Or is it both, I am so confused right now. All I do know is that I must press onward into those waters and discover what is beyond.  Thank you @Starhawk for the idea.

  • Things to remember if duplicating Light Logic

    Dr. Cockroach08/19/2019 at 14:53 0 comments


    Just some things to think about if anyone wishes to duplicate Light Logic.

    1 - There is a wide low end resistance value range with CdS photo cells so try to test and match the cells used.

    2 - Stray light will kill the Light Logic effect faster than anything else.  Light shielding around the Led/Ldr pair IS required.

    3 - Operating voltage is very critical and selection of support resistors is somewhat trial and error.

    Light Logic in its current development is still very experimental and requires a lot of hands on adjustments.

  • Sequencer Size Reduction

    Dr. Cockroach08/18/2019 at 22:21 0 comments

    This is the usable seven step sequencer for the future all Light Logic processor. Resistor and capacitor values need to be tweaked for best performance but this is working better than I had planned on in so short a time.

  • Seven Step Sequencer

    Dr. Cockroach08/03/2019 at 23:49 3 comments

    The three phase Astable is now a seven step sequencer. When wired in order 1,2,3,4,5,6,7 the firing order is 1,6,4,2,7,5,3 then returns to 1 so it steps by 5. The sequence does repeat. This can be the sequencer and clock combined for IO2 the Inside Out Light Logic computer. No other clock will be needed.


    Here is a good display of the sequencer in action and I realized that I now have a solid clock and sequencer in a single circuit. This will be used for the Light Logic computer project this winter.


    I ran out of ideas other than adding a starter switch to the panel. On power up the loop freezes so I have to ground one input in order to unbalance the loop. Then I got the scope out and then the music fits the display.

    That is a trace of cell one followed by cell six.

    After I looked at the output traces, I wanted to see if I could sharpen them up a bit. so I added a Light Logic non-inverting buffer gate to the output of cell number one and the next video clip shows a big improvement. The lower trace is output number one and the top trace is the same output run through the buffer.

  • A No Transistor 3 Phase Astable ????

    Dr. Cockroach08/02/2019 at 15:55 0 comments

    This circuit is so cool to look at while running  and took me the better part of a week to figure out. The goal was to make a LED Chaser using Light Logic and I am pleased with the result to this point.


    I have looked at the signals with my scope and indeed it is outputting what looks like smooth sine waves.

  • Another simple XOR that works

    Dr. Cockroach07/20/2019 at 09:17 6 comments

    Here is another XOR circuit that I wired and tested last night. Thanks to Yann Guidon for this idea as it does further reduce the parts count. The Input resistors are optional depending on the logic level voltage. For a XNOR, just reverse the +5 and ground. This XOR, once again, has good solid logic levels on the output.

  • XOR and XNOR simple as ever

    Dr. Cockroach07/16/2019 at 10:01 2 comments

    I now have, thanks to @Starhawk for the nudge, managed to create A XOR and XNOR gate that uses just a single Light Logic switch. I no longer need to combine other gates for these logic functions. Logic highs are 4 volts or higher and the low levels are less than 0.5 Volts. Good enough to be used with the rest of the Light Logic family.

  • XOR and still transistor less

    Dr. Cockroach06/22/2019 at 22:24 0 comments

    I am working on a educational display to showcase Light Logic and how it works.

    https://hackaday.io/project/166376-light-logic-diode-resistor-logic-out-of-its-cage

    This is a combination of NAND, OR and AND gates to create a working XOR gate. And as the same for all Light Logic gates, transistors are not to be found. Just diodes and resistors. Power leads are under the paper to better show the logic wiring.

  • Six basic gates with Diodes and Resistors

    Dr. Cockroach05/31/2019 at 23:29 2 comments

    I have worked out the circuits for the following gates. AND, NAND, Buffer, NOT, OR and NOR. With these I can make XOR and XNOR gates as well. These gates have good fan-in and fan-out capability.

View all 36 project logs

Enjoy this project?

Share

Discussions

Andrey V wrote 08/30/2019 at 17:47 point

Interesting project. Maybe you will implement ALU on your logic gates?

  Are you sure? yes | no

Dr. Cockroach wrote 08/30/2019 at 18:11 point

Hello Andrey, Yes I will have a full 4 bit ALU for this project. I already tested out a single bit Full Adder without any problems so I think a complete processor with my rather odd gate design will work. Not fast but will work :-)

  Are you sure? yes | no

Andrey V wrote 08/30/2019 at 18:34 point

It is very impressive! I think with years I will start to do the same things)

  Are you sure? yes | no

Dr. Cockroach wrote 08/30/2019 at 20:35 point

All I can say is that you do not need years. You have all the tools and the desire so you can do it all now. I really like your lab, very impressive :-) I just work with whatever I can obtain and if I dream it then I go and do it :-)

  Are you sure? yes | no

David H Haffner Sr wrote 04/04/2019 at 19:13 point

Hello Doc, yeah been out for awhile, I was hospitalized at the VA hospital for a time but all is better now. I wasn't sure what was going to happen so I shut down a lot of my online presense except for this place, which I consider the best fit for me anyway. Glad tto see your wonderful creation evolving into a real thing of beauty! 

  Are you sure? yes | no

Dr. Cockroach wrote 04/05/2019 at 00:28 point

Glad your OK David, I wondered where you have been. Great to have you back :-D

  Are you sure? yes | no

retrac wrote 03/29/2019 at 04:16 point

This is a creative and unusual idea.  I think both neon lamps and even incandescent bulbs would work instead of an LED.  Perhaps it's possible to build a computer faster than relay logic entirely out of neons, resistors, and photoresistors.  No semiconductors at all.

One could also use a phototransistor instead of a photoresistor.  That would be quite fast with an LED compared to a photoresistor.  Rise times in the tens of microsecond.  So many variations possible!  You've struck my curiosity, I think I'll see what I can build.  Thank you.

  Are you sure? yes | no

Dr. Cockroach wrote 03/29/2019 at 11:09 point

Hey there retrac and thanks for the input :-) Oh for sure it is doable to not use any semiconductors at all by using other light sources. But as far as speed, well, the CdS photo resistors do have a fairly long reaction time so sequential logic circuits start to have issues as soon as I ramp up the clock speed. If I use a photo transistor then I defeat the idea of this project but yes, that would be a faster way to switch :-)

A friend did send me some PIN photo diodes so going to check them out once I get this project moving again.

  Are you sure? yes | no

Samuel A. Falvo II wrote 02/19/2019 at 17:09 point

If  speed becomes a concern, which I suspect it would if you are trying to build complex logic like instruction decoders and such, then you could use a 2D mask to implement a kind of ROM-like device.  The idea is that the inputs illuminate rows, and the CdS cells detects light along the columns.  The mask, which remains interstitial between the input rows and output columns, implements the complex logic.  (Remember to keep the light from each row isolated from adjacent rows!)  This restricts your propagation delays to just three layers: the input buffering/inverting to drive the rows, and the output logic to collect the columnar results into specific outputs.  This device would be "field programmable" by just swapping out the mask with a new one.

  Are you sure? yes | no

Dr. Cockroach wrote 02/19/2019 at 18:36 point

Thank you @Samuel A. Falvo II , I had not given thought that far ahead but that sounds like a great idea to try out. Yes indeed, speed will be a major factor for more complex logic.

  Are you sure? yes | no

matseng wrote 11/08/2018 at 14:35 point

-H-o-w- (EDIT: Have) you been able to make a self-latching circuit out of this?  I.E basically just a single LDR and one LED connected in series and pointed to each other?  

At full darkness the resistance of the LDR is high enough to not light up the LED, then you temporary short the LDR to light up the LED causing the resistance of the LDR to drop enough to keep the LED on permanently.

If you then temporary short the LED so it will go dark causing the LDR to be high-resistance keeping the LED in a permanent off-state.

(Some current limiting might be a good thing here...)

I played around with it a bit, but my LEDs are so sensitive that they light up enough to cascade-trigger the LDR to full-on.

If it would be possible then a memory matrix rivaling the first core memories in density could be within reach.

  Are you sure? yes | no

Dr. Cockroach wrote 11/08/2018 at 16:04 point

Hey there, The Not, Nor and Nand gates interconnect and work just like their transistor counterparts.... The only connection between the Led and Ldr is their common ground. The led is turned on and off by the previous gate by shunting to ground. So far my s-r latch and D latch are working fine as well as the master slave J-K using the clock signal from the astable that is also using the led/ldr combo :-) Excess room/sun light needs to be shielded to some extent. The self latching idea sounds like something for me to try out....Need to look into it :-)

  Are you sure? yes | no

Dr. Cockroach wrote 11/14/2018 at 10:40 point

It is very possible :-D

  Are you sure? yes | no

matseng wrote 10/29/2018 at 09:41 point

So this means that each gate have both voltage and current gain... Or else the signal would "fizzle out" after chain of a few gates.   So possibly it could be possible to make an (very bandwidth limited) audio amplifier out of LEDs and LDR's then.

[ The department of ancient knowledge wants to remind you all that the word fizzle meant "to break wind without making noise" back 500 years ago ;-) ]

  Are you sure? yes | no

Dr. Cockroach wrote 10/29/2018 at 10:45 point

Fizzle, I can still learn something new every day ;-)

Yep, each gate refreshes the output levels so I might give the gates a try at audio and hear what happens. I do not expect Hi-Fi quality though ;-)

One issue to contend with is the latency of the CdS material as that is limiting the speed of the gates.

  Are you sure? yes | no

Yann Guidon / YGDES wrote 10/15/2018 at 21:18 point

Did you see http://www.decodesystems.com/nixie.html ?
It shows one example of ROM/decoder with CdS cells :-D

  Are you sure? yes | no

Dr. Cockroach wrote 10/15/2018 at 15:08 point

Thanks Yann for bringing me out of the darkness. Glad you caught this :-)

  Are you sure? yes | no

Yann Guidon / YGDES wrote 10/15/2018 at 18:41 point

it's a pleasure to see you hacking, and I'm glad your experiments are rewarded !

  Are you sure? yes | no

esot.eric wrote 10/14/2018 at 05:43 point

Breaking all the rules! Perfect teaching-aide, too! Nicely done.

  Are you sure? yes | no

Dr. Cockroach wrote 10/14/2018 at 07:31 point

Broke / Bend, I lost track :-) Thanks :-)

  Are you sure? yes | no

Yann Guidon / YGDES wrote 10/14/2018 at 03:52 point

Is there an "optimisation" to merge the input diodes with the LED function ?

Just have the CdR as "high side" resistor, and the 1N4148 are replaced by LEDs that both shine on the photocell :-)

  Are you sure? yes | no

Dr. Cockroach wrote 10/14/2018 at 07:29 point

I was planning on trying to mount real small SMD leds to the CdS and someone else mentioned using fiber optic cables to couple the gates to each other...

  Are you sure? yes | no

Starhawk wrote 10/14/2018 at 01:50 point

You can get LED night lights with CdS cells inside at Dolla Tree, IIRC...

  Are you sure? yes | no

Dr. Cockroach wrote 10/14/2018 at 07:30 point

My Dollar Tree keeps running out of them but I will keep checking my store :-)

  Are you sure? yes | no

Kelly Heaton wrote 10/11/2018 at 13:29 point

What are the specs of your CdS Photo Resistor LDR (what resistance in light and dark)?

  Are you sure? yes | no

Dr. Cockroach wrote 10/11/2018 at 14:55 point

I read about 40K blacked out and 200 Ohms very bright. These Ldrs are from night lights sold at Wal-Mart. @Morning.Star  sent me one of his that went to almost inf when blacked out and about 30 Ohms lighted but I misplaced it for the moment :-)
 For small purchases, the four pack of led night lights with the Ldr runs about $5 and besides the Ldr and Smd led there are a few more useful parts to hack out of them ;-)

  Are you sure? yes | no

Kelly Heaton wrote 10/12/2018 at 01:47 point

Thanks!

  Are you sure? yes | no

Peabody1929 wrote 10/10/2018 at 15:51 point

How about using fiber optic cable to connect the LED output to the photocell input?  A 2 input gate would have two cables over a single photocell.  The fiber optic cable could even be the "wiring" between gates.

  Are you sure? yes | no

Dr. Cockroach wrote 10/10/2018 at 16:26 point

That has been mentioned as well as attaching very small SMD leds to the face of the CdS. Many ways to try this out and looking forward to testing them all :-) Thanks :-)

  Are you sure? yes | no

Morning.Star wrote 10/09/2018 at 05:21 point

Thats what I've been told, not possible. Lol, sounds like a challenge :-D

This is impressive, low level theory and technology. Nice discovery dude. Nice work! :-)

  Are you sure? yes | no

Dr. Cockroach wrote 10/09/2018 at 11:01 point

It looks as if I am going to have to write my own book on how this works. The rules have changed a little bit ;-)

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates