Embedded Control

Embedded Systems Project

Fall 2017 @ RPI

Introduction

An Embedded System is a computer system with a dedicated function within a larger mechanical or electrical system. It is embedded as part of a complete device often including hardware and mechanical parts, used to control many devices in common use today, such as light dimmers, traffic lights, avionics and even hybrid vehicles.

As an RPI student, me and my teammates have engineered two embedded systems successfully during the Fall 2017 semester. The first is a Smart Car capable of driving, steering and course correction, and with abilities such as avoiding obstacles. The second is an Upside-down Blimp capable of maintaining a constant heading with two thrust fans installed on the side of it. I'm very proud of what we've accomplished in such a short semester.

Features & Technologies

Incredible Features Implemented on Our Embedded Systems

C & SDCC

Both the smart car and the gondola are programmed with the c programming language. The code is then compiled with the SDCC compiler, enabling the embedded functionality with ease.

Hardware on Protoboard

We implemented all our hardware with sophisticated wiring and design on a single protoboard, also known as a breadboard. Good hardware design goes a long way.

ADC & Potentiometer

Analog to Digital Conversion (ADC) on the Smart Car converts an voltage supplied by the hardware into a digital value ranging from 0 to 255. By combining this technology with the voltage-altering potentiometer, we are able to adjust software parameters with on-board hardware.

Pulse Width Modulation

Pulse Width Modulation (PWM) is a type of digital signal sent in pulses, allowing the practitioner to control the power supplied to electrical devices. In the context of our embedded systems, PWM is utilized to control the speed and direction of motors on both the Blimp and the Smart Car.

GitHub

The source code for our embedded systems are entirely maintained on GitHub, allowing for better team collaboration and version control. View the Git repo here.

C8051 Microcontroller

The Silicon Labs C8051 is a 8-bit microcontroller serving as the heart of these embedded systems, enabling seamless communication between hardware and software. Without it, our ideas wouldn't come to life.

I2C Communication

I2C (Inter-Integrated Circuit) is a serial computer bus utilized to attach peripheral devices to microprocessors for short-range communication. We've implemented this standard to take advantage of the power of ranger, compass and accelerometer for use on our embedded systems.

Control Algorithms

Control algorithms involving PID (Proportional-Integral-Derivative) are deployed extensively on our embedded systems to enable course correction and heading adjustment. Without it, our Blimp and Smart Car would crash into the obstacles mercilessly.

Target System #1: Smart Car

Equipped with Sonar, Compass & Accelerometer

For the smart car, we engineered it to perform driving tasks by developing hardware and software simultaneously. The driving speed of the car is altered via manipulating PWM pulsewidths, and control algorithms determine the course correction behavior of the car. Three peripheral devices also played important roles in this project: compass, ranger and accelerometer. In order to make these work correctly, we wired up I2C hardware on the protoboard.

In Lab 4 and 5, our hardware and software are put to test. In Lab 4, the smart car must be able to detect obstacles, stop and turn until the obstacle is out of the way, then resume driving. We use the ranger to detect obstacles: obstacle is present when the distance read by the ranger is less than a threshold we specified. When such condition is true, the car turns around while checking compass readings to make sure it does not turn too far. When the ranger reading is normal again, the embedded system exits the turning state and resumes normal driving. In Lab 5, the smart car utilizes accelerometer readings to provide data to the control algorithm which ensures the car would drive up the ramp reversely.

Target System #2: Gondola

Upside-down Blimp w/ Heading Correction

For the Gondola, it's a little bit eccentric: it's intended to fly, but it has to be placed upside down on the turntable for safety reasons. The only thing it does is to spin. It has two thrust fans and one tail fan, both of which are used to control the heading of the soon-to-be blimp. In Lab 6, our task is to maintain heading. In order to do so, two thrust fans, which are installed on the side of the blimp, have to rotate in the opposite direction. Hence, we implemented code which successfully set the pulsewidth of both fans in a reversed fashion. With the help of compass, we implemented the PD (Proportional-Derivative) control algorithm to make sure the gondola faces a desired direction (maintain heading). A ranger is installed atop the gondola. Our code is also capable of changing the direction the gondola faces based on the reading of ranger. Please see the video to the gondola in action!

Flickr Gallery

High-quality Images of the Smart Car

Embedded Control (LITEC) Project @ RPI

Wanna See It for Yourself?

Then Watch the Video.