GithubHelp home page GithubHelp logo

blagojeblagojevic / motor-speed-control Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 32.08 MB

Dc motor speed control using PIC16F877A and MICROC IDE. For the purpose of simulation it is used Proteus.Also PID algoritam is implemented.

License: MIT License

Assembly 64.96% C 9.86% C++ 25.18%
electronics pic motor c embeded-systems microchip microcontroller pic16f877a proteus speed-controller

motor-speed-control's Introduction

Motor-speed-control

This repository consists of the following units:

  1. MyProject.c

Which is C code for a program that controls the speed of a motor using a PID controller on a PIC microcontroller. The program uses the LCD and UART modules to display the current speed of the motor and the PWM module to control the duty cycle of the motor. The program uses the external interrupt and timer modules to measure the speed of the motor, and the program uses the variables kp, ki, and kd to tune the PID controller. The program sets the initial speed of the motor to 100 RPM, and the user can change this by sending a value through the UART module. The program uses the PWM1 and PWM2 modules to control the direction of the motor. The program uses the Timer1 module to measure the speed of the motor, and the external interrupt module to count the number of pulses.

  1. Simulations done in PROTEUS

The user of this repository must take care of the pid controller settings within 1.

Also, the code must be changed depending on the type of encoder.

  1. Webserver.ino

The code starts by including the necessary libraries for either the ESP32 or ESP8266 platform, then creates an instance of the AsyncWebServer class on port 80.

The setupConection() function sets up the connection to the local WiFi network, sets up the server to handle HTTP GET requests on the root URL "/" and on the "/get" URL, and sets the notFound() function as the handler for when a URL is not found.

The setup() function initializes the serial communication and calls the setupConection() function.

The loop() function continuously checks for incoming serial data, and if there is data, it reads it and stores it in the variable speedM. If there is no incoming data, it sends the value of input_parameter1 to the serial port.

motor-speed-control's People

Contributors

blagojeblagojevic avatar

Stargazers

 avatar  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.