Give Your Raspberry Pi Robot a Worm Brain

The C Elegans worm is one of the most-studied animals in science. In neurobiology, it’s the most basic brain model scientists use to study how the brain works. Now you can have a robot that thinks like one!

The C Elegans worm brain has been brought to the Raspberry Pi Robot. The Connectome project has modeled the C Elegans brain into a Python program and made it open-source. You can download yourself, and have a worm-brained robot running around the house.

Hacking the Worm Brain

The C Elegans neuron map, courtesy of the Connectome Project. The C elegans worm has approximately 1000 cells that make up the entire organism. 302 of those cells are neurons. The neurons form a network that help the worm find food, move muscles, and do whatever it is that worms do. The program made by the Connectome project takes a map of these cells and models how they’re connected. The resulting model and code work just like a worm would, but in Python. And on your Raspberry Pi. The worm is a simple beast: and spends its life bumping into things and looking for food. But its simplicitiy is what makes it such a powerful brain model. The end-result is truly a totally autonomous robot that is reacting to its environment through a simulated brain of a nematode (worm).

Simulating the Brain in a Raspberry Pi

In this project, we walk you through simulating the C Elegans brain in a Raspberry Pi.Give Your Raspberry Pi Robot a Worm Brain

Step 1: Build the GoPiGo.

You can find a GoPiGo here. The GoPiGo Starter Kit includes everything you need to make a Raspberry Pi Robot.

The GoPiGo is quick to assemble and takes about 20 minutes or less with just a philips head screw driver. No soldering is required and no prior expertise required.

Check out the code and designs on the Dexter Industries Github repo. The GoPiGo can be programmed in Python, Scratch and Java.

There step by step instructions on building the GoPiGo here.

Step 2: Build the GoPiGo Servo Controller.

The GoPiGo Servo Controller is essential for controlling and moving the Ultrasonic sensor.

The Servo Controller attaches directly to the GoPiGo and is controlled by software. There are mounting holes for the Raspberry Pi camera and the Ultrasonic sensor.

There are building instructions for attaching the servo and an ultrasonic sensor to the Raspberry Pi here.

Step 3: Attach the GoPiGo Ultrasonic Sensor.

You should attach an Ultrasonic Sensor to your Raspberry Pi Robot. Instructions for attaching the ultrasonic sensor to your Raspberry Pi Robot can be found here.

Step 4: Connect the GoPiGo and Raspberry Pi to the internet.

Setup a wifi connection to the internet with your Raspberry Pi.Give Your Raspberry Pi Robot a Worm Brain schematic

Step 5: Clone the Github repository to your desktop.

After your Raspberry Pi is connected to the internet, you should open up the command line and clone the Ceonnectome Github Repository. You don’t need to setup a github account to do this step, we’re just copying the github repository to your Raspberry Pi. All of the code will be downloaded.

In your command line type:

sudo git clone


For more detail: Give Your Raspberry Pi Robot a Worm Brain

© 2015 Powered By Engineering Projects Team, Raspberry Pi Projects

Scroll to top