Week 5 Lots of Stuff - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

Week 5 Lots of Stuff

Description:

Week 5 Lots of Stuff. Sensors and sensing, mostly. All of ... Start Passing Wires Around ... LEDs. RS232. TeraTerm. A (free!) terminal emulation software ... – PowerPoint PPT presentation

Number of Views:331
Avg rating:3.0/5.0
Slides: 22
Provided by: rc52
Category:
Tags: leds | lots | stuff | week

less

Transcript and Presenter's Notes

Title: Week 5 Lots of Stuff


1
Week 5 Lots of Stuff
  • Sensors and sensing, mostly.

2
All of Todays Stuff
  • Start Passing Wires Around
  • printf() / just a few words /
  • Serial Terminal
  • Sensors and Sensing
  • Voltage Divider Circuit
  • Photocells
  • Photovores
  • Wiring

3
Start Passing Wires Around
  • Youll need four 2½ long wires of different
    colors, stripped ¼ at both ends
  • Red (5 Volts)
  • Black (Ground)
  • Blue (Pin C4)
  • White (Pin C5)
  • Also, two 1 long blue/yellow striped wires,
    stripped ¼ at both ends

4
printf()
  • printf() is a formatted print function in C.
  • It takes a variable number of arguments
  • 1 printf(Hello, world!\n)
  • 2 printf(This is an integer d\n, nameofint)
  • gt2 printf(3 ints d, d, d\n, a, b, c)
  • See analogbutt.c on Blackboard.

5
Serial Terminal
  • No monitor hooked up to your robot!
  • Buzzer
  • LEDs
  • RS232
  • TeraTerm
  • A (free!) terminal emulation software
  • http//hp.vector.co.jp/authors/VA002416/teraterm.h
    tml
  • StartgtRun Q\tt

6
Sensors and Sensing
  • Sensors tell a robot one simple thing about their
    environment
  • Temperature, distance, pressure etc.
  • A digital sensor returns a 0 or a 1
  • Example bump sensor
  • An analog sensor returns a value from a range
    based on the voltage level.
  • Examples photocell, ultrasonic ranger

7
The Voltage Divider
This is a battery. It supplies electrical
current at a constant(ish) voltage.


8
The Voltage Divider
This is a battery. It supplies electrical
current at a constant(ish) voltage.


6V
9
The Voltage Divider
This is a resistor. It blocks the flow of
electrical current.
10
The Voltage Divider
This is a resistor. It blocks the flow of
electrical current.
11
The Voltage Divider


V
R1
R2
12
The Voltage Divider
  • a V
  • c 0 (Ground)
  • b (a-c)(R1/R1R2)
  • V(R1/R1R2)



V
R1
R2
13
Photocells
Photocells are variable resistors. Current flow
is proportional to incident light.
14
Photocells
Photocells are variable resistors. Current flow
is proportional to incident light.
15
The Voltage Divider with a Twist
  • a 5V
  • c 0V
  • R1 4.7k ohms
  • b (a-c)(4700/4700R2)
  • 5(4700/4700R2)
  • 3k lt R1 lt 11k claimed
  • 300 lt R1 lt 500k actual



V
R1
R2
16
Photovore
  • A photovore is a robot that is attracted to
    light.
  • Grey Walter created the turtle robots in 1948
    it is unknown how they worked, but they were
    among the first photovores.

17
Photovore
  • Braitenberg published a paper (1984) on a simple
    method of controlling a photovore.

18
Next weeks demo
  • Your task to create a photovore
  • Things to keep in mind
  • Light levels vary depending on time of day
  • Your photocells will NOT be identical, nor will
    they return the same values for similar light
    levels
  • Hint you may want to compare both of your
    photocells for light intensity and drive in the
    direction of the greatest light intensity. Just a
    suggestion there are many ways to do this.

19
Photovores
20
A Quick Note about Breadboards
21
To Ffly C4
To Ffly C5
Write a Comment
User Comments (0)
About PowerShow.com