Nematoduino: A Roundworm Neural Model On An Arduino

When it comes to building a neural network to simulate complex behavior, Arduino isn’t exactly the first platform that springs to mind. But when your goal is to model the behavior of an organism with only a handful of neurons, the constraints presented by an Arduino start to make sense.

It may be the most important non-segmented worm you’ve never heard of, but Caenorhabditis elegans, mercifully abbreviated C. elegans, is an important model organism for neurobiology, having had its entire nervous system mapped in 2012. [Nathan Griffith] used this “connectome” to simulate a subset of the diminutive nematode’s behaviors, specifically movements toward attractants and away from obstacles. Riding atop a small robot chassis, the Arduino sends signals to the motors when the model determines it’s time to fire the virtual worm’s muscles. An ultrasonic sensor stands in for the “nose touch” neurons of the real worm, and when the model is not busy avoiding a touch, it’s actively seeking something to eat using the “chemotaxis” behavior. The model is up on GitHub and [Nathan] hopes it provides an approachable platform for would-be neuroroboticists.

This isn’t the first time someone has modeled the nematode’s connectome in silico, but kudos to [Nathan] for accomplishing it within the constraints an Arduino presents.

13 thoughts on “Nematoduino: A Roundworm Neural Model On An Arduino

  1. Really cool project, thanks for posting! Not sure this is related to the OpenWorm project as I believe that focuses on implementing C. Elegans on a PC; either way I’m a big fan of anything that pulls more neuro into the electronics realm.

  2. It’s notable that 300 neurons is actually a substantial amount of C elegans: the entire worm is only just over 1000 cells. I think this is pretty neat, and I’m impressed that the maker has managed to fit 300 spiking neurons into the relatively meagre computing resources of an Arduino. I think I need to dig into the code over the weekend and see how it was done – inspirational, perhaps :)

  3. There are a couple of interesting looking neural network libraries for MCUs on github, worth checking out. It is surprising how much intelligence you can get out of something so simple, once you have trained up the network on a more substantial piece of hardware. Some may ask what is the point when you can just use an ESP32 or RPi and they’d have a point worth considering, however a set of tiny MCUs can act as the semi autonomous parts of a larger system and use less power. Not unlike how the nervous system of more complex organisms works anyway, you think “pick up cup” but the kinematics of actually making your body do it is handled by a different and lower level of your brain that is much older (in evolutionary terms) than the cerebral cortex.

  4. I wonder what the update rate of the neuron network is on a 16 Mhz atmega328 that this is designed for.
    It’s is not mentioned anywhere.
    The lookup table for the neuron connections is too big to fit in RAM, so it is stored in the program flash instead.
    The flash is slower to read than RAM, how much impact would that have on performance?
    The Arduino M0 and Arduino Zero have a ATSAMD21 ARM processor with 32Kb of RAM. You
    could fit the table in RAM completely.

Leave a Reply to zakqwyCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.