user manual arduino robot controller shield - techshopbd.com · 05 bluetooth module and hc-05...

8
USER MANUAL Arduino Robot Controller Shield

Upload: nguyenduong

Post on 07-Aug-2019

257 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: USER MANUAL Arduino Robot Controller Shield - techshopbd.com · 05 bluetooth module and HC-05 bluetooth pair. Can also be used for viewing data on arduino serial Can also be used

USER MANUAL

Arduino Robot Controller Shield

Page 2: USER MANUAL Arduino Robot Controller Shield - techshopbd.com · 05 bluetooth module and HC-05 bluetooth pair. Can also be used for viewing data on arduino serial Can also be used

Introduction:

This shield turns your Arduino into a controller for your remote controlled robot. Resembling the

design of classis game controllers, we have put a two axis joystick on the left and four action

buttons on the right. There are also two small momentary push switches, two toggle switches and a

potentiometer. You can also connect a MPU6050 gyro sensor to it and add motion control to your

robot, just like PlayStation controllers.

For wireless communication with your robot, there are several options. Code for using all of the

modules with this controller is provided by us. The compatible modules are

- Cheap 433 MHz RF transmitters like RX-B6 or FS1000A.

- The famous HC-05 bluetooth module or our HC-05 pair module.

- NRF24L01 module for long range application.

You can also play games on your computer using this shield when attached to an Arduino

Leonardo.

Features:

1. Classis game controller style design.

2. Supports a wide range of wireless communication modules.

3. Option to add motion controller.

4. Can be used to play games on PC as a HID game controller.

Specifications:

1. Operating Voltage: 5V & 3.3V.

2. No. of Push Buttons: 6

3. No. of Toggle Switches: 2

4. Supported Arduino Boards: Uno, Mega and Leonardo.

5. Supported Motion Sensor: MPU6050 (GY521 board)

6. Supported RF modules: RX-B6, FS1000A, HC-05 bluetooth, NRF24L01.

7. Dimension: 14 cm ×7 cm (l×b)

Application:

Controller for combat robot, soccer robot and similar, playing games on PC.

Page 3: USER MANUAL Arduino Robot Controller Shield - techshopbd.com · 05 bluetooth module and HC-05 bluetooth pair. Can also be used for viewing data on arduino serial Can also be used

Components:

1. Two-Axis Joystick:

The two axis joystick sends analog voltage according to its positions. Signal pin for X-axis

connects to Arduino analog pin A2 and signal pin for Y-axis to Arduino analog pin A3.

2. Action Buttons:

Four heavy duty action buttons A, B, X, Y are designed to connect to Arduino digital pins 4, 7, 5,

6 respectively. When pushed, these momentary buttons connect their respective arduino pins to

ground.

3. Push Buttons:

Two small momentary push buttons (B1 & B2) are for additional control. B1 and B2 gets

connected to Arduino digital pins 3 and 2. When pushed, these momentary buttons connect their

respective arduino pins to ground.

4. Toggle Switches:

Two push type toggle switches, S1 and S2 are designed to connect to Arduino analog pins A1 and

A0 respectively. Each of them connects their respective arduino analog pins to either 5V or GND

depending on its push/pull state.

Page 4: USER MANUAL Arduino Robot Controller Shield - techshopbd.com · 05 bluetooth module and HC-05 bluetooth pair. Can also be used for viewing data on arduino serial Can also be used

5. User Knob:

Feeds 0V-5V voltage to Arduino analog pin A5.

6. Bluetooth Connectors:

There are two bluetooth connectors: one is for the popular HC-05 bluetooth module and another is

for our HC-05 pair module. Both of them can be plugged into the ports directly (don’t connect

both of them together). Bluetooth module gets connected to Arduino serial0 pins (TX0 and

RX0).

Moreover, you’ll not face the issue of “code upload error” while bluetooth module is connected

to serial0 pins as they are diode protected.

7. 433MHz RF Module Connector:

Either RXB6 or FS1000A RF modules can be attached to this connector. The data pin of RF

module gets connected to Arduino digital pin 9.

8. NRF24L01 Connector:

The popular NRF24L01 module can be connected here. A capacitor near to the NRF power pins

has been placed to support the high power application of long range NRF24L01.

9. Gyro Connector:

A connector for the MPU6050 gyro (GY-521 board) is for adding motion control and connects to

Arduino I2C pins. It gets connected to the SDA and SCL pins placed beside the USB port of

Arduino. That means you can use gyro with both Arduino Uno and Leonardo.

10. Knob jumper:

Connects the knob to Arduino analog pin A5. As A5 is the SCL pin of Arduino Uno, you’ve to

disconnect the user knob by removing this knob jumper when using gyro. If you are using an

Arduino Leonardo, you can use gyro without removing this jumper.

11. B2 Jumper:

Connects button B2 to Arduino digital pin 2. As digital pin 2 is the SDA pin of Arduino

Leonardo, you’ve to disconnect button B2 by removing this B2 jumper when using gyro. If you

are using an Arduino Uno, you can use gyro without removing this jumper.

Jumper Position when using Gyro

Arduino Board I2C pins Remove jumper Disables

Uno A4, A5 Knob jumper User Knob

Leonardo 2,3 B2 jumper Button B2

Mega 20, 21 Don’t have to remove

any jumper Nothing

Page 5: USER MANUAL Arduino Robot Controller Shield - techshopbd.com · 05 bluetooth module and HC-05 bluetooth pair. Can also be used for viewing data on arduino serial Can also be used

Compatible Modules:

1. Bluetooth module HC-05

2. HC-05 bluetooth pair

3. 433 MHz RF module RXB6

4. 433 MHz RF module FS1000A

5. NRF24L01 2.4GHz RF module

6. MPU6050 gyro accelerometer module (GY521 board)

1 2

3 4

5 6

Page 6: USER MANUAL Arduino Robot Controller Shield - techshopbd.com · 05 bluetooth module and HC-05 bluetooth pair. Can also be used for viewing data on arduino serial Can also be used

Circuit connection:

Component Connect to Arduino

Pin Comment

Joystick X A2 0V-5V

Joystick Y A3 0V- 5V

Action Button A 4

When pressed, connect

corresponding arduino pins to GND.

Enable internal pull up resistor of

corresponding arduino pins to use

these buttons.

Action Button B 7

Action Button X 5

Action Button Y 6

Push Button B1 3

Push Button B2 2

Toggle Switch S1 A1

Toggle Switch S2 A0

User Knob A5 Gets connected via knob jumper

Bluetooth RX 1

Bluetooth TX 0 Via diode protection circuit

433 MHz RF Data 9

NRF24L01 MOSI 11

These pins can be controlled / read

with 5V logic although NRF24L01

runs on 3.3V.

NRF24L01 MISO 12

NRF24L01 SCK 13

NRF24L01 CE 8

NRF24L01 CSN 10

MPU6050 SDA Arduino SDA A4 (Uno) / 2 (Leonardo)/ 20 (Mega)

MPU6050 SCL Arduino SCL A5 (Uno) / 3 (Leonardo)/ 21 (Mega)

Page 7: USER MANUAL Arduino Robot Controller Shield - techshopbd.com · 05 bluetooth module and HC-05 bluetooth pair. Can also be used for viewing data on arduino serial Can also be used

Codes:

Click on the “Documents” tab of the web page of this product. All arduino codes are provided

there. Codes are provided for the following.

Serial Communication: For bluetooth communication via bluetooth module. Works with both HC-

05 bluetooth module and HC-05 bluetooth pair. Can also be used for viewing data on arduino serial

monitor using usb cable.

Serial Communication with Gyro: Same as “Serial Communication” code for bluetooth

communication and usb debugging; with added support for sending MPU6050 gyro data as well.

NRF24: For using NRF24L01 module. Uses arduino “RF24” library. Code for both transmitter

and receiver is provided.

RF 433MHz: For using 433MHz RXB6 or FS1000A module. Code is same for both of them.

Code for both transmitter and receiver is provided. Uses arduino “Radiohead” library.

Gamepad: To use as HID game controller to play PC games. Use it with Arduino Leonardo only.

After uploading sketch, arduino will appear as a game controller to the PC.

Gamepad with Gyro: Same as “Gamepad” code but adds MPU6050 gyro as the right stick.

Battery Attachment:

Use a cable tie to attach a battery to this controller for wireless control.

Page 8: USER MANUAL Arduino Robot Controller Shield - techshopbd.com · 05 bluetooth module and HC-05 bluetooth pair. Can also be used for viewing data on arduino serial Can also be used

HID Game Controller:

You can use this shield with Arduino Leonardo to make your own USB HID Game Controller.

Attach this robot controller shield to Arduino Leonardo, then upload the “Gamepad Controller”

code, open windows “Devices & Printers”. You’ll be able to see a gamepad controller in the list.

And if you want Motion Control too, attach a MPU6050 to the shield, attach to Arduino Leonardo,

and then upload the “Gamepad with Gyro” code. The gyro will act as the “Right stick”.

Tested on windows 7 and 10.