Velleman EDU02 User Manual

Page 19

Advertising
background image

19

www.vellemanprojects.com

Required parts: Solar cell, microcontroller (µC), 2x 4K7 resistor (yellow, purple, red,
gold), 470 ohm resistor (yellow, purple, brown, gold), 2V4 zener diode, piezo sounder,
wire jumpers, wire.

How it works: The solar cell
provides the supply voltage for the
microcontroller. Once it receives
2VDC it starts running its internal
program. The zener diode and the
470 ohm resistor make sure the
supply voltage of the controller
never goes beyond 2.4V, even in
bright sunlight. A too high voltage
can damage the device. The
voltage generated by the solar cell is
also divided by two by means of two
equal resistors (4K7) and fed to the
analog input of the PIC. Even in
bright sunlight, the input receives no more than 4.5/2 = 2.25VDC.
The internal software ‘measures’ the voltage at the input and translates it to a variable audio frequency
(note). The piezo sounder converts the signal into sound. When the amount of light received by the solar
cell changes, the voltage at the input of the controller will also change. The sofware will notice this and
change the tone. With a bit of practice, you could play a tune by waving your hand or a flashlight over the
solar cell.

SOLAR CELL

ZD1

2V4

+

BUZ1

PIEZO

R1

4K7

R2
4K7

R3

470

VD

D

2

VS

S

7

GP3/MCLR/VPP

8

GP2/T0CLKI/FOSC4

3

GP1/ICSPCLK

4

GP0/ICSPDAT

5

IC1

PIC10F220

Advertising