Advertisement

Dissecting an artificial brain at ESC Silicon Valley

November 30, 2016

Max The Magnificent-November 30, 2016

Give me strength! I'm too young for all this excitement. There are now only a few days to go before I fly out to attend the Embedded System Conference (ESC) Silicon Valley, December 6-8, 2016.

In addition to seeing all my friends and giving a couple of presentations, one thing that is really exciting me is the prospect of noodling (dare we say "brain-stem-storming") my new artificial brain project with like-minded folks (see The Time Has Come to Build My Own Electronic Brain and Deep Thoughts Regarding the Bodacious Brain).

Just to remind us as to what this is all about, the Bodacious Brain will comprise lots and lots (possibly lots2) of semi-autonomous cells (neurons) filling a large glass tower. These cells will respond to different stimuli -- including sounds -- in strange and wondrous ways.

Did you ever see the LD3 Cube Kickstarter Project (if not, bounce over there right not to check out the video of the cube responding to audio stimulus). Well, it cannot be denied that the LD3 Cube is very impressive, but "Cubes are so 20th Century, my dear!" The Bodacious Brain is going to be like a 3D Cube on steroids or my name isn't Max the Magnificent!

For more years than I care to remember, whenever I've announced a new hobby project, a number of my friends have emailed me to say "You really should consider using PSoC devices from Cypress Semiconductor for this creation" (I use the word "creation" only as an example; other terms have been employed, including "folly").

My chum Jay Dowling has been particularly passionate in this regard. Meanwhile, another chum, Sree Harsha Angara (an AE at Cypress), has been talking more of a "stealth marketing" approach. The way this works is that I post a blog discussing what I'm thinking about doing, and a few days later Sree emails me to say something like "I played around at home this past weekend and managed to do what you wanted using only 10% of the resources on a PSoC xxxx."

On the off-chance you aren’t familiar with these little scamps, a PSoC ("Programmable SoC") comprises a mix of programmable analog fabric and programmable digital fabric, all accompanied by a hard processor core. These cores include 8-bit 8051s in the PSoC 3 family, 32-bit ARM Cortex-M0s in the PSoC 4 family, and 32-bit ARM Cortex-M3s in the PSoC 5 family.

These devices are accompanied by an intuitive, easy-to-use drag-and-drop graphical user interface. Based on all of this, you may be wondering why I've never actually employed PSoCs in any of my projects. Actually, reading what I've just written, I'm wondering the same thing myself. I think it's just been a reluctance to make the effort to learn something new, but it may be that the Bodacious Brain provides the perfect project platform for these little beauties.

As always, I find I have a lot to learn. For example, all of the cells will be running the same program (in the case of MCU-based cells) or have the same configuration (in the case of PSoC-based cells). With regard to an MCU-based implementation, I'd vaguely considered pre-programming the cells and then using an I2C bus to "tweak" various parameters and coefficients. In a previous column, I mentioned that I'd ideally like to be able to upload an entire new program into each cell via the I2C bus, but that I didn’t know how. Well Sree informs me that all PSoC 3/4/5s can be reprogrammed via I2C, so that solves that problem.

However, Sree then went on to note that I2C only supports 127 individual addresses. I said that, even though we coudl have many more than 127 cells, this wasn't an issue because I was planning on giving all the cells the same address and simply broadcasting the same code to all of them, but Sree informed me that this wouldn’t work because:

(a) The I2C specification doesn’t allow for same addresses on a single bus (to the extent of my knowledge). The most problematic is the 'ACK' at the end of a byte send. Since the I2C data line is a physical pull-up pin, it really gets crazy when all the I2C's try to ‘ACK’ together. I suspect multiple I2C devices with the same address will probably hang the bus.

b) On top of the I2C protocol lies the programming packets. These also use handshakes (in case of a packet loss due to noise, bad soldering, etc.) to ensure that we don’t write corrupt programs and brick the processor. So if all of them try a ‘handshake’ together, things go even crazier.

Bummer. I hadn’t considered the problem of multiple devices with the same address all trying to handshake together. On the other hand, Sree also notes that PSoCs can support up to four I2C busses depending on the device, so maybe there's a solution to be had with each cell receiving an I2C input stream on one bus, using that stream itself, and also passing the stream on to the next cell using a second I2C bus.

When I mentioned to Sree that -- for the main processing element for each cell -- I was thinking of using surface mount devices on small breakout boards, he responded by saying that there are many flavors of PSoC, that they come in all sizes, and that the smallest breakout is probably something like the PSoC 4 M-Series Prototyping Kit. He also pointed out that it might make more sense to breakout the programmer device -- the one on the USB end -- because this is a PSoC 5LP in disguise and it has a bunch of pins one can reprogram and reuse.


PSoC 4 M-Series Prototyping Kit (Source: Cypress Semiconductor)

This is a great idea, but probably not the way we'll go (sorry Sree). My chum Duane Benson works at Screaming Circuits. He will be designing any custom breakout boards tailored to the Bodacious Brain's unique requirements, and Screaming Circuits can assemble any circuit board one's heart desires. Happily, Duane will also be attending ESC Silicon Valley, so he, Sree, and yours truly are planning on meeting up, quaffing a few beers, and bouncing bodacious ideas back and forth.

Speaking of ideas, I'd originally planned on having a single microphone mounted in the base supporting the Bodacious Brain's glass tower, but Sree just emailed me to say: "I was actually visualizing the Bodacious Brain as having a microphone array -- maybe six -- arranged around the periphery so that it reacts to sounds spatially." Good grief -- I'd simply never thought of that. I tell you... there's so much fun stuff to do and so little time to do it all.

I shall be reporting back further following out meeting at ESC Silicon Valley. In the meantime, as always, any comments and suggestions will be very much appreciated.

Loading comments...