GithubHelp home page GithubHelp logo

x-vmaier / levitator Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 22 KB

Magnetic levitation system implementing PID control

License: MIT License

C++ 100.00%
arduino cpp eeprom platformio serial-communication

levitator's Introduction

Levitator

This repository hosts the Arduino code for managing an electromagnet levitator system.

Overview

The levitator system employs a PID controller to regulate the position of an object levitated by an electromagnet. It communicates with a graphical user interface (GUI) via serial communication to update parameters such as setpoint, proportional, integral, and derivative gains.

Requirements

  • PlatformIO
  • Arduino Nano (ATmega328)

Installation

To utilize this code, proceed with the following steps:

  1. Clone this repository to your local machine.
  2. Open the project folder in PlatformIO.
  3. Upload the code to your Arduino Nano.

Usage

Connect the Arduino Nano to your electromagnet system and power it up. Ensure that the GUI from PyLevit is operational and connected to the Arduino via serial communication.

The system will receive input from the GUI to update parameters and control the electromagnet accordingly.

Implementation Details

Packet Format/Serialization

Communication between the Arduino and the GUI is facilitated through packet-based serial communication. Each packet comprises a start delimiter, identifier, separator, data payload, and end delimiter, structured as {identifier:data}. The fastprotoc library handles packet serialization and deserialization.

EEPROM

System parameters such as setpoint, proportional gain, integral gain, and derivative gain are stored in the EEPROM to retain their values across power cycles. The EEPROMHandler class manages reading and writing data to EEPROM, ensuring that only altered values are written.

Credits

License

This code is licensed under the MIT License. Feel free to use, modify, or distribute it according to the terms of the license.

For more details, refer to the PyLevit repository for integrating the levitator system with the graphical user interface.

levitator's People

Contributors

x-vmaier avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.