Search This Blog

Building robotics ground vehicle. Part 2 - remote control.

In Part 1 of this series we covered the mechanics of the our small robotics ground vehicle. The next step is to add electronics required to control the vehicle remotely or let it drive in autonomous mode. Following articles will present how to control the motors using standard RC sender and receiver, autonomous driving with Arduino and Raspberry Pi.

General idea

This particular article is focused on manual control with standard RC device typically used in modeling and toys. So what we want to make is to place receiver on the robot and connect it in such a way that it can set motors rotation speed according to the control sticks position on the sender.

General structure of RC-based manual control

Before we continue, it is important to understand what output is generated by RC receiver and how to interpret it for motor control.

Few words about standard remote control

The simplest way to test our newly build vehicle is to connect standard remote control. There two parts - sender and receiver.

RC sender

RC receiver

Receiver is placed on the vehicle and generates standardized Pulse Width Modulation (PWM) signal on each of it's outputs. At the bottom of the receiver there are several three-pins columns. Each column is an output terminal (also might be referenced as channels). Where first pin provides ground connection, second provides +5V power signal and the third one generates PWM signals with duty cycle proportional to the position of the control stick on the sender. Here is an example of such PWM signal used to control standard servo motor.

So the idea is to use one PWM output (channel) to control the overall wheel rotation speed and the second channel to steer, i.e. to define the difference in rotation speed of the wheels on the left and right side of our vehicle.

Need for speed motor control interfacing board

Since we have decided for 12V motors, we need somehow convert +5V PWM signals to the up to +12V voltage to drive our motors. This is the typical task for motor control (or motor driver) board. It's main task is to receive the input which says what is the desired rotation speed and convert this input to the output voltage connected to the motors to rotate with target speed. In hobby robotics domain, there are three popular ways to provide an input: a) standard PWM signals; b) setting target rotation speed over serial connection; c) using I2C bus to transmit target rotation speed. Which way to use depends on the particular project requirements and capabilities of the motor control board and corresponding receiver/processor part.
In this particular project we decide to use MD22 motor control board.

MD22 - dual 24V 5A H-Bridge motor drive

Inputs and outputs connectors

Among others, one nice thing by this controller is it's ability to handle standard RC signals as well as I2C commands as the input for motor control. So we can easily switch between different control techniques depending on the connected electronics and particular project needs. In addition, it can provide up to 5A current to each motor and this is what we need for our rather powerful motors. Motor controllers which can not provide such current may burn out if we connect our motors and then for example block them causing the maximum current flowing through controller.

Providing power to the whole system

We are using 12V on-board battery to supply power for motors. However, during development it is convenient to have the possibility to power up the whole system from wall adapter. In addition, while using the battery we need to answer the question how to charge it. There are basically two possibilities: use external charger (here are some examples) or use some on-board electronics which can charge the battery. For convenience, we decide to use on-board charger which can in addition instantly switch between wall adapter and battery power. The following picture illustrates this decision.

Adding power source

Fortunately, there is ready made UPS module which satisfy our requirements. For this particular project we decide to use picoUPS-120-ATVX DC micro UPS system. The picoPSU-120-ATV ensures uninterrupted power for electronics by automatically switching in between a DC input source (13-16V) and a Lead Acid (SLA battery). The switching in between the power sources is instantaneous, thus allowing smooth, uninterrupted device operation. The picoUPS-120-ATV also has a built-in, 1.2A fast battery charger unit.
With this solution we supply power for motors and solve battery charging problem. However, what is still needed is +5V power for on-board electronics. In particular, we need to power up the RC receiver and provide +5V for motor interfacing board. For these purposes, we need to convert +12V out of UPS module down to +5V.
There is a bunch of the step-down voltage converters available on the market. What is important to decide which one to use is to consider input voltage range, output voltage and output current. Input voltage range should include our +12V. Required output voltage in our case is +5V. This is a fix output we need, so there is no need for adjustable regulator (it only increase the price). Requirements for the output power could be estimated by summing up current requirements of all modules need to be powered. Taking in account our future plans to connect Raspberry Pi, BeagleBoard or similar embedded systems, we decide that 3.5A out current should be enough. Correspondingly, we decide to use Pololu D15V35F5S3 Step-Down Voltage Regulator.

3.5A 12V to 5V step-down voltage regulator.

Dimensions and connectors labels

It is very easy to connect this module. +12V from UPS goes to VIN and ground to GND (on the right side at the second picture). By default (without jumper) the module provides regulated +5V at the VOUT and GND (on the left side at the second picture). This output voltage could be used to supply RC receiver and MD22 interfacing board with required power.

Wiring everything together

The following picture illustrates everything we need to wire together to achieve our goal - controlling the vehicle with standard RC.

Final wiring diagram

After wiring everything together for the very first time we have got what is illustrated on the pictures below

Cable salad after wiring everything together

Nevertheless it works!

This is what is typically called the cable salad :-) . Nevertheless it works! But obviously we need to deal with this cable salad. The situation will become even worth if we add sensors and on-board computer for autonomous navigation. This is where we decide to develop simple custom board which mainly provides exactly the same wiring as described above but integrate them on printed circuit board (PCB) and provides convenient connectors for all external modules.

Interfacing board to get rid of cable salad

The next article in this series will provide more details on this board and illustrate how to connect Arduino, Rasperry Pi and sensors for autonomous drive. Stay tuned! :-)

Comments

Post a Comment

Popular Posts

For the last couple of days, I wanted to concentrate on reducing time required to boot our robot. The first action I did was to find out minimum configuration for kernel. After couple of rounds of getting SD card between computer and Beagleboard XM, which is the base for our robot, I decided to check how other people are developing kernel on embedded systems. The standard approach is to boot kernel from network.

Fortunately, the hard part was already done: u-boot support for network chip is already implemented. Here I wanted to document steps, required to get it working. Most of the information is available somewhere on the Internet, here is just place to get it all together.

Unfortunately, I could not configure DHCP server to get required parameters for TFTP boot, so...

The mission: u-boot loads kernel from nfs and kernel mounts nfs root.

Assumptions

Network configuration: I will be using static IP addresses to minimize influence of "bad" DHPC server. It will be go…

Here is my first example for the Unit 1 of the CS373 free online class. Please see this post for the introduction of this example series. This example illustrates how to perform one-dimensional localization using histogram filter we have learned in Unit 1 of the class. I will be using our Veter vehicle to illustrate how to control real robotics vehicle. To illustrate the one-dimensional localization algorithm, I have made the following test environment:

The Figure 1 illustrates our vehicle and the line of A4 paper sheets which represents the "wall". Each sheet is labeled with the number (0, 2, 3, etc., from right to left) which is the position within the line. Sheets with numbers 1 and 4 are removed to simulate the "door". We assume here, that robot can make discrete movement one position left or right. So the localization problem is to determine current position of the robot, i.e. in front of which sheet the robot currently is. So it roughly corresponds to the fo…

There is the HoloLens contest organized by Unity and Microsoft. I decide to join it with my idea and quick prototype I have already made. It is about using HoloLens with color measurement devices to streamline user experience. In particular, implemented scenario could be useful for automotive sector and body shops. This post describes the idea.
ContextPainted surfaces could be characterized by many parameters such as color, gloss, fluorescence, etc. They all together define total appearance for the human eye. Ability to measure these parameters is very useful. For example, car manufacturers using it to ensure that parts from different suppliers have exact the same appearance and fit together when assembled. Also, body shops using measurement devices to order matching color mix for repairing. There are a lot of other application areas such as cosmetic, packaging industry and even in ISS space station. Most of the modern color measurement devices are handheld, equipped with WiFi and hav…