Telepresence Robot: Shields and Modules
by randofo in Circuits > Robots
7052 Views, 19 Favorites, 0 Comments
Telepresence Robot: Shields and Modules
![main.jpg](/proxy/?url=https://content.instructables.com/FFF/3KQ7/IMGLGQQI/FFF3KQ7IMGLGQQI.jpg&filename=main.jpg)
The Arduino is capable of a lot, but sometimes it needs a little help. Shields and modules are two types of circuit boards that you can use to expand the capability of your Arduino, and hence, your robot. There are countless shields and modules out in the world that perform more functions than you can imagine. This project obviously cannot cover even a fraction of them.
Instead, we will be focusing on two in particular. The first is an Arduino shield that processes DTMF tones (a.k.a. telephone touchtones). The second, is a microphone module. We are going to use the two of these together to control the robot over Skype. When touchtones are made by pressing the keypad in the Skype software, the robot will respond and move accordingly.
This is the sixth part of a seven-part instructables series. Over the next two instructables we will be building the basic electromechanical robot platform. This platform will later be enhanced with sensors and additional control electronics.
To learn more about the topics covered in this series of projects check out the Robot Class, Electronics Class, and Arduino Class.
Materials
![shieldTopDown.jpg](/proxy/?url=https://content.instructables.com/FS3/B72J/IMDZ7KMW/FS3B72JIMDZ7KMW.jpg&filename=shieldTopDown.jpg)
![1B.jpg](/proxy/?url=https://content.instructables.com/FC5/6YEO/IM560IE3/FC56YEOIM560IE3.jpg&filename=1B.jpg)
For this project you will need:
(x1) DFRobot DTMF shield
(x1) Adafruit Audio Amplifier Module
(x1) 12" servo extension cable
(x1) Roll of painters tape
Shields
![1A.jpg](/proxy/?url=https://content.instructables.com/FNP/68XP/IM560I8H/FNP68XPIM560I8H.jpg&filename=1A.jpg)
An arduino shield is a special circuit board that plugs in on top of the Arduino and adds special functionality to it. It gets it's name because it is a little bit like the board is holding a shield in front of itself as protection.
People make all kinds of shield to expand the functionality of the Arduino. It is basically like making a special circuit to do something very particular, and then attaching it directly to the Arduino. Given that there are an endless numbers of circuits that you can connect to the Arduino, there are also countless shields out in the world performing a wide variety of functions.
We will be using a DTMF shield to interpret and process DTMF tones. This may seem foreign, but DTMF tones are basically just telephone touch-tones. DTMF stands for "dual tone multi-frequency."
The reason I have decided to control the robot via touch-tones is that they are highly proven technology. For decades millions of people around the world have used them reliably on terrible staticy phone lines with little issue. Also, they are generally easy to generate, and can be produced by a number of existing video conference applications (like Skype). We don't need to create any new software to interface with the shield. It's this combination of reliability and ease of use that makes them good for controlling our robot.
Modules
![resized_FYZ7OF3INAC5PGV.jpg](/proxy/?url=https://content.instructables.com/F9D/LQJJ/IOEXWZ4G/F9DLQJJIOEXWZ4G.jpg&filename=resized_FYZ7OF3INAC5PGV.jpg)
Modules, like shields, are boards that connect to an Arduino, and add special functionality. The difference with modules is that they are not Arduino specific. They do not need to plug over top of the Arduino, but can be connected to a number of different controller boards, or sometimes run as a stand-alone device (i.e. all by themselves).
The Ping sensor we used in the previous lesson is an example of a module board. As you begin working with robotics, you will continually encounter all kinds of different modules. Just like with shields, there are countless of them out in the world which perform more functions than you can imagine.
The module we are using in this lesson is a microphone amplifier. It plugs into the DTMF shield to expand it's functionality and allow it to process sound. This is used to 'listen' to the DTMF tone being played out loud through the smartphone speaker and send it to the DTMF shield.
The reason we are using a module instead of just a microphone is that the signal from a microphone in and of itself is typically not high enough for the shield to hear it. We need the module to amplify the signal to be about as loud as the audio signal coming out of the headphone jack of your phone.
Prepare the Module
![2A.jpg](/proxy/?url=https://content.instructables.com/FN8/QDQS/IM560LA0/FN8QDQSIM560LA0.jpg&filename=2A.jpg)
![2B.jpg](/proxy/?url=https://content.instructables.com/FRQ/ZOY9/IM560LA1/FRQZOY9IM560LA1.jpg&filename=2B.jpg)
![2C.jpg](/proxy/?url=https://content.instructables.com/F8L/1P2L/IM560LA2/F8L1P2LIM560LA2.jpg&filename=2C.jpg)
To prepare the module, take a servo extension cable and cut off the male header pin connectors. Seperate the remaining red, black and white wire slightly, and strip away a little bit of the insulation on each.
To make it easier to insert the threaded wire through the terminal holes of the module, you can tin the exposed strands of each wire with just a tiny bit of solder.
Solder the red wire to VCC, the black wire to GND, and the white wire to "out."
VCC is one way the power connection in a circuit is often labeled.
Unplug Everything
![3A.jpg](/proxy/?url=https://content.instructables.com/FJO/WVFR/IM6LB46I/FJOWVFRIM6LB46I.jpg&filename=3A.jpg)
![3B.jpg](/proxy/?url=https://content.instructables.com/F3M/EVTC/IM6LB46J/F3MEVTCIM6LB46J.jpg&filename=3B.jpg)
![3C.jpg](/proxy/?url=https://content.instructables.com/F1M/ZTR5/IM6LB46M/F1MZTR5IM6LB46M.jpg&filename=3C.jpg)
In order to plug the shield in, we will need to unplug everything. However, before you unplug everything, STOP!
The first thing you should always do before disconnecting a wire is label it. This is easily accomplished by using a peice of painters tape and a marker. Rip a small peice, and fold it around the wire. Write down what pin the wire is plugged into, and then unplug it.
If you don't label it before unplugging it, you will end up with a tangle of wires that will make no sense to you later. You will then have to figure out which wire is which. This is annoying, takes a long time, and can lead to errors.
Labeling everything will make life remarkably better. Trust me.
So... Label everything and then unplug the wires.
Plug Everything Back In
![4A.jpg](/proxy/?url=https://content.instructables.com/FYY/S5I8/IM6LB4F2/FYYS5I8IM6LB4F2.jpg&filename=4A.jpg)
![4B.jpg](/proxy/?url=https://content.instructables.com/F17/5LK7/IM6LB4FY/F175LK7IM6LB4FY.jpg&filename=4B.jpg)
![4C.jpg](/proxy/?url=https://content.instructables.com/F4X/VHA4/IM6LB4G2/F4XVHA4IM6LB4G2.jpg&filename=4C.jpg)
Insert all of the wires that you unplugged into the corresponding sockets on the Arduino shield. They should line up perfectly with the sockets already on the Arduino.
Once all of the wires are plugged in, plug the shield into the Arduino sockets.
Insulate the Module
![resized_FMXFAKOINAC5PI0.jpg](/proxy/?url=https://content.instructables.com/FTE/MMWU/IOFZA6V3/FTEMMWUIOFZA6V3.jpg&filename=resized_FMXFAKOINAC5PI0.jpg)
![7B.jpg](/proxy/?url=https://content.instructables.com/F9H/02BW/IM6LB613/F9H02BWIM6LB613.jpg&filename=7B.jpg)
![7C.jpg](/proxy/?url=https://content.instructables.com/FBV/8EEV/IM6LB61W/FBV8EEVIM6LB61W.jpg&filename=7C.jpg)
![7D.jpg](/proxy/?url=https://content.instructables.com/FO7/Q7F1/IM6LB636/FO7Q7F1IM6LB636.jpg&filename=7D.jpg)
Slide a piece of shrink tube around microphone amplifier module.
Heat it up to shrink it into place.
We are doing this because the selfie stick tube is conductive, and we want to prevent any of the module's conductive terminals from shorting together when the module is zip tied to the tube.
Plug in the Module
![5A.jpg](/proxy/?url=https://content.instructables.com/F8A/3RSB/IM6LB4Y8/F8A3RSBIM6LB4Y8.jpg&filename=5A.jpg)
Pass the microphone cable's socket through the 3/8" hole in the top of the plastic box and plug it into the microphone header pins on the shield. The white wire should line up with the 'mic' label on the shield.
Clean Up the Wiring
![8A.jpg](/proxy/?url=https://content.instructables.com/FLU/D1CU/IM6LB9D8/FLUD1CUIM6LB9D8.jpg&filename=8A.jpg)
Everything should be all wired up now.
This would be a good opportunity to zip tie together all of the wires inside of the robot nice and tidy like.
Cleaning up the wire is good form and will prevent unexpected problems.
Again, trust me on this one.
Install the Library
![library.png](/proxy/?url=https://content.instructables.com/F2A/BFCB/IMGLELGH/F2ABFCBIMGLELGH.png&filename=library.png)
An Arduino library is a collection of Arduino pin assignments and functions designed to perform a specific task. Instead of adding each of the functions individually, we can just #include the library at the top of our code, and call the functions within the library at will.
We have already encountered a library before. We used the Servo Library to setup and control servo motors. This library came pre-installed in the Arduino software, and we did not need to install anything to make it work. The DTMF library, however, does not come pre-installed. So, we need to load the library into the software so that our code can use it.
It is necessary to do this because the DTMF library is required to use the DTMF shield. In fact, many Arduino shields have special libraries required to use them. While installing them is mildly annoying, they will ultimately make your life much easier.
Download the DTMF_Read_Only_Library.zip file.
Install the library by selecting the "Install Library" dropdown from the top menu bar.
Next, select "Import Zip Archive" and select the DTMF_Read_Only_Library.zip file.
And that's it. You're done.
Note that this is a special version of the DTMF library that I have modified to remove the DTMF tone generation capability from the shield. With this library, the shield can only read DTMF tones, as opposed to read and generate DTMF tones. I have done this because we have no reason to generate tones when using our robot, and in order for the shield to have the ability to create tones, it required that pins 2 and 3 of the Arduino be assigned as special outputs. Clearly this is a problem because we are already using pins 2 and 3 for our sensors. Thus, I disabled this functionality in the library. Rather than have these two pins communicate with the shield, I have freed them up to connect our sensors.
Downloads
Reprogram the Arduino
![6A.jpg](/proxy/?url=https://content.instructables.com/FI6/BZ4Q/IM6LB5BX/FI6BZ4QIM6LB5BX.jpg&filename=6A.jpg)
Program the Arduino with the following code:
Attach the Module
![9A.jpg](/proxy/?url=https://content.instructables.com/FV9/8TGT/IM6LBBYP/FV98TGTIM6LBBYP.jpg&filename=9A.jpg)
![9B.jpg](/proxy/?url=https://content.instructables.com/F8I/1NGL/IM6LBBYT/F8I1NGLIM6LBBYT.jpg&filename=9B.jpg)
Zip tie the module to the telescoping tube directly above the servo motor.
Clean up the wires once done.
Insert Your Phone
![insert.jpg](/proxy/?url=https://content.instructables.com/FKB/MI9G/IMF6AN1T/FKBMI9GIMF6AN1T.jpg&filename=insert.jpg)
Place your smartphone into the phone holder on the robot.
Connect to Skype
![ComputerApp.png](/proxy/?url=https://content.instructables.com/F05/NKMT/IMF6ABXY/F05NKMTIMF6ABXY.png&filename=ComputerApp.png)
This robot is controlled through Skype. You will need at least one Skype account and a friend who also has Skype. To test this on your own, you will need to create two Skype accounts.
This also requires a smartphone running the Skype app and a computer running the Skype software.
Open the Skype app on your phone.
On a computer, log in to the Skype software and place a video call to the account open on your phone.
Accept the call on the phone.
Once the two apps are connected, open the dial pad on the computer. This dial pad can be found under the Window dropdown in the top menu bar or launched by pressing Command 2. The dial pad is used for controlling the robot.
Test It Out
![finalInstructions.jpg](/proxy/?url=https://content.instructables.com/FTZ/KY80/IMGLF7GC/FTZKY80IMGLF7GC.jpg&filename=finalInstructions.jpg)
When the buttons on the key pad are pressed, it plays a DTMF tone through the smartphone. This tone is sensed by the microphone module and interpreted by the DTMF shield on the robot. The robot then moves depending on which tone is sensed.
The following commands are used to control the robot via Skype:
2: Forward
4: Left
6: Right
8: Backwards
7: Tilt Camera Up
9: Tilt Camera Down