Spectrum Tera

A long-term robot project

Similar projects worth following
I have built many robots in my life. Each time I started with the mechanical construction first and then took care of the electronics and programming. This time I want to do it differently and deal with the electronics and especially the programming first. At the moment, I only have a very vague idea of what the robot will look like.

April 2023

In the first step, I designed a 32-key keyboard in the classic QWERTY format, based on shift registers. For this, I found SMD tactile switches that have a nice feel, are rubberized, and don't wobble like these ordinary push buttons. Besides that, the keyboard features a mini trackball, a piezo buzzer, and a DS3231 Precision RTC plus a coin cell holder. The keyboard is a sandwich construction. The upper PCB actually only has the cut-outs for the buttons and the trackball and silkscreen with the key labeling. All electronic components are on the lower PCB. The supply voltage is 3.3-5V, so the keyboard can be used universally.

Let's take a look at the top of the populated board. There are the 4 CD4021 8-stage static shift registers located, of course, the 32 tactile switches, the 32 pull-down resistors, and the SMD piezo buzzer.

On the bottom side of the board the RTC, the coin cell holder, and the connectors are located.

I will not go into detail here about how shift registers work. There is a good Arduino CD4021B shift registers tutorial for this. For completeness here is the schematic for the keyboard:

The keyboard is assembled with eight M2 x 10mm screws. The trackball includes an RGB LED. I can use this for example when the SHIFT key is activated.

Since I still have an Arduino Due and a 320 x 480 TFT shield lying around, I decided to build a small computer, a kind of console, through which you can communicate with the machine. The main brain of the robot will probably be an Arduino Portenta.

The corresponding PCB I designed, therefore, is a shield for the Arduino Due and the TFT display, with all broken-out pins and additional connectors, an on/off switch, a reset button, and an SD card connector.

To connect the keyboard to the main board, I made custom cables with connectors.

May 2023

To hold the keyboard and the monitor in place I designed a laser cut case in Inkscape.

Completely assembled unit:


Mini Soft Touch Push-button Switch datasheet

Adobe Portable Document Format - 309.50 kB - 04/19/2023 at 22:01


  • Why is it so difficult to write an intelligent chatbot program?

    M. Bindhammer05/06/2023 at 14:58 0 comments

    The reason for this is that the computer can handle mathematics very well but text or text processing can hardly be described mathematically. Thus, less than 40 lines of code are sufficient to realize a calculator that performs the four basic arithmetic operations of two numbers, unthinkable for text processing.

    float number1;
    float number2;
    char Arithmetic_Operator;
    void setup() {
    void loop() {
      while(Serial.available() > 0) {
        number1 = Serial.parseFloat();
        Arithmetic_Operator =; 
        number2 = Serial.parseFloat();
        Serial.print(" = ");
    float calculate() {
      float result;
      switch(Arithmetic_Operator) {
        case '+':
        result = number1 + number2;
        case '-':
        result = number1 - number2;
        case '*':
        result = number1 * number2;
        case '/':
        result = number1 / number2;
      return result;

    The vast majority of chatbots only feign intelligence. They are based on a little probability theory but above all on brute force and the Internet as a database. A traditional approach is the keyword method. The machine searches the user input string for a keyword stored in a lookup table and outputs a corresponding ready-made response. If the machine does not find a keyword, the machine tries to get the user to enter a keyword that the machine knows. The famous program ELIZA uses exactly this technique. It was developed in 1966 by Joseph Weizenbaum and is considered the first chatbot in the history of computer science. So if we want to program a truly intelligent chatbot, we have no choice but to describe text mathematically. What a complex task this is can be seen just by looking at the English language: more than a million words in total, about 170,000 words in current use, and 20,000-30,000 words used by each individual. Of course, there are an infinite number of numbers, but each number has a strictly defined mathematical relationship to another number.

    To make one thing clear: Keywords are not a bad approach at all, because our brain also works with them. I remember when I lived in China and started to learn the Chinese language, I always looked for keywords in Chinese conversations that I already understood, so I could roughly deduce what the conversation was about. It is not particularly difficult to write a small program that finds keywords in a text respectively a String.

    char *keywords[] = {"CAT", "DOG", "BIRD", "HOUSE"};
    void setup() {
    void loop() {
      bool keyword_flag = false;
      Serial.println("User input:");
      while (Serial.available() == 0) {} // Wait for data available
      String userInput = Serial.readString(); // Read until timeout
      userInput.trim(); // Remove any whitespace at the end of the String
      userInput.toUpperCase(); // Get an upper-case version of the String
      for (int i = 0; i < sizeof(keywords)/sizeof(char *); i ++) {
        if (strstr(userInput.c_str(), keywords[i]) != 0) {
          Serial.print("Keyword ");
          Serial.println(" found");
          keyword_flag = true;
      if(keyword_flag == false) Serial.println("No keyword found");

    Let's take my example with the Chinese keywords and try to model my thoughts then.

    char *keywords[] = {"CAT", "DOG", "BIRD", "HOUSE", "LOVE", "HATE"};
    char *responses[] = {"A CAT", "A DOG", "A BIRD", "A HOUSE", "LOVE", "HATE"};
    void setup() {
    void loop() {
      bool keyword_flag = false;
      Serial.print("Conversation: ");
      while (Serial.available() == 0) {} // Wait for data available
      String Conversation = Serial.readString(); // Read until timeout
      Conversation.trim(); // Remove any whitespace at the end of the String
      Conversation.toUpperCase(); // Get an upper-case version of the String
      int keyword_counter = 1;
      for (int i = 0; i < sizeof(keywords)/sizeof(char *); i ++) {
        if (strstr(Conversation.c_str(),...
    Read more »

View project log

Enjoy this project?



Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates