The Truck Stops Here

A simple 8-neuron hardware spiking neural network built on breadboards guides an RC Cybertruck so that it can zip around without crashing.

This breadboard neural network is controlling an RC car (📷: Global Science Network)

Artificial neural networks typically conjure up mental images of huge matrices of numbers whizzing through the memory of a computer as GPUs perform massively parallel operations on them. And in most cases, that is more or less exactly what is happening. But neural networks do not have to look that way, of course. A quick study of biological neural networks is enough to tell us that there are better and more efficient ways to build them.

The weights of a neural network could be encoded into hardware, like resistors, for instance. But this type of solution is expensive, does not scale well at all, and would be a nightmare to debug. So with the technologies (and understanding) available to us today, computational methods are still far and away our best option. Even still, YouTuber Global Science Network is a big believer in alternative, hardware-based neural networks and thinks that they are the future. That view may or may not prove to be correct, but in any case, it led him to design and build a very cool hardware-based network that is worth checking out.

A better look at the hardware (📷: Global Science Network)

Global Science Network’s design is a hardware spiking neural network consisting of just 8 neurons that are laid out on a series of breadboards. The neurons process sensor data from a remote-controlled Cybertruck and send controls to it so that it can autonomously drive without crashing into walls or other obstacles.

The truck is equipped with a set of 4 IR proximity sensors facing forward, backward, and to the left and right. The measurements from these sensors are wirelessly transmitted, via an ESP32 development board, to the spiking neural network (another ESP32 receives the data), where they serve as inputs to the network.

The data from each sensor feeds into a separate neuron. If the signal level received crosses a threshold value, the neuron spikes, which means it sends a signal to the next layer of the network. In this lower layer, the output neurons will again spike if the signal they receive, from the sum of their inputs from the first layer, cross a threshold. Each output neuron is interpreted as a command to the truck, specifically to move it forward, backward, left, or right.

The network was manually tuned (📷: Global Science Network)

The network was manually tuned to produce an appropriate output given a set of inputs. For example, if the front proximity sensor detects something nearby, the resistances within the neurons will inhibit further forward movement, and instead may cause the vehicle to turn or back up.

To carry out the commands, Global Science Network disassembled the Cybertruck’s controller and soldered some wires to the pads of the buttons that would normally be pressed when operating it by hand.

Whether or not Global Science Network is right about this direction being the future of machine learning is debatable, but in any case it is a very interesting project. The LEDs that flash as the neurons are activated is a nice touch in particular. It really helps to visualize how the network operates, which makes this project not only entertaining, but also educational.


nickbild

R&D, creativity, and building the next big thing you never knew you wanted are my specialties.

Latest Articles