New Mobile Robot Design


Introduction:

This time, I'm presenting a whole robot, a project that has a slightly larger scale than my normal ones. This robot (or rover) was designed as an educational tool, a project to be built by teams of High School students over a period of 2-3 weeks.  As such, the robot was designed for simplicity and durability, not low price. The robot’s design is split into several modules: Mechanical Frame, Locomotion, Sensors, and Control Hardware/Software. Before I go into detail (and it will be excruciating detail, I’m sorry in advance) here’s a basic video of what the robot looks like driving back and forth, including video of the remote control in operation.

Also, for those of you who would rather just look at schematics and code, the control card is fully documented online at http://subversion.assembla.com/svn/hobbyelectronics/trunk/XBee_Receiver

Mechanical Frame:

         Material: The frame is constructed from four 1” width 80/20 extruded aluminum rails. For those who don’t know, the 80/20 T-slot system is called “the industrial erector set,” and the description is fitting. The rails can be cut to size relatively easily with hand tools (though we use power tools,) and can be bolted together using aluminum plates, “T-nuts” and screws, instead of welding. This means that the system is easily reconfigurable on the fly, and small mistakes can be quickly remedied by loosening the plates and shifting the rail, instead of by removing welds.  

         Design: The main frame is a simple rectangle constructed from four lengths of 80/20 rail, bolted together at the corners with four triangular plates.  Attached to this main frame are several other lengths of rail. One houses the bumper; another houses the ball transport and vulnerability switch. (All of which will be discussed later) Three vertical stalks are also integrated into the design to hold other sensors. As a side bonus, these stalks are mounted firmly enough that the robot can technically be flipped upside down and rest on them, for easier service.  This photo shows the frame roughly halfway through assembly, when the bumper, Vulnerability Switch, and stalks have all been attached, but the power unit has not.

Newrover

 

Locomotion:

         Mechanical Drive System: The robot incorporates two pneumatic wheels with integrated sprockets. The two wheels can rotate independently of each other, enabling steering, and are attached to a single axle, which is a 1/2-inch outside diameter tube. This axle is attached to the underside of the frame using pillow blocks.  Two 8-amp stepper motors drive the 2 wheels through a chain system. Sprockets attach to the motors’ drive shafts, and connect to the wheel-mounted sprockets through lengths of chain.  

         Motor Control System: A pair of Anaheim Automation MBC10101 Stepper Motor Drivers control the stepper motors. These drivers are powered by 24V provided by the robot’s power unit, and have control inputs driven by the main control card. The main controls are: clock input, to determine the speed of the motors; Inhibit, to remove power from the motors and stop the robot; and Direction, to control the direction of rotation. These inputs are controlled by the main board, which will be discussed later. These drivers, while expensive, are from my experience highly reliable and are hard to burn, an excellent feature when wired by inexperienced builders who can easily miss a ground or clock signal.

         Electrical Supply (power unit): The robot’s power is provided by a custom supply based around two 12V, 2200mAh, Lead-Acid rechargeable batteries. When in Charge mode, the power supply wires these two batteries in parallel, each with their own 10 ohm ceramic power resistor, to the main power jack. While in this mode, ~14V can be supplied from an external regulated supply to charge the batteries. When in Drive mode, the power supply switches the two batteries into series, providing 24V output to the main power jack, which runs to the stepper motor drivers. The power supply also taps one of the batteries to supply 12V to a 7805 5V voltage regulator, which powers the control circuitry. Due to the power dissipation through this 7805, it is screwed to a “heat sink” (bottle cap).

Powerunit_photo

Sensors:

         The robot integrates several sensors to react to its surroundings. These include front-mounted bumper switches and phototransistors, and a rear-mounted vulnerability switch.

         Bumper: A flexible bumper is attached to the front of the robot, along with 2 momentary lever switches. This enables the robot to detect when it has run into an object, usually the wall. The robot’s response to this information can be determined in software by the students.

         Vulnerability Switch: A 3 position (SPTT) toggle switch is mounted to the rear of the robot, and acts as a manual shutdown switch and “weak spot.” When the switch is positioned in the center (not connected), the robot operates normally. However, when the switch is actuated to either side, the robot instantly shuts down, turning off the motors and rendering the robot inoperable. This feature is implemented in software, but tampering with that section of code is forbidden. This switch is primarily used as a safety feature, but is also exploited for the high school competition, as bonus points are awarded to teams who can activate their opponents’ switches.

         Phototransistors: While these are not currently attached, the phototransistors can be used to detect light levels, allowing the robots to navigate based on guidance from a flashlight, as well as to seek out the beacons above the competition’s “goals.”


Control:

         At last, the more recognizable part. The robot’s control system is remarkably simple, consisting of an Arduino-based card and an associated XBee remote control.

         Control Card Hardware:

 Motor Control: The Arduino's output pins are buffered through 74LS14 hex inverters and then sent to the stepper motor drivers. The outputs are pulled up through resistors to 5V to ensure that the drivers are properly driven, as we had previously encountered problems where the Arduino’s output pins couldn’t sufficiently drive the motor drivers’ input pins, causing all kinds of weird and alarming noises to come from the motors.

Sensors: The sensor inputs are buffered as well to form an extremely simple debouncing circuit. The Phototransistors also run through 1.5K resistors to ground, forming common collector amplifiers whose outputs run into the Analog In pins on the Arduino.

XBee: The control card utilizes an XBee wireless transceiver to enable bidirectional serial communication between the robot and the remote control. An Adafruit XBee Adapter kit is used to house the XBee and convert the Arduino’s 5V logic to the XBee’s 3.3V logic.  

         Control Card Software:

Motor Control: The top of the Card’s priority list is controlling the motor drivers. Each of these drivers takes 3 inputs (clock, inhibit, and direction) as discussed previously. The 2 clock lines are driven by independent square waves generated by the Arduino Tone library. These square waves typically have frequencies between 2KHz and 5KHz.  Because the stepper motors have 200 steps/rotation, these speeds translate to motor speeds between 10 and 25 motor revolutions per second. However, due to the gearing present through the sprockets, the robot’s wheels rotate at a lesser rate. (Embarrassingly, I haven’t actually counted sprocket teeth or done the rest of this math yet. I’ll get back to you.) Inhibit and Direction, the other 2 data lines (per driver) are comparatively simple. When the driver sees a logic low on the inhibit pin, the motor is turned on, and when the driver sees a logic high, the motors are turned off. Similarly, for direction, logic low results in forward rotation, logic high results in backwards rotation.

Vulnerability Switch: The vulnerability switch input is monitored using an interrupt, whose interrupt service routine disables both motors, then waits for the vulnerability switch to be returned to center before exiting. In this way, the motors are disabled upon the switch being flicked, and will not re-enable, no matter what the user says, until the switch is returned to center.

XBee Remote Control: To communicate through the XBee, a simple serial protocol is used, along with a pre-determined command set. Incoming serial bytes are read and interpreted by the program, with, for example, “W” signifying forward movement, “S” signifying backward movement, and “F” signifying stop. For more information about this process, look at the previous article, about the Remote Control designed to interface with this system.

Control Card Schematic:

Click here to download:
arduino_card.pdf (71 KB)
(download)

When all of this comes together, the result is a robot that can drive forwards and backwards under remote control, be manually disabled by a vulnerability switch, and detect when it has hit a wall and respond accordingly, by turning away. These features are demonstrated in this video:

And for now, that’s it for me. I will probably be updating and further proofreading this as time goes on, but for now, here goes. The source files and schematics for this project (the control card, at least) are available online at http://subversion.assembla.com/svn/hobbyelectronics/trunk/XBee_Receiver/ More information about the robots and power unit (although slightly outdated) is available at www.engin.brown.edu/courses/EN900-3B

 

--Harry

 

Rover XBee Remote

Time for another Arduino-based project! This time, it's a custom remote control built around the atmega328P chip and the XBee wireless transceiver. This board was designed to work with the custom receiver board I built, but will communicate with anything else that has an XBee on it.

Remotetable

The remote is based on the Atmega328P, and compatible with the Arduino IDE. It features a numeric 7-segment display, driven by a 74HC595 Shift Register, for display; up to 7 buttons (plus a reset button) provide inputs. A 6-pin header is included to connect with an FTDI USB-Serial cable. A 74AHC125 buffer is used to convert between the 5V used by the Atmega and the 3.3V used by the XBee. However, the '125 has another feature that solves a commonly encountered problem with interfacing an Arduino compatible device to an XBee: The need to disconnect the XBee for the Arduino-compatible device to program. Normally, this problem is solved using manual, physical jumpers that disconnect the serial RX and TX lines. However, using the Output Enable pins on the '125, the lines between the XBee and the Atmega can be tri-stated (switched to High Impedance mode.) The Atmega controls this feature through a pin connected to the '125 Output Enable pins. This line is normally pulled up to 5V through a 10K resistor. This means that when the Atmega is reset and in programming mode (where its outputs are automatically tri-stated), the '125 Output Enable pin is pulled high, and the lines connecting the Atmega and the XBee are essentially cut. When the Arduino sketch starts running, it can set the Output Enable pin low, enabling the XBee communication lines. This provides a quick, easy, and automatic way to switch between programming and transmitting mode.

Power is supplied by the user through a 2-pin terminal block. In the photo above, this power is provided by a commercially available 9.7V RC car battery.  Actual power consumption is yet to be measured, but when running off 9.7V, the 7805 used to provide 5V can heat up over prolonged use. This problem should be fixed by later revisions. (Proper heat sinking TBD) Also, I added a 6-pin AVR-ISP to the latest versions, as the Atmegas must currently be programmed separately of the board. (A bit frustrating).

(download)

A bag of parts, about to be assembled into another remote.

Xbeeslave

Target Receiver Board (More on this later.)

Rover XBee Remote (should be) Open Source Hardware. The schematic and board files are licensed under CC BY/SA, and the Arduino code files are licensed under the lesser GPL. Arduino Source Code, schematic, and board files are available here. Default code includes a program that prints the current state of the buttons to the XBee and a program that uses a switch statement to select what to send based on the buttons being pressed. The second (code.pde), is used in conjunction with the Receiver, also in the subversion repository. (more documentation on that coming soon.)

 

 

MobileProg SD, A portable Arduino™ Programmer

An older project, from last year!

           The MobileProg SD is an easy to use, portable, and handheld programmer for Arduino™ compatible boards. It is pin-compatible with the standard FTDI six-pin connector, so any devices compatible with it can plug directly in. (LilyPad, Bare Bomes Board, etc.) It does does not, however supply power to the target, since it is assumed that it is being used in an embedded system.

            As a part of my internship, I designed and built an Arduino™ based mobile rover control unit, communicating with a remote control over a XBee connection, and having inputs from Phototransistors, lever switches, and other potential sensors. Photos of this setup are shown below.

Xbeeslave

Wholerover

 Since this rover was used as a demo for a class, I wanted to be able to switch between different programs rapidly, for example in one demo showing off the phototransistors, in another example expressly showing off the bumper switches, and in yet another showing off the ability to control the rover’s two speeds independently. What I found myself having to do to accomplish this, however, was either lug a laptop around everywhere, or else continually run the control card into the lab to reprogram it.

            I have attempted to resolve this issue by designing a mobile programmer for Arduino compatible boards, utilizing the serial bootloader present on these boards. Its primary components are an SD card, for storing the Intel HEX files generated by the Arduino® compiler, a serial connection and reset line to the target Arduino for communication, and a user interface consisting of a small LCD and pair of switches, all on a small handheld device. However, I haven't found a good, cheap PCB fabrication house until recently, so the only version I have is a prototype model on a breadboard, using an external serial LCD instead of an integrated one. However, the main part (programming code to an arduino through this board) works. Hopefully at some point I'll get around to having a PCB fabbed and populated. Also, I'll get around to recording a video.. at some point... 

Mobileprogsd

            The user formats an SD card and loads the necessary hex files produced by the Arduino IDE compiler onto its root directory, then plugs the SD card into the MobileProg SD.  When the programmer first resets, it initializes the SD card, and displays the first hex file in the directory. The user can use the “next” key to scroll through the available hex files, and the “select” key to select the desired program. At this point, the programmer attempts to open a communication line with the target’s bootloader, using a variety of different baud rates (to ensure compatibility with the various bootloaders being used.) Assuming the connection is successful, the programmer reads the signature bytes of the board to determine the target chip being used, then begins parsing the hex file and transferring the program to the target using the built-in bootloader commands, while displaying a progress bar on the LCD screen. When transferring is complete, the programmer disconnects from the target, leaving it to run the program independently.

Load programs onto your Arduino board on the go!

All software and code is released under the GPL Lesser Public License, all hardware and board designs released under CC BY/SA. http://subversion.assembla.com/svn/hobbyelectronics/trunk/MobileProg_SD

 

 

MicroGPIO: A General Purpose In/Out Expander for Microtouch. Also, first post!

Hello!

In advance, this is the first online project I've posted, so constructive criticism is welcome! I recently got a Microtouch device from Adafruit Industries (www.adafruit.com). This is a wonderful product, co-produced by Adafruit and Rossum (http://rossum.posterous.com). However, the first thing that I noticed was the lack of general in/out ports to interface to LEDs, transistors, and other external devices. This also seems to have been apparent to several other members of the Ask An Engineer weekly video. I devised a method to solve this problem by utilizing the MicroSD card slot and SPI software libraries present on the Microtouch.

(download)

As can be seen in the video, the board plugged into the microSD card slot pipes the 3.3 Volt power and SPI lines to an external chip, the attiny2313, which interprets SPI commands into general in/out pins. At this point, the Microtouch application has 6 software buttons that turn on and off 6 individual LEDs, but this could be expanded to 4 more pins, input and output. The MicroGPIO could also, in theory, provide an accessible UART for communication to serial driven devices. However, as a first revision, these features have yet to be implemented.

This project is (I hope!) open source! The Attiny2313 firmware files are licensed under GPL 3.0, and the Schematic files are licensed under CC BY/SA. All files are available here: https://subversion.assembla.com/svn/hobbyelectronics/trunk/microtouch/

Creative Commons License
MicroGPIO by Harry Johnson is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.