/TeenyBot

(WIP) Small Wireless enable robot to mess around with!!

Primary LanguageC++MIT LicenseMIT

DISCLAIMER: W.I.P AND STILL NEEDS A LOT OF WORK BEFORE BEING AT A MINIMUM OPERATING LEVEL

TeenyBot - A Small Wireless enable robot to mess around with!!

TeensyBot Img

Overview

Not to special about the project (for now). The current aim of the project is to just create a small, simple robot that can be talked to wirelessly and to do whatever I want to do with it.

The whole idea is that I can develop this robot and can add any extra feature that want to experiment with. Essentially this robot (and this repo itself) serves as a small prototyping platform which I can use to scale to a larger robot platform, if i wanted to .

Table of Contents

TODO List

Firmware

  • Communication
    • Serial CMD (Debug and Dev ONLY)
      • Send Data
      • Receive Data
    • Wi-Fi Communication
      • ESP32-Based Controller (ESPNow)
      • ESP32-Based Controller (Web Client/Server)
        • Local Web-server/Relay-hub
      • Autonomous Web-server
        • Local
        • Remote
    • BT Communication
  • Robot Control
    • Forward and Backwards motor control
      • Half Motor Speed option
        • Currently toggled via a button state on the controller
    • Turning
      • Blended turning
        • Controller
        • CMD/Path instructions
      • Stationary/on-the-spot rotation
        • Can be done via the controller with precise control but there is not way to lock the rotation to occur on-the-spot.
  • Auto Stop when lost connection
    • to controller
    • to server
  • Close-loop speed control
    • Motor RPM Reading
    • PID Motor Speed Controller
      • Speed is a measurement in RPM
  • Orientation of the robot (Hardware Dependant)
    • ICM-20948 IMU
  • robot position (Hardware Dependant)
  • Vision (Hardware Dependant)
    • LIDAR(Hardware Dependant)
    • Video (MASSIVE Hardware Revision needed)

Controller

  • Robot Communication
    • Wi-Fi (ESPNow) Connection to robot
      • Send Controller Data to the robot
      • Receive data from the robot
  • Robot Control via joystick
    • Drive robot Forward/Backwards
    • Rotate the robot
    • Blended Turning of the robot
      • Happens on the robot's firmware
  • Live Feedback
    • Status Monitor
      • Connection state to Robot
      • Robot Speed
        • Left Motor
        • Right Motor
        • (BONUS) Velocity Vector(?)
      • Direction (Hardware Dependant)
      • Position (Hardware Dependant)

Web-Server App

Potentially have two versions of the (Local Network) Web-Server, one running on an ESP32, another that runs on a standard computer/OS (I am currently thinking of a RPi Zero W currently, but it could change)

  • TBD

Control App

(Still need to designed on the framework and language)

  • Robot Communication
    • Wi-Fi Connection to robot
    • BT Connection to robot
    • Send commands
    • Receive data from the robot
  • Robot Control
    • Drive robot Forward/Backwards
    • Rotate the robot
  • Live Feedback
    • Status Monitor
      • Robot Speed
      • Direction (Hardware Dependant)
      • Position (Hardware Dependant)
    • LIDAR(Hardware Dependant)
    • Video (MASSIVE Hardware Revision needed)

Hardware

Robot

  • Chassis
  • Motors
  • ESP32 Dev board
  • Motor Driver Boards - DRV8833
  • Power management:
    • Power Switch
      • The one is used was just some random one I had spare
    • Battery: Currently just 4xAA Batteries that the chassis holds
      • Plans to swap this with a rechargeable solution
    • Charger: TBD
    • Voltage Regulator: The once I use are no longer listed but these ones should be fine for now
      • I Plan to change this for smaller (and hopefully better) option when I get to redesigning the rest of the power management of the robot.

Controller

Software

The project has several software tools/programs, Starting from the Microcontroller firmware running on te robot itself, a custom EPS32-based remote control, a web-server application, and a Mobile Controller app.

Robot's Microcontroller Firmware

The Microcontroller is the main brain of the robot and handles the communication with the Controller/Server/App communication(s) received wirelessly connection.

The code is written using platformIO in VSCode use the platformIO Extention and project files can be found here

ESP32-based Controller

CONTROLLER PICTURE TO COME

The Controller is based around an ESP32. This way we can make use of the ESPNow communication protocol to directly connect our controller and robot together and send data back and forth between them.

The Controller IO includes:

  • A 2-axis (analog) joystick
  • 3 programmable buttons
  • 128x64 OLED Display

The programmable button are available to do whatever we want, whether that is a custom menus on the controller and we want to navigate them, or if we want to assign a specific function to them. Or (as I like to do for most projects) toggle state variable which are transmitted and handled elsewhere.

PICTURE OF DISPLAY GUI

The OLED screen used is mounted vertically and is used to display the controller and received robot data. You can either display it as basic text, or (as I prefer) on a simple GUI window. In the GUI it currently display:

  • Joystick analog readings
  • Buttons toggle states
  • MOCK/FAKE IMU data
    • Bearing/Heading angle
    • Accel OR Gryo X, Y, Z
  • Left and Right Motor Current Speed
  • Connection Status to robot

The Controller also implements a deadzone filtering effect, as the analog joystick doesn't accurately center itself back between movements and the values jitter around creating noisy readings. The filter used doesn't really classify as a filter (at least to me) and just check if the readings of the joystick axis's are between the center value (2048) +/- a THRESHOLD values that we can change. If it is, then we just say that the joystick is centred and it reads 2048, else we send the actual reading form the Joystick.

Web-Server App

TODO: Write overview and features once development starts

Control App

TODO: Write overview and features once development starts

Libraries/Packages used

  • TO ADD LATER