Giter Site home page Giter Site logo

bledronecode's Introduction

Drone code Using NordicSemi NRF5340 with Bluetooth BLE


This repository contains the code for the drone. The code runs on the zephyr RTOS and uses the NordicSemi Peripheral UART as the base code base.

the IMU sensor used is the CEVA FSM300. Currently this is the only external Peripheral used.

The connection diagram is as follows: Connection Diagram

Connecting the E.S.C - Electronic Speed Controller

The E.S.C is connected to the NRF5340 using the PWM pins. The PWM pins are connected to the NRF5340 using the following pins:

PWM0 - P0.06
PWM1 - P0.07
PWM2 - P0.08
PWM3 - P0.09

ESC Connection Diagram

The key connection is to make sure the grounds are common. You want the E.S.C and the NRF5340 to have the same ground. This is because the PWM signal is a differential signal and the ground is used as a reference. If the grounds are not common then the PWM signal will not be read correctly.

The timing settings for the PWM signal is as follows:

PWM period: 20ms
PWM pulse width: 1ms - 2ms

ESC Connection Diagram

The PWM signal is a 20ms signal with a pulse width of 1ms to 2ms. The pulse width is used to control the speed of the motor. The pulse width is controlled using the PWM duty cycle. The duty cycle is a percentage of the pulse width. For example a duty cycle of 50% will give a pulse width of 1.5ms. This will give a medium speed to the motor. A duty cycle of 100% will give a pulse width of 2ms. This will give the maximum speed to the motor. A duty cycle of 0% will give a pulse width of 1ms. This will give the minimum speed to the motor.

Connecting the IMU - Inertial Measurement Unit

The IMU is connected to the NRF5340 using the SPI pins. The SPI pins are connected to the NRF5340 using the following pins:

SPI0 SCK - P0.06
SPI0 MOSI - P0.07
SPI0 MISO - P0.25
SPI0 CSN - P0.26

bledronecode's People

Contributors

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