NeuroChip is a prototyping board for hybrid digital/analog neuromorphic computing for the DIY robotics community and researchers in the fields of artificial intelligence and computational neuroscience.
NeuroChip can be used to test various learning algorithms and activation functions in hardware. Once a design has been verified, it can be miniaturized and scaled up using one of the following technologies: System in Package (SiP), VQFN, SOT, or WLCSP.
To program each processor, remove the chip from the socket and connect it to a 5 volt Arduino or programming board (many instructions available online). To test the board, remove the "cell body" chip and connect the corresponding socket positions (with jumper wires) directly to an arduino that has been programmed with the code from the cell body chip (with some additional serial monitoring code). After confirming that the board is performing as expected, reinstall the cell body chip. External sensors, actuators and monitors can now be connected to the inputs and outputs of the board (note: these must either be at 5 volts and connected to a common ground or operated by relay).
#include "avr/interrupt.h"
volatile int state = 0;
byte input;
byte weight = 2;
byte power;
int difference;
byte learningRate = 5;
void setup() {
pinMode(4, INPUT_PULLUP); // input
pinMode(2, INPUT_PULLUP); // post-synaptic feed-back
pinMode(1, OUTPUT); // output
GIMSK = 0b00100000;
PCMSK = 0b00000100;
sei();
void loop() {
if (state == 1){
weight = weight + (difference / learningRate); // if post-synaptic neuron fired, nudge weight towards last input
state = 0 // reset post-synaptic feed-back state
}
input = pulseIn(4, HIGH) / (); // read input and normalize to 255 (to determine number to divide by, divide max
difference = input - weight; // pulse width by 255
power = abs(difference); // replace this function with Gaussian for more powerful recognition
analogWrite(1, (255 - power));
}
ISR(PCINT0_vect)
{
state = digitalRead(2); // get post-synaptic firing event (rising edge only)
if (state == 0) {
state = 1}
}
Qty | Value | Device | Package | Parts | Description | MF | MPN | Aliexpress or Ebay link |
---|---|---|---|---|---|---|---|---|
5 | AtTiny85 | DIP | N/A | |||||
2 | NPN Transistor (BJT) | SOT23-EBC | T1, T2 | |||||
6 | 0.1 uF | Ceramic Capacitor | Through Hole Capacitor | C8, C3, C4, C7, C6, C5 | ||||
1 | Quad 2-Input AND Gate 74HC08 | SOIC14 | U1 | |||||
2 | 1n4001 Diode | D2, D1 | D1, D2 | |||||
5 | 8-Pin IC Socket | IC1, IC2, IC3, IC4, IC5 | ||||||
1 | 220 ohm | Resistor | 0204/5 | R4 | ||||
3 | 1k | Resistor | 0204/5 | R1, R2, R3, R5 | ||||
5 | 4-Pin Header | J5, J2, J3, J7, J8 | ||||||
2 | 2-Pin Header | J1, J9 | ||||||
1 | 3-Pin Jumper | JP2 | ||||||
1 | 10 uF | Capacitor | C1 |
Name | Size | # Downloads |
---|---|---|
circuit.drl | 1.95 kB | 666 |
circuit.gbl | 99.41 kB | 689 |
circuit.gbo | 42.28 kB | 652 |
circuit.gbs | 93.39 kB | 714 |
circuit.gtl | 103.95 kB | 670 |
circuit.gto | 107.54 kB | 626 |
circuit.gts | 94.83 kB | 648 |
Revision | Created | Layers | Dimensions |
---|---|---|---|
rev1 | 8 years ago | 2 | 46 × 44 |