PIKACHU ROBOT USING DC MOTORS AND BLUETOOTH MODULE

(0 review)
Free
Check out

In this project you will be introduced to some hardware components that are essential to make moving Pikachu robot wireless using dc motors and Bluetooth module and there various pin configurations and connections.

DSC_0132

Hardwire required:

  • Arduino Uno
  • USB cable
  • Dc motors
  • Motor driver IC
  • Connectors

KIT: Junkbot Edu kit.

Code brick program:

Screenshot (129)

The program can be depicted on the hardware as illustrated below.

Fritzing image:

21

How to test a dc motor:

  1. How to connect dc motor to Arduino Uno:
  • Connect the positive wire (red wire) of the motor to the 5v pin and negative wire (black wire) of the motor to the GND pin (ground pin) of Arduino .
  • Now the motor rotates in clockwise direction when you reverse the connections red wire to GND and black to 5v of Arduino motor rotates in anti-clockwise direction.

Screenshot (95)

  1. Controlling motors with Bluetooth:

To control the directions of the motors we use motor driver IC and the connections are stated below.

  • Connect the 5v and GND of Arduino Uno to Vcc and GND pins of motor driver IC.
  • Connect the 8,9,10 and 11 pins of Arduino to A-1A, A-1B, B-1A and B-1A of motor driver IC respectively.
  • Connect the RXD and TXD of Bluetooth to pin 0(RX) and pin1 (TX) of Arduino Uno.
  • Connect Vcc and GND of Bluetooth to VIN and GND of Arduino.
  • Set pins 8 and 10 of Arduino to HIGH and connect the positive (red wire) of right motor and left motor respectively.
  • Set pins 9 and 11 of Arduino to LOW and connect the negative (black wire) of right motor and left motor respectively.
  1. How to write code using the code bricks:
  • Open the code bricks software.
  • Click on the events and drag1 and change the control of key according to your preference so when press the key the robot moves.
  • Click on the events and drag 2and change the control of key according to your preference so when key is released the robot stops moving.
  • Click on robots block and drag 3 and4  to make the right motor rotating in forward direction.

 

  • Same procedure to left motor drag 5 and 5 to make the left motor rotating in forward direction.

 

  • Now to make your robot moving the forward direction connect all the the blocks above as shown6 and change the control key from space to W.

 

  • So when you press W the robot will move forward when you release the W 7 it stops.
  • Reverse direction of robot can be done by using the same blocks but by just changing the HIGH and LOW8 options and changed the control key to S.
  • So when you press S the robot will move reverse when you release the S 9 it stops.

 

  • To turn right the right motor should go in reverse direction and the left in forward direction as illustrated 10and changed the control of key to D.

 

  • So when press you D the robot will move right when you release the D 11 it stops.
  • To turn left the left motor should go in reverse direction and the right motor in forward direction as illustrated 12and change the control of key to A.
  • So when you press A the robot will move left when you release the A 13it stops.
  • To stop both the motors when space key is pressed.

NOTE: You can change the control keys on your keyboard as per your requirement.

  1. Establishing Bluetooth connection:

 

Establishing connection:

  • Even though you connected Arduino to your computer, it won’t start communicating with codebricks until you connect them manually.
  • This is represented in codebricks, with dot to show status.
  • If the color of dot is red (as illustrated below), it means the communication is not started yet.

14

  • Click connect Screenshot (138)
  • Select the corresponding serial port.

15

 

  • Go to CONNECT and select the USB port and wait until it says 22 serial port connected.

 

  • The dot will turn from red to green, representing the connection established.

16

  • Connect the USB cable to Arduino and laptop.
  • Go to BOARDS and select Arduino Uno 17

 

  • Once port is connected upgrade the firmware 19 and wait until it upload is finish 20 .

 

NOTE: Upgrading the firmware is not possible when Bluetooth Module is connected to Arduino.

 

After upgrading the firmware is finished connect the Bluetooth Module. Disconnect the serial port (USB cable) and connect a power bank to Arduino as source of supply and the connect Bluetooth module.

 

Course Features

  • Lectures 0
  • Quizzes 0
  • Duration 50 hours
  • Skill level All level
  • Language English
  • Students 7
  • Certificate No
  • Assessments Self
  • Build your own Robot

  • Build your own Robot

Reviews

Average Rating

0
0 rating

Detailed Rating

5 stars
0
4 stars
0
3 stars
0
2 stars
0
1 stars
0
Free