ECE4180 UWP/WIN32 Robot Controller

Bing Xian Lim, Lingfeng Zhou, Varun Malhotra, Jun Wei Phua

Description

Description

This program sets up a GUI to create a voice controller for the robot. The program was developed as a Win32 application, written in C#. The code uses the System.Speech.Recognition APIs for voice recognition capabilities. A custom grammar was built to recognize basic commands such as: forward, back, left right. The custom grammar enhances the command recognition ability of the system because the recognition engine interprets speech input to match the commands. On interpreting a valid command, the GUI sends specific characters to the mbed module running the transmitter firmware, which then transmits commands wirelessly (to the receiver on the robot) to control the robot.

Update : After having our Win32 Application working flawlessly, we then proceeded on to work on our initial aim, of having our program written in Microsoft's newest UWP platform. As technology improves, newer applications are now written in UWP to promote integration of system.

Operation

The GUI incorporates a drop-down menu to list all available COM ports to open a connection to. The user needs to select a port to initiate the application. Once a port is selected, the “Enable” button becomes valid. The user then needs to hit the button and speak a valid command, following which, the text box will print the command interpreted by the system. The button will become invalid in the interim of command processing and transmission, after which, the button becomes valid, allowing the user to repeat the process.

Problems and Fixes

In its initial version, the GUI appeared to glitch every so often and updated very slowly. This was fixed by adding a separate thread to run the command processing and transmission.

-C# Robot Controller Graphical User Interface V1.0

/media/uploads/deathernater/capture.png

-C# Robot Controller Graphical User Interface V1.1

/media/uploads/deathernater/win32_capture.png

-UWP Robot Controller Graphical User Interface V2.0

/media/uploads/deathernater/uwp_capture.png

The latest version of the GUI is written in C# using Microsoft's new UWP platform. UWP stands for Universal Windows Platform, and is a homogenous application architecture designed to run on any Windows 10 devices such as Desktops, Tablets, and Mobiles. UWP is extremely friendly to multithreaded and asynchronous operations with native asynchronization built into the API. This allows for a smooth UI which will not cause a delay in any parts of the program if any part of the program hangs, resulting in a paradigm of responsiveness in program design. The voice recognition system is also upgraded to the UWP API's counterpart, and shares the same speech recognition backend as Microsoft's Cortana offline recognition module. The lessons learned creating this UWP variant of the robot GUI will prove to be very valuable for the future development of embedded projects for ECE 4180 and beyond for Windows 10 using the latest and greatest software paradigms sitting currently on the cutting edge in industry.

Components used:

- RF Transmitter & Receiver (315MHz)

- Class D Amplifier

- Speaker

- H-Bridge Motor Driver

- Sparkfun Shadow Chassis Robot

Pin Out Diagrams

-Communications

RF TransmitterMbedRF Receiver
P3VU (5V)P4,P5
P1GNDP1,P6,P7
P2P9 (Transmit)
P10 (Receive)P2
P4AntennaP8

-Motor Controls

H BridgeMbed
Motor 1 Trigger BP15
Motor 1 Trigger AP16
Motor 2 Trigger BP18
Motor 2 Trigger AP17
PWM AP22
PWM BP21
Vm, Vcc , Vout, Standby5V

-Audio Output

mbedTPA2005D1Speaker
gndpwr - (gnd), in -
Vout (3.3V) or 5Vpwr +
p26 (any PWM or D/A)in +
out ++
out --
Any DigitalOut px(optional)S (low for shutdown)

Project Codebase

GUI GIT REPO

Import programECE4180FinalProjectRTOS

Shadow Chassis Robot Receiver Program

Import programECE4180FinalProjectTramsmitter

Shadow Chassis Robot Controller Transmitter

Demo Videos

UWP Robot Controller Demo

Win32 Robot Controller Demo


Please log in to post comments.