Download Controller Schematic Design

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Amplifier wikipedia , lookup

CMOS wikipedia , lookup

Microcontroller wikipedia , lookup

Integrating ADC wikipedia , lookup

TRIAC wikipedia , lookup

Josephson voltage standard wikipedia , lookup

Multimeter wikipedia , lookup

Analog-to-digital converter wikipedia , lookup

Ohm's law wikipedia , lookup

Gender of connectors and fasteners wikipedia , lookup

PC/104 wikipedia , lookup

Operational amplifier wikipedia , lookup

Electrical connector wikipedia , lookup

Power electronics wikipedia , lookup

Valve audio amplifier technical specification wikipedia , lookup

Two-port network wikipedia , lookup

Current source wikipedia , lookup

D-subminiature wikipedia , lookup

XLR connector wikipedia , lookup

Schmitt trigger wikipedia , lookup

Current mirror wikipedia , lookup

Valve RF amplifier wikipedia , lookup

Resistive opto-isolator wikipedia , lookup

Power MOSFET wikipedia , lookup

Switched-mode power supply wikipedia , lookup

Voltage regulator wikipedia , lookup

Rectiverter wikipedia , lookup

Surge protector wikipedia , lookup

Opto-isolator wikipedia , lookup

Printed circuit board wikipedia , lookup

Surface-mount technology wikipedia , lookup

Immunity-aware programming wikipedia , lookup

Charlieplexing wikipedia , lookup

Transcript
Controller for a Robotic Hand
Prof. Mihai AGAPE
Palatul Copiilor Drobeta Turnu Severin - Filiala Orşova
This work is part of the project “Remote Controlled Arm Project”, no. LLP-LdV/PAR/2010/RO/023. The
project was financed by the European Commission in the Long Life Learning Program, action Leonardo da
Vinci Partnership. This publication reflects the views only of the author, and the Commission cannot be
held responsible for any use which may be made of the information contained therein.
Resume: The purpose of this paper is to present a controller designed to control the fingers of a robotic
hand via some servomechanisms.
Figure 1 – Robotic hand with 6 servomechanisms which act 4 fingers and 1 thumb (3D design and prototype)
This paper is a revised version of the article „Controler pentru comanda degetelor unui braţ robotic”,
published in the magazine Conexiuni 6 (I.S.S.N. 1584 – 8645), pg. 51 – 62. The magazine can be downloaded
from http://www.didactic.ro/magazines/download/id/2428.
Controller Specifications
The controller has to control the 6 servomechanisms (2 servos for the thumb and one servo for each finger)
which actuate the fingers (Figure 1). The controller receives commands from a computer and information
about the pressure exerted by fingers.
The description above can be converted in the next requirements for the controller:
-
6 PWM outputs which have to transmit the signals for the servomechanisms (i.e. signals with
period T = 20 ms and variable pulse width between 1 and 2 ms);
-
6 analog inputs which have to receive the information about the pressure exerted by the fingers;
-
2 I/O for serial communication interface (RXD and TXD);
Pagina 1 din 11
-
2 I/O for communication via I2C / TWI interface (SCL and SDA).
Solutions for Implementing the Specifications
Communication Interfaces
In order to establish the communication via serial interface and I2C we use the dedicated pins of the
microcontroller.
PWM Outputs
For the 6 PWM outputs we can use the dedicated PWM outputs of the microcontroller or we can use
ordinary digital outputs and generate the PWM signals by software. For the first case the resolution of
generated PWM signals is poor (the duty factor of the PWM signal varies between 5% and 10 %). A better
precision of the PWM signal can be obtained by software generation. I chose the second solution.
Analog Inputs
We could use pressure sensors for measuring the pressure exerted by finger, but this would increase the
complexity of the robotic hand. A better solution is to consider that the force exerted by fingers is
proportional with the torque of the servo, which in turn is proportional with the current passing through
the motor of the servo. We can use a resistor connected serially with the motor. The voltage across the
resistor is proportional with the electrical current of the motor; therefore the voltage is proportional with
the force exerted by the finger. Because the range of the voltage across resistor is very little, we will use a
circuit for amplifying the signal to the right level. We will use 6 analog inputs, one for each
servomechanism.
Choosing the Microcontroller
I chose an ATmega8 microcontroller which corresponds to the application as pins number and probably as
needed memory.
Controller Schematic Design
In original article I presented the design of the controller schematic step by step. In this version I gave up
this approach; I just present the final result. The link http://www.didactic.ro/magazines/download/id/2428
is for those interested in a step by step approach.
I used the software „Target 3001!” for the schematic and PCB design.
I modified the first version of the schematic when I designed the PCB for facilitate the traces routing. The
important modifications were the interchange of the operational amplifiers and changes of the connections
between amplifiers outputs and analog inputs of the microcontroller.
Final version of the schematic is presented in Figure 2.
The way I designed the electronic diagram is explained further.
Pagina 2 din 11
Figure 2 – Controller’s Schematic
Pagina 3 din 11
Microcontroller’s pins allocation
Pins for General Use (15)
A part of the microcontroller’s pins are used in a similar manner regardless the application specificity. In
this category I include the next 15 pins:
3, 5, 21 GND
15
PB3 (MOSI)
Programming connector - pin 4
4, 6
VCC
16
PB4 (MISO)
Programming connector - pin 1
18
AVCC
17
PB5 (SCK)
Programming connector - pin 3
20
AREF
29
PC6 (RESET/)
Programming connector - pin 5
7, 8
PB6, PB7
XTAL
27, 28 PC4, PC5
TWI Interface
VCC and GND (Digital Supply Voltage and Ground)
Digital Supply Voltage has to be connected between VCC and GND pins.
I connected pins 3, 5 and 21 to ground (GND).
I connected pins 4 and 6 to VCC.
The capacitor C1, which filters the digital supply voltage, is connected between VCC and GND.
AVCC (Analog Supply Voltage) and AREF (Analog Reference)
The analog supply voltage AVCC is connected to VCC through a low pass LC filter L1, C2.
The capacitor C3, which filters the reference voltage for A/D converter (CA/D), is connected to the analog
reference pin AREF.
XTAL (XTAL=PB6 and XTAL2=PB7) and RESET/ (=RC6)
For generating clock we are using a 16 MHz quartz crystal (Q1) connected between PB6 and PB7 pins. These
2 pins are decoupled by 2 capacitors (C4 and C5).
Reset pin (RC6) is connected to VCC by resistor R1 and to GND by a pushbutton (S1) which resets the
microcontroller when is pushed. By connecting a capacitor to the ground (C6) we obtain the reset when the
power supply is connected. The reset pin is connected also to the programming port.
SPI and TWI interface
TWI has 2 signal lines SCL (PC5) and SDA (PC4). A pull-up resistor is connected at each line.
The SPI (Serial Peripheral Interface) is used for microcontroller’s programming. AVRISP programmer (ISP –
In circuit Serial Programmer) is connected to a 6 pin connector.
The programming connector has next pin configuration:
1 - MISO (PB4)
2 - VCC
3 - SCK (PB5)
4 - MOSI (PB3)
Pagina 4 din 11
5 - RESET/ (RC6)
6 – GND
Pins for Specific Use (17)
17 pins are available for specific application requirements.
Servos Control (6)
We used digital output pins PD2…PD7 to control the servos.
The servos are connected at K2…K7 connectors. Each connector has 3 pins with next signals: GND (by
resistors R4…R9); V+; PWM Signal.
The servos are not connected directly to the ground, but through the R4…R9 resistor which have a very
little resistance (0.2 Ω). The current through the resistors is the same as the one passing through the
corresponding servo. If we measure the voltage across the resistors we have information about the
electrical current and therefore about the torque of the servo.
Servos supply voltage is V+ and is different from VCC, digital supply voltage.
Measuring Current trough Servos (6)
The voltages across resistors R4…R9 are small (maximum 0.2V) therefore I used amplifiers to increase
them.
We use 3 LM358, dual operational amplifiers ICs, to realize 6 non-inverting amplifiers. The voltage across
the resistor for current sensing is amplified in such a way the voltage range at the amplifier’s output is 02.5V.
The outputs of the six amplifiers are connected to the inputs ADC0…ADC3, ADC6 and ADC7 of
microcontroller. We didn’t use ADC4 and ADC5 because are used for TWI interface.
USART Connector (2)
The pins TXD (PD1) and RXD (PD0) of the serial port are available at K9 connector.
Unused Pins (3)
A total of 3 pins (PB0, PB1 and PB2) are unused and they are available at K10 connector.
Voltage Regulator
The board has a 5V voltage regulator (IC5). The diode D1 protects the circuit if the battery is connected
with wrong polarity. We could use a p channel MOSFET transistor, which assure a smaller voltage drop, but
this is not necessary as long as battery voltage (across K11 connector) is big enough (7,2V).
The D2 LED, connected to the voltage regulator output shows the presence of the supply voltage on board.
We use the C7, C14 and C15 capacitors, connected between VCC and GND, to filter out the supply voltage
near operational amplifiers.
Pagina 5 din 11
Bill of Materials
The list of components to build the controller is found in Table 1.
Pos
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Quantity
3
2
4
6
1
1
1
1
1
3
1
1
7
7
1
1
1
1
7
2
6
6
1
1
Name
C1,C2,C3
C4,C5
C6,C7,C14,C15
C8,C9,C10,C11,C12,C13
C16
C17
D1
D2
IC1
IC2,IC3,IC4
IC5
K1
K2,K3,K4,K5,K6,K7,K10
K8,K9,K13,K14,K15,K16,K17
K11
K12
L1
Q1
R1,R10,R12,R14,R16,R18,R20
R2,R3
R4,R5,R6,R7,R8,R9
R11,R13,R15,R17,R19,R21
R22
S1
Value
C-SMD_0805_50V_5%_0,1µF
18pF
0,1µF
0,047µF
10µF
22µF
1N4001
LED-SMD1206_green
ATMEGA8(TQFP32)
LM358D
LM2940CS
K2X03
K1X03
K1X02
C1x2
C1x2
BLM21AF121SN1D
QUARZ_16,0000MHZ
10K
2K2
R5,08_DIN
100k
1K
Taster_Kurzhub
Package
0805
0805
0805
0805
1411_ELKO
2412_ELKO
D_GRID10,16
1206
TQFP32(7X7)
SO8_SOT96-1
TO263/3
2X03
1X03
1X02
1X02
ANSCHLUSSKLEMME_2
0805
HC49/U
0805
0805
1206
0805
0805
PUSHBUTTON_QUICKLIFT
Table 1 – Bill of Materials
PCB Design
The step by step approach for documenting the design of PCB was very difficult and that’s why I chose to
present just the results.
I designed the single sided PCB in 3 steps:
-
I placed the components on the board;
-
I routed the traces;
-
I exported the files for PCB making.
I chose to manually components placing and trace routing, because the results are much better than
automatically placing and routing.
Next I will show you the drawings for PBC making.
Pagina 6 din 11
PCB Layouts
PCB composite top view
The printed circuit and placement of components are shown in Figure 3. Principal elements in the drawing
are:
-
bottom layer tracks, colored in red;
-
top THD components footprints, colored in black;
-
bottom SMD components footprints, colored in white blue.
PCB dimensions are 65 mm x 55 mm.
In order to have a better clearance of the drawing, the ground plane is not presented in Figure 3.
Because I didn’t succeed to route all traces on a single layer I used some bridges placed on top face
(drowned with thick black line).
Figure 3 – PCB Composite Top View (Components Placement and Copper Traces)
Pagina 7 din 11
Bottom Layer Tracks
Bottom PCB Layout, used to make the board, is shown in Figure 1.
Figure 1 – Bottom Layer Tracks
Silk-screens
Silk-screens, for top (THD components) and bottom (SMD components) sides, are shown in Figure 2.
Figure 2 – Silk-screens for top and bottom sides
Pagina 8 din 11
3D views
3D views generate by CAD software “Target 3001!” are shown in Figure 3.
Figure 3 – 3D Views (Bottom and Top)
PCB Manufacturing
The printed circuit board was made using TTS (Toner Transfer System) method. We used blue PnP (Press
and Peel) foil for transfer because the resolution is better than for white PnP foil. In Figure 4 you can see
that the toner transfer is better for the left board than for the right board. The drawings printed on the
board were corrected by redrawing unprinted connections with a marker and removing the short-circuits
by scratching.
Figure 4 – Single Side PCB Laminate and PnP Foil after toner transfer (2 instances)
Pagina 9 din 11
In Figure 5 you can see the printed circuit board after etching. There are few over etched areas but the
functionality of the board is not affected.
Figure 5 – PCB after Etching
Components Placing and Soldering
The components were placed according to the design with some exceptions (Figure 6). For R4…R9 resistors
we used THD components because we didn’t find 0.1 Ω SMD resistors. Board design allowed modifications
(making drills) to mount the THD resistors.
One of lesson learned from this project, is to use both footprints for critical components – THD and SMD –
in the PCB design process, as the availability of components is a factor in this case.
Figure 6 – Board Assembly Populated with Components (Bottom and Top View)
We used a soldering iron to solder the SMD and THD components.
Pagina 10 din 11
Conclusions
The controller has functioned well at the preliminary tests.
For actuation of the entire robotic arm we can choose to design another controller to command the
remaining servos of the arm. Other solution is to use a single controller for all robotic arm servos. In the
second case, probably we have to drop out the facility of measuring the fingers pressure force.
This paper could be useful for people who want to understand how to use Atmel microcontrollers in
applications.
Bibliography
1. *** ATmega8(L) Rev. 2486Z–AVR–02/11. Atmel. http://www.atmel.com/Images/doc2486.pdf.
2. Agape, Mihai (august 2011). „Controler pentru comanda degetelor unui braţ robotic”. Conexiuni 6
(I.S.S.N. 1584 – 8645): 51 - 62. Conexiuni 6 magazine can be downloaded by following the link
http://www.didactic.ro/magazines/download/id/2428.
3. Agape, Mihai (decembrie 2007). „Utilizarea foliilor PnP la realizarea circuitelor imprimate”. Conexiuni
2-3 (I.S.S.N. 1584 – 8645): 36 – 42. Conexiuni 2-3 magazine can be downloaded by following the link
http://www.didactic.ro/magazines/download/id/723.
This project has been funded with support from
the European Commission.
This publication reflects the views only of the
author, and the Commission cannot be held
responsible for any use which may be made of
the information contained therein.
Translated by Scientix
(www.scientix.eu)
Pagina 11 din 11