Skip to the content
2 layers68.6 × 53.3 mmLED shield, the printed circuit board in 3D

Project to make a photonic neural network using photochromic material for the synaptic weighting adjustments

Size
68.6 × 53.3 mm
Copper layers
2
Thickness
1.6 mm
Parts
31
Nets
70
Pads
155
Tracks, vias
310, 24
Pours
1
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
21 Oct 2020
Updated
25 Jul 2024

Overview

LED shield is an open-source printed circuit board by RepRapLtd, from the RepRapLtd/AnalogueNeuralNet repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 68.6 × 53.3 mm with 31 parts on 70 nets, routed with 310 tracks and 24 vias.

It is built around the PCA9622DR. Its parts include 21 resistors, 3 capacitors and 1 IC. It belongs with the AVR (ATmega, ATtiny) boards of this library.

Main components

1

README

README.md

Modular Neuromorphic Analogue Neural Net

This is a project to create a neuromorphic analoge neural network. I wanted to get away from using conventional computers (including parallel graphics processors) to do neural simulations and to make something that is a lot more like a real brain.

What I propose is similar to the early work on perceptrons by Rosenblatt from the 1950s that has now been all but abandoned because today it’s much easier to solve a problem by writing some software to do it than by designing and building some electronics to do it. Easier maybe, but at least today we have the advantage of 21st Century electronics.

So. How will it work? (Chip numbers in brackets are suggestions, and may not form part of the final design.)

Neuron circuit

This is the central idea for a single artificial neuron.There are a number of digital inputs I0+…In+ and I0-…In+. Each controls an electronic analogue switch (SN74LVC1G3157) that selects either GROUND or a voltage, V. The voltages are set by digital to analogue converters (AD5629R) and are the weights in the network. There are exitatory inputs (I+) and inhibitory ones (I-). They are all summed by two operational amplifiers (MCP6004) the voltages from which are fed into a comparitor to give the final output, O.

The neuron has fired when O = 1, and not when O = 0.

Synapse Test

The photograph above shows a test breadboard of this design using the chips listed. The D to A converter and the Arduino are both controlled by the I2C driver in the middle, which allows the whole thing to be run via a single USB from a Python program running on a PC. The Arduino is supplying the inputs, I, and is reading and reporting the output voltage from the summing op. amp.

So far, so (I hope) straightforward. It’s an analogue version of the way that a conventional artificial neural network operates, but it’s a lot closer to the biological original than linearising the thing in a program for a Turing-equivalent machine.

But I obviously don’t want to hard-wire the connections. I want the input data to be routed to any I input; I want the resulting weights/voltages to be routable in any combination to be summed; and I want any output, O, to be able to feed into any group of inputs, I in the next layer (or to form a bit of the final result). To do this I will use crosspoint analogue switches (ADG2188).

First, here is how the voltages will be connected to the summing amplifiers:

Synapse to axon connections

Only one analogue switch in any row can be closed, but any number in a column can be closed. The closed switches in a column cause the corresponding voltages selected by the inputs, I, to be summed. This happens in adjacent pairs, one (left) inhibitory, and one (right) exitatory. The inputs on the left are labelled “synapses”, but it is perhaps more accurate to regard a single column of switches to be synapses.

So now there are a collection of outputs, O. These have to be connected to the inputs of the next layer, or form part of the final result:

Axon to synapse connections

The switch matrix works in exactly the same way as before (though there are different numbers of rows and columns), but this time it is switching digital signals. Once again only one switch on a row may be closed, but any number in a column may be closed. So any output, O, can be routed to any number of inputs, I, but each input can only be driven by one output.

There are also GROUND and Vdd columns that allow any input to be set permanently to 0 or 1. I may add a third such column carrying Johnson–Nyquist noise so that noise can be injected into the machine in a controlled way at any point.

If you look at the two diagrams above, you can see that they align, in the sense that they are two flat circuits that could be put one on top of the other then connected along their left and bottom edges.

Rather conveniently, the AD5629R D to A converter has eight analogue outputs, and the ADG2188 crosspoint switch is an 8×8 matrix. This will allow the whole system to be made modular – the synapses down the left in the first matrix diagram can be grouped in eights; the MCP6004 summing amplifiers along the bottom have 4 per chip and so can also easily be grouped in eights; and the matrix can be made up from 8×8 elements.

This means that the whole machine can be made Lego like from just three modular PCB designs that can be combined with connectors for the edges to build a machine of any size. Of course there will be limits set by things such as input impeedances, propagation delays and so on. Those will have to be calculated and experimentally investigated.

The whole machine will be programmed via I2C setting the voltages, V, and deciding which switches to close. Note that this will be done once before the machine is used, and does not have to be altered while it is operating. Thus that step doesn’t have to be particularly fast. The voltages, and possibly the interconnections, will have to be altered when the machine is learning, though.

This means that there will be multiple identical I2C devices on the same bus, all with the same addresses. But they all have two addresses that you flip between with a 1 or a 0 on a given pin. So you can use that pin as a chip select – keep it normally 0, and just set it to 1 when you want to talk to the device on its 1-address.

But how to address all those address-select pins? Well. The computer can only talk to one device at a time; there is no parallelism while the machine is being set up, even though it is completely parallel in operation. And – as I pointed out above – for setting up the machine speed is not a big issue. So I propose that each I2C device will have a single D-type flip-flop (74LVC1G175GW) with its Q output connected to its address-select pin. These will be chained to make a long shift register. The controlling computer can reset all the flip-flops to 0 with a common CLR line then clock a single 1 into the first flip-flop to address the I2C chip on its Q output. The next clock pulse will allow the next device to be addressed, and so on.

What will the proposed machine be able to do? Well, as I mentioned I don’t yet know how big it can be made by adding more modules, though I’ll be very surprised if it can do a trillion-parameter LLM. It might make a component of one though.

It is, provably, functionally complete because it can implement a NAND gate. (Functional completeness means that it can do anything that a computer can do.) To see this imagine that Vdd is used to switch 0.5V to the positive sum of one of the summing amps. Two of the I inputs then each switch 0.3V to the negative sum. Only when both inputs are 1 will the output be 0 – that is, that tiny bit of the machine becomes a NAND gate the output of which can be connected to any other.

If it all works it will make a fully asynchronous (it has no clock in operation) modular neuromorphic analogue neural net. The entire design will be open-source, of course. And, if it works well, we may offer kits of the three basic modules plus edge connectors so that people can experiment.

Adrian Bowyer

7 May 2024

Parts

31
QtyValueFootprintReferences
8100RResistor_SMD:R_0805_2012MetricR3, R5, R7, R10, R11, R13, R15, R17
868RResistor_SMD:R_0805_2012MetricR4, R6, R9, R12, R14, R16, R18, R19
3RResistor_SMD:R_0805_2012MetricR8, R20, R21
3SolderJumper_3_OpenJumper:SolderJumper-3_P1.3mm_Open_Pad1.0x1.5mmJP1, JP2, JP3
210KResistor_SMD:R_0805_2012MetricR1, R2
21uCapacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolderC2, C3
2PINHD-1X12Connector_PinHeader_2.54mm:PinHeader_1x12_P2.54mm_VerticalJP4, JP5
10.1uCapacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolderC1
1Arduino_Uno_Shieldarduino:Arduino_Uno_ShieldXA1
1PCA9622Package_SO:TSSOP-32_6.1x11mm_P0.65mmU1

More from RepRapLtd/AnalogueNeuralNet

4
  • 2 layers93 × 73.5 mmOne synapse electronic, the printed circuit board in 3D

    One synapse electronic

    RepRapLtd/AnalogueNeuralNet

    Project to make a photonic neural network using photochromic material for the synaptic weighting adjustments

    141 parts8GPL-3.0
  • 2 layers101.6 × 53.3 mmDirect drive LEDs, the printed circuit board in 3D

    Direct drive LEDs

    RepRapLtd/AnalogueNeuralNet

    Project to make a photonic neural network using photochromic material for the synaptic weighting adjustments

    43 parts8GPL-3.0
  • 2 layers31 × 31 mmCrosspoint switches, the printed circuit board in 3D

    Crosspoint switches

    RepRapLtd/AnalogueNeuralNet

    Project to make a photonic neural network using photochromic material for the synaptic weighting adjustments

    20 parts8GPL-3.0
  • 2 layersSkidl experiment, the printed circuit board in 3D

    Skidl experiment

    RepRapLtd/AnalogueNeuralNet

    Project to make a photonic neural network using photochromic material for the synaptic weighting adjustments

    6 parts8GPL-3.0

Similar boards

  • 2 layers44.5 × 46.9 mmOSO SWAT B1-jig, the printed circuit board in 3D

    OSO SWAT B1-jig

    joeycastillo/Sensor-Watch

    A board replacement for the classic Casio F-91W wristwatch

    31 parts2.1k
  • 2 layers65 × 30 mmRgb to hdmi, the printed circuit board in 3D

    Rgb to hdmi

    hoglet67/RGBtoHDMI

    Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI

    31 parts1kGPL-3.0
  • 2 layers191 × 98.5 mmMacroKeypad, the printed circuit board in 3D

    MacroKeypad

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    31 parts915
  • 2 layers39 × 45.2 mmCH32V003F4P6-R0-1v1, the printed circuit board in 3D

    CH32V003F4P6-R0-1v1

    openwch/ch32v003

    CH32V003 is an ultra-cheap RISC-V MCU with 2KB SRAM, 16KB flash, and up to 18 GPIOs that sells for under $0.10

    31 parts599
  • 2 layers26.7 × 27.9 mmBreakout board, the printed circuit board in 3D

    Breakout board

    Luos-io/luos_engine

    Open-source and real-time orchestrator for cyber-physical-systems, to easily design, test and deploy embedded applications and digital twins.

    31 parts546MIT
  • 2 layers100 × 50 mmPixelix, the printed circuit board in 3D

    Pixelix

    BlueAndi/Pixelix

    Full RGB LED matrix, based on an ESP32 and WS2812B LEDs or emulated LEDs on TFT.

    31 parts447MIT
  • 2 layers77.2 × 69.8 mmCubesatsim solar, the printed circuit board in 3D

    Cubesatsim solar

    alanbjohnston/CubeSatSim

    CubeSatSim, the AMSAT CubeSat Simulator

    31 parts419GPL-3.0
  • 2 layers103 × 55 mmTd neck-294, the printed circuit board in 3D

    Td neck-294

    tdaede/td-crt

    tubes

    31 parts373

Questions

How big is the LED shield PCB?

It measures 68.6 × 53.3 mm and has 2 copper layers, 1.6 mm thick.

What parts does the LED shield use?

31 parts, built around the PCA9622DR. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the LED shield KiCad files?

From the RepRapLtd/AnalogueNeuralNet repository on GitHub, at the commit this page was made from: the board is Electronics/LED-shield/LED-shield.kicad_pcb and its schematic Electronics/Crosspoint-AANN/crosspoint-switches/crosspoint-switches.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the LED shield design in my own project?

Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).