vrijdag 26 juni 2015

Setting Up the Hardware


Making your RC Controlled Boat Programmable with Arduino

At the Rotterdam University of Applied Science we have started a small pilot project with secondary schools, concerning robotics and maritime technology. For this, we decided to see if we could make a cheap off-the-shelf RC boat programmable with an Arduino. What we wanted was to:
  1. Make the boat switch between manual control and autonomy
  2. Use the  stuff that was available on the boat, including the remote control
It only took four evenings before we had a programmable boat, that conformed to the above demands. Two evenings were spent on the hardware and two on the software, so that evened out quite nicely! We decided to share the experiment with the community, and maybe improve on the design as we move along.

The design and parts lists can be found here.

Setting Up the Hardware

We found a nice transparent boat, which allows students to see the construction from the outside. The boat was shipped with a 27 MHz Radio Controller (RC), which are often provided with toys; it can steer up and down, left and right in a binary fashion; you either stop or you go fast!
 

Figure 1: RC Boat with controller
 The propeller and the rudder are both controlled by a 9 Volt DC engine. Furthermore there were two lights (LEDs), which light up when the boat is powered up. In order to make this boat programmable, we bought:
  • An Arduino Uno microcontroller board
  • A Sparkfun motor controller (MC) for two motors (SparkFun ArduMoto DEV-09815 RoHS)
  • Five wires with connectors
  •  Four throughput connectors for the Arduino, to be assembled on the SparkFun MC. Note that you need two with six pins and two with eight pins.
  • Shrink sleeves
  • About 30 cm (a foot) of red, black, yellow and purple wire (0.25 mm2)
Furthermore we need a mini screwdriver set, a soldering iron and a paint burner (or a cigarette lighter) to shrink the sleeves.



Figure 2: Equipment and Materials
The boat and the Arduino can operate at 9 V DC, so no measures are needed to convert the power. The Sparkfun MC has some means to customise the electronic print, so we can use this for the soldering work. As a result, nothing needs to be done on the Arduino itself. The majority of the work is spent in extending the Sparkfun MC so that the motors, the LEDs and the 27 MHz RC can be connected to this. So in order to make this work we have to:
  1. Cut the wires between the receiver and the motors and LEDs
  2. Put the Arduino in between these.
The 27 MHz receiver is often a combination of a a receiver and an amplifier unit. The motors are connected between two class A transistor amplifiers, each of which can power the motor. This way you can switch between two directions.


Figure 3: Wiring the 27MC Unit to the Arduino
When you remove the motors, you end up with four wires that can be connected to the digital input port of the Arduino. In this example, we will be using ports D7-D10 for the 27MHz RC controller, and rewire the two LEDs to connect to D5 and D6. The Sparkfun MC uses D3and D11 for the control of the two motors, so these are reserved. With this, the LEDs become available for other things, and the RC controller can still be used.
As was mentioned earlier, the Sparkfun MC shield has ample space to make these connections. The figure below shows the result:


Figure 4: Wiring the 27MC Unit to the Arduino
The battery pack is connected to the 9V DC print of the SparkFun MC. The two motors are attached to the A and B outputs of the motor controllers, and the LEDs are soldered directly on the connector of Port D. Last, a six pin connector is added to connect the RC. The astute observer may have noticed the pull-down resistotrs (47kOhm) on the above photo. To my knowledge, these are not really needed.The blue and green wires connect the RC to correct entries of Port D, while the two remaining pins are connected to the 9V DC, so that this can power the RC unit.
in the next post, we will discuss the software.

Geen opmerkingen:

Een reactie posten