Light Emitting Logic Gates Built From Scratch

What’s the weirdest computer you can think of? This one’s weirder.

[Dr. Cockroach] figured out a way to create an inverting NOT gate from just one LED and two resistors (one being a photo-resistor). The Dr. has since built AND, NAND, OR, NOR, XOR and XNOR gates, as well as a buffer, incorporating light into every logic gate.

Traditional inverters – NOT gates – are already made with diodes (typically not light-emitting), resistors (typically not light-dependent), and bipolar transistors. The challenge was to reduce the number of transistors. The schematic from the very first test shows the slight modifications [Dr. Cockroach] made to incorporate light into the logic gate using a 910 Ohm, output LED, and an LED and LDR in parallel.

The output is initially 4.5V for logic 1 and 1.5V for logic 0. Adding two 1N914 diodes and an AND gate ahead of the inverter create a two-input NAND gate. With the two diodes reversed and a 910 Ohm resistor removed, a NOR gate is created.

The next step was to build a S-R latch using the NAND gates and inverters, which holds some basic memory. From there, with some size reductions, a Master-Slave J-K Flip Flop, similarly using NAND gates and inverters, can be built. The current state of the project is a working sequencer and counter. You can even see a smooth sine wave propagating through the LED chaser, which is typically built with ICs or transistors but in this case is built simply with LEDs, LDRs, resistors, and capacitors.

The upcoming plan is to use the gates to build a processor that only uses diodes, resistors, and capacitors. While it’s probably not going to be nearly as fast as any processors we have today, it should be interesting (and educational!) to be able to visually track the flow of data from one logic gate over to the next. Continue reading “Light Emitting Logic Gates Built From Scratch”

Shedding A Bit Of Light On Some Logic

When it comes to logic technologies, we like to think we’ve seen them all here at Hackaday. But our community never ceases to surprise us with its variety and ingenuity, so it should be a surprise that [Dr Cockroach] has delivered one we’ve not seen before. Light logic doesn’t use the conventional active devices you’d expect such as transistors, tubes, or even relays. Instead, it uses LEDs and CdS cells to make rudimentary switches. So far there is a NAND, a NOR, and a set-reset latch that appears in the video below the break, and it is not inconceivable that much more complex devices could be crafted.

The CdS cell switch is not too far different in operation to a transistor, with the CdS cell forming half of a potential divider as a rough equivalent of a collector-emitter circuit, and the LED feeding its light to the cell and forming a rough equivalent of a base circuit. It would probably not form a very good analog of a transistor and it seems likely that is will not be the fastest of devices, but we applaud the ingenuity in coming up with it.

CdS cells are a component that seems almost to come from another era, redolent of childhood electronic kits from days of yore. It’s no surprise we don’t see them too often, though, they pop up in the occasional automatic sunglasses.

Continue reading “Shedding A Bit Of Light On Some Logic”

Astronaut Food Is Light Years Beyond Tang And Freeze-Dried Ice Cream

When it comes down to it, we humans have two major concerns when venturing away from home for an extended period of time: what we’ll eat, and where we will sleep. Depending on the mode of travel, you might take some snacks along, or else rely on restaurants and/or the pantry of your possible hosts. Until the day we can reliably grow many types of food in space, or that Milliways, that five-star eatery at the end of the universe is operational, astronauts and other space-bound travelers will have to bring most of their food with them.

Cubes and Tubes

Space food has its roots in military rations, which in the United States were devised during the Revolutionary War. Both the variety and delivery methods of food have changed significantly since the beginning of the space program. While the menu may have at first been limited to tubes of nutrient-rich goo, bite-sized cubes and freeze-dried powdered beverages, the fare is more far-out these days. Astronauts on the ISS even enjoy tortillas, fresh fruits, and vegetables thanks to resupply missions, though they have to eat some of these types of foods quickly.

The average astronaut has also changed quite a bit, too. At first, they were all young and super-fit ex-military men, but nowadays they are more likely to be middle-aged science-y types and women. All three of these groups have different nutritional needs when faced with the rigors of living and working in space.

Continue reading “Astronaut Food Is Light Years Beyond Tang And Freeze-Dried Ice Cream”

Light-Tracking BEAM Robot Can See The Light

BEAM robotics, which stands for Biology, Electronics, Aesthetics, and Mechanics, is an ethos that focuses on building robots with simple analog circuits. [NanoRobotGeek] built a great example of the form, creating a light-tracking robot that uses no batteries and no microcontrollers.

The robot aims to track the brightest source of light it can see. This is achieved by feeding signals from four photodiodes into some analog logic, which then spits out voltages to the two motors that aim the robot, guiding it towards the light. There’s also a sound-detection circuit, which prompts the robot to wiggle when it detects a whistle via an attached microphone.

The entire circuitry is free-formed using brass wire, and the result is an incredibly artful build. Displayed in a bell jar, the build looks like some delicate artifact blending the past and future. Neither steampunk nor cyberpunk, it draws from both with its combination of vintage brass and modern LEDs.

It’s a great build that reminds us of some of the great circuit sculptures we’ve seen lately. Video after the break.

Continue reading “Light-Tracking BEAM Robot Can See The Light”

Bringing The Quake Flicker To Life With A Hacked Light

If you ever feel a pang of shame because you’ve been reusing the same snippets of code in your projects for years, don’t. Even the big names do it, as evidenced by the fact that code written to govern flickering lights back in 1996 for Quake is still being used in AAA titles like 2020’s Half-Life: Alyx. In honor of this iconic example of digital buck-passing, [Rodrigo Feliciano] thought he’d port the code in question over to the Arduino and recreate the effect in real-life.

Since the Quake engine has been released under the GPLv2, it’s easy to pull up the relevant section of the code to see how the lighting was configured. Interestingly, lighting patterns were implemented as strings, where the letters from a to z referenced how bright the light should appear. So for example, a strobe light that goes between minimum and maximum brightness would be written as “aaaaaaaazzzzzzzz”, while a flickering light could be represented with the string nmonqnmomnmomomno“.

An emergency light provided the LEDs and enclosure.

This ended up being very easy to implement on the Arduino in just a few lines, as [Rodrigo] simply had to assign each letter in the string a numerical value between 0 and 255 using map, and then use the resulting number to set the LED brightness with analogWrite.

With the code written, [Rodrigo] then had to put the hardware together. He stripped down a basic emergency light to get an array of white LEDs and a handy enclosure. He also wired up a simple transistor circuit on a scrap of perfboard so the Arduino Pro Mini could control all the LEDs from a single GPIO pin. Combined with a long USB cable to power it, and he’s got a perfect desk accessory for late-night gaming sessions.

In the video below you can see the final result, which [Rodrigo] has even synced up to footage from the classic 1996 shooter. The light makes for an interesting conversation piece, but we think the logical next step is to work this technique into an ambilight-like system to really make it feel like you’re wandering down those dimly lit corridors.

Continue reading “Bringing The Quake Flicker To Life With A Hacked Light”

An RF Remote Is No Match For A Logic Analyser!

The Neewer NL660-2.4 Video Keylight has a handy remote control, which for [Tom Clement] has a major flaw in that it can’t restore the light to the state it had during its last power-on. He’s thus taken the trouble to reverse engineer it and create his own remote using a suitably-equipped Arduino clone.

The write-up is a step through primer for the would-be RF remote hacker, identifying the brains as an STM8 and the radio as an NRF24 clone before attempting to dump the firmware of the STM8. As might be expected the STM is protected, which only leaves the option of sniffing the connection between the two chips. The SPI pins are duly probed with a logic analyser, and the codes used by Neweer are extracted. As luck would have it there is a handy board called the RF Nano which is an Arduino Nano and an NRF24 in an Arduino Nano form factor, so a proof of concept remote could be written on an all-in-one module. You can find the result as a GitHub Gist, should you be curious.

We’ve seen Tom a few times before, particularly in his European BadgeLife work, as part of which he’s put a lot of effort into bringing browser-based WebUSB and WebSerial development to his work.

Relay Logic Nixie Tube Clock Checks All The Boxes

There are a few words in the electrical engineering lexicon that will perk any hardware hacker’s ears. The first of course is “Nixie tubes” with their warm cold war era ambiance and nostalgia inducing aura. A close second is “relay logic”. Between their place in computing and telecom history and the way a symphony of click and clatter can make a geek’s heart go pitter patter, most of us just love a good relay hack. And then there’s the classic hacker project: A unique timepiece to adorn our lair and remind us when we’ve been working on our project just a little too long, if such a thing even exists.

With those things in mind, you can forgive us if we swooned ever so slightly when [Jon Stanley]’s Relay Logic Nixie Tube Clock came to us via the Tip LineAdorned with its plethora of clicking relays and set aglow by four Nixie tubes, the Relay Logic Nixie Tube Clock checks all our boxes. 

[Jon] started the build with relay modules that mimic CD4000 series CMOS logic chips. When the prototype stage was complete, the circuit was recreated on a new board that mounts all 55 Omron relays on the same PCB. The result? A glorious Nixie tube clock that will strike envy into even the purest hacker’s heart. Make sure to watch the video after the break!

[Jon] has graciously documented the entire build and even makes various relay logic boards available for purchase if you’d like to embark on your own relay logic exploits . His site overflows with unique clock projects as well, so you can be sure we’ll be checking those out. 

If you feel inspired to build your own relay logic project, make sure you source genuine Omron relays, especially if your Relay Computer Masterpiece takes six years to build.

Thanks to [Daniel] for sending this our way. Got a cool project you’d like to share? Be sure to send it in via the Tip Line

Continue reading “Relay Logic Nixie Tube Clock Checks All The Boxes”