PID Controlled Magnetic Levitation using Hall Effect sensor.
Although a simple project using Arduino, I was able to learn how PID systems work closely by implementing my own loop.
The equation to the right is the basis for electromagnetism, further equations incorporate the number of turns in a solenoid, which is why more turns equals more magnetic field.
Problems Faced:
Electromagnets work best with a soft iron core. However, finding one is both very expensive and near impossible at nearby hardware stores. Thus, I settled for steel, which is only composed of a certain percentage of iron. This greatly weakened the electromagnet.
So ensued the game of changing the max current from the MOSFET to allow for a stronger magnetic field.
Finally, I spent around 5 hours tweaking the PID gains. Although PID is a great control loop, if you don't know the order of magnitudes for the Proportional, Integral and Derivative terms (like me :D) it unfortunately takes a long time to fine tune.
The main motivation for this project was creating something that nearly every child thinks is amazing: making something float in mid air. I had researched Hall Effect Sensors around the age of 8, but had no clue behind the control loops or electronics hardware. Thankfully I was able to complete this and fulfill my young self's dreams.
This is a research paper written for a class focusing on the effects of video games on society.
Link to paper: here!
Abstract:
The public opinion on the effect and place of video games in society are that they are primarily a tool for recreation. However, further analysis of how certain computer hardware developers have responded to the increasingly complicated nature of video games has led to discoveries that video game development influences computer hardware directly. Innovations in computer hardware has direct implications in the fields of Machine Learning, Cryptography, and Parallel Computing. By finding profound applications of these technologies in modern day society, we can argue that the development of video games has led to tangible difference in society, albeit in a different sector than originally intended by video game developers.
This was an introduction to Assembly programming and electronics component usage.
The system itself is a Finite State Machine which has different states that allows it to count backwards from 3 to 0 in binary. The circuit itself used D-Flip Flops to implement the FSM.
The assembly code was needed in order to allow the microprocessor to interpret the clock properly using edge detection and trigger the shift from state to state.
Problems Faced:
As with any electronics project, it usually does not work the first time unless you are a leprechaun. The first time I connected the FSM to a power supply it did not light up the LEDs at all.
Troubleshooting a relatively complicated (at the time) Finite State Machine with oscilloscope probes is a nightmare. However, I learned a lot from the experience and fine-tuned my oscilloscope tuning skills.
After several hours of hunching over the circuit pulling out jumper cables, I would never have imagined to be so happy to see two LEDs flashing in my life.