Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
TOPIC
PAGE NO.
01
02. certificate
02
03. Decliration
03
04. Acknowledgement
04
08
06. Parts
09
10
08. Software
11
14
16
17
12. Code
19
13.LDR switch
20
21
15.Arduino ATMEGA328
22
16.Power
25
17.Memory
26
18. Communication
27
19. Programming
27
28
29
29
30
24. Transistors
31
32
(a) Function
(b) Connecting and soldering
(c) Testing and LEDs
32
32
32
26. Resistors
(a)
Function
(b)
Connecting and soldering
(c)
Resistor values-the resistor colour code
27. Small values resistor
28. Tolerance of resistor
29. Variable resistors
30. Capacitors
31. Unpolarized capacitor
32. Capacitor no. code
33. Light dependent resistor
34. Project conclusion
36. Reference
37. Appendix
33
33
33
33
34
34
34
35
35
36
36
38
38
39
40
41
5
LIST OF FIGURE
TOPIC
PAGE N0.
1.
2.
3.
4.
5.
6.
7.
8.
9.
08
10
16
17
18
20
22
23
29
30
31
31
31
32
32
33
33
35
37
Abstract
The electrical components required for low budget robotics projects are now
readily available. Because of this, robotics research is no longer limited to
institutions that can devote extensive resources for new technology. Smaller
robotics projects provide a good base for students to apply a variety of engineering
skills necessary to develop these low cost embedded systems.
The project chosen by this group was to design a robotic device capable of
maneuvering itself through a base, locating a light source placed within a floor and
extinguishing the light intensity. It competed against other robots to see which
design could locate and extinguish the light source in the shortest amount of time.
By the end of the project, the robot could reliably navigate the contest maze and
extinguish the candle. By using a combination of dead reckoning and landmark
recognition, the robot can avoid maze obstacles and enter maze rooms.
Motor
driver
motor
Light
sensor
microcontroll
er
Pump
driver
buzzer
Water
pump
4 buzzer 6V
5 water pump 9V
7 wheel
8 cursor wheel
9 chasis
10 led 5MM
11 battery 9v
12 regulated IC 7805
13 some resistors
CIRCUIT DIAGRAM
10
SOFTWARE
/*
Analog input, analog output, serial output
Reads an analog input pin, maps the result to a range from 0 to 255
and uses the result to set the pulsewidth modulation (PWM) of an output pin.
Also prints the results to the serial monitor.
The circuit:
* potentiometer connected to analog pin 0.
Center pin of the potentiometer goes to the analog pin.
side pins of the potentiometer go to +5V and ground
* LED connected from digital pin 9 to ground
*/
11
intsensorValue = 0;
intoutputValue = 0;
constint ledpin1 = 6;
constint ledpin2 = 7;
constint ledpin3 = 8;
// value output to the PWM (analog out)
void setup() {
// initialize serial communications at 9600 bps:
pinMode(ledpin1 , OUTPUT);
pinMode(ledpin2 , OUTPUT);
pinMode(ledpin3 , OUTPUT);
void loop() {
// read the analog in value:
sensorValue = analogRead(analogInPin);
// map it to the range of the analog out:
12
outputValue = map(sensorValue, 0, 1023, 0, 255);
// change the analog out value:
if(outputValue< 150 ) {
digitalWrite(ledpin1 , HIGH);
digitalWrite(ledpin2 , LOW);
digitalWrite(ledpin3 , LOW);
delay(20);
}
else if(outputValue>= 150 ) {
digitalWrite(ledpin1 , LOW);
digitalWrite(ledpin2 , HIGH);
digitalWrite(ledpin3 , HIGH);
delay(2000);
13
Light Sensors
A Light Sensor generates an output signal indicating the intensity of light by measuring the
radiant energy that exists in a very narrow range of frequencies basically called light,
and which ranges in frequency from Infra-red to Visible up to Ultraviolet light
spectrum.
The Light Sensor is a passive devices that convert this light energy whether visible or in the
infra-red parts of the spectrum into an electrical signal output. Light sensors are more commonly
known as Photoelectric Devices or Photo Sensors because the convert light energy (photons)
into electricity (electrons).
Photoelectric devices can be grouped into two main categories, those which generate electricity
when illuminated, such as Photo-voltaics or Photo-emissives etc, and those which change their
electrical properties in some way such as Photo-resistors or Photo-conductors. This leads to the
following classification of devices.
Photo-emissive Cells These are photodevices which release free electrons from a
light sensitive material such as caesium when struck by a photon of sufficient energy. The
amount of energy the photons have depends on the frequency of the light and the higher
the frequency, the more energy the photons have converting light energy into electrical
energy.
approximately 0.5V. The most common photovoltaic material is Selenium used in solar
cells.
14
such as the photodiode or phototransistor which use light to control the flow of
electrons and holes across their PN-junction. Photojunction devices are specifically
designed for detector application and light penetration with their spectral response tuned to
the wavelength of incident light.
15
Typical LDR
As its name implies, the Light Dependent Resistor (LDR) is made from a piece of exposed
semiconductor material such as cadmium sulphide that changes its electrical resistance from
several thousand Ohms in the dark to only a few hundred Ohms when light falls upon it by
creating hole-electron pairs in the material.
The net effect is an improvement in its conductivity with a decrease in resistance for an increase
in illumination. Also, photoresistive cells have a long response time requiring many seconds to
respond to a change in the light intensity.
Materials used as the semiconductor substrate include, lead sulphide (PbS), lead selenide (PbSe),
indium antimonide (InSb) which detect light in the infra-red range with the most commonly used
of all photoresistive light sensors beingCadmium Sulphide (Cds).
Cadmium sulphide is used in the manufacture of photoconductive cells because its spectral
response curve closely matches that of the human eye and can even be controlled using a simple
torch as a light source. Typically then, it has a peak sensitivity wavelength (p) of about 560nm
to 600nm in the visible spectral range.
16
The most commonly used photoresistive light sensor is the ORP12 Cadmium Sulphide
photoconductive cell. This light dependent resistor has a spectral response of about 610nm in the
yellow to orange region of light. The resistance of the cell when unilluminated (dark resistance)
is very high at about 10Ms which falls to about 100s when fully illuminated (lit resistance).
To increase the dark resistance and therefore reduce the dark current, the resistive path forms a
zigzag pattern across the ceramic substrate. The CdS photocell is a very low cost device often
used in auto dimming, darkness or twilight detection for turning the street lights ON and
OFF, and for photographic exposure meter type applications.
Connect one pin of LDR to 5v and another pin to A0 input.This is a Light sensor using LDR and
Arduino, you can make it either Shadow detector or light detector by simply changing the code
given below.
Connect one pin of 10k resistor to GND and another pin to A0 input
The code below makes the arduino as a Shadow detector, to make it light detector you change the
Condition statements, If Else part change different things and get different outputs.. Enjoy
18
CODE:
int LDR = 0;
//analog pin to which LDR is connected, here we set it to 0 so it
means A0
intLDRValue = 0;
//thats a variable to store LDR values
intlight_sensitivity = 500; //This is the approx value of light surrounding your LDR
void setup()
{
Serial.begin(9600);
//start the serial monitor with 9600 buad
pinMode(13, OUTPUT); //we mostly use13 because there is already a built in yellow LED
in arduino which shows output when 13 pin is enabled
}
void loop()
{
LDRValue = analogRead(LDR);
to Analog input 0 A0
Serial.println(LDRValue);
delay(50);
arduino
if (LDRValue<light_sensitivity)
{
digitalWrite(13, HIGH);
}
else
{
digitalWrite(13, LOW);
}
}
Connecting a light dependant resistor in series with a standard resistor like this across a single
DC supply voltage has one major advantage, a different voltage will appear at their junction for
different levels of light.
The amount of voltage drop across series resistor, R2is determined by the resistive value of the
light dependant resistor, RLDR. This ability to generate different voltages produces a very handy
circuit called a Potential Divider or Voltage Divider Network.
As we know, the current through a series circuit is common and as the LDR changes its resistive
value due to the light intensity, the voltage present at VOUTwill be determined by the voltage
divider formula. An LDRs resistance, RLDR can vary from about 100s in the sun light, to over
10Ms in absolute darkness with this variation of resistance being converted into a voltage
variation at VOUT as shown.
One simple use of a Light Dependent Resistor, is as a light sensitive switch as shown below.
LDR Switch
This basic light sensor circuit is of a relay output light activated switch. A potential divider
circuit is formed between the photoresistor, LDR and the resistor R1. When no light is present ie
in darkness, the resistance of the LDR is very high in the Megaohms (Ms) range so zero base
bias is applied to the transistor TR1 and the relay is de-energised or OFF.
As the light level increases the resistance of the LDR starts to decrease causing the base bias
voltage at V1 to rise. At some point determined by the potential divider network formed with
resistor R1, the base bias voltage is high enough to turn the transistor TR1 ON and thus
activate the relay which in turn is used to control some external circuitry. As the light level falls
back to darkness again the resistance of the LDR increases causing the base voltage of the
transistor to decrease, turning the transistor and relay OFF at a fixed light level determined
again by the potential divider network.
By replacing the fixed resistor R1 with a potentiometer VR1, the point at which the relay turns
ON or OFF can be pre-set to a particular light level. This type of simple circuit shown above
has a fairly low sensitivity and its switching point may not be consistent due to variations in
either temperature or the supply voltage. A more sensitive precision light activated circuit can be
easily made by incorporating the LDR into a Wheatstone Bridge arrangement and replacing
the transistor with anOperational Amplifier as shown.
20
In this basic dark sensing circuit, the light dependent resistor LDR1 and the
potentiometer VR1 form one adjustable arm of a simple resistance bridge network, also known
commonly as a Wheatstone bridge, while the two fixed resistors R1 and R2 form the other arm.
Both sides of the bridge form potential divider networks across the supply voltage whose
outputs V1 and V2 are connected to the non-inverting and inverting voltage inputs respectively
of the operational amplifier.
The operational amplifier is configured as a Differential Amplifier also known as a voltage
comparator with feedback whose output voltage condition is determined by the difference
between the two input signals or voltages, V1 and V2. The resistor combination R1 and R2 form
a fixed voltage reference at input V2, set by the ratio of the two resistors. The LDR
VR1 combination provides a variable voltage input V1 proportional to the light level being
detected by the photoresistor.
As with the previous circuit the output from the operational amplifier is used to control a relay,
which is protected by a free wheel diode, D1. When the light level sensed by the LDR and its
output voltage falls below the reference voltage set at V2 the output from the op-amp changes
state activating the relay and switching the connected load.
Likewise as the light level increases the output will switch back turning OFF the relay. The
hysteresis of the two switching points is set by the feedback resistor Rf can be chosen to give any
suitable voltage gain of the amplifier.
The operation of this type of light sensor circuit can also be reversed to switch the relay ON
when the light level exceeds the reference voltage level and vice versa by reversing the positions
of the light sensor LDR and the potentiometer VR1. The potentiometer can be used to pre-set
the switching point of the differential amplifier to any particular light level making it ideal as a
simple light sensor project circuit.
21
Arduino ATmega328 Pinout
For those of you who are using an ATmega328 with the ArduinoBootloader code on your own
circuit board here is the pinout details which shows the chip pin numbers and the associated
Arduino pins
22
The Arduino Uno is a microcontroller board based on the ATmega328 (datasheet). It has 14
digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a
16 MHz ceramic resonator, a USB connection, a power jack, an ICSP header, and a reset button.
It contains everything needed to support the microcontroller; simply connect it to a computer
with a USB cable or power it with a AC-to-DC adapter or battery to get started.
The Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial driver
chip. Instead, it features the Atmega16U2 (Atmega8U2 up to version R2) programmed as a
USB-to-serial converter.
Revision 2 of the Uno board has a resistor pulling the 8U2 HWB line to ground, making it easier
to put into DFU mode.
Revision 3 of the board has the following new features:
1.0 pinout: added SDA and SCL pins that are near to the AREF pin and two other new
pins placed near to the RESET pin, the IOREF that allow the shields to adapt to the voltage
provided from the board. In future, shields will be compatible with both the board that uses the
AVR, which operates with 5V and with the Arduino Due that operates with 3.3V. The second one
is a not connected pin, that is reserved for future purposes.
ATmega328
Operating Voltage
5V
7-12V
6-20V
40 mA
50 mA
Flash Memory
SRAM
2 KB (ATmega328)
EEPROM
1 KB (ATmega328)
Clock Speed
16 MHz
24
Note: The Arduino reference design can use an Atmega8, 168, or 328, Current models use
an ATmega328, but an Atmega8 is shown in the schematic for reference. The pin configuration is
identical on all three processors.
Power
The Arduino Uno can be powered via the USB connection or with an external power supply. The
power source is selected automatically.
External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery.
The adapter can be connected by plugging a 2.1mm center-positive plug into the board's power
jack. Leads from a battery can be inserted in the Gnd and Vin pin headers of the POWER
connector.
The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V,
however, the 5V pin may supply less than five volts and the board may be unstable. If using
more than 12V, the voltage regulator may overheat and damage the board. The recommended
range is 7 to 12 volts.
The power pins are as follows:
VIN. The input voltage to the Arduino board when it's using an external power source (as
opposed to 5 volts from the USB connection or other regulated power source). You can supply
voltage through this pin, or, if supplying voltage via the power jack, access it through this pin.
5V.This pin outputs a regulated 5V from the regulator on the board. The board can be
supplied with power either from the DC power jack (7 - 12V), the USB connector (5V), or the
VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator,
and can damage your board. We don't advise it.
3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50
mA.
IOREF. This pin on the Arduino board provides the voltage reference with which the
microcontroller operates. A properly configured shield can read the IOREF pin voltage and select
the appropriate power source or enable voltage translators on the outputs for working with the
5V or 3.3V.
25
Memory
The ATmega328 has 32 KB (with 0.5 KB used for the bootloader). It also has 2 KB of SRAM
and 1 KB of EEPROM (which can be read and written with the EEPROM library).
Input and Output
Each of the 14 digital pins on the Uno can be used as an input or output,
using pinMode(), digitalWrite(), anddigitalRead() functions. They operate at 5 volts. Each pin
can provide or receive a maximum of 40 mA and has an internal pull-up resistor (disconnected
by default) of 20-50 kOhms. In addition, some pins have specialized functions:
Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data.
These pins are connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial chip.
External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a low
value, a rising or falling edge, or a change in value. See the attachInterrupt() function for details.
PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite() function.
SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication
using the SPI library.
LED: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH
value, the LED is on, when the pin is LOW, it's off.
The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits of resolution
(i.e. 1024 different values). By default they measure from ground to 5 volts, though is it possible
to change the upper end of their range using the AREF pin and the analogReference() function.
Additionally, some pins have specialized functionality:
TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the Wire
library.
There are a couple of other pins on the board:
AREF. Reference voltage for the analog inputs. Used with analogReference().
Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset
button to shields which block the one on the board.
26
Communication
The Arduino Uno has a number of facilities for communicating with a computer, another
Arduino, or other microcontrollers. The ATmega328 provides UART TTL (5V) serial
communication, which is available on digital pins 0 (RX) and 1 (TX). An ATmega16U2 on the
board channels this serial communication over USB and appears as a virtual com port to
software on the computer. The '16U2 firmware uses the standard USB COM drivers, and no
external driver is needed. However, on Windows, a .inf file is required. The Arduino software
includes a serial monitor which allows simple textual data to be sent to and from the Arduino
board. The RX and TX LEDs on the board will flash when data is being transmitted via the USBto-serial chip and USB connection to the computer (but not for serial communication on pins 0
and 1).
A SoftwareSerial library allows for serial communication on any of the Uno's digital pins.
The ATmega328 also supports I2C (TWI) and SPI communication. The Arduino software
includes a Wire library to simplify use of the I2C bus; see the documentation for details. For SPI
communication, use the SPI library.
Programming
The Arduino Uno can be programmed with the Arduino software (download). Select "Arduino
Uno from the Tools > Board menu (according to the microcontroller on your board). For details,
see the reference and tutorials.
The ATmega328 on the Arduino Uno comes preburned with a bootloader that allows you to
upload new code to it without the use of an external hardware programmer. It communicates
using the original STK500 protocol (reference, C header files).
You can also bypass the bootloader and program the microcontroller through the ICSP (InCircuit Serial Programming) header; see these instructions for details.
27
The ATmega16U2 (or 8U2 in the rev1 and rev2 boards) firmware source code is available .
The ATmega16U2/8U2 is loaded with a DFU bootloader, which can be activated by:
On Rev1 boards: connecting the solder jumper on the back of the board (near the map of
Italy) and then resetting the 8U2.
On Rev2 or later boards: there is a resistor that pulling the 8U2/16U2 HWB line to
ground, making it easier to put into DFU mode.
You can then use Atmel's FLIP software (Windows) or the DFU programmer (Mac OS X and
Linux) to load a new firmware. Or you can use the ISP header with an external programmer
(overwriting the DFU bootloader). See this user-contributed tutorial for more information.
Rather than requiring a physical press of the reset button before an upload, the Arduino Uno is
designed in a way that allows it to be reset by software running on a connected computer. One of
the hardware flow control lines (DTR) of theATmega8U2/16U2 is connected to the reset line of
the ATmega328 via a 100 nanofarad capacitor. When this line is asserted (taken low), the reset
line drops long enough to reset the chip. The Arduino software uses this capability to allow you
to upload code by simply pressing the upload button in the Arduino environment. This means
that the bootloader can have a shorter timeout, as the lowering of DTR can be well-coordinated
with the start of the upload.
This setup has other implications. When the Uno is connected to either a computer running Mac
OS X or Linux, it resets each time a connection is made to it from software (via USB). For the
following half-second or so, the bootloader is running on the Uno. While it is programmed to
ignore malformed data (i.e. anything besides an upload of new code), it will intercept the first
28
few bytes of data sent to the board after a connection is opened. If a sketch running on the board
receives one-time configuration or other data when it first starts, make sure that the software with
which it communicates waits a second after opening the connection and before sending this data.
The Uno contains a trace that can be cut to disable the auto-reset. The pads on either side of the
trace can be soldered together to re-enable it. It's labeled "RESET-EN". You may also be able to
disable the auto-reset by connecting a 110 ohm resistor from 5V to the reset line; see this forum
thread for details.
USB Overcurrent Protection
The Arduino Uno has a resettable polyfuse that protects your computer's USB ports from shorts
and overcurrent. Although most computers provide their own internal protection, the fuse
provides an extra layer of protection. If more than 500 mA is applied to the USB port, the fuse
will automatically break the connection until the short or overload is removed.
Physical Characteristics
The maximum length and width of the Uno PCB are 2.7 and 2.1 inches respectively, with the
USB connector and power jack extending beyond the former dimension. Four screw holes allow
the board to be attached to a surface or case. Note that the distance between digital pins 7 and 8
is 160 mil (0.16"), not an even multiple of the 100 mil spacing of the other pins.
29
30 RPM 12V DC geared motors for robotics applications. Very easy to use and available in
standard size.Nut and threads on shaft to easily mount on chassis and internal threaded shaft for
easy connection to wheel.
6mm shaft diameter with internal hole
125gm weight
12 V water pump
Transistors
Function
Transistors amplify current, for example they can be used to amplify the small output current
from a logic IC so that it can operate a lamp, relay or other high current device. In many circuits
a resistor is used to convert the changing current to a changing voltage, so the transistor is being
used to amplify voltage.
A transistor may be used as a switch (either fully on with maximum current,
or fully off with no current) and as an amplifier (always partly on).
The leads are labelled base (B), collector (C) and emitter (E).
These terms refer to the internal operation of a transistor but they are not much help in
understanding how a transistor is used, so just treat them as labels!
cation is called the current gain, symbol hFE.
31
Light Emitting Diodes (LEDs)
Colours | Sizes and shapes | Resistor value | LEDs in series | LED data | Flashing | Displays
Example:
Circuit symbol:
Function
LEDs emit light when an electric current passes through them.
Connecting and soldering
LEDs must be connected the correct way round, the diagram may be labelled a or+ for anode
and k or - for cathode (yes, it really is k, not c, for cathode!). The cathode is the short lead and
there may be a slight flat on the body of round LEDs. If you can see inside the
LED the cathode is the larger electrode (but this is not an official
identification method).
LEDs can be damaged by heat when soldering, but the risk is small unless
you are very slow. No special precautions are needed for soldering most LEDs.
Testing an LED
Never connect an LED directly to a battery or power supply!
It will be destroyed almost instantly because too much current will pass
through and burn it out.
LEDs must have a resistor in series to limit the current to a safe value,
for quick testing purposes a 1k resistor is suitable for most LEDs if
your supply voltage is 12V or less. Remember to connect the LED the
correct way round!
For an accurate value please see Calculating an LED resistor value below.
32
Colours of LEDs
LEDs are available in red, orange, amber, yellow, green, blue and white. Blue and white LEDs
are much more expensive than the other colours.
The colour of an LED is determined by the
semiconductor material, not by the colouring of
the 'package' (the plastic body). LEDs of all
colours are available in uncoloured packages
which may be diffused (milky) or clear (often
described as 'water clear'). The coloured packages
are also available as diffused (the standard type) or transparent.
Tri-colour LEDs
The most popular type of tri-colour LED has a red and a green LED combined in one package
with three leads. They are called tri-colour because mixed red and green light appears to be
yellow and this is produced when both the red and green LEDs are on.
The diagram shows the construction of a tri-colour LED. Note the different lengths
of the three leads. The centre lead (k) is the common cathode for both LEDs, the
outer leads (a1 and a2) are the anodes to the LEDs allowing each one to be
separately, or both together to give the third colour.
Resistors
Example:
Function
Circuit symbol:
The Resistor
Colour Code
Colour
Number
Black
Brown
Red
Orange
Yellow
Green
Blue
Violet
Grey
White
Resistors restrict the flow of electric current, for example a resistor is placed in series with a
light-emitting diode (LED) to limit the current passing through the LED.
33
Connecting and soldering
Resistors may be connected either way round. They are not damaged by heat when soldering.
Resistor values - the resistor colour code
Resistance is measured in ohms, the symbol for ohm is an omega .
1 is quite small so resistor values are often given in k and M .
1 k = 1000
1 M = 1000000 .
Resistor values are normally shown using coloured bands.
Each colour represents a number as shown in the table.
Most resistors have 4 bands:
The fourth band is used to shows the tolerance (precision) of the resistor, this may be
ignored for almost all circuits but further details are given below.
This resistor has red (2), violet (7), yellow (4 zeros) and gold bands.
So its value is 270000 = 270 k .
On circuit diagrams the is usually omitted and the value is written 270K.
Find out how to make your own Resistor Colour Code Calculator
Variable Resistors
Construction | LIN & LOG | Rheostat | Potentiometer | Presets
Construction
Variable resistors consist of a resistance track with connections
at both ends and a wiper which moves along the track as you
turn the spindle. The track may be made from carbon, cermet
(ceramic and metal mixture) or a coil of wire (for low
resistances). The track is usually rotary but straight track
versions, usually called sliders, are also available.
Variable resistors may be used as a rheostat with two
connections (the wiper and just one end of the track) or as a
potentiometer with all three connections in use. Miniature
versions called presets are made for setting up circuits which
will not require further adjustment.
Variable resistors are often called potentiometers in books and catalogues. They are specified by
their maximum resistance, linear or logarithmic track, and their physical size. The standard
spindle diameter is 6mm.
35
Capacitors
Polarised (> 1F) | Unpolarised (< 1F) | Real Values | Variable & trimmers
Function
Capacitors store electric charge. They are used with resistors in timing circuits because it takes
time for a capacitor to fill with charge. They are used to smooth varying DC supplies by acting as
a reservoir of charge. They are also used in filter circuits because capacitors easily pass AC
(changing) signals but they block DC (constant) signals.
Capacitance
This is a measure of a capacitor's ability to store charge. A large capacitance means that more
charge can be stored. Capacitance is measured in farads, symbol F. However 1F is very large, so
prefixes are used to show the smaller values.
Three prefixes (multipliers) are used, (micro), n (nano) and p (pico):
1. means 10-6 (millionth), so 1000000F = 1F
2. n means 10-9 (thousand-millionth), so 1000nF = 1F
3. p means 10-12 (million-millionth), so 1000pF = 1nF
36
Capacitor values can be very difficult to find because there are many types of capacitor with
different labelling systems!
There are many types of capacitor but they can be split into two groups, polarised and
unpolarised. Each group has its own circuit symbol.
Polarised capacitor
Examples:
Circuit symbol:
Examples:
Circuit symbol:
Small value capacitors are unpolarised and may be connected either way round. They are not
damaged by heat when soldering, except for one unusual type (polystyrene). They have high
voltage ratings of at least 50V, usually 250V or so. It can be difficult to find the values of these
small capacitors because there are many types of them and several different labelling systems!
Many small value capacitors have their value printed but without a multiplier, so you need to use
experience to work out what the multiplier should be!
For example 0.1 means 0.1F = 100nF.
Sometimes the multiplier is used in place of the decimal point:
For example: 4n7 means 4.7nF.
37
Capacitor Number Code
A number code is often used on small capacitors where printing is difficult:
the 3rd number is the number of zeros to give the capacitance in pF.
Ignore any letters - they just indicate tolerance and voltage rating.
For many years the standard LDR has been the ORP12, now the NORPS12, which is about
13mm diameter. Miniature LDRs are also available and their diameter is about 5mm.
An LDR may be connected either way round and no special precautions are required when
soldering.
38
Project Conclusion
The robot can reliably navigate the contest maze and extinguish the light
source. By using a combination of dead reckoning and landmark recognition, the
robot can avoid maze obstacles and enter maze rooms. Other sensors allow the
robot to pinpoint the location of the light source.
Further improvements could be added to the project that would allow the robot to
place better in future contests. A tone detector could be added that would allow the
robot to be activated once a 3 kHz to 4 kHz tone is sounded (instead of a simple
push button), simulating the noise emitted from a smoke detector. In addition, the
robot could be programmed to adjust for uneven floors, requiring modifications to
the robot chassis. Finally, the software implementation could be changed to allow
the robot to return to its starting position once the light source has been
extinguished.
39
References
Contest References:
1.
http://www.trincoll.edu/events/robot/Rules/default.asp
2.
http://www.trincoll.edu/events/robot/Results04/default.asp
Robotics References:
3.
http://members.verizon.net/~vze2b2zf/robotpage.html
4.
http://abrobotics.tripod.com/Snuffy/snuffy.htm
Part References:
5.
http://bd.thrijswijk.nl/thrsim11/68hc11/about2.htm.
6.
http://abrobotics.tripod.com/Snuffy/uvtron.htm
7.
http://www.acroname.com
8.
http://www3.sympatico.ca/donroy/handson.html
9.
http://www.srl.gatech.edu/education/ME3110/primer/motors.htm
10.
http://lancet.mit.edu/motors/index.html
11.
http://e-www.ATMEL.com/webapp/sps/site/overview.jsp
12.
http://www.woodweb.com/knowledge_base/Servo_vs_stepper_motors.html
13.
http://www.cs.uiowa.edu/~jones/step/
14.
http://www.cctc.demon.co.uk/stepper.htm
15.
http://www.euclidres.com/apps/stepper_motor/stepper.html
16.
http://www.robotics.com/motors.html
Book References
17.
Software and Hardware Engineering, Fredrick M. Cady, Copyright 1997, Oxford
University Press, Inc.
40
APPENDIX
COMPONENT NAME
Light sensor
AT MAGA 328
QUALITY
LDR
PRICE IN RUPECE
50.00
Microcontroller
300.00
Variable resister
100K
25.00
Buzzer
6V
50.00
Water pump
9V
125.00
Gear motor
30RPM
235.00
Wheel
40.00
Chases
30.00
Led
5MM
15.00
Battery
9V
39.00
Regulated IC
7805
80.00
Some resisters
50.00
41