wirelessly control a robot using arduino and rf mo

19
http://www.instructables.com/id/Wirelessly-Control-A-Robot-Using-Arduino-and-RF-Mo/ Food Living Outside Play Technology Workshop Wirelessly Control A Robot Using Arduino and RF Modules ! by robodude95 on October 14, 2013 Table of Contents Wirelessly Control A Robot Using Arduino and RF Modules ! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Intro: Wirelessly Control A Robot Using Arduino and RF Modules ! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Step 1: Collect Your Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Step 2: The Transmitter : Part 1 :- Controlling the Robot using the Computer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Step 3: The Transmitter : Part 2 :- Breadboard Remote Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Step 4: The Receiver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Step 5: The Chassis and Drivetrain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Step 6: Main Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Step 7: Test It!! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Upload: javier-ramirez

Post on 28-Dec-2015

141 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Wirelessly Control a Robot Using Arduino and RF Mo

http://www.instructables.com/id/Wirelessly-Control-A-Robot-Using-Arduino-and-RF-Mo/

Food      Living       Outside        Play        Technology       Workshop

Wirelessly Control A Robot Using Arduino and RF Modules !by robodude95 on October 14, 2013

Table of Contents

Wirelessly Control A Robot Using Arduino and RF Modules ! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Intro:   Wirelessly Control A Robot Using Arduino and RF Modules ! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 1:   Collect Your Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Step 2:   The Transmitter : Part 1 :- Controlling the Robot using the Computer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Step 3:   The Transmitter : Part 2 :- Breadboard Remote Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Step 4:   The Receiver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Step 5:   The Chassis and Drivetrain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

Step 6:   Main Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

Step 7:   Test It!! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Page 2: Wirelessly Control a Robot Using Arduino and RF Mo

http://www.instructables.com/id/Wirelessly-Control-A-Robot-Using-Arduino-and-RF-Mo/

Author:robodude95    LMR PageI'm in my first year of engineering (EXTC).I enjoy building robots and making various contraptions using Arduino.Thanks for stopping by :)

Intro:  Wirelessly Control A Robot Using Arduino and RF Modules !In this Instructable you'll learn how to make an RF controlled Arduino Robot.....or in other words your very own Minion waiting to obey your commands..... :p

OVERVIEW

In this project I've used a 433Mhz Tx and Rx pair to allow the Arduinos to communicate wirelessly with each other.These modules are probably the easiest way to set upwireless simplex communincation between two arduinos and are much cheaper compared to other wireless modules like Xbee or bluetooth modules(reduced rangethough).

I have shown two alternatives for controlling the robot :- 1). Using your computer's keyboard to control the bot and 2).Using a separate controller made on a breadboard.The robot uses differential drive in order to turn (wheels on either side move in opposite directions).

Refer to the pdf attached for getting started with these modules.

So lets get started..... :)

File Downloads

VirtualWire.pdf (122 KB)[NOTE: When saving, if you see .tmp as the file ext, rename it to 'VirtualWire.pdf']

Page 3: Wirelessly Control a Robot Using Arduino and RF Mo

http://www.instructables.com/id/Wirelessly-Control-A-Robot-Using-Arduino-and-RF-Mo/

Step 1: Collect Your PartsHere is the parts list and some links for buying them :-

The Controller Board :-

1. Any model/clone Arduino board.2.The 433MHz OR the 315MHz module (both work the same way) Tx and Rx pair ( Link here )3. A breadboard for the controller pad (Not needed if you're using a computer to control the bot).4.Push button switches X 5 (Again not needed if you're using a computer to control the bot).5. Connecting wires.6. 9V battery to power the Arduino on the Tx end.7.A 17cm long breadboard wire for the Antenna for the Tx and Rx.

The Receiver Board :-

1. Any Arduino model/clone board.2. The Rx part of theTx/Rx pair (Link in Step 2 above).3. Breadboard and connecting wires.4.12V battery pack to power Motors.(In the video I have used a 12V AC to DC adapter)5. 100uF Electrolytic Caps X 4.6. L293D motor driver chip X 2 (Each chip controls 2 motors bi-directionally...So if you want to make a 2 wheeled bot you will require only 1 L293D chip).7. 0.1uF ceramic caps X 12 (3 for each motor)....for eliminating noise between the controller and motors.8. A 9V battery for powering the Arduino on the Rx end.

Note :- You can skip step 5 and 6 if you have a motor shield...though the code will need some tweaking then!

Robot Chassis and Drivetrain :-

1.DC Motors X 42.Robot chasis3. Wheels X 4

Note :- I used this robot chassis....came with the motors and wheels

Now on to the build......

Image Notes1. Arduino Uno2. Breadboard3. Jumper wires4. 5 Push button switches5. 17cm Antenna6. Tx Module7. 9V battery with barrel jack

Image Notes1. L293D motor driver chips2. Connecting wires...more required than shown here :p3. 47uf and 100uF Electrolytic caps4. Rx Module5. Arduino Clone6. 17cm Antenna7. 9V battery8. 12V AC TO DC adapter...for powering the motors

Page 4: Wirelessly Control a Robot Using Arduino and RF Mo

http://www.instructables.com/id/Wirelessly-Control-A-Robot-Using-Arduino-and-RF-Mo/

Image Notes1. Chassis with 4 DC motors2. Zip Tie3. 4 wheels

Step 2: The Transmitter : Part 1 :- Controlling the Robot using the ComputerThe transmitter and receiver communicate across a 433MHz frequency ( or 315MHz...really depends on what module you use).

The transmitter is the smaller module having 4 pins :-

(1)Ant ---------> Antenna(2)Vcc ---------> Power supply....in this case 5v from the Arduino at the Tx end.(3)Data -------> Data pin.....transmits the data in bytes.(4)Gnd-------->Ground pin....connected to Arduino ground.

First solder the 17 cm (about 13cm for the 315MHz module) solid core breadboard wire to the Ant pin on the Tx module....the added antenna increases thecommunication range and improves performance indoors.If you do not want to solder the antenna directly you can always connect it on the breadboard.

In this step you will learn how to control the bot using the computer.

You can have a look at Step 3 which shows how to control the bot using a breadboard controller.

Connections :-

These are the connection between the Arduino and the Tx module.

Tx Arduino

Vcc-----------------------------------> 5v pinGnd-----------------------------------> Gnd pinData-----------------------------------> Digital Pin 3

Code :-

First you need to download the VirtualWire Library...this library makes coding these modules for the Arduino very easy.Download and Installation instructions are provided here

Working of the code :-

The code accept inputs from the user (f,b,r,l,s) through the serial monitor and then uses Switch-Case statements to determine which command is to be sent by the Tx .i.e.Front, Back, Left, Right, or Stop.

The code is attached below in a .txt file.....just paste it into a new window on the Arduino IDE.

Moving on......

Page 5: Wirelessly Control a Robot Using Arduino and RF Mo

http://www.instructables.com/id/Wirelessly-Control-A-Robot-Using-Arduino-and-RF-Mo/

Image Notes1. Parts required when using the computer to control the robot2. Tx Module with Antenna soldered3. Arduino Uno4. Jumper wires5. Breadboard

Image Notes1. Bend the Antenna pin a bit before soldering so that it does not come in the wayof the breadboard

Image Notes1. Pins pn the Module2. Soldered Antenna

Image Notes1. Arduino ground2. Digital Pin 33. Arduino 5V

Page 6: Wirelessly Control a Robot Using Arduino and RF Mo

http://www.instructables.com/id/Wirelessly-Control-A-Robot-Using-Arduino-and-RF-Mo/

Image Notes1. Ckt with all connections made

File Downloads

transmitterCode.txt (2 KB)[NOTE: When saving, if you see .tmp as the file ext, rename it to 'transmitterCode.txt']

Step 3: The Transmitter : Part 2 :- Breadboard Remote ControllerThis is an alternative way of controlling the bot....by building your own remote on a breadboard.

This is where the push buttons come in use...connect the push-buttons in a way that you find comfortable to control the bot (see the pics for reference).

Make sure you identify the correct terminals of all the switches.

The Connections :-

Connect one terminal of each switch to a common ground that is connected to an Arduino ground pin (Again refer to the pics).

Connect the other terminal to a Digital pin on the Arduino.

The connections should be something like this :-

Button Digital Pin

Forward -------------------------------------------> 08Backward ------------------------------------------> 09Right --------------------------------------------> 10Left -------------------------------------------> 11Stop --------------------------------------------> 12

You can change the digital pin connections....but make sure you change them in the RemoteTx code as well!!

The Code :-

(1) The Tx Code :-

The code reads whenever a button is pressed since the corresponding digital pin goes LOW.Based on which digital pin goes LOW the appropriate command istransmitted.

(2)The Rx Code :-

The code receives the transmitted byte and based on the command received move the bot in the desired direction.

Both codes are attached at the bottom.

Page 7: Wirelessly Control a Robot Using Arduino and RF Mo

http://www.instructables.com/id/Wirelessly-Control-A-Robot-Using-Arduino-and-RF-Mo/

Image Notes1. Completed Ckt

Image Notes1. Parts required for making a separate controller remote.2. 9V battery3. 5 Push button switches4. Arduino Uno5. Tx Module

Image Notes1. Button terminals to make connections at2. Ground3. Arduino digital Pin4. You can choose any 2 diagonally opposite terminals like this.

Image Notes1. Forward2. Left3. Backward4. Stop5. Controller Button Layout6. Right7. Ground Line8. Wires connected here go to Ground

Page 8: Wirelessly Control a Robot Using Arduino and RF Mo

http://www.instructables.com/id/Wirelessly-Control-A-Robot-Using-Arduino-and-RF-Mo/

Image Notes1. Tx module

Image Notes1. Tx connections2. Ground3. Digital Pin 34. Arduino 5V

Image Notes1. Ckt with Tx and Pin connections

File Downloads

RemoteRx.txt (4 KB)[NOTE: When saving, if you see .tmp as the file ext, rename it to 'RemoteRx.txt']

RemoteTx.txt (2 KB)[NOTE: When saving, if you see .tmp as the file ext, rename it to 'RemoteTx.txt']

Step 4: The ReceiverThe Rx is the longer module having 8 pins :-

(1)Ant(2)Gnd(3)Gnd(4)Vcc

(5)Vcc(6)Data(7)Data(8)Gnd

Note :- we only use the first Data pin (pin 7).

Page 9: Wirelessly Control a Robot Using Arduino and RF Mo

http://www.instructables.com/id/Wirelessly-Control-A-Robot-Using-Arduino-and-RF-Mo/

Now take the second 17cm wire and solder it to the Ant pin of the Rx module.

Connections :-

These are the connections between the Arduino and the Rx module.

Rx Arduino

Vcc-----------------------------------> 5v pinGnd-----------------------------------> Gnd pinData-----------------------------------> Digital Pin 2

You will also need to connect the two L293D motor driver chips to the Arduino at the receiver.( Pin diagram of L293D given in the pics) Make sure you connect the chipproperly...the end with the notch is the front end.

First L293D Arduino

Enable1 --------------------------------> Digital Pin 05Enable2 -------------------------------->Digital Pin 06Input 1 -------------------------------->Digital Pin 07Input 2 ----------------------------------->Digital Pin 08Input 3 ----------------------------------->Digital Pin 09Input 4 ----------------------------------->Digital Pin 10

Second L293D Arduino

Enable1 --------------------------------> Digital Pin 03Enable2 -------------------------------->Digital Pin 11Input 1 -------------------------------->Digital Pin 04Input 2 ----------------------------------->Digital Pin 12Input 3 ----------------------------------->Digital Pin 14(Analog 0)Input 4 ----------------------------------->Digital Pin 15(Analog 1)

Additional connections :-

(1)For the L293D motor drivers :-Pin 8 of both the L293D chip go to the poitive of the 12V supply....this pin gives the power to the motors.

Pins 4,5,12,13 of both chips go to ground.

Pins 3 and 6 are connected to the leads of first motor........and pins 11,14 go to the leads of the second motor.(Same for the second L293D as well but for third andfourth motor).

Pin 16 of both chips is connected to the Arduino 5v supply...............this pin powers the chip.

Very Important :- Make sure Arduino and 12V supply grounds are connected TOGETHER!!!!

The Code :-

This code is receives the transmitted commands from the Tx and moves the robot in the desired direction.

Note :- This receiver code is used when the robot is controlled via the computer input. Another modified receiver code is used with the breadboard controller and can bedownloaded in Step 3.

Page 10: Wirelessly Control a Robot Using Arduino and RF Mo

http://www.instructables.com/id/Wirelessly-Control-A-Robot-Using-Arduino-and-RF-Mo/

Image Notes1. The tx module

Image Notes1. We will use this Data Pin2. We will use this Data Pin3. 17cm Antenna4. 17cm Antenna5. Bend the Antenna Pin before soldering

Image Notes1. This strip on the cap...indicates the negative terminal

Image Notes1. Negative terminal2. Negative terminal3. Positive Terminal

Image Notes1. 47uf Cap2. 100uF cap3. Front end with the notch4. L293D Connections

Page 11: Wirelessly Control a Robot Using Arduino and RF Mo

http://www.instructables.com/id/Wirelessly-Control-A-Robot-Using-Arduino-and-RF-Mo/

Image Notes1. L293D Pin out2. Arduino 5V3. 12V supply

Image Notes1. The second L293D driver

Image Notes1. Tx module connected

File Downloads

Page 12: Wirelessly Control a Robot Using Arduino and RF Mo

http://www.instructables.com/id/Wirelessly-Control-A-Robot-Using-Arduino-and-RF-Mo/

ReceiverCode.txt (4 KB)[NOTE: When saving, if you see .tmp as the file ext, rename it to 'ReceiverCode.txt']

Step 5: The Chassis and DrivetrainNow get your Motors and robot chassis ready....

First solder the 0.1uf ceramic caps on the motors in the following way :-

(1) connect one capacitor across the terminals of the motor.(2)connect one lead each of the 2 other caps on the motor body and the other lead to each motor terminal.These caps don't have polarity so don't get worried about connecting them wrong.

You can refer to the pics and also to the link for more help :-http://www.pololu.com/docs/0J15/9

Now attach your motors to the chassis and connect the motor terminals to the correct pins on the L293D motor driver.

Don't forget to connect the 100uF electrolytic caps to the supply pins of the L293Ds (Pins 8 and 16).Electrolytic caps are polarized and need to be connected correctly.The shorter lead (the side of the casing with the strip ) is the negative terminal and the longer lead isthe positive one.These caps smooth out voltage spikes from the supply.

Now for the main assembly........

Image Notes1. Fully Asembled

Image Notes1. First make sure you solder the caps on to each motor like this.

Image Notes1. Bare chassis with motors

Image Notes1. Underside of the chassis with motors and wheels connected

Page 13: Wirelessly Control a Robot Using Arduino and RF Mo

http://www.instructables.com/id/Wirelessly-Control-A-Robot-Using-Arduino-and-RF-Mo/

Step 6: Main AssemblyFirst make sure all the circuit connections are correct, caps on the motors are soldered well and check for any loose connections.

Be Careful While adding the batteries and make sure ALL connections are correct before connecting the batteries and powering up.

For mounting the the receiver breadboard on to the robot I used bits of velcro. I secured the Arduino on to the robot by using a zip tie.

Use small bits of solid core wires or rubber bands to tie the different bunches of wires to make it a bit neater.

Now on to Testing!!!!!!!!!!!

Image Notes1. Velcro to fasten the breadboard

Image Notes1. Tie bunches of wire....makes it neater :p2. Zip Tie to secure the controller

Image Notes1. Ready to go :p

Step 7: Test It!!With everything assembled and all the wires connected properly the only step left is Testing!

Before you put the wheels on and power the bot up.....test it without the wheels attached first...this way you can make sure all the motors have been connectedcorrectly with the motor driver and their direction of rotation is correct.Once you're satisfied with the speed and rotation of the motors put the wheels on!Be careful when using the 12v supply and double check all your connections before powering anything up again!I have attached links to videos of the robot testing when controlled by both the computer and the separate breadboard controller.

Now that your robot is made add some more features to it (I'm planning on tank tracks!)...now your bot is ready to do your bidding! :p

Initial Test Video :-

PS :- I have entered this Instructable in the Microcontroller Contest...so please vote if you liked it...Thanks!

Page 14: Wirelessly Control a Robot Using Arduino and RF Mo

http://www.instructables.com/id/Wirelessly-Control-A-Robot-Using-Arduino-and-RF-Mo/

Update (28-10-13) :- Here is a short video of the robot in action with batteries.....sorry for the bad shooting, had the controller in my other hand!

Related Instructables

Arduino UNOwirelesscommunicationwith PC (Photos)by inhaos

Wireless RadioFrequencyModule UsingPICMicrocontroller.by be-Abee

Make yourArduino projectwireless inminutes, withthe WirelessInventors Shield(video) byopensourcerf

WirelesscommunicationArduino RF byEagle199393

GSM BasedVersatileRobotic VehicleUsing PICMicrocontrollerby be-Abee

TheWireless,ObstacleDetecting,BeepingRobot usingArduinos! byrobodude95

Page 15: Wirelessly Control a Robot Using Arduino and RF Mo

http://www.instructables.com/id/Wirelessly-Control-A-Robot-Using-Arduino-and-RF-Mo/

Advertisements

Comments

45 comments Add Comment

 Chalson says:  Apr 5, 2014. 8:33 PM  REPLYHi.. I trying to control the speed of dc motor with rf wireless module. the dc motor will rotate correspond to the analog input voltage. My code did not work asexpected. May I have ur help in troubleshoot the code?

 robodude95 says:  Apr 5, 2014. 11:18 PM  REPLYYou'll need to connnect the enables to pwm pins for controlling the speed.Give a link to your code if you like. :)

 Lioramirez says:  Mar 31, 2014. 10:04 AM  REPLYCan I use the arduino Nano?????

 robodude95 says:  Apr 2, 2014. 3:21 AM  REPLYYeah...shouldn't be a problem!

 gaurav157 says:  Mar 30, 2014. 2:05 AM  REPLY

 gaurav157 says:  Mar 28, 2014. 12:27 PM  REPLYIs that any problem in program?i use arduino uno smd & induino.

 gaurav157 says:  Mar 28, 2014. 1:01 PM  REPLYSome time one thinks is happening when i upload a cod in arduino and connecting 9v battry the tx light of arduino is closed but if i connected to mylaptop it is on.what problem is happening.

 robodude95 says:  Mar 29, 2014. 7:58 AM  REPLYIt should work fine on the Induino since arduino proograms work on it.

What are you using to control the robot?....Laptop or a controller?

 gaurav157 says:  Mar 29, 2014. 8:46 AM  REPLYContoller

 robodude95 says:  Mar 29, 2014. 8:58 AM  [email protected]

My phone has gone for repair right now...that's why I can't check on updates very frequently.I have given 2 codes..one is for the laptop andthe other is for the computer...make sure you uploaded the correct one.

The code for the controller is here.

 gaurav157 says:  Mar 29, 2014. 9:31 AM  REPLYSome time one thinks is happening when i upload a cod in arduino and connecting 9v battry the tx light of arduino is closed but if iconnected to my laptop it is on.what problem is happening.it is problem with program.

 gaurav157 says:  Mar 29, 2014. 9:22 AM  REPLYThanks for your id

 gaurav157 says:  Mar 29, 2014. 9:19 AM  REPLYI uplode step no 3 both code.

Page 16: Wirelessly Control a Robot Using Arduino and RF Mo

http://www.instructables.com/id/Wirelessly-Control-A-Robot-Using-Arduino-and-RF-Mo/

 gaurav157 says:  Mar 29, 2014. 8:47 AM  REPLYCan you give me your email &fb for easy communication.

 gaurav157 says:  Mar 28, 2014. 11:46 PM  REPLYit is my ckt.

 gaurav157 says:  Mar 28, 2014. 11:46 PM  REPLYit is my ckt.

 gaurav157 says:  Mar 28, 2014. 12:59 PM  REPLYI am make pcb of motor drivers.

 gaurav157 says:  Mar 22, 2014. 11:29 AM  REPLYsome problem is created on compiling code.

Page 17: Wirelessly Control a Robot Using Arduino and RF Mo

http://www.instructables.com/id/Wirelessly-Control-A-Robot-Using-Arduino-and-RF-Mo/

 robodude95 says:  Mar 25, 2014. 3:25 AM  REPLYHey...you probably havent saved the VirtualWire library in the correct folder.

Make sure its in the Libraries folder of your main Arduino folder!

 gaurav157 says:  Mar 28, 2014. 12:23 PM  REPLYThanks it is sloved.

 gaurav157 says:  Mar 28, 2014. 12:23 PM  REPLYThanks it is sloved.

 gaurav157 says:  Mar 28, 2014. 12:23 PM  REPLYPlz help meI do all try but my robot is not working.battry amp. Is affect on motor&control? I use my bike 12v battry.transmiter tx light is on but motor is not working. I check all connection & continuity all are ready.what is problem i can't find.plz help me

 mechkartans says:  Mar 15, 2014. 10:13 PM  REPLYcan u plz upload the full circuit dia of receiver ,,,,, connection of 4 100uf capacitor was not clearly mentioned, i am a beginner so plz help me

THANK U

 Rv Singh says:  Mar 10, 2014. 9:20 AM  REPLYHellocan anyone help me… i have constructed transmitter and reciever circuits on two different pcb. the transmitter side is working well as i have seen thewaveforms on CRO.. but on reciever side the reciver is recieving is recieving the same waveform but decoder is not working(Vt not going high).i tried no. of combinations of resistance(b/w osc1 &osc2) but didnt work1- 1Mohm on tx side & 33k on rx2-1Mohm on Tx side & 1k on Rx3-820 K on Tx side & 1k in Rx..i’ve grounded all the address pin in both HT12E & HT12D…ive also replaced the HT12D but it doesnt worked at all…please help..

 robodude95 says:  Mar 11, 2014. 10:55 AM  REPLYI havent tried using these modules with the encoder/decoder ICs you mentioned since I directly used arduinos.

I have seen some videos on youtube where those ICs are used.....they could be of some help.

Alo have a look at this http://www.instructables.com/id/A-very-cost-effective-ROBOT-using-microcontroller-/

 electro18 says:  Jan 8, 2014. 9:33 AM  REPLYWhat if we press two ( or more buttons) at a time and somehow can we use PWM to control the speed of motor?

 robodude95 says:  Jan 11, 2014. 5:26 PM  REPLYI haven't come across a scenario where two buttons had to be pressed a once....there would still be a slight delay between the button pressing which thearduino picks up and then executes the output of whichever button was pressed first

 electro18 says:  Jan 18, 2014. 8:29 PM  REPLYThanks for the help :)

 robodude95 says:  Jan 11, 2014. 5:28 PM  REPLYYou can control the motor speed by connected the Enable pins on the L293d to PWM pins on the Arduino.

analogWrite(enablePin,motorSpeed);

 cobinrox says:  Jan 7, 2014. 2:41 PM  REPLYNice! How far away can you be from the robot? Could you control the robot from your dorm room with the robot running outside (but close to) the building?

Page 18: Wirelessly Control a Robot Using Arduino and RF Mo

http://www.instructables.com/id/Wirelessly-Control-A-Robot-Using-Arduino-and-RF-Mo/

 robodude95 says:  Jan 11, 2014. 5:22 PM  REPLYThe range of these sensors is about 100ft indoors and 300ft to 500ft outdoors.....as of now I have only tested the robot indoors and I am able to control itfrom different rooms.

 fgonzalez14 says:  Nov 30, 2013. 9:33 AM  REPLYHere are the images

 robodude95 says:  Nov 30, 2013. 10:19 AM  REPLYDude....Pin 8 of your L293D Ic isnt connected at all!!....the positive of the motor power supply is supposed to go there....your motors arent working sincethey arent getting any power!...connect positive of 12v to Pin 8 of the L293D IC.....Check the IC pin out pic given in this instructable.

This should solve your problem...and always double check your connections!!

 fgonzalez14 says:  Nov 30, 2013. 4:07 PM  REPLYAlright I connected it and nothing is happening, could it be the motors?

 fgonzalez14 says:  Nov 30, 2013. 4:10 PM  REPLYI wonder if it is the remote, here is a picture

 robodude95 says:  Nov 30, 2013. 9:26 PM  REPLYOne more thing....looking at your picture of your ckt.....Pin 16 of your L293D IC seems to be connected to a digital pin on the Arduino...that isprobable why its not working.

Pin 16 of the L293D is the Vcc pin for the IC....it has to receive 5V from the Arduino.

 robodude95 says:  Nov 30, 2013. 9:20 PM  REPLYMake sure you have uploaded the correct code for each Arduino.

I dont think the motors are the problem....remove them from the ckt before testing them.

Didnt get your picture of the remote.

 fgonzalez14 says:  Nov 30, 2013. 8:13 AM  REPLYAlright, I changed it to where the ground and negative are connected and that there is a 9V source in the left of the breadboard and a 3V on the right yet nothinghappens. Also, the capacitors are soldered to the motors with a 9V battery connected to the arduino.

Page 19: Wirelessly Control a Robot Using Arduino and RF Mo

http://www.instructables.com/id/Wirelessly-Control-A-Robot-Using-Arduino-and-RF-Mo/

 robodude95 says:  Nov 30, 2013. 8:24 AM  REPLYYour motors wont run on 3V....you'll probably need around 12v for them....why is there 3V?...And could you please send a pic of your connections..will beable to help better :)

 fgonzalez14 says:  Nov 30, 2013. 9:19 AM  REPLYI have a 9V connected to a 3V,

 fgonzalez14 says:  Nov 30, 2013. 5:22 AM  REPLYI am using 12V motors since those where the ones given to me by my school. As for the voltage source, I am using a 12V source on left side of the breadboarand nothing on the right side but it is connected to the negative of the left yet not to the ground of the arduino, could that be the problem?

 robodude95 says:  Nov 30, 2013. 6:21 AM  REPLYThe arduino ground and power supply ground MUST be connected commonly...this is mostly the cause of your problem.This link should help explain the common ground problem :-http://www.thebox.myzen.co.uk/Tutorial/Power_Supplies.html

An additional fix would be to separate the power source for the arduino and motors by using a 9v battery for the arduino.

And also make sure you've soldered the 0.1uF caps on to the motors...you'll have problems with the noise generated by the motors otherwise.

Hope this helps!

 fgonzalez14 says:  Nov 29, 2013. 6:30 PM  REPLYI tried making this with 12Vdc motors yet it did not work, do I have to use a 48V? or what do I change?

 robodude95 says:  Nov 29, 2013. 10:48 PM  REPLYwhat voltage are the motors rated for??...and what battery are you using to supply the power....dont use 48v..you'll probably burn the motors!!

 Mohannad Rawashdeh says:  Oct 20, 2013. 5:16 AM  REPLYSo nice I love it