va3wam / TWIPe

This repository contains the embedded code used for the TWIPe robot
MIT License
2 stars 0 forks source link

TWIPe

LICENSE

This is the repository for a Two Wheeled Inverted Pendulum robot called Twipe. The firmware that runs on the robot can be found here as well as a browser based ccontrol console app for remote control and monitoring of the robot.

Local Directory Structure

Documents
└───VisualStudioCode
    └───platformIO 
        └───Projects
            └───TWIPe
                └───bash
                └───doc
                └───img
                └───include
                └───lib
                └───src
                    └───main.cpp (This is the robot firmware)
                └───test
                └───webClient
                    └───commandConsole
                        └───twipeConsole.html (This is the operator console)

Getting Started

There is a VA3WAM wiki page that has been created containing information common to all VA3WAM projects. Everything that you need to set up a VA3WAM compatable work space can be found in the wiki. Alternativey, you can follow the instructions and links below to set up your environment. Here are the high level steps needed to get started with your very own TWIPe robot:

  1. Connect the robot to your computer via a USB cable
  2. Test the robot's circuit. Code and instructions here
  3. Get the calibration values. Code and instructions here
  4. Load up the TWIPe code (with the updated offset values if you did that step)
  5. Put the robot on its back parallel to the ground
  6. Let it boot up
  7. Stand up the robot and it should balance. If not you will need to do some PID tuning

Prerequisites

The VA3WAM development environment used to make the code in this repository is documented here. To get the best results you need to run the calibration program first. Following the instrcutions provided in the readme file before proceeding with this program.

Installing

To get a copy of this project up and running on your local machine for development and testing purposes please follow these instructions.

Booting Up

In order for the robot to balance properly you need to follow this boot up procedure:

  1. Lay the robot face down. THis is tricky with the control panel buttons and USB port so a jig may ne needed
  2. Boot up the robot. Wit until it is fully booted. Takes aboout a minute at most
  3. Slowly bring the robot to an upright position.

Running the tests

You may wish to test the robot circuit or test the code that runs on the circuit. If you have trouble uploading code to the robot make sure that the GREEN reset button is in the out position. Turning the GREEN button on/off can sometimes help as well.

Test the Circuit

To test the PCB please load this code into your robot and then folllow the test instructions found in that repository.

Calibrate the MPU6050

In order to get proper balancing values from the MPU6050 you must firt run this calibration code then update this code with the seed values produced.

Test this Code

We have not yet developed a test methodology for the robot code.

Deployment

At this time the embedded code in this repository is uploaded via a serial connection using PlatformIO.

Built With

Contributing

At the present time this code is only done by close friends so no process for becomming a contibutor has been worked out.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments