3-Axis Gimbal with Gyroscopic Control
This project was the culmination of all the knowledge I collected during my Bachelors in Computer Engineering. It was designed to be a two part system, a wireless remote with a 6-axis Gyroscope and Accelerometer, and a 3-axis Gimbal designed to house a Cinema Camera. The main goal was to have the Gimbal mimic both the controllers angular rotation and acceleration, allowing complete control over a Cinema Camera without needing to be near it.
This project hit many different aspects of Engineering, including software, hardware, and circuit design. Both the Remote and the Gimbal housed a microcontroller with Bluetooth capabilities, used to establish a wireless connection between the two. The Microcontroller in the remote had the built in 6-Axis Gyroscope and Accelerometer that needed to be finely calibrated, as these sensors are very finicky and predictably unpredictable. The Gimbal part was particularly tricky, as I needed to design and create a circuit that would interface both the Gimbal Microcontroller and the Three 3-Phase Brushless DC Motors. This circuit utilized high power H-Bridge Motor Driver IC’s that were then configured to provide 3-Phase Bi-Directional control of each BLDC Motor. Each motor could draw up to 60W of instantaneous power, and provided a very impressive amount of torque.
I was very proud of this project, as it challenged what I thought I knew about circuit design and hardware. If given more time, I would have implemented more functionality into the remote to allow for adjustable sensitivity, and also be able to apply a smoothing factor to any given motion, similar to handheld gimbals.
School Project Description
School Project Poster
Algorithmic Art
The main focus of this project was to be able to create visuals based on any user defined algorithm. This program so far is able to provide the most granular control possible when it comes to video. The user is able to control the value of every single pixel on every single frame, and define the video's resolution, fps, and total length. Although the below examples may seem pretty underwhelming, they illustrate the fact that this program provides the most amount of detail possible.
I have implemented this program in two different languages, C++ and Python. The python version of the program allows for the user to import their own media filters in a separate python file, preventing the need of most of the code to be recompiled like in my C++ implementation. Although the python version is not as fast as the C++ version, it actually is still very quick thanks to the use of the Numpy library, which is implemented in C. Images are created and manipulated using the Pillow Library. If we are creating a video, a series of PNGs are created then turned into a video using the FFMPEG command line program. The Python version is designed to create images and video from scratch, and also apply algorithms to existing images and videos. The possibilities are quite literally endless.
The C++ implementation of the program relies on two main C++ libraries to accomplish this task of Algorithmic Art. In order to turn my raw video frames into a video file, I rely on the OpenCV Library to encode the raw frames into one of many video formats. The other library is SFML (Simple and Fast Multimedia Library), which is used to preview the algorithm to the user before having to export the video, which can be a very time consuming process based on video resolution and length.
Simulated Annealing
My Bachelor's Degree in Computer Engineering involved getting a minor in VLSI Design (Very Large Scale Integration). This program first takes in a file input, which contains chip blocks with a fixed area and aspect ratio. The program's main function is to design a floorplan that arranges all of the blocks to create a “minimum cost” floorplan. Given a smaller number of chips, it is possible to find the best case scenario by exhaustively testing all possible combinations. However, since modern processors have billions of transistors, it is not feasible to exhaustively test all possible combinations. We need to rely on “Heuristic Algorithms”, also called good enough algorithms.
This is where the Simulated Annealing portion of the project comes in. This algorithm will create a random layout and compare its cost to its previous random layout. The algorithm only chooses one layout to proceed to the next comparison, and chooses between the two in a very interesting way. Given a set of parameters, the algorithm is going to do a fixed number of these layout comparisons. In the early stages of the comparisons it is more likely to not choose logically between the two, but randomly. As the program nears termination, the algorithm is very picky, and almost always chooses the better layout to proceed. The idea behind this addition of entropy is to prevent the algorithm fixating on a specific local minima/maxima.
OpenCL Graphics Card Example
OpenCl is a portfolio library designed to provide access to many different hardware accelerators, such as graphics cards. With this program, I am able to first detect any hardware devices connected to the processor, then send a program to the hardware device on a specific number of compute units. The example application does a bunch of double precision multiplication, both serially and in parallel, then logs the time it takes to complete each.
File Encryption Application
PySimpleGUI is a python library used in this project to create a simple graphical user interface for the user. The application allows the user to open a file and password protect it using SHA-256 Encryption. The same application is then used to decrypt files as well.
Hardware Random Number Generation
For programmers, it is very important to have have access to some sort of random number generation. Pseudo random number generators are great when you want repeatable randomness, such as world seeds used in some video games. However, having access hardware randomized numbers is crucial for applications such as cryptography. Using the Intel Intrinsics C/C++ Library, it gives you access to many hardware functions/accelerators. One of those hardware functions is a "Digital Random Number Generator" (DRNG) that leverages the unpredictable fluctuations of thermal noise within the CPU to produce a stream of random bits, which are then conditioned and processed using cryptographic algorithms to create high-quality random numbers.