[this was the first programmed brain used with Robot3, my second microcore walker]

Brain Transplant...

Hardwired behavior layers add personality and ability, but only in a fixed way. If you arrange things for good performance in one environment, it'll often fail in another. Although I started on some non-cpu brain ideas on another page, I have little time for experiments and parts aquisition so I re-used the brain circuit and code from the previous walker. The original brain code includes timing/wakeup functions and is better applied to a timer-less walker as in the first schematic above. The modified code has all timing functions removed, so it only "wakes up" when the hardwired activity timer tells it to. The code is in Parallax format for the PASM.EXE assembler.

Here is the hookup I used...

      .------------*---------------*-----------> +
      |    2.2u    |               |
      |  .--||-----*--4.7K-.   .---|---< photocell (other ends
      |  |    +            |   | .-|---< photocell  tied to +)
      |  |        .-----.  |   | | | .1u
      |  |       -|1    |--|---*-|-|--||--.
      |  |       -|     |--|-----*-|--||--*----> -
      |  |       -|     |--*-||-.  | .1u _|_
      `--|--------|     |-  27p_|_ |
         *--------| PIC |----------'                   Feeler circuit
        _|_   .---|     |---820K---->                  (if not present)
        .-----|---|     |---820K----> Micro-core Inputs        +
        | .---|---|     |---820K----> (junctions of            |
        | | .-|---|     |---820K---->   R and C)      .---100K-*  feelers
        | | | |   `-----'                             | .-100K-'   /  
        | | `-|----*----------------< Side Feeler <---*-|-------->|___
        | `---|----|-*--------------< Side Feeler <---|-*-------->|  _|_
 status |     |    | `---|>|--.                       | |     2.2u \
  LED   |     |    `-----|>|--*-----> Reverse feeler  | `-100-+||-. 
    ^^  `-----|----------|<|--'                       `---100-+||-*
  .-|<|--2.2K-*---|<|--------100----> Reset capacitor        2.2u_|_
 _|_           (D and 100 only for timed bnrider code)
   

The diodes are 1N914 or 1N4148, the PIC chip is a PIC-16C54-RC/P and must be programmed with working brain code (they come blank), the .1uF caps might be better if they were .22uF, maybe not, use a sharpie to trim the photocells if they measure differently, and the 820K resistors are probably on the low side but I like it that way. 1M to 1.5M might be more reasonable. If connecting to the basic walker without layers, add the pull-up/hold circuit at the side - the inputs expect high for no contact and low when touching. It doesn't matter which outs go to which nodes, same for left and right feeler inputs and photo inputs. The bitnet algorithm works with what it's got and unless you plan to monitor it to see what is controlling what, it makes no difference.

The connection to the reset capacitor is only used with the original code with software timer functions, it goes to the juction of 10M and .22uF in the first schematic. This connection has no effect if the hardwired timer is in place, instead connect the reset out to the junction of the 47uF, 1.5 meg, 4.7K and timer stage input pin. An "emergent" behavior... sometimes the cpu and hardwired timers clash on turn-off and produce a state where no amount of stimulous will bring it around, after a few minutes it's fine. That and it waking up at inappropriate moments prompted the simplified code with all that stuff ripped out. Was getting on my nerves...

What does it do? Well it certainly isn't alive, and intelligence is relative. Basically, it outputs semi-random control signals to the microcore in response to input signals, and evaluates the feeler inputs to determine how effective the chosen move was. If it hits again, it tries a different move. Moves that work reliably tend to persist, moves that don't work very well get quickly replaced. So it learns to steer or back away from obstacles, and performs tricks if messed with too much. Refer to the Bit-Net page for more information about this simple method of associating sensors to control outputs. In effect, the bitnet behaves as a diode connection matrix that randomly rewires itself when things aren't going well.

There is a side effect from the brain circuit connections, specifically the diodes used to apply the reverse feeler to both feelers (the code treats both L and R feelers together as a separate state) also conduct charge current into the capacitor that times the reverse action, drastically reducing how long the hardwired backup action operates and increasing the hold time of the L/R feelers. Both side effects work out ok, the former helps the learning algorithm actually learn to back up rather than rely on the hardwired connection (which remains as a safety-net even if brief), and feeler hold time needs increasing a bit anyway to ensure the cpu notices.