Вы находитесь на странице: 1из 8

ULTRASONIC SENSOR

It emits an ultrasound at 40 000 Hz which travels through the


air and if there is an object or obstacle on its path It will
bounce back to the module. Considering the travel time and
the speed of the sound you can calculate the distance.
The HC-SR04 Ultrasonic Module has 4 pins, Ground, VCC, Trig
and Echo. The Ground and the VCC pins of the module needs
to be connected to the Ground and the 5 volts pins on the
Arduino Board respectively and the trig and echo pins to any
Digital I/O pin on the Arduino Board. In order to generate the
ultrasound, you need to set the Trig on a High State for 10 µs.
That will send out an 8-cycle sonic burst which will travel at
the speed sound and it will be received in the Echo pin. The
Echo pin will output the time in microseconds the sound
wave travelled.
Source Codes
First you must define the Trig and Echo
pins. In this case they are the pins
number 9 and 10 on the Arduino Board
and they are named trig Pin and echo
Pin. Then you need a Long variable,
named “duration” for the travel time
that you will get from the sensor and an integer variable for
the distance. IN the setup you have to define the trig Pin as
an output and the echo Pin as an Input and also start the
serial communication for showing the results on the serial
monitor.
AUDRINO UNO SPECIFICATIONS
Microcontroller : ATmega328P
Operating Voltage :5V
Input Voltage :7-12V
Input Voltage (limit) :6-20V
Digital I/O Pins :14 (of which 6 provide output)
PWM Digital I/O Pins :6
Analog Input Pins :6
DC Current per I/O Pin :20 mA
DC Current for 3.3V Pin :50 mA
Flash Memory :32 KB (ATmega328P)
SRAM :2 KB (ATmega328P)
EEPROM :1 KB (ATmega328P)
Clock Speed :16 MHz
LED_BUILTIN :13
Length :68.6 mm
Width :53.4 mm
Weight :25 g
AUDRINO UNO
GENERAL PIN FUNCTION
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 - 20V), the USB connector (5V), or the VIN
pin of the board (7-20V). Supplying voltage via the 5V or 3.3V
pins bypasses the regulator, and can damage the board.
3V3: A 3.3 volt supply generated by the on-board regulator.
Maximum current draw is 50 mA.
GND: Ground pins.
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 to work with the 5V or 3.3V.
Reset: Typically used to add a reset button to shields which
block the one on the board.
SPECIAL PIN FUNCTION

In addition, some pins have specialized functions:

Serial / UART: pins 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: pins 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
.
BREADBOAD
A breadboard is a solderless device for temporary prototype
with electronics and test circuit designs. Most electronic
components in electronic circuits can be interconnected by
inserting their leads or terminals into the holes and then
making connections through wires where appropriate. The
breadboard has strips of metal underneath the board and
connect the holes on the top of the board. The metal strips
are laid out as shown below. Note that the top and bottom
rows of holes are connected horizontally and split in the
middle while the remaining holes are connected vertically.
JUMPER WIRE
A jump wire (also known as jumper wire, or jumper) is an
electrical wire, or group of them in a cable, with a connector
or pin at each end (or sometimes without them – simply
"tinned"), which is normally used to interconnect the
components of a breadboard or other prototype or test
circuit, internally or with other equipment or components,
without soldering.[1]ER

Individual jump wires are fitted by inserting their "end


connectors" into the slots provided in a breadboard, the
header connector of a circuit board.
SERVO MOTOR
A servomotor is a closed-loop servomechanism that uses
position feedback to control its motion and final position. The
input to its control is a signal (either analogue or digital)
representing the position commanded for the output shaft.

The motor is paired with some type of encoder to provide


position and speed feedback. In the simplest case, only the
position is measured. The measured position of the output is
compared to the command position, the external input to the
controller. If the output position differs from that required,
an error signal is generated which then causes the motor to
rotate in either direction, as needed to bring the output shaft
to the appropriate position. As the positions approach, the
error signal reduces to zero and the motor stops.

Вам также может понравиться