Skip to content
Parallax Learn

Parallax Learn

  • Welcome
  • Tutorials
        • Tutorial Series head tag

          Tutorial Series
        • Tutorial Series

          The special, classroom-ready series pages are organized collections of tutorials for our most popular hardware and/or languages. The tutorials for each topic are conveniently accessible from a single page, shown in the order it is recommended that they be completed.
        • Robotics Series Head tag

          Robotics Series
        • Robotics Series

          • Artificial Intelligence
          • Cybersecurity: Radio Data tutorialCybersecurity
          • cyber:bot + Python
          • cyber:bot + MakeCode
          • Boe-Bot Tutorial SeriesBoe-Bot
          • Arduino Shield-Bot
          • ActivityBot with C TutorialsActivityBot + C
          • ActivityBot with BlocklyProp Tutorial SeriesActivityBot + BlocklyProp
          • Scribbler 3 Tutorial SeriesScribbler 3
        • Electronics & Programming Series Head tag

          Electronics & Programming Series
          • BS2 Board of Education Tutorial SeriesBS2 Board of Education
          • Propeller C-Language BasicsPropeller C Basics
          • FLiP Try-It Kit C Tutorial SeriesFLiP Try-It Kit + C
          • FLiP Try-It Kit BlocklyProp TutorialsFLiP Try-It Kit + BlocklyProp
          • Badge WX Tutorial SeriesBadge WX
          • Propeller BlocklyProp Basics and ProjectsPropeller BlocklyProp Basics
          • View All Tutorial Series »
        • Browse Tutorials
        • Browse Tutorials

          Individual tutorials sorted by robot or kit, and language.
        • By Robot or Kit
          • ActivityBot
          • SumoBot WX
          • Boe-Bot
          • Shield-Bot
          • cyber:bot
          • Badge WX
          • ELEV-8
          • ARLO
        • By Language
        • By Language

          • Propeller C
          • Arduino
          • BlocklyProp
          • PBASIC
          • Python
          • MakeCode
          • View All Tutorials »
  • Educators
  • Reference
  • Downloads
  • Home
  • All Courses
  • Visible Light Navigation for the cyber:bot

Visible Light Navigation for the cyber:bot

A Look at Ohm’s Law

Two properties affect the voltage at VAD2: current and resistance, and Ohm’s Law explains how it works.  Ohm’s Law states that the voltage (V) across a resistor is equal to the current (I) passing through it multiplied by its resistance (R).  So, if you know two of these values, you can use the Ohm’s Law equation to calculate the third:

                       V = I x R

Voltage (V) is measured in units of volts, which are abbreviated with an upper-case V.  Current (I) is measured in amperes, or amps, which are abbreviated A. Resistance (R) is measured in ohms which is abbreviated with the Greek letter omega (Ω).  The current levels you are likely to see through this circuit are in milliamps (mA).  The lower-case m indicates that it’s a measurement of thousandths of amps.  Similarly, the lower-case k in kΩ indicates that the measurement is in thousands of ohms.

In some textbooks, you will see E = I × R instead. E stands for electric potential, which is another way to say “volts.”
Let’s use Ohm’s Law to calculate VAD2 with the phototransistor, letting two different amounts of current flow through the circuit:

  • 0.92 mA, which might happen as a result of fairly bright light
  • 0.15 mA, which would happen with less bright light

The examples below show the conditions and their solutions.  When you try these calculations, remember that milli (m) is thousandths and kilo (k) is thousands when you substitute the numbers into Ohm’s Law.

Example 1: I = 0.92 mA and R = 2 kΩ

Example 2: I = 0.25 mA and R = 2 kΩ

Your Turn – Ohm’s Law and Resistor Adjustments

Let’s say that the ambient light in your room is twice as bright as the light that resulted in VA3 = 3.1 V for bright light and 0.5 V for shade.  Another situation that could cause higher current is if the ambient light is a stronger source of infrared.  In either case, the phototransistor could allow twice as much current to flow through the circuit, which could lead to measurement difficulties.

Question: What could you do to bring the circuit’s voltage response back down to 3.1 V for bright light and 0.5 V for dim?
Answer: Cut the resistor value in half; make it 1 kΩ instead of 2 kΩ.

  • Try repeating the Ohm’s Law calculations with R = 1 kΩ, and bright current I = 3.1 mA and dim current I = 0.5 mA. 

Does it bring VA3 back to 3.1 V for bright light and 0.5 V for dim light with twice the current?  (It should; if it didn’t for you, check your calculations.)

 


Printer-friendly version
How the Phototransistor Circuit Works
Prev
Light Levels over Larger Ranges
Next

DISCUSSION FORUMS | PARALLAX INC. STORE

About | Terms of Use | Feedback: learn@parallax.com | Copyright©Parallax Inc. 2024

© 2025 Parallax Learn • Built with GeneratePress