Engineers Garage

  • Electronics Projects and Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe

Photocells for analog Voltage Reading

By Samidha Verma June 14, 2016

Lady Ada used a photocell to analog Voltage Reading Method with a 5V supply in a configuration where the analog voltage reading ranges from 0V (ground) to about 5V. Although a 3.3v supply can also be used as it is based on the idea that as the resistance of the photocell decreases, the total resistance of the photocell and the pull-down resistor decreases from over 600KΩ to 10KΩ

She adopted the easiest way to measure a resistive sensor by connecting one end to Power and the other to a pull-down resistor to ground. Then the analog input of a microcontroller such as an Arduino is connected to point between the fixed pull-down resistor and the variable photocell resistor

The trick lies in the way, where current flows through both resistors increases which in turn causes the voltage across the fixed 10KΩ resistor to increase. She has used a table to indicate the approximate analog voltage based on the sensor light/resistance w/a 5V supply and 10KΩ pull-down resistor. It is available on her website

But there are some setbacks, for instance, if you want to have the sensor in a bright area and you use a 10KΩ pull-down, it will quickly saturate as it will hit the ‘ceiling’ of 5V and not be able to differentiate between bright and really bright. Therefore, replace the 10KΩ pull-down with a 1KΩ pull-down. Hence, it won’t be able to detect dark level differences but it will be able to detect bright light differences better. Else, “Axel Benz” formula can also be used by first measuring the minimum and maximum resistance value with the multi meter and then finding the resistor value with

Lady Ada has used a sketch that will take the analog voltage reading and help to determine how bright the red LED is. The LED has to be connected to a PWM pin for this to work.  A simple Code is used for Analog Light Measurements as it just prints out what it interprets as the amount of light in a qualitative manner.

This capture from an oscilloscope shows what’s happening on the digital pin (yellow). The blue line indicates when the sketch starts counting and when the counting is complete, about 1.2ms later.

As it is clearly understood concept that photocells are resistors, it is possible to use them without analog pins on microcontroller. This is possible because of the advantage that is taken from a basic electronic property of resistors and capacitors. The concept is that when capacitor is initially storing no voltage, and is connected to power like 5V through a resistor, it will charge up to the power voltage slowly. To summarize, the bigger the resistor, the slower it is. Here, the capacitor acts like a bucket and the resistor is like a thin pipe. So, when a bucket is to be filled up with a very thin pipe, it takes enough time that can be used to figure out how wide the pipe is by timing how long it takes to fill the bucket up halfway.

The capacitor can be changed anyway but make sure the timings will also change for these photocells although 0.1uF ceramic capacitor is the best one to start for these photocells. For bright ranges measurement, use a 1uF capacitor and for darker ranges, go down to 0.01uF.

The detailed information is available on the website


Filed Under: Reviews

 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: Internet of Things
Explore practical strategies for minimizing attack surfaces, managing memory efficiently, and securing firmware. Download now to ensure your IoT implementations remain secure, efficient, and future-ready.

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions

  • Simple Active Bandpass Filter Oscillates
  • De-embedding using Y, Z parameter
  • i need an embedded c program that will read a 12 bit memory address from the io pins and output the data to pins from the memory in a 8051 mcontroller
  • Gate Driver Suggestions for Two-Switch Non-Inverting Buck-Boost Converter
  • DC/DC Converter with wide range input

RSS Electro-Tech-Online.com Discussions

  • 12v battery, 18v magic
  • JBL charge 4 dead motherboard?
  • Back to the old BASIC days
  • Reclaiming missing motherboard header
  • Need help in repairing a dead motherboard

Featured -USB Series

  • Controller Chip Selection for Developing USB Enabled Device (Part 6/6)
  • Signal and Encoding of USB System (Part 5/6)
  • USB Requests and Stages of Control Transfer (Part 4/6)
  • USB Descriptors and their Types (Part 3/6)
  • USB Protocol: Types of USB Packets and USB Transfers (Part 2/6)
  • Introduction to USB: Advantages, Disadvantages and Architecture (Part 1/6)

Recent Articles

  • Littelfuse driver achieves less than 1 µA standby current for energy-efficient designs
  • Microchip optimizes power consumption in transceiver-less FPGA design for automotive applications
  • What is an IoT platform and when is one useful?
  • Silanna launches laser driver IC with sub-2 ns FWHM pulse for LiDAR application
  • LEM introduces current sensors with bandwidth up to 2.5 MHz for precision applications

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronics Projects and Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe