Coder Social home page Coder Social logo

l-abe / embedded_controller Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aerotechlab/embedded_controller

0.0 0.0 0.0 18.77 MB

Embedded Software Kata problem studying the anatomy of PID velocity controllers

License: MIT License

C 95.90% Makefile 4.10%

embedded_controller's Introduction

PID Controller - DC Motor

Members

  • L Abe (Code development and documentation)

Introduction

This is a attempt to implement a PID Controller using:

  • Toradex Colibri VF50;
  • Motor Maxon RE25 118754;
  • H-Bridge L298;
  • Encoder HEDL 5540 110514.

This code was not tested, use at your own risk.

How to build and execute?

Check configure-toolchain to learn to configure Toradex Software Development Kit (SDK) for cross-compilation of C/C++ code to the ARM architecture.

  • Setting environment for cross compilation:

     . /usr/local/oecore-x86_64/environment-setup-armv7at2hf-neon-angstrom-linux-gnueabi
  • Compiling the controller:

    make all
  • Clean directory:

    make clean
  • Copying binary to colibri VF50:

    scp ./bin/controller [email protected]:/home/root
  • In the target terminal, run the application:

    ./controller

What to expect in this code?

  • The original PID Controller was written by tfoliva.
  • The driver to control the motor is based on a H-Bridge configuration, that can control direction and speed.
  • The sensor code compute the motor's speed using the time difference between N pulses from the encoder's Channel I. A new thread was created to keep getting the sensor data and not interfere in the main code.
  • To make a timer to update the pid control was created a loop to wait until the next execution.

Links

embedded_controller's People

Contributors

tfoliva avatar l-abe 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.