Valentinos ZachariouTeam T.R.A.P (group 2)October 11, 2018
Homework 5: Circuit Design and Theory of Operation
Due: Thursday, September 29, at Classtime
Team Code Name: ______T.R.A.P______Group No. ___2__
Team Member Completing This Homework: ______Valentinos Zachariou______
Report Outline:
- Introduction (brief description of design project)
- Theory of operation (circuit design narrative – describe function and operating mode of each major component, including rationale for choice of operating frequency, supply voltage, etc.)
- Documentation for circuit design
- OrCAD schematic printed on 11x17 paper
- OrCAD design rule check report
- OrCAD bill of materials report
- List of References (include links to data sheets for all major components utilized)
Evaluation:
Component/Criterion / Score / Multiplier / PointsIntroduction & Theory of Operation / 0 1 2 3 4 5 6 7 8 9 10 / X 4
Documentation for Circuit Design / 0 1 2 3 4 5 6 7 8 9 10 / X 4
List of References / 0 1 2 3 4 5 6 7 8 9 10 / X 1
Technical Writing Style / 0 1 2 3 4 5 6 7 8 9 10 / X 1
TOTAL
- INTRODUCTION
The basic idea for this project was to create a fully automated vehicle that will have the ability to pick up and store a significant number of soda/beer cans of a specific color, in an indoor environment. Many people like to have parties at their home or at relatively large ballrooms or reception areas. When the party is over they have to clean up. Picking up all the trash after a party is a tedious work. Our autonomous vehicle is designed to make that task significantly easier by providing an alternative to picking up soda cans by hand. In order for the autonomous vehicle to achieve this task, it needs to have the ability to patrol a user specified area; the party area. The autonomous vehicle also needs to be able to know its heading and how far it traveled in order to avoid drifting out of the specified area. When in the specified area, it needs to have the ability to correctly identify soda cans, from other trash that it won’t be able to collect. Once it identifies them, it needs to successfully pick them up and store them in a container that will be towed along. In addition to picking up the identified soda cans, it also needs to correctly avoid all other potential obstacles, while staying in the specified area. For safety reasons it also needs to stop if something happens to block its path of motion. For further functionality the robot must have the ability to know when its towed container is full and indicate that event to the potential users. For this reason it needs to use an onboard LCD display for displaying various important messages, such as error messages and battery low status. Finally the autonomous vehicle needs to have a keypad, so that the potential users can interface with it and provide information for its functions, such as area to be cleaned. In addition it will need to have sufficient battery life to allow it to clean a large area, without the need of recharging before the cleaning task is complete.
- THEORY OF OPERATION
- LTC1174 SwitchingDC/DC converter
The most important component of the circuitis the LTC1174-5 step-down DC/DC converter [1]. Without this component none of the other components can function properly. This component is basically a switching voltage regulator which can provide a constant output voltage of 5 V and a current of up to 600 mA. We chose this component due to its extremely high efficiency, up to 95% (without load), which allows it to consumes a mere 175 uA at no load conditions. This component is essential as most peripheral components need to be driven at 5 V from a 7.2 V NiMH power cell [2]. In order for the whole board to function properly, this particular component needs to be configured correctly. Its configuration is achieved via four external components:
- A low loss inductor coil (CTX100) [3]
- A Schottky diode (MBRS140T1) [4]
- 0.1 uF non electrolytic surface mount capacitors
- 47 uF non electrolytic surface mount capacitors
The above components are arranged as indicated on Figure 1. We are using the exact same circuit in our circuit design with the exception of the input voltage being 7.2 V instead of the 6 V shown on Figure 1. This only affects the values of the potential divider resistors, namely the 162-KΩ and the 47.5-KΩ resistors. In our schematic, the resistor values are 162KΩ and 45 KΩ respectively. The voltage regulator, connected to one of the two 7.2 V NiMH batteries [2], will be the major power supply of the entire PCB board, except for some areas where the second 7.2 V NiMH battery [2], will be required directly, as in the case of powering the motors, servos and the camera module.
Figure 1: LTC1174-5 High Efficiency Step-down DC/DC converter
- Atmel ATmega128L -8AI
The autonomous operation of the vehicle is controlled by an Atmel ATmega128L -8I, industrial grade micro-controller unit [5].At only 8 Mhz, it is capable of handling all the peripheral devices that will be connected to it, while at the same time minimizing power consumption. We chose the industrial version of the processor due to its extreme durability. It can operate at temperatures of up to 85 °C. Knowing that the processor will need to operate in close proximity to 9 different motors that will need to operate continually for hours, operating temperature becomes a critical factor. We need the processor to be able to handle any potential high temperatures that will be caused from the operation of the motors, even if those temperatures will never reach 85 °C.
The ATmega128L – 8I micro-controller [5] will operate at 5 V at a frequency of 8 Mhz. The micro-controller will interface directly and control the following ten peripheral devices:
- Two Devantech SRF04 Ultrasonic Sensors [6] (used to track obstacles in the front of the robot, as well as monitor the amount of trash in the rear basket).
- Threeindividual servo motors, (used to control the arm section of the shovel mechanism)[8].
- Twoservo motors (used to control the shovel mechanism) [7].
- L298HN dual H-Bridge module (usedto control the four 7.2-Vmotors of the base) [9].
- Parallax LCD display module(Used to provide visual feedback)[10].
- Spectra-Symbol membrane keypad module (used as a user interface) [11].
- CMUcam2 Camera module (used for identifying cans of a specific color)[12]
- Vector 2x Compass module (used by the robot to maintain a constant heading) [13]
- ATmega128 Serial Programming Interface (used to program the microcontroller from the PCB) [14].
- Devantech SRF04 Ultrasonic Sensor
Two Devantech SRF04 ultrasonic sensors will be used for two different operations. One will be used to aid in avoiding obstacles, and the other will be used as a sensor to detect when the trash container is full. We chose ultrasonic sensors for both of these operations, due to their wide range of detection, compared to standard infrared sensors. We decided to use an ultrasonic sensor for detecting a basket full condition due to its wide range of detection. The ultrasonic sensor will be able to detect a can that should trigger a basket full condition at any place on the surface of the basket. This cannot be achieved by a infrared sensors due to their narrow range. The ultrasonic sensors require fourpin connections each, in order to interface with the micro-controller. Each sensor requires an input and an output pin to be connected to one of the ports of the micro-controller as well as two pins connected to power and ground respectively. The micro-controller will be sending 1-us pulses to the sensor’s input pin, in order to trigger a sonic pulse. The ultrasonic sensor will then wait for an echo of that pulse. The moment it receives the echo it will assert its output pin high for a certain amount of time. Using the micro-controller’s timer modulewe can measure the length of time that particular micro-controller pin was held high by the incoming pulse. This time frame can be directly translated to a distance value of a potential obstacle.
- Futaba and Hitec Servo Motors
The micro-controller will interface directly to five servo motors used for controlling the shovel mechanism. The shovel mechanism is divided into two sections. The first section appears on Figure 2 and it includes the support mechanism as well as three Hitec high torque servo motors [7], needed to support the whole weight of the mechanism. The front part of the shovel mechanism, Figure 2, consists of two mounting brackets and two Futaba low torque servo motors[8], required to open and close the front aluminum shovel (not shown on Figure 2). Each servo motor has three input pins and requires one pulse width modulated signal in order to rotate properly. The pulse width modulated signal required is a 3-5V peak to peak square wave pulse. The pulse should have a varying duration between 0.9mS to 2.1mS with 1.5mS as dead center (at this point the servo can rotate equal amounts clockwise and counterclockwise). The microcontroller needs to refresh the pulse every 20 mS.
The two servo motors at the base of the shovel mechanism will be wired together so that they can operate with a single signal.For this reason, only four input/output pins will be consumed. Since the servo motors require a pulse width modulated signal as their input, they will be controlled using port B and port E of the microcontroller where the pulse width modulators are located and they will be powered by the unregulated 7.2-V NiMH battery [2].
Figure 2: Shovel Mechanism (Black Block = Servo Motor)
- L298HN Dual H-Bridge module
The L298HN [9], is a dual H-Bridge chip build on its own board. It can support motors from 6 V to 12 V and can supply a current of up to 2 A per channel. The four motors of the robot are designed to operate at 7.2 V and ata maximum current of 400 mA. 400 mA is an excessive current requirement which we don’t need and we will not use. At the robot’s desired speed, the motors drain about 140 mA. The L298HN [9], also supports features such as slow acceleration to desired speed and soft breaks, which are necessary features for a mobile robot. Breaks are necessary features because at times we need to rapidly change the direction of motion of the robot (in cases where the robot tries to correct its heading using the compass module). If we try changing the direction of motion without first stopping the motors, we could damage the motors and/or the H-bridge. Having break features as part of the H-bridge functionality is a quick insurance that this will never happen.
The interface to the L298HN [9], Figure 3, requires eight pin connections, two of which are power and ground. The remaining six pin connections include two pulse width modulated inputs, for motor duty cycle control, and four logic pins that will determine whether the motors connected on channel A or B of the H-Bridge rotate clockwise or counterclockwise. The four motors of the base are connected in parallel and in pairs so that the two left side motors can be controlled by one channel of the H-Bridge and the right side motors by the other. Port B of the microcontroller is used to control two of the pins that require the pulse width modulated signal and the rest occupy four pins from Port F.
Figure 3: L298HN Dual H-Bridge Module
- Parallax LCD Display Module
The Parallax Serial LCD [10] can interface with the microcontroller via a single pin connection, utilizing the one wire serial protocol. Only one microcontroller pin is used, together with power and ground for the serial transfer of ASCII characters. The microcontroller sends the desired ASCII character, using the one wire serial protocol from TXD0 (Port E), at the same baud rate as the LCD’s read baud rate. The LCD module displays that ASCII character on the screen and increments the cursor. There is no need to accommodate for the position of the cursor or for a space after each character; the Parallax Serial LCD [10] does that on its own.
- Spectra-Symbol membrane keypad
The spectra Symbol membrane keypad [11] utilizes the keypad scan method for key press identification. It will require eight microcontroller pins and the internal micro-controller pull up resistors will be used to implement the keypad scan matrix.
- CMUcam2 Camera module
The CMUcam2 camera module [12] comes complete on its own board. It doesn’t need the 5 V regulated power of the PCB board as it has an internal voltage regulator of its own; for this reason the CMUcam2 [12] will be using the unregulated 7.2 V input directly. The camera module communicates with the micro-controller via a TTL (Transistor to Transistor logic) serial port. This port consists of two pins, for transmitting and receiving ASCII characters, a power pin and ground. The camera is fully programmable through the use of ASCII string commands. Since a two wire serial interface will be used, the CMUcam2 camera module [12] will be connected on port D (the RXD0 and TXD0)on the terminals of the two wire logic ports of the micro-controller.
- Vector 2x Compass module
The Vector 2x Compass module [13] is an analog to digital compass module designed to transmit a bearing in degrees from a certain calibration point, in the form of a 16 bit BCD (binary coded decimal). The compass module simply measures the rotation angle relative to its front face, Figure 4. It then communicates that bearing in BCD format through the SPI module of the microcontroller. This module allows the robot to know if it’s moving in straight lines and how much to turn in order to achieve desired angle headings.
Figure 4: L298HN Dual H-Bridge Module
- Atmel ATmega128L, Serial Programming Interface
The Serial Interface acts as the only way to debug and upgrade the micro-controller software once the micro-controller is soldered on the PCB. The serial interface connects to ports PE0 and PE1 used to serially transfer data to and from the micro-controller. It also connects the SCK port of the micro-controller, in order to use the processors clock for transmitting and receiving data. The Serial Interface also connects to the reset pin of the microcontroller so that it can reset it once programming is complete.The last two pins of the serial interface are just power and ground.
- Documentation for Circuit Design
REFERENCES
[1]“LTC1174 Switching DC/DC Converter Data Sheet” [Online Document], Available HTTP:
[2]“7.2vdc Ni-MH 1600mAh battery pack Info and Specs” [Online Document], Available HTTP:
[3]“Coiltronics CTX100 Low Loss Inductor Coil Datasheet” [Online Document], Available HTTP:
[4]“MBRS140 Schottky Rectifier Datasheet” [Online Document], Available HTTP:
[5]“Atmel ATmega128L Summary” [Online Document], Available HTTP:
[6]“Devantech SRF04 Ultrasonic range finder tech Specs” [Online Document], Available HTTP:
[7]“Hitec HS-645 High Torque Servo Specs-Sheet” [Online Document], Available HTTP:
[8]“FutabaS3004Standard Servo Specs-Sheet” [Online Document], Available HTTP:
[9]“L298HN Dual H-Bridge User Guide” [Online Document], Available HTTP:
[10]“Parallax Serial LCD Display Manual” [Online Document], Available HTTP:
[11]“Spectra Symbol Custom Membrane Keypad Specs” [Online Document], Available HTTP:
[12]“CMUcam2 Vision Sensor User Guide” [Online Document], Available HTTP:
[13]“Vector 2x Electronic Compass Module Application Notes” [Online Document], Available HTTP:
1