Reader small image

You're reading from  Intel Edison Projects

Product typeBook
Published inMay 2017
PublisherPackt
ISBN-139781787288409
Edition1st Edition
Concepts
Right arrow
Author (1)
Avirup Basu
Avirup Basu
author image
Avirup Basu

http://www.avirupbasu.com/p/resume_9.html
Read more about Avirup Basu

Right arrow

Manual Robotics with Intel Edison

In Chapter 5, Autonomous Robotics with Intel Edison, we dealt with robotics and the autonomous side of it. Here, we are going to deep dive into the field of manual robotics. A manual robot may not typically be called a robot, so more specifically, we will deal with the manual control of robots that have some autonomous characteristics. We are primarily dealing with the development of UGVs and its control using WPF applications. WPF applications have already been discussed in Chapter 3, Intel Edison and IoT (Home Automation), where we communicated with Edison using the MQTT protocol. Here, we are going to do the same using serial port communication. We will also learn how to make our bot fully wireless. The topics we will be covering are as follows:

  • Manual robotic system—architecture and overview
  • 2WD and 4WD mechanisms
  • Serial port communication with Intel Edison
  • Making the...

Manual robotic system

We have had a look at the autonomous robotic architecture. Manual robotics also deal with a similar architecture; the only difference being that we have a fully-fledged controller that is responsible for most of the action:

Manual robot architecture

There isn't much of a difference between the architecture discussed here and the one discussed in Chapter 5, Autonomous Robotics with Intel Edison. We've added a receiver and a transmitter unit here which would have been present in the earlier use case as well. When dealing with robotics, the entire architecture falls under the same roof.

Manual robotics may not be limited to only manual robots. It may be a blend of manual and autonomous functionality, because a fully manual robot may not typically be called a robot. However, we are aware of Unmanned Ground Vehicles (UGVs) and Unmanned Aerial Vehicles (UAVs). Sometimes the terminology...

Chassis in robotics: 2WD and 4WD

The reader is expected to develop their own robot, and thus you will be required to learn about drive mechanisms and a choice of chassis. Ideally, there are two types of drive mechanisms and the choice for the chassis is done on the basis of the drive mechanism used. Normally we don't want a chassis that over-stresses our motors, nor do we want one that may get stuck while exposed to the outdoor environment. In a typical line follower robot, as discussed in Chapter 5, Autonomous Robotics with Intel Edison, the most common and the most widely-used drive mechanism is a two-wheel drive, as normally these operate on smooth surfaces and in indoor environments.

Two-wheel drive

Two-wheel drive (2WD) refers to the driving mechanism involving...

Making the system wireless

For making systems wireless in robotics, there are many options available. The choice of hardware and protocol depends on certain factors, which are as follows:

  • Availability of mobile network coverage
  • Rules and regulations over RF in your operating country
  • Maximum distance required
  • Availability of Internet connectivity

If we use a GSM module, then mobile network coverage is a must. We may need to get clearance for the RF and ensure that it does not interfere with other signals. The maximum distance is another factor to consider, as distance is limited when using Bluetooth. Bluetooth connectivity can be hampered if the distance exceeds. The same goes for RF, but RF coverage can be increased based on the antenna used. If there is Internet connectivity over an area, then MQTT itself can be used, which was again discussed in Chapter 3, Intel Edison and IoT (Home Automation).

RF, or radio...

WPF application for LED on and off

In Chapter 3, Intel Edison and IoT (Home Automation), we looked at using a WPF application and MQTT connection, learning that we could control our Intel Edison using MQTT protocol. However, here, we'll be dealing with serial port communication. Since we have already discussed WPF applications and how to create projects, and created an hello world application, we won't discuss the basics in this chapter, and will instead get into the application directly. Our problem statement in this chapter is to switch an LED on and off using a WPF application via serial port communication.

Start with creating a new WPF project and name it RobotController:

RobotController—1

Next, in MainWindow.xaml, we'll design the UI. We'll use the following controls:

  • Buttons
  • TextBox
  • TextBlocks

Design your UI as follows:

RobotController—2

The xaml code for the preceding...

High performance motor driver sample with code

In Chapter 5, Autonomous Robotics with Intel Edison, we saw an application of L293D and we also wrote some code for it to control motors. However, L293D fails in high performance applications. To tackle this, we had a brief discussion about an alternative high-power driver.

Here, we'll deep dive into the driver, as it has been my personal favorite and is used in virtually all our robots:

Dual motor driver high power. Picture source: http://robokits.co.in/motor-drives/dual-dc-motor-driver-20a

The driver has the following five control pins:

  • Gnd: Ground
  • DIR: When low, the motor rotates in one direction; when high, it rotates in another direction
  • PWM: Pulse width modulation to control the speed of the motor; the recommended frequency range is 20Hz - 400Hz
  • BRK: When high, it halts the motor in operation
  • 5V: Regulated 5V output from motor driver board

Now let&apos...

4WD UGV (black-e-track)

The name might be a bit fancy but this UGV is quite simple with the only difference being that it contained four high torque motors powered by a single dual driver motor driver circuit. Initially, we used two driver circuits but then we shifted to one. It was powered by a Li-Po battery but all tests were conducted using an SMPS. The UGV was controlled by a WPF application with the name of universal remote controller. This UGV was also fitted with a camera with an operating frequency of 5.8 GHz. The UGV was also wireless using a 2.4 GHz RF module. Let's have a look at the hardware required apart from the Intel Edison:

  • 30 cm by 30 cm chassis(1)
  • 10 cm diameter wheels(4)
  • High torque motors 300 RPM 12V(4)
  • 20A dual motor driver(1)
  • RF 2.4 GHz USB link(1)
  • RF 2.4 GHz Serial link(1)
  • Li-Po battery (minimum voltage supply: 12V; maximum current drawn: 3-4A)

This section will cover the hardware...

Universal robot controller for UGV

Before deep diving into the controller, clone the following GitHub repository to your PC. The code is itself around 350+ lines so some parts are to be discussed:

https://github.com/avirup171/bet_controller_urc

So initially let's design the UI first:

Screenshot of URC

For simplicity two sections of fast and slow controls are included. However it can be merged into one and using a checkbox. We have a connection pane on the right hand top side. The commands are displayed. A default password for 12345 was added which was done to avoid crashes and unauthorized use. However it's a simple controller and can be used with UGVs pretty much efficiently.

If you have a close look over the UI, then you will find a button named Press to activate keyboard control. Once you click on the button, the keyboard control gets activated. Now here you need to assign keyboard pressed and keyboard...

Open-ended question for the reader

What we have developed so far is a kind of UGV and not typically a robot, although we can configure it to be one. To develop an autonomous and manual robot, we normally design a robot to perform a certain task, however we keep manual control as well so that we can take back control whenever we desire. More appropriately, it may not be fully manual nor fully autonomous. Think of a drone. We just specify the waypoints on the map and the drone follows the waypoints. That's one of the classic examples. Now the reader's job is to combine the line follower robot discussed previously and manual robot discussed here and combine it into a single platform.

Summary

We have come to the end of the chapter as well as to the end of the book. In this chapter, we had a chance to have a look at some in-depth concepts of manual robotics and UGVs. We developed our own software for robot controlling. We also learned how to make our robots wireless and the ways to access multiple serial ports. Finally, we controlled our robot using our own controller. In Chapter 3, Intel Edison and IoT (Home Automation), we have learned how to control the Edison using an Android app with the MQTT protocol. That technique can also be used to control a robot by using the mraa library.

The entire book has covered multiple topics related to Intel Edison. Now it's your job to use the concepts discussed to come up with new projects and explore even further. The last two chapters purely concentrated on robotics based on Intel Edison, but these concepts may be applied to other devices, such as an...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Intel Edison Projects
Published in: May 2017Publisher: PacktISBN-13: 9781787288409
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Avirup Basu

http://www.avirupbasu.com/p/resume_9.html
Read more about Avirup Basu