Oct 25

In order to translate high level movement commands from the brain a small micro controller will be placed between the interface to all segments and the FB. To minimize the time needed for transferring commands a parallel bus interface will be used to the micro and an interrupt signal from the micro to the FB in order to indicate attention is required.

Using 8 bidirectional pins, some address outputs, one read output and one write output are all that is needed to create a memory mapped IO interface. By making sure that there are enough pins used for the address bus it might be possible to add later a second board on top that uses the same interface but now in a different memory area.

Some thoughts about how communication will take place between the FB and the micro:

  • Read the primary motor cortex status, can be a specific memory location
  • Status of a specific segment reporting current servo current, position, charge voltage, charge current, segment status. This would require more a memory location to set the targeted segment using a memory location followed by reading multiple memory locations (5 so far).
  • Normally the micro controls the segments, however when making very focused movements it might be wise to have write access to a segment directly for setting maximum current, position, maximum charge current, charging on/off. This can be the same memory area and principle but than writing to the locations after writing the targeted segment.
  • Give commands to the micro, for example move forward, using the vector model this would require a target vector (X, Y), perhaps even 16 bits and what kind of movement will be required at what speed.

This list is most likely not complete and should be considered work in progress. But I wonder if using a memory location for each variable would not work. Above list would already require 8 to 12 address locations, as an alternative a protocol can be defined over the interface, for example byte one is the command, byte two the amount of data bytes to follow and byte two+n the data bytes. In this case a very limited amount of address lines would be needed, theoretically only one.

With respect to available IO on the FB, the pins IOG8..IOG15 can be used as a bi-directional data bus. The direction must be changeable depending read or write commands. This is possible as a whole 8 bit bus but not per pin, this is not a problem.  Pins IOG16..IOG23 can be used as an 8 bit address bus, all to be set as outputs. Outputs OG3 and OG4 can be used for /RD and /WR and input IG1 as the /INT signal. Some additional outputs OG1 and OG5 can be used to drive two LED’s which always prove to be helpful during development.

In total there are 19 pins used for interfacing with the micro. Most ATMEGA’s have more so also here there is no problem to be expected. As a result, there is a 256 byte memory area defined, so both the memory mapped and protocol based methods of interface are possible. Additional all pins are mapped on port G requiring only one file descriptor to be opened in the application on the FB (/dev/gpiog) making maintenance easier and allowing a second application to run in parallel using the other pins if needed later on.

For the interface to the segments an I2C interface is planned. Although perfect as interface I’m worried about data integrity. The snake might turn out to be long (1 to 2 meters) requiring long interface lines from head to tail. Combining this with multiple servos all driven using a pulsed driving signal the electrical noise generated should not be under-estimated. A better choice would be RS485 since this is designed for noisy long distance communication. However, setting up a multi master system with this will not be easy. Perhaps a better option is to use the interface designed for this: CAN.

2 reacties

  1. vikas Says:

    The issue of stimulating the motor cortex also has biological issues apart the ones which you have addressed(which i beleive you would be aware of). The coding responsible for the final motor act need not be processed in the cortex for which reason you would be looking at something like a compiler sort of language at the level of the motor cortex

  2. admin Says:

    Fully agree to your statement, the brain will decide were to go and instruct the cortex to (for example) move forward with a specific speed (as indicated above). The cortex will split the command in several smaller commands and send these commands to the specific motor units. These units will execute the command by physicly driving the engines using sensors to monitor correct execution.

    Thanks for the post.


Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.