building an autonomous stiquito robot

24
Spring 2003 System Documentation Thursday, May 11, 2000 1 of 24 Building an Autonomous Stiquito Robot TABLE OF CONTENTS I. EXECUTIVE SUMMARY___________________________________________ 2 II. NEWSLETTER _________________________________________________ 3 III. PROJECT REPORT _____________________________________________ 4 A. INTRODUCTION _____________________________________________________ 4 B. BACKGROUND ______________________________________________________ 4 C. PRODUCT REQUIREMNETS __________________________________________ 6 D. DESIGN ALTERNATIVES _____________________________________________ 7 E. DESIGN SPECIFICATIONS ____________________________________________ 9 F. DESIGN DESCRIPTION ______________________________________________ 13 G. CONSTRUCTON DETAILS ___________________________________________ 16 H. COSTS _____________________________________________________________ 16 I. USER INSTRUCTIONS _______________________________________________ 18 I. APPENDICES ___________________________________________________ 19 I. Software Flowchart____________________________________________________ 19 II. Hardware Block Diagram______________________________________________ 20 III. PCB _______________________________________________________________ 21 IV. Electrical Characteristics of the MSP4301121A ___________________________ 22 V. Port Numbers and its Functionality of the MSP4301121A ___________________ 23 Works Cited _____________________________________________________________ 24

Upload: others

Post on 28-Nov-2021

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Building an Autonomous Stiquito Robot

Spring 2003 System Documentation

Thursday, May 11, 2000 1 of 24

Building an Autonomous Stiquito Robot TABLE OF CONTENTS

I. EXECUTIVE SUMMARY___________________________________________ 2

II. NEWSLETTER _________________________________________________ 3

III. PROJECT REPORT _____________________________________________ 4 A. INTRODUCTION _____________________________________________________ 4 B. BACKGROUND ______________________________________________________ 4 C. PRODUCT REQUIREMNETS __________________________________________ 6 D. DESIGN ALTERNATIVES _____________________________________________ 7 E. DESIGN SPECIFICATIONS ____________________________________________ 9 F. DESIGN DESCRIPTION ______________________________________________ 13 G. CONSTRUCTON DETAILS ___________________________________________ 16 H. COSTS _____________________________________________________________ 16 I. USER INSTRUCTIONS _______________________________________________ 18

I. APPENDICES ___________________________________________________ 19 I. Software Flowchart____________________________________________________ 19 II. Hardware Block Diagram______________________________________________ 20 III. PCB _______________________________________________________________ 21 IV. Electrical Characteristics of the MSP4301121A ___________________________ 22 V. Port Numbers and its Functionality of the MSP4301121A ___________________ 23 Works Cited_____________________________________________________________ 24

Page 2: Building an Autonomous Stiquito Robot

Spring 2003 System Documentation

Thursday, May 11, 2000 2 of 24

I. EXECUTIVE SUMMARY The objective of this project was to research and construct an autonomous small, hexapod walking robot known as “Stiquito,” using simple PCB and an inexpensive microcontroller. The Stiquito should allow the end-users to change its movement to the way s/he desires by giving them the ability to reprogram the code loaded onto the microcontroller using an external device. This project consisted of 6 major development stages. First was the research of Stiquito and nitinol. Next was selecting a microcontroller. The next big stage for this project was to create the hardware schematic and layout using Orcad and software implementation for the microcontroller. After all the hardware and software implementations were done, the prototype board was built using the breadboard to test its functionality. After the testing, the PCB was finally populated. Several different problems were encountered during the development process. Miscommunication between the project sponsor and our group, unforeseen delay in Orcad layout, poor development tool for the microcontroller and misunderstanding of the capability of the microcontroller caused the entire lab to fall behind the schedule by about two weeks. An extensive testing of the software implemented was done using the LED’s. The hexapod was replaced with LED’s to see if the microcontroller was operating as the code had intended. After the test of our software, other necessary parts were added to the breadboard to be tested as a fully functional prototype board. One feature that had been researched, but never made onto our PCB is the JTAG port which allows the end-user to load a new program onto the microcontroller. This feature is in our prototype built by using breadboard, but had to be taken out from the final PCB design to meet the project deadline. Possible follow up project should finalize the JTAG port implementation on PCB for additional expandability. Also, the power management should be explored further as the current configuration on the microcontroller drains the battery at a very fast pace. More efficient use of battery may be possible by avoid using constant current output which it currently utilizes. After fulfilling the basic operation requirements, the microcontroller still had six unused general I/O ports. Future project may utilize these ports to provide greater expandability for end-users by having extra traces on the PCB routed to the unused I/O ports. These extra traces may allow the end-users to add any additional features as long as it meets the specification of the microcontroller defined it the datasheet.

Page 3: Building an Autonomous Stiquito Robot

Spring 2003 System Documentation

Thursday, May 11, 2000 3 of 24

II. NEWSLETTER Today, there are many types of robots that are capable of carrying out various functions. Of all the different types of robots, the ones that are used in industries for manufacturing purposes are the most prevalent. These robots have taken over jobs that may be too dangerous for humans to perform while increasing the speed of manufacturing in many cases. In a manufacturing environment, walking robots have limited functions when compared to wheeled robots. However, with this new technology, the walking robots many be designed to perform more sophisticated tasks that are impossible. In this thought, many manufacturing company has researched and developed to make the robot walk. Muscle Wires, Nitinol, are thin strands of a special nickel-titanium alloy that actually shorten in length when electrically powered. They are easy to use, and they can lift thousands of times their own weight. The direct linear motion of Muscle Wires offers experimenters a source of motion that is very similar to that of a human muscle, providing possibilities not available with motors or solenoids.

This is an ideal material for making small, simple walking robots! Compared to motors or solenoids, Muscle Wires have many advantages: small size, light weight, low power, a very high strength-to-weight ratio, precise control, AC or DC activation, long life, and direct linear action. These features let you create whole categories of amazing new devices that would be difficult or impossible to do with anything else.

The Stiquito is created by attaching this element to its legs. It was first developed in early 1990’s by Dr. Jonathan Mills for his research. Now, there are various forms of the robot that are available. In this project, the microcontroller, MSP43001121, is used to control the movement of legs. It is possible to achieve a programmable robot that can be manipulated to walk using various other methods. The transistor, ULN2803, is used to driver for Nitinol legs.

Stiquito is a small, inexpensive hexapod robot. Universities, high schools, and hobbyists have used it since 1992. Stiquito is unique not only because it is so inexpensive but also because its applications are almost limitless. While other robots are challenged with finding new ways to achieve complicated movements, Stiquito is the winner in robotic field.

Page 4: Building an Autonomous Stiquito Robot

Spring 2003 System Documentation

Thursday, May 11, 2000 4 of 24

III. PROJECT REPORT

A. INTRODUCTION The primary purpose of this project was to develop a simple and inexpensive walking robot called Stiquito using simple microcontroller and a PCB. However, purpose of this project did not stop at just building the robot. The end product of this project, of course had to have a robot walking using a shape memory alloy called nitinol, but also, it had to include additional features to introduce the end-users the basic concepts of the embedded systems along with the concepts of analog electronics, digital electronics, computer control and robotics. A robot which utilizes nitinol is considered very revolutionary because of the absence of motors like in many other robots used today. Nitinol behaves very much like a human’s muscles upon the application of heat. It contracts when the heat is applied and it elongates back to its original length when the heat is removed. More detailed hardware interface and software descriptions are provided in the ‘Design Description’ section of this report. The members working on this project consisted of Su Kim, Chae Ko, Sae Kim and Yong Sim. The team decided to work on this project with a high motivation in learning embedded system and PCB layout experience. The Project was sponsored by Dr. Jim Conrad, one of the authors of the book “Stiquito for Beginners” and “Stiquito: Advanced Experiments with a Simple and Inexpensive Robot.”

B. BACKGROUND The field of robotics has come a long way from the past. Many type of robots that are capable of carrying out various functions exist today. Of all the different types of robots, the ones that are used in industries for manufacturing purposes are the most prevalent. The robots in industries have taken over jobs that may be dangerous or difficult for humans to perform. Thus, it has increased the speed of manufacturing in many cases. In addition, robots have been used in many fields such as space exploration, and medicine. Compared to the wheeled robots, walking robots have very limited functions when it comes to the industries. However, they do have their uses such as when they are used in space exploration and are required to walk on rocky areas. Until recently, many walking robots used motors as means for propulsion. Today, with the discovery of the material known as Nitinol, there robots are able to walk by the means of biological theory of opposing muscle pairs. In other words, Nitinol replaces the function of relaxing and contracting muscle pairs used for movement. Stiquito is considered a new type of robot because it uses Nitinol – a muscle-like wire which reacts to heat. The direct linear motion of Muscle Wires offers experimenters a source of motion that is very similar to that of a human muscle, providing possibilities not available with motors or any other devices. Compared to others, nitinol have many advantages: small size, light weight,

Page 5: Building an Autonomous Stiquito Robot

Spring 2003 System Documentation

Thursday, May 11, 2000 5 of 24

low power, a very high strength-to-weight ratio, precise control, AC or DC activation and long life. These features let you create whole categories of amazing new devices that would be difficult or impossible to do with anything else. (www.robotbooks.com) Nitinol forms the basis for this project, thus it is important to understand the properties of this element. It is an alloy of Nickel and Titanium and comes in a form of a very thin wire. It is used as main sources of movement for the robot; thus it is attached to the legs of the robot. It reacts to heating and cooling thus allowing for millions of cycles of contraction. Therefore, the main purpose of the material is to translate electrical energy into mechanical motion. Stiquito uses Nitinol as its basis for movement. It was first created by Dr. Jonathan Mills in early 1990’s for the purpose of testing his research on analog logic. Stiquito is actually a latter version of a robot Sticky. As a result, we have designed a small robot that is able to perform a function that may be used in other larger robots to perform more sophisticated tasks. There is a need for robots that are capable to walking rather than the ones in wheels in many applications. To address this need, we have designed a robot that is capable of walking. The robot will walk using three different methods. A manual controller will be first used to test the performance of the robot. Further, an analog controller will be built so that the robot can walk using the method known as tripod gait. As the end result, this robot will be implemented with a programmable on-board microcontroller called MSP430F1101A or MSP430F1121A.

Page 6: Building an Autonomous Stiquito Robot

Spring 2003 System Documentation

Thursday, May 11, 2000 6 of 24

C. PRODUCT REQUIREMNETS Processor

The processor shall run with a supply voltage of 2.7 to 3.9 volts. The processor shall have internal to it at least 512 bytes of ROM/OTPROM/PROM/

EEPROM/ Flash storage. The processor shall have at least 32 bytes of RAM storage. The processor shall have four outputs available for driving nitinol legs. The processor shall have at least two outputs available for driving LEDs. The processor shall have at least one input for determining one or two degree of freedom

operation. The processor shall have at least one analog input for measurement of a potentiometer

for determining gait speed. The processor shall have at least one A/D converter for this analog input.

Board

The board must attach to the Stiquito Body. The board will be FR-62 with copper plating. The board must have two holes 2.8 inches apart, centered on the width of the board,

have a diameter of 5/32 of an inch, and be plated through with 1/16 inch pads on the top side. All electronics parts on the board are to be the most cost-effective possible, with

consideration of materials and assembly. It is anticipated that surface mount are needed. The board shall have a prototype area at one end of the board. This will be plated

through-holes, 035” diameter, 0.1” spacing, the width of the board and as long as there is space.

Parts/Components

Microcontroller Tansistor driver for nitinol legs Potentiometer for adjusting gait speed 3-pin header for power attachment (could be a socket) Two LEDs for output of gaits

Page 7: Building an Autonomous Stiquito Robot

Spring 2003 System Documentation

Thursday, May 11, 2000 7 of 24

D. DESIGN ALTERNATIVES As far as the hardware was concerned, not much alternatives were available. The circuit consisted of fairly simple components which could not be taken out. To keep the board as cheap as possible, fulfilling only the minimum requirements were considered. At first, the board requirements included a power switch and 5-pin header for Stiquito Leg attachment. However, after couple discussions with our sponsor, the final decision was to eliminate the above mentioned devices from the board. A switch to determine one or two degree of freedom operation was replaced by a jumper that can be soldered onto the board by the end-user. Since the Stiquito provided by Dr. Jim Conrad only allows one degree of freedom movement, it was not necessary to include this switch at the time board is provided. The user can test the 2 degree of freedom movement later at his/her will with the Stiquito that allows the 2 degree of freedom movement by soldering the jumper onto the board. One of the biggest areas being researched and debated during the early stages of the project was microcontrollers. Couple of microcontrollers was considered for this project. Again, our goal was keeping the cost of the board as cheap as possible while maintaining all the required functionalities. The first candidate was PIC16C71X from MicroChip. This microcontroller met all the requirements for this project, but it lacked the expandability. Also, the memory available was too tight if the future expendabilities were considered. The second candidate was MSP430F1101a from Texas Instruments. This microprocessor offered much more lenient memory space and I/O ports at a price 50 cents cheaper than the PIC16C71X series, allowing more expendability for the end-users. Also, the development kits available for Texas Instrument’s microcontrollers were cheaper at $50. The only problem with this processor was that this processor did not allow the voltage input greater than 3.6V. The initial voltage input requirement was up to 3.9V. Dr. Jim Conrad wanted the 2.7V - 3.9V range with cell phone batteries in mind as an alternative battery source. After some careful consideration and discussion with our sponsor, we had agreed to drop the operating voltage range down to 3.6V and use the MSP430F1101a as the processor of our group’s project. More detailed information of this microcontroller is covered in the Design Specifications section of this report. Another feature that had to be compromised by using this microcontroller was the A/D conversion of the input received from the potentiometer to determine the walking speed of Stiquito. For the true A/D conversion, an external device, such as TLC549, an 8-bit A/D converter, was required. Our initial plan was to have four degree of speed depending on the varying input resulting from the potentiometer and A/D conversion. MSP430F1101a only had internal comparator. Purchasing additional external component defeats the purpose of choosing this cheap processor. Luckily, this chip had internal comparator that was able to detect the threshold voltage at 0.25Vcc and 0.5Vcc. We decided to use this feature instead of spending

Page 8: Building an Autonomous Stiquito Robot

Spring 2003 System Documentation

Thursday, May 11, 2000 8 of 24

money on purchasing additional component. However, this decision caused the Stiquito to have only 3 degree of speed instead of the initial 4 that we originally wanted. More details are covered in the Design Descriptions section of this report. Two methods of reprogramming were available once the chip was soldered onto the board. It can be programmed via RS-232 link with its built in boot-code. Another method was using JTAG port. We have decided to use the JTAG method because JTAG interface was quite simple to make and the device was already readily available from Olimex, which makes our debugging simpler using the breadboard built circuit. Couple of different types of batteries was considered as the voltage source. As mentioned earlier, cell phone battery was one of the choices as a voltage source, but it had to be thrown away because of the new voltage range resulted from our decision on the microcontroller. Our group decided to use 2 AAA batteries as our main voltage source for its compact sizes, weight and easy accessibility. Other type of battery being considered was lithium battery for its size and weight, but it was later scrapped due to its price and inconvenience in purchasing when compared to AAA batteries.

Page 9: Building an Autonomous Stiquito Robot

Spring 2003 System Documentation

Thursday, May 11, 2000 9 of 24

E. DESIGN SPECIFICATIONS 1. Hardware *(The specification for the hardware components attached in appendix)

a. Microcontroller MSP4301121a For this project, MSP4301121a, a high level language programmable microcontroller is used. This microcontroller is the Texas Instruments family of ultralow power microcontroller. It incorporates a 16-bit RISC CPU, peripherals, and a flexible clock system that interconnect using a von-Neumann common memory address bus (MAB) and memory data bus (MDB). Partnering a modern CPU with modular memory-mapped analog and digital peripherals, the MSP430 offers solutions for demanding mixed-signal applications. The architecture, combined with five low power modes is optimized to achieve extended battery life in portable measurement applications. The device features a powerful 16-bit RISC CPU, 16-bit registers, and constant generators that attribute to maximum code efficiency. The digitally controlled oscillator (DCO) allows wake-up from low-power modes to active mode in less than 6µs. The MSP430x11x1 series is an ultralow-power mixed signal microcontroller with a built-in 16-bit timer, versatile analog comparator and fourteen I/O pins. Typical applications include sensor systems that capture analog signals, convert them to digital values, and then process the data for display or for transmission to a host system. Stand alone RF sensor front end is another area of application. The MSP430 has following key feathers:

Ultralow-power architecture extends battery life

µA RAM retention 0.8-µA real-time clock mode 250-µA / MIPS active

High-performance analog ideal for precision measurement Comparator-gated timers for measuring resistive elements Supply voltage supervisor

16-bit RISC CPU enables applications at a fraction of the code size Large register file eliminates working file bottleneck Compact core design reduces power consumption and cost Optimized for modern high-level programming Only 27 core instructions and seven addressing modes Extensive vectored-interrupt capability

In-system programmable Flash permits flexible code changes, field upgrades and data logging

Page 10: Building an Autonomous Stiquito Robot

Spring 2003 System Documentation

Thursday, May 11, 2000 10 of 24

Memory Organization The MSP430 has one address space shared with special function registers (SFRs), peripherals, 128B RAM, and 1KB + 128B Flash/ROM memory. The flash memory can be programmed via the JTAG port, the development kit, or in-system by the CPU. The CPU can perform single-byte and single-word writes to the flash memory. Peripherals are connected to the CPU through data, address, and control busses and can be handled using all instructions. Oscillator and system clock The clock system is supported by the basic clock module that includes support for a 32768-Hz watch crystal oscillator, an internal digitally-controlled oscillator (DCO) and a high frequency crystal oscillator. The basic clock module is designed to meet the requirements of both low system cost and low-power consumption. The internal DCO provides a fast turn-on clock source and stabilizes in less than 6 µs. Digital I/O There are two 8-bit I/O ports implemented—ports P1 and P2 (only six P2 I/O signals are available on external pins):

For this project, we used P1.0 and P2.4 port as LED Outputs which shows the movement of Nitinol legs only in first degree freedom. P1.7, P1.6, P1.5, and P1.4 are used as Output for second degree freedom. P2.0 port is used as Input from user for second degree freedom. P2.3 port is Analog Input from 1k ohm potentiometer to control speed of Stiquito. Port 7 is Reset. Port2 is 3 volts Vcc. Port 4 is Vss Ground. Watchdog timer The primary function of the watchdog timer (WDT) module is to perform a controlled system restart after a software problem occurs. For this project, we disabled the watchdog timer because we used infinite dummy loops. Comparator_A

Page 11: Building an Autonomous Stiquito Robot

Spring 2003 System Documentation

Thursday, May 11, 2000 11 of 24

The primary function of the comparator_A module is to support precision analog–to–digital conversions, battery–voltage supervision, and monitoring of external analog input which is from 1k ohm Potentiometer. Power/Current The MSP430 runs on 3 Volts DC. Two 1.5 batteries were placed in series to get the desired current and voltage supply for the robot to function properly. The microcontroller consumes 350µA while it is in active mode and 70µA while it is in low-active mode. Operating Condition The MSP430 is designed to function at temperatures ranging from –40°C to +85°C, with up to 70% non-condensing humidity. The Low Supply Voltage Range 1.8 V – 3.6 V. The flash program and erase require minimum Vcc of 2.7 V. Table 3&4 summarizes the recommended operating condition for the MSP430. b. ULN2803AFW transistor (Darlington Sink Driver)

The purpose of this transistor is to magnify the current from the microcontroller. The current coming out from the microcontroller is too weak to drive the nitnol actuator wire that controls the movement of the Stiquito.

c. LED The purpose of the LED is to indicate the source output presence, and the synchronization of the movement of the Stiquito with the current output.

d. Potentiometer (POT) The purpose of the POT is to control the speed of the Stiquito movement. The input voltage is varied by changing the resistance using the potentiometer. The microcontroller then detects the change in voltage to change the speed of the Stiqiuto.

e. Reset Switch The program halts due to the complication in the state changes within the microcontroller. When the problem occurs, the reset switch must be activated or pressed to reset the system to initialize the program again.

Page 12: Building an Autonomous Stiquito Robot

Spring 2003 System Documentation

Thursday, May 11, 2000 12 of 24

f. Resistors The purpose of the resistors is to prevent the component damage and to supply the appropriate voltage source.

<Test Board Built using Breadboard> 2. Software The software requirements for the operation of Stiquito were following.

Detect an input into one of the I/O ports to decide 1 or 2 degree of freedom of

movement. 2 or 4 outputs, depending on 1 or 2 degree of freedom of movement, to

ULN2803 in a correct sequence to control the movement of nitinol. 2 outputs to toggle LED’s synchronized with the movement of nitinol A and B A/D conversion from the potentiometer to determine the speed of the Stiquito.

Page 13: Building an Autonomous Stiquito Robot

Spring 2003 System Documentation

Thursday, May 11, 2000 13 of 24

F. DESIGN DESCRIPTION 1. Hardware The hardware development for this project can basically control input and output

voltage to provide appropriate current to supply to nitinol. The input voltage provides from 2x1.5 AAA battery (total 3 volt). After microcontroller, the average output voltage of microcontroller is 2.3 volt and 2mA which is connected to ULN transistor. The transistor amplifies small current to large current to maximize power to supply to nitinol.

2. Software The software development for this project can basically be separated into four different stages. Stage 1 was studying the datasheets to understand the features provided by the microcontroller. Next was creating a state diagram and a flowchart of the software. Stage 3 was implementing the code. And finally, the last stage was debugging the software. The overall flowchart for the software is in the Appendix section of this report. The flowchart was divided into 4 different sections. Each section represents each one of the software requirement specified in the Design Specification: Software section. Also refer to the microcontroller diagram provided in the Design Specification: Hardware part or the Appendix V for the port numbers used in the software implementation. Breakdown of Each Section All the coding was done in C. Each of the tasks in the sections was carried out by a call to the functions associated with each one of them. Registers Used: P1DIR: 8-bit register to set the direction of I/O ports from pin 13 to 20.

Directions for all the ports from pin 13 to 20 were set to output by setting all the bits on P1DIR to 1’s.

P2DIR: 8-bit register to set the direction of I/O ports from pin 3 and 8 to 12. Only pin 12(P2.4) was set as an output port by setting only the 5th bit to 1 and rest of the bits to 0’s.

P1OUT: 8-bit register to initialize output state of the ports 13 to 20 All the outputs on P1 were initialized to off state

P2OUT: 8-bit register to initialize output state of the ports 3 and 8 to 12 All the outputs on P2 were initialized to off state

DCOCTL & BCSCTL1: clock registers WDTCTL: watchdog timer control register

This register was only used to turn off the watchdog timer.

a) Setting 1 or 2 Degree of Freedom Movement This is the first part of the program that had to be implemented. Port number 10(P2.2) was

Page 14: Building an Autonomous Stiquito Robot

Spring 2003 System Documentation

Thursday, May 11, 2000 14 of 24

used. By the default, all the I/O ports are configured as input ports. No change in the port direction was necessary. The function returned true only if an input was detected to this port, which meant the third bit of the 16-bit register P2IN was set to 1. If this function returned true, the program calls function for two degree of freedom, else one degree of freedom movement. b) Controlling Nitinol Legs of Stiquito Both functions for 1 degree and 2 degree movement are infinite loops which can only be stopped if voltage source is removed or a reset button is pressed. To avoid any interruption during this routine, the watchdog timer for this microcontroller was turned off. 1 Degree of Freedom: The outputs to control nitinol legs were passed through the ports in pins 17 to 20(P1.4 – P1.7). However, for 1 degree of movement, only ports 19(P1.6) for leg B and 20(P1.7) for leg A were used. When this function is called, the microcontroller was setup to turn on port 20. It then checks for the delay speed(getting the delay speed will be covered in the later section). After the proper delay, port 20 is turned off and port 19 is turned on. The microcontroller checks for the delay again and turns off the port 19 after the newly detected delay. This infinite loop function repeats the power on and off between ports 19 and 20. 2 Degree of Freedom: This movement required the ports 17(leg D), 18(leg C), 19(leg B) and 20(leg A) to drive 4 legs. Below is a chart prepared to give better explanation of how 2 degree movement works. Each of the blocks from top to bottom denotes a time delay set by the input from potentiometer. The empty blocks mean the port driving the appropriate legs are turned off during those time frames. This loop starts by turning on the leg D and goes downward in the diagram and repeats itself from the top again.c) Toggle LED Pin 12(P2.4) and 13(P1.0) were used to toggle LED’s. Actually, turning on and off the LED’s were implemented in the function where the nitinol legs were controlled. For both 1 and 2 degree movement, pin 13 was tied with pin 20(leg A) and pin 12 was tied with pin 19(leg B). The software was implemented so that the LED’s would

be turned on only if its associated legs were activated.

Page 15: Building an Autonomous Stiquito Robot

Spring 2003 System Documentation

Thursday, May 11, 2000 15 of 24

d) A/D Conversion for Speed of Stiquito The biggest problem in our software implementation came from this section. To do an A/D conversion, MSP430F1101a required an external A/D converter such as TLC549 to do an A/D conversion from a potentiometer. However, using this part would defeat the purpose of creating a cheapest board possible. Luckily, this microcontroller contained an internal comparator that could be used to detect the threshold voltage. Our initial design had 4 separate levels of speed. However, this had to be compromised due to the limitations encountered from the microcontroller. The preset threshold voltage levels implemented in the hardware were 0.5*Vcc and 0.25*Vcc. After some discussion among the members and our sponsor, it was decided to keep only 3 separate levels of speed instead of the planned 4. Also, these speeds will not be a result from an A/D conversion of an input value from the potentiometer. Instead, these are results from the compared voltage between the potentiometer and the threshold voltages. Pin 11(P1.0) was used as an input port to accept voltage from the potentiometer. The register CACTL1 was used to select the threshold voltage level and turn the comparator on. Register CACTL2 was used to link the comparator to port 11. If the voltage-in through the pin 11 was greater than 0.5*Vcc, it would return minimum delay. If the input voltage was greater than 0.25*Vcc, but less than 0.5*Vcc, the delay would be set to medium. Any voltage input less than 0.25*Vcc would result in a maximum delay. Increasing the Output Power After debugging and verification of all the functionality of the microcontroller, we felt that the default setting of the microcontroller output too small current through each of the port to heat up the nitinol effectively. From the datasheet, it was discovered that more current could be outputted through the same port if the faster clock frequencies were selected(refer to Appendix IV for the details). The registers DCOCTL & BCSCTL1 were used to increase the clock frequencies to approximately 8000 KHz. This definitely increased the current output of each of the ports, but it also drained the batteries at an extremely fast pace.

Page 16: Building an Autonomous Stiquito Robot

Spring 2003 System Documentation

Thursday, May 11, 2000 16 of 24

G. CONSTRUCTON DETAILS The project was largely separated into two parts, the software and hardware design. The physical aspect of the hardware deign was almost entirely accomplished using the OrCAD PCB design software. The software design used the development tool that was provided by the manufacturer to load the designed C programming to implement the functionality of the design into the microcontroller. Hardware Construction

The schematic of the PCB design was designed after the functionality of the stiquito movement has been finalized. The schematic has then been drawn using the program called, OrCAD Capture. After verifying the board schematic for no errors, it was automatically converted and transported to OrCAD Layout. The editing of actual routing and component placement was accomplished using OrCAD Layout. Once the design was finished and the automatic error detection has been run, the design was sent to a company called, AP Circuits, to be printed. The selected components along with the microcontroller were attached to the PCB by a technician at Sony Ericsson whom was introduced by our sponsor.

H. COSTS The prototype system will consist of the following parts from the following sources: RadioShack: 2” AAA Battery Holder 2 $2.12 35’ Wire 1 $4.06 15-Watt Soldering Iron Tip 1 $1.06 5MM YW LED-720MCD 2 $1.59 Total $8.83 Quadravox Inc: MSP430-H1121 JTAG 1 $14 Msp430 JTAG Interface 1 $10 S &H $10 Total $44 Digi-key Corp: Resistor 62 ohm 10 $1.44 Resistor 51 ohm 10 $1.44 ULN2804 3 $2.52 Switch 2 $2.06

Page 17: Building an Autonomous Stiquito Robot

Spring 2003 System Documentation

Thursday, May 11, 2000 17 of 24

LED 6 $3.60 Header 2 $1.26 Potentiometer 1k ohm 2 $0.40 Connector 2 $0.92 S & H $24.37 Total $38.01 Alberta Printed Circuits Ltd.: (First Order) P1 Setup 1 $46 2 boards of 3”x1.5” 2 $2.925 P1 Extra Drill 2 $9 S & H 1 $20 Total $89.85 Alberta Printed Circuits Ltd.: (Second Order) P1 Setup 1 $46 Special Laminate 1 $120.66 P1 Extra Drill 2 $9 S & H 1 $20 Total $204.66 OfficeMax: Project Presentation Board 1 $11.76 Poster Board 4 $2.31 Glue 1 $2.13 Total $16.2 BestBuy: AAA 16-Pack Battery 1 $10.69 Total $10.69 K-Mart: Retract Knife 1 $2.66 Total 1 $2.66 Project Total Cost $414.90

Page 18: Building an Autonomous Stiquito Robot

Spring 2003 System Documentation

Thursday, May 11, 2000 18 of 24

I. USER INSTRUCTIONS Using the PCB created for the Stiquito is quite self-explanatory. Most of the operational components that need users’ interaction had already been explained in the design description and specification part. To supply the voltage, simply plug in the 2 AAA batteries in the battery holder and plug the connector to the socket mounted on one of the corners of the PCB. To vary the speed of the gait, adjust the input voltage by turning the potentiometer. As stated earlier, pre-loaded software will be able to select 3 different speeds. Press the reset key if the software shows irregular operation or hangs. The software loaded on the microcontroller is already equipped with the 2 degree of freedom movement routine. However, to access it, a jumper would need to be soldered on to the board at the location labeled J4 on the layout(refer to the layout of the PCB on Appendix page).

Page 19: Building an Autonomous Stiquito Robot

Spring 2003 System Documentation

Thursday, May 11, 2000 19 of 24

IV. APPENDICES

I. Software Flowchart

Power On

Is P2.0 on?A No BYes

A

1 Degree of FreedomMovement

ToggleNitinol A +

its LED

ToggleNitinol B +

its LED

P

P

P

Set Speed ofStiquito

Take the inputvoltage from pot

Pot Voltage >0.5 Vcc?

Return tomain loop

Pot Voltage >0.25 Vcc?

No

Set SlowestSpeed

Yes

Set MediumSpeed

Yes

Return tomain loop

Set FastestSpeed

No

Return tomain loop

B

Turn onNitinol D

ToggleNitino A +

its LED

P

P

Two Degree ofFreedom Movement

P

ToggleNitinol D

P

ToggleNitinol C

ToggleNitinol A +

its LED

P

P

ToggleNitinol B +

its LED

P

ToggleNitinol C

P

P

ToggleNitinol D

ToggleNitinol B +

its LED

Page 20: Building an Autonomous Stiquito Robot

Spring 2003 System Documentation

Thursday, May 11, 2000 20 of 24

II. Hardware Block Diagram

InputSource

MSP430F1121AMicrocontrollerPotentiometer Speed

LED

ULN2803Transistor

NitinolActuator

Page 21: Building an Autonomous Stiquito Robot

Spring 2003 System Documentation

Thursday, May 11, 2000 21 of 24

III. PCB a. Orcad Layout b. Actual PCB

Page 22: Building an Autonomous Stiquito Robot

Spring 2003 System Documentation

Thursday, May 11, 2000 22 of 24

IV. Electrical Characteristics of the MSP4301121A a. Supplied current Under Varying Vcc and Clock Frequency

<Table 1>

b. Voltage VS. Current at Varying Frequencies

Page 23: Building an Autonomous Stiquito Robot

Spring 2003 System Documentation

Thursday, May 11, 2000 23 of 24

V. Port Numbers and its Functionality of the MSP4301121A a. Description of Each of the Pins on MSP4301121A

Page 24: Building an Autonomous Stiquito Robot

Spring 2003 System Documentation

Thursday, May 11, 2000 24 of 24

b. Pin Numbers for Each of the Ports on MSP4301121A

Works Cited Conrad, J. M., and J. W. Mills. 1997. Stiquito for Beginners: An Introduction to Robotics. Los Alamitos, Calif: IEEE Computer Society Press. Conrad, J.M., and J.W. Mills.1997. Stiquito: Advanced Experiments with a Simple and Inexpensive Robot. Los Alamitos, Calif: IEEE Computer Society Press. Robotbooks Homepage: www.robotbooks.com Stiquito Official Homepage: www.stiquito.com Texas Instrument Homepage: www.ti.com All hardware components: www.digikey.com