Skip to content

Brain Boards

Tom Seago edited this page Jun 21, 2019 · 2 revisions

A BAAAHS Brain Board, or more simple a Brain, is a custom circuit board built around the ESP32 WROOM module from Espressif. This module contains an ESP32 SoC, which itself has a huge number of built-in IoT related peripherals, a on module antenna for WiFi, and in additional flash memory. The model we selected has 16MB of flash so tons of space for code as well as static resources like files to be served up as web pages.

The Brain board also adds an Ethernet PHY, which means that if you solder the appropriate Ethernet jack module onto the board you can plug this sucker into a wired 100BaseT network and communicate that way. Ethernet jacks are a little bulky, so you depending on how you want to use a Brain you may or may not want the jack soldered onto the board.

Each Brain has a built in USB to UART chip which means you can plug this thing directly into your computer using a simple USB cable if you want to flash new firmware to it or see debugging output from the ESP32.

There is a simple UI on each Brain that consists of two buttons for input and a set of LEDs for output. The LEDs are changing from Rev D to Rev E of the board so we'll document those better after we settle down.

The primary use for the Brain is to output data to a strand of LEDs mounted in a single panel of BAAAHS. Thus, it has an "inline" style of primary power and data connections.


Theory of Use

Each Brain has a unique identifier, derived from the ESP32, so when talking on a network we can distinguish each board. It also has a set of configuration values that it stores in Non-volatile RAM (NVRAM) that can be set by a variety of means and which persist across power cycles and firmware updates. This set of configuration values give each board some additional personality that layers on top of the boards unique identifier.

The Brain firmware is/will be designed such that if you put it on a brand new "straight from the factory" board, or a "factory reset" board, it will have a set of reasonable defaults. However, these are likely to not be reasonable to you. Thus, when you first encounter a Brain it's likely that you will need to reconfigure it slightly to fit your particular situation.

The default for a brain is to believe that it is a panel on the sheep. In a "factory reset" state it doesn't know which panel it is on the sheep, because it assumes it will be told that later by the Mapper, but it's pretty sure it's a sheep panel, and thus will assume that it has the maximum number of LEDs connected to it until someone (the Mapper) tells it otherwise.

If the Brain isn't actually on the sheep, but instead is on say a bicycle, then it's going to need a little more configuration from the "factory reset" state. The first thing it needs to be told is that no, you're not a regular panel, you're some other class of surface which almost certainly can't hope to ever be configured via the Mapper. The second piece of data that it will need to know is how many LEDs are connected to it since the Mapper isn't ever going to be able to sense this and help it out.

How to perform a factory reset is still being figured out, but it is likely to be something like holding down one or both of the UI switches during, and for a long time after, boot up. After the factory reset (or after flashing a fresh board), the board UI will allow for the setting of what class of board, and it might even allow for setting the number of LEDs connected to the board.

Clone this wiki locally