Code Monkey home page Code Monkey logo

esc-controller's Introduction

ESC Controller

Control ESCs in Embedded Rust

Language Platform

The purpose of this repository is to control the speed of a motor using an ESC driven by a pwm signal. In particular, this pwm signal is 50Hz with a width of anywhere from 1-2ms (min to max throttle).

Features

  • PWM
  • Dshot

Electronic Speed Controller

In order to control the speed of a brushless motor, a middleman that can deal with intricacies involved with such as a motor is necessary. ESCs are helpful as they abstract away technical details such that the end user just needs to supply a pwm signal (or other policies such as oneshot, Dshot etc.)

The ESC I used is the LITTLEBEE 30A, which includes the BLHeli S software. Using documentation found online (which was for a different ESC, but I believe these are of the same model), a particular behaviour can be noted.

image

From the image above, I can discern that the ESC needs to detect zero throttle for a normal start up. Afterwards, the motor will run to the user's specifity.

// Zero signal
rprintln!("Zero signal");
ch1.set_duty(max_duty / 20);

rprintln!("Slight delay");
delay.delay_ms(10000_u32);

rprintln!("Mid-throttle signal");
ch1.set_duty(max_duty / 18);

In the code above, I send an initial zero throttle signal to run the ESCs normal start-up process. I also introduce a slight delay so the ESC can register the zero throttle signal. Afterwards, I can send whatever throttle signal I would like to send.

Reference

esc-controller's People

Contributors

kavintheg avatar

Stargazers

Fatıma Kavraz avatar Vitaliy Yermolenko 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.