Difference between revisions of "Microbit-Servo-Driver"

From SB-Components Wiki

(Created page with "<div class="row"> <div class="large-8 column"> == Micro:Bit Servo Driver == 16 Channel Servo Driver for micro:bit is a motor driver from which one can control up to 16 motor...")
 
 
(15 intermediate revisions by one other user not shown)
Line 2: Line 2:
 
   <div class="large-8 column">
 
   <div class="large-8 column">
 
== Micro:Bit Servo Driver ==
 
== Micro:Bit Servo Driver ==
16 Channel Servo Driver for micro:bit is a motor driver from which one can control up to 16 motors simultaneously. If you're building a robot with a lot of moving parts, or if you need to monitor a lot of servo motors with PWM yields, the microcontroller's limited PWM yields will be a big problem. The most important thing you can do to solve this problem is to obtain a 16-Channel 12-Bit PWM/Servo Driver.
+
Micro:bit Servo Driver is a motor driver from which one can control up to 16 motors simultaneously. If you're building a robot with a lot of moving parts, or if you need to monitor a lot of servo motors with PWM yields, the microcontroller's limited PWM yields will be a big problem. The most important thing you can do to solve this problem is to obtain a 16-Channel 12-Bit PWM/Servo Driver.
  
 
=== Features ===
 
=== Features ===
Line 12: Line 12:
 
* I2C controlled and external power supply connector
 
* I2C controlled and external power supply connector
 
* Compatible with Micro:bit and Micro:bit V2
 
* Compatible with Micro:bit and Micro:bit V2
</br>
 
  
 
=== Specifications ===
 
=== Specifications ===
* Power supply: 5V OR 6V (power supply connector)
+
* External Power supply: 5V OR 6V (Via power supply connector)
 
* Servo voltage: 5V
 
* Servo voltage: 5V
 
* Logic voltage: 3.3V
 
* Logic voltage: 3.3V
Line 23: Line 22:
 
</div>
 
</div>
 
   <div class="large-4 column">
 
   <div class="large-4 column">
[[File:Microbit_servo_driver.png|thumb|left|alt=Microbit ServoDriver.| Buy it From : ''[https://shop.sb-components.co.uk/products/16-channel-12-bit-servo-driver-i2c-interface-module-servo-driver-hat-for-micro-bit Click Here]'']]
+
[[File:Mbit_servo_driver.png|thumb|left|alt=Microbit ServoDriver.| Buy it From : ''[https://shop.sb-components.co.uk/products/16-channel-12-bit-servo-driver-i2c-interface-module-servo-driver-hat-for-micro-bit Click Here]'']]
 
   </div>
 
   </div>
 
</div>
 
</div>
Line 30: Line 29:
  
 
<table class="wikitable">
 
<table class="wikitable">
<tr> <th>PIN </th> <th>Description </th></tr>
+
<tr> <th>PIN </th> <th>micro:bit Pins</th></tr>
  
<tr> <td>VCC</td> <td>Power (5V/6V) </td></tr>
+
<tr> <td>VCC</td> <td>Power (5V/6V) (Via External source)</td></tr>
 
<tr> <td>GND</td> <td>Ground </td></tr>
 
<tr> <td>GND</td> <td>Ground </td></tr>
 +
<tr> <td>SDA</td> <td>P20 </td></tr>
 +
<tr> <td>SCL</td> <td>P19</td></tr>
  
 
</table>
 
</table>
Line 39: Line 40:
 
== Programming ==
 
== Programming ==
 
==== Drag and Drop ====
 
==== Drag and Drop ====
Many people want to learn the process to learn more about micro:bit by getting an understanding of the potential of micro:bit. If one wants to run servo motor and DC motor with the micro:bit motor driver then they can do the following steps.
+
* Before starting, you need these components :
 +
** Servo driver x 1
 +
** Micro:Bit x 1
 +
** Servo Motor x 1
 +
** External Supply (6-12V) x 1
  
<li> A user needs to connect the PWM servo motor to the connector(3 pin header) of the servo driver board, labelled as P0, P1, and P2 to connect up to 3 servo motors and Upto 2 DC motors on connector labelled as MA1, MA2 for motor 1 and MB1 and MB2 for motor 2. </li>
+
* Connect micro:bit on stackable connector of Servo driver board as shown below.
<li> Take micro:bit and stack it on the motor driver board’s edge connector.</li>
 
<li>Connect VIN and ground or the external power supply to the motor driver to provide power to it. </li>
 
<li> A user needs to switch on the slider switch of the motor driver. </li>
 
  
<li> To start a new project development using motor driver board, kindly visit https://makecode.microbit.org/# </li>
+
* Visit the official programming website of Micro:bit https://makecode.microbit.org/
<li>Start a new project by clicking on <b>New Project</b> tab, It will Open a Programming and Simulation Interface where you can write code , connect board and program it in 1 click. </li>
 
<li>A user needs to add an extension for SB motor driver via clicking on the tab <b> Advanced >> Extensions </b> and enter the mentioned URL below  in search box.</li>
 
https://github.com/sbcshop/Micro-Bit-Motor-Driver
 
</br></br>
 
https://cdn.shopify.com/s/files/1/1217/2104/files/add_ext1.png
 
  
<li> Click on Search button after entering above url, Now look for the search result to add the extension to the project(current). makecode micro:bit </li> </br>
+
* Now create a new project by clicking on the "New project" tab and enter the name of your project.
https://cdn.shopify.com/s/files/1/1217/2104/files/add_ext2_1.png
 
  
<li> Control your servo motor and DC motor by motor driver Extension drag and drop blocks as shown in below example.</li> </br>
+
<img src="https://github.com/sbcshop/RFID-Expansion-For-Microbit/raw/main/images/makecode_microbit.PNG" width="700" height="700" />
  
[[File:Microbit_Motor_driver_code.PNG | 1000px]]
+
* A user needs to add an extension for Servo driver via clicking on the tab Advanced >> Extensions and enter the mentioned URL below in the search box.
 +
https://github.com/sbcshop/pxt-servo-microbit
 +
 
 +
<img src="https://cdn.shopify.com/s/files/1/1217/2104/files/add_ext1.png" height="700" width="700" />
 +
 
 +
* Click on the Search button after entering the above URL, Now look for the search result to add the extension to the project(current).
 +
[[File:Mbit_servo_driver_pca9685.PNG | 700px]]
 +
 
 +
* Now you can Control your up to 16 servo motor by using servo motor driver Extension drag and drop blocks as shown in the below example. Once done with blocks, click on the download button to upload it to your microbit.
 +
 
 +
[[File:Mbit_servo_driver_code.PNG| 700px]]
 +
 
 +
* Connect Servo Motor on any pin ranging between 0-15, and connect external 6-12V power supply on Black terminal block as shown in below circuit.
 +
 
 +
[[File:Mbit_servo_ckt.png | 700px]]
  
 
== Resources ==
 
== Resources ==

Latest revision as of 08:51, 25 June 2021

Micro:Bit Servo Driver

Micro:bit Servo Driver is a motor driver from which one can control up to 16 motors simultaneously. If you're building a robot with a lot of moving parts, or if you need to monitor a lot of servo motors with PWM yields, the microcontroller's limited PWM yields will be a big problem. The most important thing you can do to solve this problem is to obtain a 16-Channel 12-Bit PWM/Servo Driver.

Features

  • Adjustable frequency PWM up to about 1.6 KHz
  • Up to 16-Channel servo/PWM outputs, 12-bit resolution for each channel (4096 scales)
  • 3 pin connectors in groups of 4 so you can plug in 16 servos at once
  • This board/chip uses an I2C 7-bit address
  • Expansion Headers for easy connections
  • I2C controlled and external power supply connector
  • Compatible with Micro:bit and Micro:bit V2

Specifications

  • External Power supply: 5V OR 6V (Via power supply connector)
  • Servo voltage: 5V
  • Logic voltage: 3.3V
  • Driver: PCA9685
  • Control interface: I2C
Microbit ServoDriver.
Buy it From : Click Here

Pinout

PIN micro:bit Pins
VCC Power (5V/6V) (Via External source)
GND Ground
SDA P20
SCL P19

Programming

Drag and Drop

  • Before starting, you need these components :
    • Servo driver x 1
    • Micro:Bit x 1
    • Servo Motor x 1
    • External Supply (6-12V) x 1
  • Connect micro:bit on stackable connector of Servo driver board as shown below.
  • Now create a new project by clicking on the "New project" tab and enter the name of your project.

  • A user needs to add an extension for Servo driver via clicking on the tab Advanced >> Extensions and enter the mentioned URL below in the search box.

https://github.com/sbcshop/pxt-servo-microbit

  • Click on the Search button after entering the above URL, Now look for the search result to add the extension to the project(current).

Mbit servo driver pca9685.PNG

  • Now you can Control your up to 16 servo motor by using servo motor driver Extension drag and drop blocks as shown in the below example. Once done with blocks, click on the download button to upload it to your microbit.

Mbit servo driver code.PNG

  • Connect Servo Motor on any pin ranging between 0-15, and connect external 6-12V power supply on Black terminal block as shown in below circuit.

Mbit servo ckt.png

Resources