Robotics workshop PPT
-
Upload
avikdhupar -
Category
Self Improvement
-
view
5.043 -
download
14
description
Transcript of Robotics workshop PPT
![Page 1: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/1.jpg)
Robotics Workshop
@RVCE
![Page 2: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/2.jpg)
Basic Electronics in Robotics
![Page 3: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/3.jpg)
Topics to be Covered
• Analog Electronics1. Resistors,Capacitors,Diodes ,Transistors and
their use in circuits.2. Relays,Transformers,Op-amp,comparators
and schmitt trigger.• Digital electronics1. Logic levels,basic gates,digital IC’s,flip flops
and its applications in counters .
![Page 4: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/4.jpg)
Resistors
Voltage divider circuit and Potentiometer
![Page 5: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/5.jpg)
![Page 6: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/6.jpg)
Capacitors
![Page 7: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/7.jpg)
The water analogy for capacitor
![Page 8: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/8.jpg)
![Page 9: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/9.jpg)
AFTER DISCHARGING
![Page 10: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/10.jpg)
Diodes
• LED’S Photodiode
![Page 11: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/11.jpg)
Application of LED and Photodiode in IR Sensor
![Page 12: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/12.jpg)
Zener diode
![Page 13: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/13.jpg)
• Zener diodes are used to "clamp" a voltage in order to prevent it rising higher than a certain value.
• This might be to protect a circuit from damage or it might be to "chop off" part of an alternating waveform for various reasons.
• Zener diodes are also used to provide a fixed "reference voltage" from a supply voltage that varies. They are widely used in regulated power supply circuits.
![Page 14: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/14.jpg)
IC 7805,VOLTAGE REGULATOR
![Page 15: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/15.jpg)
VOLTAGE REGULATOR CIRCUIT
![Page 16: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/16.jpg)
Transistors
![Page 17: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/17.jpg)
A SIMPLE ANALOGY TO UNDERSTAND THE TRANSISTOR COMPLETELY
![Page 18: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/18.jpg)
• My transistor runs on water current. You see there are three openings which I have labelled "B" (Base), "C" (Collector) and "E" (Emitter) for convenience. By an amazing coincidence, these also happen to be the names used by everyone else for the three connections of a transistor!
• We provide a reservoir of water for "C" (the "power supply voltage") but it can't move because there's a big black plunger thing in the way which is blocking the outlet to "E". The reservoir of water is called the "supply voltage". If we increase the amount of water sufficiently, it will burst our transistor just the same as if we increase the voltage to a real transistor.
• We don't want to do this, so we keep that "supply voltage" at a safe level.
![Page 19: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/19.jpg)
• If we pour water current into "B" this current flows along the "Base" pipe and pushes that black plunger thing upwards, allowing quite a lot of water to flow from "C" to "E". Some of the water from "B" also joins it and flows away. If we pour even more water into "B", the black plunger thing moves up further and a great torrent of water current flows from "C" to "E".
![Page 20: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/20.jpg)
• 1. A tiny amount of current flowing into "B" allows a large amount to flow from "C" to "E" so we have an "amplification effect". We can control a BIG flow of current with a SMALL flow of current. If we continually change the small amount of water flowing into "B" then we cause corresponding changes in the LARGE amount of water flowing from "C" to "E". For example, if we measure the current flow in gallons/minute: Suppose 1 gallon/minute flowing into "B" allows 100 gallons/minute to flow from "C" to "E" then we can say that the transistor has a "gain" or "amplification" factor of 100 times. In a real transistor we measure current in thousandths of an Ampere or "milliamps". So 1mA flowing into "B" would allow 100mA to flow from "C" to "E".
• 2. The amount of current that can flow from "C" to "E" is limited by the "pipe diameter". So, no matter how much current we push into "B", there will be a point beyond which we can't get any more current flow from "C" to "E". The only way to solve this problem is to use a larger transistor. A "power transistor".
![Page 21: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/21.jpg)
• 3. The transistor can be used to switch the current flow on and off. If we put sufficient current into "B" the transistor will allow the maximum amount of current to flow from "C" to "E". The transistor is switched fully "on".
• If the current into "B" is reduced to the point where it can no longer lift the black plunger thing, the transistor will be "off". Only the small "leakage" current from "B" will be flowing. To turn it fully off, we must stop all current flowing into "B".
• In a real transistor, any restriction to the current flow causes heat to be produced. A transistor must be kept cool or it will melt. It runs coolest when it is fully OFF and fully ON. When it is fully ON there is very little restriction so, even though a lot of current is flowing, only a small amount of heat is produced. When it is fully OFF, provided we can stop the base leakage, then NO heat is produced. If a transistor is half on then quite a lot of current is flowing through a restricted gap and heat is produced. To help get rid of this heat, the transistor might be clamped to a metal plate which draws the heat away and radiates it to the air. Such a plate is called a "heat sink". It often has fins to increase its surface area and, thereby, improve its efficiency.
![Page 22: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/22.jpg)
Rules for Operation• Let's start by stating what needs to be done to a transistor to make it
operate as a transistor.• Suppose we have the following:• 1. VC > VE, by at least a few (0.1) V.• 2. VB > VE• 3. VC > VB• 4. We do not exceed maximum ratings for voltages or currents.• When these conditions are not met, then (approximately) no current
flows in or out of the transistor. • When these conditions are met, then current can flow into the collector
(and out the emitter) in proportion to the current flowing into the base:• IC = (hfe)IB where hFE = is the current gain.
![Page 23: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/23.jpg)
PHOTOTRANSISTOR AND ITS APPLICATION IN IR SENSOR
![Page 24: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/24.jpg)
TRANSISTOR AS A CURRENT AMPLIFIER
![Page 25: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/25.jpg)
• When a transistor is used as a switch it must be either fully on or off. If driving a inductive load like a relay or any type of coil you should connect a diode in reverse bias across the load so that back EMF will not flow into the transistor, destroying it.
![Page 26: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/26.jpg)
Concept of pull up resistor
![Page 27: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/27.jpg)
• The pull-up resistor assures that the wire is at a defined logic level even if no active devices are connected to it.
• When the switch is open the voltage of the gate input is pulled up to the level of Vin. When the switch is closed, the input voltage at the gate goes to ground.
![Page 28: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/28.jpg)
Pull down resistor
![Page 29: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/29.jpg)
Op-Amp
![Page 30: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/30.jpg)
Comparator and Schmitt Trigger
![Page 31: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/31.jpg)
SCMITT TRIGGER
![Page 32: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/32.jpg)
Digital Electronics
![Page 33: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/33.jpg)
Digital IC’s
• Gates• Encoder• Decoder• Multiplexer• Demultiplexer
![Page 34: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/34.jpg)
TERMINOLOGY ASSOCIATED WITH DIGITAL CIRCUITS
• PROPOGATION DELAY: A TIME DELAY INTRODUCED BY THE DIGITAL ENTITY LIKE A GATE.
• ACTIVE HIGH :A HIGH PULSE ON THE PIN WILL CAUSE AN EVENT TO BE RECOGNISED
• ACTIVE LOW:A LOW PULSE ON THE PIN WILL CAUSE AN EVENT TO BE RECOGNISED
• POSITIVE EDGE TRIGERRED:ONLY DURING THE RISING EDGE OF THE CLOCK(CONTROL) SIGNAL,THE INPUTS ARE EFFECTIVE.
![Page 35: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/35.jpg)
SR Latch
![Page 36: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/36.jpg)
Clocked SR FLIP FLOP
![Page 37: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/37.jpg)
D FLIP FLOP
![Page 38: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/38.jpg)
T FLIP FLOP
![Page 39: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/39.jpg)
Flip Flops and their use in counters
![Page 40: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/40.jpg)
Over to Suhas
![Page 41: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/41.jpg)
Microprocessors and MicrocontrollersMicroprocessor :Central processing unit (CPU) on a single integrated circuit (IC).Ex: AMD Athlon, Intel Pentium.http://en.wikipedia.org/wiki/Microprocessor
Microcontroller :An integrated CPU, memory (a small amount of RAM, program memory, or both) and peripherals capable of input and output.Ex: Atmel AVR, PIC.http://en.wikipedia.org/wiki/Microcontroller
![Page 42: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/42.jpg)
Atmel AVR
The AVR is a Modified Harvard architecture 8-bit RISC single chip microcontroller developed by Atmel in 1996.
The AVR was one of the first microcontroller families to use on-chip flash memory for program storage.
Basic Families:•tinyAVRs. Ex: ATtiny11•megaAVRs. Ex: ATmega8, ATmega16, ATmega32•XMEGA. Ex: ATxmega64
![Page 43: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/43.jpg)
Device Architecture
ALU: Fetching, Decoding and Execution of Instructions.
Registers: Usually 32x8bit registers. The CPU does all the calculations on these registers.
Program Memory: Storage of instructions that form the program. A non-volatile Flash memory is used to store the program.The size of the program memory is occasionally indicated in the naming of the device itself (e.g., the ATmega64x line has 64 kB of Flash).
SRAM: Storage of data-variables, stack etc.
EEPROM: Internal Electrically Erasable Programmable Read Only Memory (EEPROM) for semi-permanent data storage. Like Flash memory, EEPROM can maintain its contents when electrical power is removed.
![Page 44: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/44.jpg)
Infrared LEDs Photodiodes & Phototransistors Photointerrupters Photoreflectors Photoresistors (LDR) IR-Receiver modules Light Sensors Digital Hall Sensors Programmable Hall Sensors Analog Hall Sensors Magneto-resistive Sensors Vibration Sensor Air Pressure Change Sensor Thermistors Thick-film ThermistorsThermopiles Ultrasonic Sensors Pyroelectric Sensors
Types of sensors
![Page 45: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/45.jpg)
Infrared-LEDs emit light over a range of 700nm up to1,000nm, which is no longer visible to the human eye, but canbe very well detected by silicon photodiodes and phototransistors.The wavelength emitted depends upon the material usedfor the semiconductor chips. Standard wavelengths are 880nmand 950nm, whereby the 950nm are generally more favourablepriced. Apart from the wavelength and switching speed, importantcharacteristics of infrared LEDs are the direction of emission(sideways, upwards or downwards) and the angle of beam(decisive for the optical power in the forward direction).
![Page 46: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/46.jpg)
Silicon Photodiodes and Phototransistors can detectradiation ranging between 400nm and 1,100nm. Since themaximum sensitivity is approx. 880nm, infrared radiation is particularywell detected by silicon components. Photodiodes andphototransistors are available with black epoxy resin mold, whichsuppresses the sensitivity within the visible spectral area. Forslow optical switching applications, phototransistors are generallyused, wherby photodiodes are used for measuring applicationsor data transmission.
![Page 47: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/47.jpg)
Photoresistors (LDRs) are light-sensitive resistors. Theresistance value can vary strongly depending on incident light. Thedark resistance is typically within the range of MΩ, at 10 Lux howeverin the lower range of kΩ. The advantage by comparisonwith silicon photodiodes is in the spectral sensitivity of the LDRs.Whereas photodiodes are sensitive from 400 nm (blue) up to1100 nm (infrared area) LDRs are only sensitive within the visiblespectral range. LDRs are therefore particularly suitable as lightsensors because these sensors do not detect the infrared radiationgenerally present in daylight that could lead to inaccurate measuringresults.
![Page 48: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/48.jpg)
Ultrasonic sensors use a piezo element to generateacoustic oscillations in a range above 25 kHz, which is beyondthe human auditory threshold. The ultrasonic wavelength is in arange of a few centimeters or less. This can measure objects ordistances with a high level of precision. Transmitter and receivercan either be produced as separate units (transmitter and receivertype) or one transmitter can be operated jointly as transmitterand receiver (common type).
Applications» Distance measurement (parking devices)» Spatial monitoring(burglary alarm for motor vehicles)
![Page 49: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/49.jpg)
The vibration sensor VS1 is ideally suited for detectingsmall oscillations and vibrations. The well-known principle ofball switch gave birth to this component. Here, it is miniaturisedto the size of a TOPLED and integrated within a hermeticallysealed package. A 0.8 mm high-grade steel ball is set within asmall tube with 1mm diameter tube. The wall and base of thetube constitute two contacts that are bridged by the ball when inthe quiescent state. With the smallest movement, the contact isbriefly interrupted and detected. The sensor is suitable for thequalitative measurement of any vibration or shaking.
VIBRATION SENSOR
![Page 50: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/50.jpg)
THERMISTORS
Thermistors generally refer to a temperature-dependent resistor that has a negative temperature coefficient (NTC).The resistance decreases exponentially with increasing temperatureof the component. SEMITEC thermistors consist of sinteredmetallic oxide ceramics. Thermistors are characterised bythe resistance value at 25°C (R25) and the material constant B,which defines the increase in the resistance curve in the log R-1/T diagram. SEMITEC thermistors have a tolerance in R25 andB of 1% or less. This makes highly precise temperature measurement possible. The NTCs can also be assembled in accordancewith customers’ wishes.
Applications» Battery packs» Heat meters» Temperature measuring devices» Precision temperature compensation» Temperature monitoring
![Page 51: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/51.jpg)
Over to Gautam
![Page 52: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/52.jpg)
BATTERIES IN ROBOTICS
![Page 53: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/53.jpg)
Types of Batteries
• Alkaline • Lead Acid • Lithium • NiCad • NiMH• LiPo
![Page 54: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/54.jpg)
How to select a battery?
• Current rating(in terms of mAh)• Load • Weight• Voltage • Battery life• Cost
![Page 55: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/55.jpg)
Alkaline Batteries
• Alkaline batteries are the most common, easiest to get, and cheapest too.
• Low power capacities• Short battery life
![Page 56: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/56.jpg)
Ni-Mh & Ni-Cad
• These batteries are good for small to medium size range robots
• They have memory effect problem• To prevent memory effect, whenever
you wish to recharge your NiCad, you must first fully discharge it.
• NiMH battaries can last many more cycles than your typical NiCad battery.
![Page 57: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/57.jpg)
Li-ion Batteries• Very Small in size and weight
compared to Ni-Cd, Ni-MH and Lead Acid Batteries
• Normally full charge in 60 minutes with special charger
• Long life with full capacity for upto 1000 charge cycles
• Low maintenance
![Page 58: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/58.jpg)
Li-Po batteries
• Very Small in size and weight compared to Ni-Cd, Ni-MH and Lead Acid Batteries
• Full Charge in 180 minutes with special charger
• Long life with full capacity for upto 1000 charge cycles
• Low maintenance• For example,
– 3X Li-Po 4.2V 2200mAh cells – 192Grams Weight– Discharge Current: 20*2200maH = 44Amp– Max Charging Current: 1A– Price:Rs.3500
![Page 59: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/59.jpg)
End of session 1
Please be back by __
![Page 60: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/60.jpg)
Introduction to ArduinoAvik Dhupar
![Page 61: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/61.jpg)
Arduino
ARRRR, like a pirate // DWEE, just say "do we“ fast /
/ NO, as in no.
”ARRR-DWEE-NO”
![Page 62: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/62.jpg)
What is Arduino?
• Open Source Hardware Development Platform• Serial Programmable Microcontroller (MCU)
Investment!
![Page 63: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/63.jpg)
Why Arduino?• It is Open Source, both in terms of Hardware and Software.
• It is cheap(1300रु – Original, 800रु - Clone), the hardware can be built from components or a prefab board can be purchased online.
• It can communicate with a computer via serial connection over USB.
• It can be powered from USB or standalone DC power.
• It can work with both Digital and Analog electronic signals. Sensors and Actuators.
• You can make cool stuff! Some people are even making simple robots, and we all know robots are just cool.
![Page 64: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/64.jpg)
Overview of
The C Programming Language
![Page 65: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/65.jpg)
Let's get it started, hah!Let's get it started in here, yeah
Lose control, all body, all soulDon't move too fast, people just take it slow
Don't get ahead, just jump into it!
![Page 66: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/66.jpg)
Programming an Arduino
• Write program• Compile(Check for errors)• Reset board• Upload to board
![Page 67: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/67.jpg)
An Arduino “Sketch”• Declare variables at top
• Initialize– setup() – run once at
beginning, set pins
• Running– loop() – run repeatedly,
after setup()
![Page 68: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/68.jpg)
• 14 Digital I/O (pins 0 - 13)• 6 Analog In (pins 0 - 5)
• 6 Analog Out (pins 3,5,6,9,10,11)
![Page 69: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/69.jpg)
Functions for digital i/o
pinMode()
digitalWrite()
digitalRead()
![Page 70: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/70.jpg)
![Page 71: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/71.jpg)
![Page 72: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/72.jpg)
![Page 73: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/73.jpg)
Demonstration
Start up the Arduino software and open up the Blink sketch.
For the most basic kind of program you’ll need a simple actuator, an LED with the long leg (+) pushed into pin 13 and the short leg (-) in the adjacent ground pin (GND). Pin 13 is special, in the sense that it has a built in resistor to correctly control the voltage going into a testing LED just like this.
![Page 74: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/74.jpg)
Code Structure: Header
Header provides information
![Page 75: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/75.jpg)
Code Structure: setup function
setup function is executedonly once at the start
![Page 76: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/76.jpg)
Code Structure: loop function
loop function isrepeated indefinitely
![Page 77: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/77.jpg)
Code
Digital I/O Functions:pinModedigitalWritedigitalRead
pinMode(13, Output)prepare pin 13 foroutputs of voltage
![Page 78: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/78.jpg)
Code
digitalWrite(13, HIGH)Sets pin 13 to a voltage thatmeans “on”
Digital I/O Functions:pinModedigitalWritedigitalRead
![Page 79: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/79.jpg)
Code
Digital I/O Functions:pinModedigitalWritedigitalRead
delay(1000);Tells microcontroller to do nothing for 1000 ms = 1 s
![Page 80: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/80.jpg)
Code
digitalWrite(13, LOW)Sets pin 13 to voltagethat means “off”
Digital I/O Functions:pinModedigitalWritedigitalRead
![Page 81: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/81.jpg)
Over to Ganesh
![Page 82: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/82.jpg)
ADC
![Page 83: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/83.jpg)
![Page 84: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/84.jpg)
![Page 85: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/85.jpg)
Mux
![Page 86: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/86.jpg)
![Page 87: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/87.jpg)
![Page 88: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/88.jpg)
![Page 89: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/89.jpg)
Over to Gautam
![Page 90: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/90.jpg)
555 TIMER
Applications• Precision timing • Pulse generation• Sequential timing • Time delay generation • Pulse width modulation (PWM)
![Page 91: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/91.jpg)
MONOSTABLE MULTIVIBRATOR
T = 1.1RC
![Page 92: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/92.jpg)
ASTABLE MULTIVIBRATOR
• Duty cycle = ((RA + RB)/( RA + 2RB)) x 100%
• T =0.693(RA + 2RB)C
![Page 93: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/93.jpg)
TSOP SENSOR USING 555 TIMER
![Page 94: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/94.jpg)
EXPLAINATION
• This is a simple yet effective IR proximity sensor built around the TSOP 1738 module.• Commonly found at the receiving end of an IR remote control system; e.g., in TVs, CD
players etc.• These modules require the incoming data to be modulated at a particular frequency
and would ignore any other IR signals. It is also immune to ambient IR light, so one can easily use these sensors outdoors or under heavily lit conditions.
• Such modules are available for different carrier frequencies from 32 kHz to 42 kHz.• In this particular proximity sensor, we will be generating a constant stream of square
wave signal using IC555 centered at 38 kHz and would use it to drive an IR led. So whenever this signal bounces off the obstacles, the receiver would detect it and change its output.
• Since the TSOP 1738 module works in the active-low configuration, its output would normally remain high and would go low when it detects the signal (the obstacle).
![Page 95: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/95.jpg)
Over to Avik
![Page 96: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/96.jpg)
Pulse Width Modulationaka
PWM
• Not all digital pins allow PWM– Pin 13 does not work– Pin 11,10,9,6,5,3 does
• analogWrite function takes care of this
![Page 97: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/97.jpg)
PWM
• Microcontroller only allows 2 states – HIGH or LOW
• “fake” analog using PWM• Virtual digital to analog
converter• It is a technique for
getting analog results with digital means
![Page 98: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/98.jpg)
P…What!?
Digital control is used to create a square wave, a signal switched between on and off. This on-off pattern can simulate voltages in between full on (5 Volts) and off (0 Volts) by changing the portion of the time the signal spends on versus the time that the signal spends off. The duration of "on time" is called the pulse width. To get varying analog values, you change, or modulate, that pulse width. If you repeat this on-off pattern fast enough with an LED for example, the result is as if the signal is a steady voltage between 0 and 5v controlling the brightness of the LED.
![Page 99: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/99.jpg)
PWM on Arduino?The green lines represent a regular time period. This duration or period is the inverse of the PWM frequency. In other words, with Arduino's PWM frequency at about 500Hz, the green lines would measure 2 milliseconds each. A call to analogWrite() is on a scale of 0 - 255, such that analogWrite(255) requests a 100% duty cycle (always on), and analogWrite(127) is a 50% duty cycle (on half the time) for example.
![Page 100: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/100.jpg)
End of session 2
![Page 101: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/101.jpg)
Over to Aalok
![Page 102: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/102.jpg)
Basics of actuators
![Page 103: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/103.jpg)
Actuators
• An actuator is something that converts energy into motion.
• They are the part of a robot that actually makes it to move and do stuffs.
• Actuators can create a linear motion, rotary motion or oscillatory motion.
![Page 104: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/104.jpg)
Rotational and linear actuators
• Dc gearless motor• Dc geared motor• Brushless motor• Stepper motor• Servo motor• DC Linear Actuator• Solenoid
![Page 105: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/105.jpg)
Dc gearless motor
• Moderately high speed(rpm)
• Less torque• Can be used for low
power application• Usually used as
propeller in small boats, in beambots and other solar bots
![Page 106: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/106.jpg)
Geared dc motor
• Good torque • Relatively lesser speed• Used where the torque
is the main criteria• Low speed application• Usually used to drive a
robot and for robotic arm
![Page 107: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/107.jpg)
A simple npn transistor can be used to drive a motor with variable speed.
Note: the direction of rotation of motor cant be controlled using this setup.
![Page 108: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/108.jpg)
Brushless motor
• Very high speed(rpm)• Low torque• Used as propellers in
UAV, aerial robot and as air propeller RC controlled boats
• Requires a good power source(like LiPo batteries)
![Page 109: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/109.jpg)
Stepper motor
• Pretty good torque• Speed is variable• Used where precise
rotation is• Require special circuit
to make it work • Usually used with a
microcontroller
![Page 110: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/110.jpg)
Servo motor
• Good torque• Rotates a maximum of
180 degree (360 degree in some case)
• Rotates to a particular position depending of the duty cycle of pwm
![Page 111: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/111.jpg)
DC Linear Actuator
• Provide linear movement
• made up of a DC motor connected to a lead screw
• Similar to dc motor and hence speed can be controlled using pwm
![Page 112: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/112.jpg)
Solenoid
• They can be electromechanical, hydraulic, or pneumatic driven
• Stroke is usually very small but they are pretty fast
• Can be made to work using a simple MOSFET or transistor
![Page 113: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/113.jpg)
Choosing an Actuator
• Is the actuator being used to move a wheeled robot?
• Is the motor being used to lift or turn a heavy weight?
• Is the range of motion limited to 180 degrees and need good torque?
• Does the angle need to be very precise?• Is the motion in a straight line?
![Page 114: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/114.jpg)
Types of LEDs
• Single (polar) LEDs• Bi-colour LEDs• Tri-colour LEDs• RGB LEDs
![Page 115: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/115.jpg)
Choosing series resistor for LEDsColour Current
{I}Voltage{VL}
Red 30mA 1.7V
Bright red 30mA 2.0V
Yellow 30mA 2.1V
Green 25mA 2.2V
Blue 30mA 4.5V R = (VS - VL) / I
![Page 116: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/116.jpg)
Drive multiple LEDs using transistor
• Easier to use, simpler circuit
• Not many components are required
• Can be used with any controller(even with the low power microcontrollers)
![Page 117: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/117.jpg)
Home Lighting
• Why can’t we directly use the circuits for home lighting?
• Any simpler solution for that?
![Page 118: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/118.jpg)
Relays
• Works on both AC and DC
• Easier to use (compared to transistor)
• Require no extra components(like resistors)
![Page 119: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/119.jpg)
![Page 120: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/120.jpg)
Pros
• Can be used to switch both AC and DC (transistors can only switch DC)
• Can switch higher voltages than standard transistors.
• A better choice for switching large currents (> 5A).
• Can switch many contacts at once.
Cons
• Bulkier than transistors for switching small currents.
• Relays cannot switch rapidly (except reed relays)
• Require use more power • Require more current than
many ICs can provide(low power transistor can be used)
• Relatively costlier when used in smaller circuits
![Page 121: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/121.jpg)
A better solutionOPTOISOLATORS
• Cheaper than relays• Works well even for AC
power supply(some of them… moc3021 for eg)*
• Easier to use• No extra circuit needed
to make the ic work• Fast switching rate
* not preferred in most of the case though
![Page 122: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/122.jpg)
![Page 123: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/123.jpg)
Over to Prashant
![Page 124: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/124.jpg)
H-Bridge
![Page 125: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/125.jpg)
![Page 126: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/126.jpg)
![Page 127: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/127.jpg)
![Page 128: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/128.jpg)
L293D
![Page 129: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/129.jpg)
Differential Drive(basics)
![Page 130: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/130.jpg)
Over to Prashant :P
![Page 131: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/131.jpg)
Serial Communication
![Page 132: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/132.jpg)
Basics of Serial Communication
Parallel-expensive-short distance-fast
Serial-short distance-slow
![Page 133: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/133.jpg)
Other concepts involved
Framing:start and stop bit
Baud rate:Number of state changes
![Page 134: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/134.jpg)
USART/UART
![Page 135: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/135.jpg)
Activities1-simple functions to do with serial communication-begin, print,read,available2-send data from arduino to computer using serial monitor3-send data from computer to arduino
![Page 136: Robotics workshop PPT](https://reader036.fdocuments.net/reader036/viewer/2022081412/5404e3a58d7f729e768b4966/html5/thumbnails/136.jpg)
Activity-Controlling the speed of motor based on the temperature
Important steps involves:1-interfacing temperature sensor and motors appropriately.2-getting the analog values of the temperature sensor.3-depending on the sensor inputs, supply pwm to the motors.4-code :)