beautypg.com

Project a9 counting to the stars – Elenco XP&trade User Manual

Page 18

background image

Project A9

Counting To The Stars

Note: This circuit requires program Electronic
Brain to be in microcontroller U21’s memory.
This is loaded into U21 at the Snap Circuits

®

factory and should still be there, unless you
already reprogrammed it. If it has been
reprogrammed, you must use project B1 to load
program Electronic Brain back into U21 before
building this circuit.

The circuit will count how many times you
press switch S2, play some music, and then
spin the fan for a duration based on how many
times you pressed the switch.

Part A. Turn on slide switch (S1) and wait a
moment for the green LED (D2) to come on.
Press switch S2 once; the red LED (D1)
flashes. Wait for the green LED (D2) to turn off

(about 10 seconds after you press S2). When
the green LED comes back on, press and hold
down S2 until music starts. The motor (M1) will
spin for 1/4 second and stop. The green LED
will come back on, indicating the time has been
reset.

Part B. Now press switch S2 three times, and
wait for the green LED to go off. The red LED
will flash three times, indicating the motor will
spin for 3/4 seconds. Press and hold down
switch S2 until the music starts. The motor
should spin for 3/4 seconds, and the fan may
rise into the air.

Part C. Now press switch S2 ten times, and
wait for the green LED to go off. The green LED
will flash twice and the red LED will flash twice.

Each green flash equals 1 second and each
red flash equals 1/4 second, so the motor
should spin for 2 and 1/2 seconds. Press and
hold down switch S2 until the music starts. The
motor should spin for 2 and 1/2 seconds, and
the fan will rise into the air.

Part D. For each time you push the switch, the
motor will spin for 1/4 second. Press switch S2
up to fifty times, and wait for the green LED to
go off. The green & red LEDs will flash based
on the motor spin time you entered; each green
flash equals 1 second and each red flash
equals 1/4 second. Press and hold down switch
S2 until the music starts. The motor should spin
for the duration you entered; if the time is long
enough then the fan will rise into the air.

-17-

!

WARNING:

Moving parts.

Do not touch the fan or
motor during operation. Do
not lean over the motor.

This complex circuit is
pictured on the box cover, use
that as a guide to help build it.

The program in the
microcontroller IC (U21)
controls power to the motor
(M1), flashes the LEDs (D1 &
D2), and sends music to the
speaker (SP).
The microcontroller is like an
electronic brain running the
circuit.

+