KentuckySolarCar / Telemetry-GUI

This code will run on a desktop machine, and display the data the solar car sends from an rs 232 connection
8 stars 1 forks source link

UKY Solar Car Telemetry

This program is written by Stephen Parsons. The underlying functionality to manage the serial connection and the graphical interface borrows heavily from Eli Bendersky's work.

Getting Started

The program connects to a serial port and then processes the incoming information, displaying it in real time. The following are needed to run the telemetry:

Python 2.7 as source program
pySerial for serial connection
PyQt4 for Graphical User Interface
matplotlib for realtime graphs

Each must be installed/configured per machine. This can be a pain. Sometimes it takes a combination of source installations, binary downloads, and package manager installations. Keep trying until it works! It can be done.

Standalone Testing (no connection to car)

First, link two serial ports together so that you can write to one and the program can read from another. On Windows, this is best done with com0com. On other systems, install socat and run testing/link_sim.py.

Next, send false data to the serial connection using testing/sender_sim.py.

From this point, use the program as if it were connected to the car.

Usage

Run the telemetry program by double clicking or from a shell with python telemetry.py.

Select a serial port by clicking "Change Port" or with Ctrl+p.
Begin monitoring with "Start Monitor" or Ctrl+m.
Stop monitoring with "Stop Monitor" or Ctrl+t.
You can exit with "Exit" or Ctrl+x.

Log files will be automatically written in the logs/ directory.

Info for each battery is displayed. The bar level indicates the voltage (also noted at the bottom of each battery) and the temperature is displayed as well. Should a battery exceed 30° C, it will turn red. High, low, and average voltages are displayed for each box and for the pack as a whole.

Various stats for the motor controller and the MPPTs are displayed as well as some graphs.

Screenshot

Maintenance

A large part of the maintenance work will be parsing serial data, storing it, and displaying it. This is functional now but the team may decide to add or change information in the car's output as time goes on. Find # Regular Expressions in the code and update them as necessary. Below this section you can write update functions to parse the data and store it internally. Changing the display requires writing layouts and widgets and adding them to the existing window. This should be self explanatory after reading the existing interface code.

Todo

License

MIT