Basic Light Meter - Elenco Electronics SNAP CIRCUITS XP SCXP-50 Instruction Manual

Table of Contents

Advertisement

Project B12
Optional:
-45-
Changing the amount of light shining on the
photoresistor changes its resistance, and so
changes the voltage measured at the ADC
microcontroller input (the
readadc
The readadc command has 8-bit accuracy, so
the measured number will be from 0 to 255.
The
sertxd
command
displays
measurement in the terminal.
The 10KW resistor (R4) allows the voltage at
the ADC microcontroller input to fall when it is
dark and rise when there is light on the

Basic Light Meter

Build the circuit as shown. Turn on the slide switch
(S1).
Load program Basic Light Meter into the
microcontroller
instructions in project B1.
Press the F8 key or select Terminal under the PICAXE
menu to open a terminal window for communication
with the microcontroller, set the baud rate to 4800, and
select Refresh. Turn the slide switch (S1) off and on to
reset the microcontroller.
The microcontroller measures the amount of light on
the photoresistor (RP), then displays it as a number in
the Terminal (0 is total darkness, 255 is brightest).
You can shift the brightness scale by replacing the
10kW resistor (R4) with one of the other resistors.
photoresistor. The voltage measured depends
on the ratio of the photoresistor resistance to
the 10KW resistor (R4). The measured value
command).
will be about 128 when the photoresistor
resistance equals R4. Replacing R4 with
another resistor shifts the measured light
the
value (between 0 and 255).
More details on how these commands work
can be found under the Help menu at Snap
Circuits
XP
.
®
TM
(U21)
using
the
programming

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Snap circuits xp

Table of Contents