INTRO Robot Remote – First Production PCB

After the first prototype (see “Prototype of Wireless Remote Controller with NXP Kinetis K20“), we have received the boards and populated a first PCB to verify everything is working properly.

INTRO Robot Remote

INTRO Robot Remote

The main purpose of this project is to give students a decent platform for learning and for controlling the Sumo robot used in the course:

INTRO Sumo Robot

INTRO Sumo Robot

The other purpose of this project is to enable students for small battery operated project. With the graphical LCD and two wireless options a range of applications is possible, from remote controller to data logger applications.

Board features:

INTRO Robot Modules

INTRO Robot Modules

Most of the modules have connectors on the bottom side of the PCB: that way the LCD and joystick are the highest components on the top side:

intro-remote-bottom-side

intro-remote-bottom-side

It is possible to use the Adafruit LoRa transceiver module instead of the Nordic Semiconductor nRF24L01+ module. The picture below shows the module connected to the board. The final version will use a right-angle header, the picture below is from a test setup:

Adafruit LoRa Module

Adafruit LoRa Module

For the LCD I have implemented a simple menu system. The following shows an example top menu:

Menu 1

Top Menu

The currently selected item is highlighted. Items in submenus are indicated with a ‘>’ on the right side:

Menu 2

Item 2 in top menu selected

With this I can go down and up again in the menu hierarchy:

Submenu

Sub-Menu items

Each menu is described with very simply data structure:

typedef struct LCDMenu_MenuItem_{
  uint8_t id;  /* unique ID of menu item, starting with 1 */
  uint8_t level; /* menu level, starting with 0 (root), then increasing numbers */
  uint8_t pos; /* position of menu in level, starting with 0 (top position) */
  uint8_t lvlUpID;  /* menu item level up, 0 for 'none' */
  uint8_t lvlDownID; /* menu item level down, 0 for 'none' */
  char *menuText; /* text of menu item */
  void(*handler)(const struct LCDMenu_MenuItem_ *item, LCDMenu_EventType event, void **dataP); /* callback for menu item */
} LCDMenu_MenuItem;

The menu itself can be stored in FLASH:

static const LCDMenu_MenuItem menus[] =
{/* id, lvl, pos, up, down, text,       callback */
    {1, 0,   0,   0, 2,     "General",  NULL},
    {2, 1,   0,   1, 0,     NULL,       BackLightMenuHandler},
    {3, 0,   1,   0, 4,     "Robot",    NULL},
    {4, 2,   0,   3, 0,     "Remote",   NULL},
    {5, 2,   1,   3, 0,     "Sensors",  NULL},
    {6, 0,   2,   0, 0,     "nRF24",    NULL},
    {7, 0,   3,   0, 0,     "LoRa",     NULL},
    {8, 0,   4,   0, 0,     "Sensors",  NULL},
};

The callback is used to configure the menu item or to react on menu selection:

static void BackLightMenuHandler(const struct LCDMenu_MenuItem_ *item, LCDMenu_EventType event, void **dataP) {
  if (event==LCDMENU_EVENT_GET_TEXT && dataP!=NULL) {
    if (LedBackLightisOn) {
      *dataP = "Backlight ON";
    } else {
      *dataP = "Backlight OFF";
    }
  } else if (event==LCDMENU_EVENT_ENTER) { /* toggle setting */
    LedBackLightisOn = !LedBackLightisOn;
  }
}

The implementation is very simple and will be extended over the next days. The current sources can be found on GitHub.

The enclosure for the board is not ready yet. I plan to post pictures when ready next week.

Happy Remoting 🙂

Links

Advertisements

5 thoughts on “INTRO Robot Remote – First Production PCB

  1. I found the chip-on-board-on-board-on-board design a bit amusing—I can understand how it happened, from minimizing design time by reusing existing boards, but I suspect it might have been worth a little time to cut out the Adafruit board and put the underlying RF96 module directly on the remote board. It seems that all the Adafruit board adds is a voltage regulator and level shifter, which are not tricky to design with (unlike radio).

    Like

    • We will use the nRF24L01+ module in the course. We could have designed that module on the board, but these modules cost only around $2 so it was not worth to do an onboard antenna design, and we can re-use existing modules. The LoRa module is different: we plan to use them only for a few boards, so it was not worth to design it into the board or even to use the receiver board. As you said: minimizing design time was the key reason.

      Like

  2. Pingback: Enclosure for the Remote Robot Controller with LCD Display | MCU on Eclipse

What do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s