31
This worksheet is copyright © New Wave Concepts Limited. All rights reserved. It may be reproduced for classroom or educational use. www.genieonline.com Page 1 of 31 GENIE Cuddly Creatures.pdf Version 1.1 Contents Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2 The GENIE Audio Kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4 The cuddly creature characters . . . . . . . . . . . . . . . . . . . . . .5 Creating a hand-held design . . . . . . . . . . . . . . . . . . . . . . . .6 Creating a stand-mounted design . . . . . . . . . . . . . . . . . . . .9 Creating your own designs . . . . . . . . . . . . . . . . . . . . . . . .12 Modelling the GENIE Audio Kit . . . . . . . . . . . . . . . . . . . . .14 Programming the GENIE to play sound effects . . . . . . . . . .15 Choosing which sound is to be played . . . . . . . . . . . . . . . .18 Understanding sound samples and audio . . . . . . . . . . . . .20 Responding to inputs from the push switch . . . . . . . . . . . .21 Responding to inputs from the light sensor . . . . . . . . . . . .22 Controlling the two light-emitting diodes (LEDs) . . . . . . . .23 Playing more than one sound effect . . . . . . . . . . . . . . . . .24 Building the GENIE Audio Kit . . . . . . . . . . . . . . . . . . . . . .25 Powering the GENIE Audio Kit . . . . . . . . . . . . . . . . . . . . .29 Downloading a program to the GENIE microcontroller . . .30 Fault-finding and troubleshooting . . . . . . . . . . . . . . . . . . .31 The GENIE Cuddly Creatures project is built around the GENIE Audio Kit. The GENIE Audio Kit is also used in the GENIE Rock Star project (which has real MIDI music). So if you have the GENIE Audio Kit, you can choose to make either project. All of the design files for this project can be downloaded from genieonline.com/creature An intelligent, microcontroller-based electronics and CAD/CAM project P P L L A A Y Y S S M M U U L L T T I I P P L L E E R R E E A A L L S S O O U U N N D D S S ! ! * Learn about sound effects on page 20. Cuddly Creatures * 3D renderings of a selection of hand-held and stand-mounted GENIE Cuddly Creatures. 2 in 1

GENIE Cuddly Creatures Project · Page 7 of 31 fi GENIE Cuddly Creatures.pdf fi Version 1.1 GENIE Cuddly Creatures Project Creating a hand-held design 7 In addition to mouinting

  • Upload
    others

  • View
    7

  • Download
    0

Embed Size (px)

Citation preview

Page 1: GENIE Cuddly Creatures Project · Page 7 of 31 fi GENIE Cuddly Creatures.pdf fi Version 1.1 GENIE Cuddly Creatures Project Creating a hand-held design 7 In addition to mouinting

This worksheet is copyright © New Wave Concepts Limited. All rights reserved.It may be reproduced for classroom or educational use. wwwwww..ggeenniieeoonnlliinnee..ccoomm

Page 1 of 31 ® GENIE Cuddly Creatures.pdf ® Version 1.1

Ò

CCoonntteennttss

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2The GENIE Audio Kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4The cuddly creature characters . . . . . . . . . . . . . . . . . . . . . .5Creating a hand-held design . . . . . . . . . . . . . . . . . . . . . . . .6Creating a stand-mounted design . . . . . . . . . . . . . . . . . . . .9Creating your own designs . . . . . . . . . . . . . . . . . . . . . . . .12Modelling the GENIE Audio Kit . . . . . . . . . . . . . . . . . . . . .14Programming the GENIE to play sound effects . . . . . . . . . .15Choosing which sound is to be played . . . . . . . . . . . . . . . .18Understanding sound samples and audio . . . . . . . . . . . . .20Responding to inputs from the push switch . . . . . . . . . . . .21Responding to inputs from the light sensor . . . . . . . . . . . .22Controlling the two light-emitting diodes (LEDs) . . . . . . . .23Playing more than one sound effect . . . . . . . . . . . . . . . . .24Building the GENIE Audio Kit . . . . . . . . . . . . . . . . . . . . . .25Powering the GENIE Audio Kit . . . . . . . . . . . . . . . . . . . . .29Downloading a program to the GENIE microcontroller . . .30Fault-finding and troubleshooting . . . . . . . . . . . . . . . . . . .31

TThhee GGEENNIIEE CCuuddddllyy CCrreeaattuurreess pprroojjeeccttiiss bbuuiilltt aarroouunndd tthhee GGEENNIIEE AAuuddiioo KKiitt..

The GENIE Audio Kit is also used inthe GENIE Rock Star project (which

has real MIDI music). So if you havethe GENIE Audio Kit, you canchoose to make either project.

All of the design files for thisproject can be downloaded

from ggeenniieeoonnlliinnee..ccoomm//ccrreeaattuurree

An intelligent, microcontroller-based electronics and CAD/CAM project

PPLLAAYYSSMMUULLTTIIPPLLEE

RREEAALLSSOOUUNNDDSS!!

* Learn about soundeffects on page 20.

Cuddly Creatures

*

3D renderings of a selection of hand-heldand stand-mounted GENIE Cuddly Creatures.

22 in11

Page 2: GENIE Cuddly Creatures Project · Page 7 of 31 fi GENIE Cuddly Creatures.pdf fi Version 1.1 GENIE Cuddly Creatures Project Creating a hand-held design 7 In addition to mouinting

This worksheet is copyright © New Wave Concepts Limited. All rights reserved.It may be reproduced for classroom or educational use. wwwwww..ggeenniieeoonnlliinnee..ccoomm

Page 2 of 31 ® GENIE Cuddly Creatures.pdf ® Version 1.1

GGEENNIIEE CCuuddddllyy CCrreeaattuurreess PPrroojjeecctt

EEqquuiippmmeenntt nneeeeddeedd

For the GENIE Cuddly Creatures project youwill need at least the following:

U A GENIE Audio Kit and download cable.

U Three AA batteries (new or fully charged).

U Soldering iron, lead-free solder and wire.

U Two 3mm (M3) size counter-sunk screwswith matching nuts (the screw length willdepend on your choice of design) alongwith a suitable screwdriver.

The materials and equipment needed for thebody of the project will vary depending onyour own choices, but may include:

[ Acrylic or card for the body, and acrylic,wood or metal for a stand.

[ CAD for the design of the body panelsand CAM (such as a laser cutter) formanufacturing. These are optional, butwill result in a higher-quality end product.

Introduction 22The GGEENNIIEE CCuuddddllyy CCrreeaattuurreess projectshows how you can use the GENIEAudio Kit to apply computing andembed an intelligent, microcontroller-based electronic circuit into theproducts that you design and make.

Through a range of sound-themedprojects, you will learn the varioustechniques involved in developing amodern, high-tech, electronic toy,from the design of the panels throughto computer programming andconstruction of the circuit (see page3). Once you have learned these skills,you will then be able to apply themto your own projects.

3D renderings ofseveral GENIE Cuddly

Creatures projects.

IIDDEEAALLFFOORRAAGGEESS

1122 ttoo1155*

* England and Wales Key Stage 3years 8 and 9, Scotland S2 to S3,Northern Ireland years 9 and 10,Republic of Ireland Junior Cycle.

GENIE Cuddly Creatureswas produced with thekind assistance of Mark

Gooding, Billericay School.

Page 3: GENIE Cuddly Creatures Project · Page 7 of 31 fi GENIE Cuddly Creatures.pdf fi Version 1.1 GENIE Cuddly Creatures Project Creating a hand-held design 7 In addition to mouinting

This worksheet is copyright © New Wave Concepts Limited. All rights reserved.It may be reproduced for classroom or educational use. wwwwww..ggeenniieeoonnlliinnee..ccoomm

Page 3 of 31 ® GENIE Cuddly Creatures.pdf ® Version 1.1

GGEENNIIEE CCuuddddllyy CCrreeaattuurreess PPrroojjeecctt

Introduction 33The following list outlines many of the ideas and skills that will beintroduced as you step through this GENIE Cuddly Creatures project.

PPrroodduucctt ddeessiiggnn

® Using CAD/CAM in a product design® 2-D and 3-D modelling® Embedding an electronic circuit into a design® Selection of product materials

CCoommppuutteerr pprrooggrraammmmiinngg

® Programming using flowcharts® Responding to inputs® Controlling outputs® Digital and analogue signals® Variables and calculations® Downloading a flowchart

A 3D rendering of a hand-heldGENIE Cuddly Creatures project.

SScciieennccee aanndd mmaatthheemmaattiiccss

® Sound waves and frequencies® Power, voltage and resistance

EElleeccttrroonniicc ssyysstteemmss

® Programmable microcontrollers® Digital sound formats® Circuit simulation and modelling® Using printed circuit boards (PCBs)® Identifying electronic components® Soldering components to a PCB® Fault-finding and troubleshooting

IIDDEEAALLFFOORRSSTTEEMMWWOORRKK

*

* STEM is Science, Technology,Engineering and Mathematics.

Page 4: GENIE Cuddly Creatures Project · Page 7 of 31 fi GENIE Cuddly Creatures.pdf fi Version 1.1 GENIE Cuddly Creatures Project Creating a hand-held design 7 In addition to mouinting

This worksheet is copyright © New Wave Concepts Limited. All rights reserved.It may be reproduced for classroom or educational use. wwwwww..ggeenniieeoonnlliinnee..ccoomm

Page 4 of 31 ® GENIE Cuddly Creatures.pdf ® Version 1.1

GGEENNIIEE CCuuddddllyy CCrreeaattuurreess PPrroojjeecctt

The GENIE Audio Kit 44

The GENIE Audio Kit, shown on the right,is an intelligent, programmable electroniccircuit that can play real sound effects (seepage 19) through its loudspeaker.

At its heart is a GGEENNIIEE 1144 mmiiccrrooccoonnttrroolllleerr.

This is an integrated circuit (or IC) thatcontrols the other components on thecircuit. It is programmable, meaning thatyou can change how it behaves simply bydownloading different programs from yourcomputer onto the microchip.

The GENIE Cuddly Creatures project is based around the GENIE Audio Kit.

GENIE 14 microcontroller

Download socketLight-emitting

diode (LED)

Pushswitch

Light-dependentresistor (LDR)

Printed circuitboard (PCB)

The picture below highlights the major parts of the GENIE Audio Kit. These will be discussed in moredetail later. A full list of the parts contained within the GENIE Audio Kit can be found on page 26.

A GENIE Audio Kit (shown on itsown, without a product design).

PPrroodduucctt DDeessiiggnn TTiippss!!

The GENIE Audio Kit is also used inthe GENIE Rock Star project (which

has real MIDI music). So if you havethe GENIE Audio Kit, you canchoose to make either project.

22 in11

Page 5: GENIE Cuddly Creatures Project · Page 7 of 31 fi GENIE Cuddly Creatures.pdf fi Version 1.1 GENIE Cuddly Creatures Project Creating a hand-held design 7 In addition to mouinting

This worksheet is copyright © New Wave Concepts Limited. All rights reserved.It may be reproduced for classroom or educational use. wwwwww..ggeenniieeoonnlliinnee..ccoomm

Page 5 of 31 ® GENIE Cuddly Creatures.pdf ® Version 1.1

GGEENNIIEE CCuuddddllyy CCrreeaattuurreess PPrroojjeecctt

The cuddly creature characters 55The character of your GENIE cuddly creature will come from its design. You can draw your owncharacter, or choose from one of the following creatures, which are supplied in .png (bitmap), .svg(vector) and .dxf (CAD) formats, available for download from wwwwww..ggeenniieeoonnlliinnee..ccoomm//ccrreeaattuurree

Creatures 1 to 3 are larger and thus slightly better suited to the hand-held creature designs.

Creature 1 Creature 2 Creature 3

Creature 4 Creature 5 Creature 6

Creature 7 Creature 8 Creature 9

Page 6: GENIE Cuddly Creatures Project · Page 7 of 31 fi GENIE Cuddly Creatures.pdf fi Version 1.1 GENIE Cuddly Creatures Project Creating a hand-held design 7 In addition to mouinting

This worksheet is copyright © New Wave Concepts Limited. All rights reserved.It may be reproduced for classroom or educational use. wwwwww..ggeenniieeoonnlliinnee..ccoomm

Page 6 of 31 ® GENIE Cuddly Creatures.pdf ® Version 1.1

GGEENNIIEE CCuuddddllyy CCrreeaattuurreess PPrroojjeecctt

Creating a hand-held design 66

The GENIE Audio Kit will be form part of the finished project.

For the hand-held creature design, we will make use of thefact that the GENIE Audio Kit has been cleverly designed sothat a battery box can be mounted directly to the back of theprinted circuit board (see the pictures left and below).

Below you can also see how the two LEDs ‘poke through’ tothe front of the creature to become its ‘eyes’.

There are two ways in which GENIE Cuddly Creatures projects aredesigned to be put together—hand-held and stand-mounted.

In hand-held type of design, a panel or cut-out for the creature’scharacter is placed on top of the GENIE Audio Kit unit, so thatthey both combine to form a self-contained mobile toy.

You can find out about the second type project design (attachingthe creature to a stand) on page 9.

A 3D rendering of a finishedhand-held GENIE Cuddly

Creatures project. You can seethe two light-emitting diodes

(LEDs) and two sensors.

Reverse view of the project, showingthe circuit and battery box

Side view of the project.

Page 7: GENIE Cuddly Creatures Project · Page 7 of 31 fi GENIE Cuddly Creatures.pdf fi Version 1.1 GENIE Cuddly Creatures Project Creating a hand-held design 7 In addition to mouinting

This worksheet is copyright © New Wave Concepts Limited. All rights reserved.It may be reproduced for classroom or educational use. wwwwww..ggeenniieeoonnlliinnee..ccoomm

Page 7 of 31 ® GENIE Cuddly Creatures.pdf ® Version 1.1

GGEENNIIEE CCuuddddllyy CCrreeaattuurreess PPrroojjeecctt

Creating a hand-held design 77

In addition to mouinting the battery box, we must also consider how tomount the loudspeaker.

For the GENIE Cuddly Creatures project, we will take advantage ofanother cleverly-designed feature of the GENIE Audio Kit: its usefulability to mount the loudspeaker directly onto the printed circuit board.

You will notice that the printed circuit board hasa large semi-circular cut-out on one side. Thesize of this cut-out is designed to fit around thecentral body of a standard 50mm loudspeaker.

The loudspeaker can slot into the circuit board.

Cut-out

Mounting screws

From the underneath of the GENIE Audio Kit we can see the location ofthe two screws that will be needed to mount the printed circuit board tothe battery box:

It is recommended that the mounting screws have counter-sunk heads toensure that they do not obstruct the battery cells when they are fitted.

View from underneath(shown without batteries)

Top side.

Page 8: GENIE Cuddly Creatures Project · Page 7 of 31 fi GENIE Cuddly Creatures.pdf fi Version 1.1 GENIE Cuddly Creatures Project Creating a hand-held design 7 In addition to mouinting

This worksheet is copyright © New Wave Concepts Limited. All rights reserved.It may be reproduced for classroom or educational use. wwwwww..ggeenniieeoonnlliinnee..ccoomm

Page 8 of 31 ® GENIE Cuddly Creatures.pdf ® Version 1.1

GGEENNIIEE CCuuddddllyy CCrreeaattuurreess PPrroojjeecctt

Creating a hand-held design 88

Slot intothe board

Once in position, the loudspeaker will sit overthe many sound holes. These holes allow thesound waves to travel through the circuit board.

When finally constructed later on in the project,we suggest adding glue at contact pointsbetween the printed circuit board and themetalic part of the loudspeaker body. This willgive the loudspeaker even more stability.

The shape of creature sits on top of the printed circuit board, with just the two light-emitting diodes(LEDs), the light-dependent resistor (LDR) and push switch ‘poking through’ the panel.

A variation on this type of design is to have a thinpanel sit between the printed circuit board and thecharacter outline, as shown on the left.

You could then, for example, glue a creature designto this panel. The panel itself can be made secure byglueing to high points on the circuit, such as the topof the capactitor and the outer rim of the loud-speaker (taking care to avoid the speaker cone).

The CAD outline for this panel is available todownload from: wwwwww..ggeenniieeoonnlliinnee..ccoomm//ccrreeaattuurree

A creature placed on topof the GENIE AudioCircuit. In this 3D render,the creature is shown asbeing transparent, so thatyou can see how bothparts combine together.

Page 9: GENIE Cuddly Creatures Project · Page 7 of 31 fi GENIE Cuddly Creatures.pdf fi Version 1.1 GENIE Cuddly Creatures Project Creating a hand-held design 7 In addition to mouinting

This worksheet is copyright © New Wave Concepts Limited. All rights reserved.It may be reproduced for classroom or educational use. wwwwww..ggeenniieeoonnlliinnee..ccoomm

Page 9 of 31 ® GENIE Cuddly Creatures.pdf ® Version 1.1

GGEENNIIEE CCuuddddllyy CCrreeaattuurreess PPrroojjeecctt

Creating a stand-mounted design 99A second, slightly more sophisticated design involvesmounting the creature to a stand made of acrylic.

You can also make the stand out of wood, strong cardor metal, however these will involve more work.

A view of the standwithout the creature.

A 3D rendering of a stand-mountedcuddly creature design.

Battery box(glue the undersideto the stand’s base) Loudspeaker

(glue this face to the stand)

In addition to having a stand, the differencesbetween the stand and hand-held variants are:

® The battery box is not attached to the backof the GENIE Audio Kit.

® The loudspeaker is mounted the other wayaround, this time facing backwards.

Slot intothe board

When finally constructed later on inthe project, we suggest adding glueat contact points between theprinted circuit board and themetalic part of the loudspeakerbody. This will give the loudspeakereven more stability.

The battery box and loudspeakershould then be glued to the stand.

Page 10: GENIE Cuddly Creatures Project · Page 7 of 31 fi GENIE Cuddly Creatures.pdf fi Version 1.1 GENIE Cuddly Creatures Project Creating a hand-held design 7 In addition to mouinting

This worksheet is copyright © New Wave Concepts Limited. All rights reserved.It may be reproduced for classroom or educational use. wwwwww..ggeenniieeoonnlliinnee..ccoomm

Page 10 of 31 ® GENIE Cuddly Creatures.pdf ® Version 1.1

GGEENNIIEE CCuuddddllyy CCrreeaattuurreess PPrroojjeecctt

Creating a stand-mounted design 1100The stand for the creature is formed from an ‘L’ shape, with the battery box attached to the horizontalbase and both the creature and printed circuit board attached to the near-vertical section.

Holes are cut into the near-vertical section for the two light-emitting diodes (LEDs) and the two sensors.You do not need to cut holes for the loudspeaker since the stand is not forming an enclosure.

Printed circuit board Battery box

Cre

atur

e is

atta

ched

her

e

When using acrylic, the whole stand is typically made from a singlelaser-cut flat panel, which is then bent into the required shape byapplying heat to the intersection with a wire heating/bending tool.

It is recommended that the acrylic for the stand have a thickness of 3mm. This willgive the stand sufficient strength, while still being thin enough to be bent.

To improve stability, we recommend that the bend be about 70° to 80°.

It is also important that the panel be bent in the correct direction. The picture onthe right shows a view of the front panel from the front (creature) side. Notice thepositions of the two lower holes. These will be used for the light sensor (LDR) andpush switch respectively. The hole for the push switch is on the right and is lower.

For those without Circuit Wizard 3, 2D CAD outlines for creature standsare available to download from wwwwww..ggeenniieeoonnlliinnee..ccoomm//ccrreeaattuurree

Applying heat softens the acrylic, allowing it to be bent.

This becomesvertical

This becomesthe base

Ò

Page 11: GENIE Cuddly Creatures Project · Page 7 of 31 fi GENIE Cuddly Creatures.pdf fi Version 1.1 GENIE Cuddly Creatures Project Creating a hand-held design 7 In addition to mouinting

This worksheet is copyright © New Wave Concepts Limited. All rights reserved.It may be reproduced for classroom or educational use. wwwwww..ggeenniieeoonnlliinnee..ccoomm

Page 11 of 31 ® GENIE Cuddly Creatures.pdf ® Version 1.1

GGEENNIIEE CCuuddddllyy CCrreeaattuurreess PPrroojjeecctt

Creating a stand-mounted design 1111

You may, however, choose to construct thestand out of other types of material.

The two views shown on the right are of astand made out of metal.

For some types of materials, such as wood,the horizontal and vertical sections of thestand will usually need to be madeseparately, before being fixed together.Depending on the structural strength of thejoin, additional support may be required forthe vertical section.

The stands shown so far have been made out of an acrylic material, which is ideal for this type ofproject as it results in a strong, rigid structure. Acrylic is available in a variety of colours (both opaqueand transparent) and is well suited to computer-aided manufacturing (CAM), such as with a laser cutter.

A side view of thesame project.

A GENIE Cuddly Creatures projectconstructed with a stand made of wood.

A plan view of a GENIE Cuddly Creaturesproject attached to a metal stand.

Page 12: GENIE Cuddly Creatures Project · Page 7 of 31 fi GENIE Cuddly Creatures.pdf fi Version 1.1 GENIE Cuddly Creatures Project Creating a hand-held design 7 In addition to mouinting

This worksheet is copyright © New Wave Concepts Limited. All rights reserved.It may be reproduced for classroom or educational use. wwwwww..ggeenniieeoonnlliinnee..ccoomm

Page 12 of 31 ® GENIE Cuddly Creatures.pdf ® Version 1.1

GGEENNIIEE CCuuddddllyy CCrreeaattuurreess PPrroojjeecctt

Creating your own designs 1122

The 3D models were all created using thePro/DESKTOP 8 CAD software. You candownload these files from our website at:

wwwwww..ggeenniieeoonnlliinnee..ccoomm//ccrreeaattuurree

Now that you have seen how the hand-held and stand-mounted designs are put together, you may beready to create your own designs. You may wish, for example, to create a new character, modify anexsiting creature’s shape or even create an entirely different type of interactive toy!

All of the designs shown in these worksheets were created using the CAD/CAM design tools within theCircuit Wizard 3 software. By combining both electronic circuit design and CAD/CAM panel design,Circuit Wizard 3 was able to automatically calculate and produce all of the necessary mounting holes.

Once created, the design outlines were then exported in .dxf format for further editing and manufacture.

A computer rendered 3D design.

PPrroodduucctt DDeessiiggnn TTiippss!!

The designs presented in these

worksheets are only intended

to act as a starting point for

your own creative ideas and

product designs.

You can design you own

products and then use these

instructions to incorporate the

GENIE Audio Kit.

Page 13: GENIE Cuddly Creatures Project · Page 7 of 31 fi GENIE Cuddly Creatures.pdf fi Version 1.1 GENIE Cuddly Creatures Project Creating a hand-held design 7 In addition to mouinting

This worksheet is copyright © New Wave Concepts Limited. All rights reserved.It may be reproduced for classroom or educational use. wwwwww..ggeenniieeoonnlliinnee..ccoomm

Page 13 of 31 ® GENIE Cuddly Creatures.pdf ® Version 1.1

GGEENNIIEE CCuuddddllyy CCrreeaattuurreess PPrroojjeecctt

Creating your own designs 1133

49m

m1.

92”

30m

m1.

18”

74mm2.91”

HHeeiigghhtt

The PCB’s height includingcomponents, legs and soldering, isapproximately 15mm (0.6”).

MMoouunnttiinngg

There are many large holes, but thetwo indicated by the arrows aredesigned for mounting the PCB.

These holes have a diameter of3mm, which makes them suitablefor use with M3-size screws/nuts.

The spacing between the two holesis 30mm (1.18”).

The other holes were not designedfor mounting and are described onthe power and loudspeaker pages.

28mm1.10”

From the diagram below you can see the physical dimensions of the GENIE Audio Kit as well as theposition and size of two holes used for mounting. This information is useful when creating new designs.

∅ 3mm(M3)

9mm

0.35

”10

mm

0.39

10mm0.39”

∅ 6mm

∅ 7mm

∅ 7mm

∅ 7mm

The second diagram details the location of the holes needed for the LEDs and sensors.

39m

m1.

54”

5mm0.20”

5mm0.20”

19.5mm0.77”

10mm0.39”

19.5mm0.77”

3mm0.12”

30mm1.18”

PPrroodduucctt DDeessiiggnn TTiippss!!

If you have Circuit Wizard 3,

these holes and mounting details

can be created automatically.

Page 14: GENIE Cuddly Creatures Project · Page 7 of 31 fi GENIE Cuddly Creatures.pdf fi Version 1.1 GENIE Cuddly Creatures Project Creating a hand-held design 7 In addition to mouinting

This worksheet is copyright © New Wave Concepts Limited. All rights reserved.It may be reproduced for classroom or educational use. wwwwww..ggeenniieeoonnlliinnee..ccoomm

Page 14 of 31 ® GENIE Cuddly Creatures.pdf ® Version 1.1

GGEENNIIEE CCuuddddllyy CCrreeaattuurreess PPrroojjeecctt

Modelling the GENIE Audio Kit 1144With the product design chosen, we canprogress onto the making the project cometo life through the GENIE Audio Kit.

The intelligence is provided by a sequence ofinstructions that are created on a computerand then downloaded to the microcontroller.This process is known as pprrooggrraammmmiinngg.

With GENIE, the instructions can be in theform of either graphical flowcharts or (themore advanced) BASIC text commands.

For the GENIE Cuddly Creatures project, wewill be programming using flowcharts.

Traditionally, developing these instructions has been difficult, however just as with computer-aided design(CAD), we can take advantage of computer modelling to develop and test a design before it is built.

You can find the Circuit Wizard 3 design and simulation files within that product’s RReessoouurrccee CCeennttrree.

For those without access to Circuit Wizard 3, you can instead use the free GENIE Programming Editorsoftware available from wwwwww..ggeenniieeoonnlliinnee..ccoomm//eeddiittoorr. This software allows you to write and downloadyour flowcharts, but does not enable you to design, simulate and test your electronic circuits on screen.

A CAD model of theGENIE Audio Kit.

An example of computermodelling is shown left.

Here we are using CircuitWizard 3 to simulate anelectronic circuit model ofthe GENIE Audio Kit.

Circuit Wizard 3 allows usto run the simulation andsee how our flowchartbehaves as we interact withit. We can detect mistakesearly on, saving time.

One example of this can beseen in the picture. Here wehave asked the software tocolour each connection adifferent colour based onthe voltage at that point.

A computer simulation model of theGENIE Audio Kit in Circuit Wizard 3.

Page 15: GENIE Cuddly Creatures Project · Page 7 of 31 fi GENIE Cuddly Creatures.pdf fi Version 1.1 GENIE Cuddly Creatures Project Creating a hand-held design 7 In addition to mouinting

This worksheet is copyright © New Wave Concepts Limited. All rights reserved.It may be reproduced for classroom or educational use. wwwwww..ggeenniieeoonnlliinnee..ccoomm

Page 15 of 31 ® GENIE Cuddly Creatures.pdf ® Version 1.1

GGEENNIIEE CCuuddddllyy CCrreeaattuurreess PPrroojjeecctt

Programming the GENIE to play sound effects 1155Creating a flowchart to control the GENIE Audio Kit requires either the GGEENNIIEE PPrrooggrraammmmiinngg EEddiittoorrsoftware or version 3 of the CCiirrccuuiitt WWiizzaarrdd software. The GENIE Programming Editor software isdescribed here; for information on using Circuit Wizard 3, please see the following page.

Run the GENIE Programming Editor software by clicking on its icon. Once it loads, click on the NNeewwbutton on the toolbar or choose NNeeww from the FFiillee menu. You will then see the screen below.

At the top of the main GENIE Programming Editor window is the toolbar.Along with the normal buttons, such as OOppeenn, SSaavvee, PPrriinntt and UUnnddoo, onthis toolbar you will also find buttons for controlling your flowchart.

A SSttaarrtt command is placed for you in your flowchart.

On the right of the main window is the GGaalllleerryy. It is from here that youwill select which other commands you wish to include in your flowchart.

The GENIE ProgrammingEditor software.

The GENIE ProgrammingEditor icon.

Next, you need to tell GENIE which typeof chip you are using. To do this, click onthe MMiiccrrooccoonnttrroolllleerr button on the toolbarand choose PPrrooggrraamm SSeettttiinnggss.

Select a GGEENNIIEE 1144 chip from the list. Theinputs and output signals for this type ofmicrocontroller are fixed, so just click onthe OOKK button to continue.

You are now ready to draw a flowchart.This is described on page 17.

Page 16: GENIE Cuddly Creatures Project · Page 7 of 31 fi GENIE Cuddly Creatures.pdf fi Version 1.1 GENIE Cuddly Creatures Project Creating a hand-held design 7 In addition to mouinting

This worksheet is copyright © New Wave Concepts Limited. All rights reserved.It may be reproduced for classroom or educational use. wwwwww..ggeenniieeoonnlliinnee..ccoomm

Page 16 of 31 ® GENIE Cuddly Creatures.pdf ® Version 1.1

GGEENNIIEE CCuuddddllyy CCrreeaattuurreess PPrroojjeecctt

Programming the GENIE to play sound effects 1166Circuit Wizard 3 is our flagship software combining GENIE programming, circuit design and simulationalong with the a range of built-in CAD/CAM design tools. The creature panels, circuits and flowcharts forthis project were all created using the Circuit Wizard 3 software.

The CircuitWizard 3 icon.

The Resource Centre window.

Viewing a creature design resource.

To run Circuit Wizard 3, double click onits icon (pictured above).

Once it loads, you will see the RReessoouurrcceeCCeennttrree window (see right). This is whereyou can gain access to a wide range ofresources that show how GENIE can beused to add intelligence to your designingand making projects.

On the front screen of the RReessoouurrcceeCCeennttrree are six areas for you to explore:

‘LLiigghhttiinngg aanndd SSeennssiinngg’, ‘SSoouunndd aanndd MMuussiicc’and ‘MMoottoorrss aanndd RRoobboottiiccss’ all provideinformation on how to use and controlparticular inputs and outputs.

‘DDeessiiggnn aanndd CCAADD//CCAAMM’ is where you canlearn about the built-in panel design toolsand access resources for this project, suchas the one shown on the right (this is anexample of stand-mounted creaturedesign within Circuit Wizard 3).

Once you are ready to progress yourknowledge, you can access the topicswithin the ‘SSTTEEMM AAccttiivviittiieess’ section. Hereyou will find information on thecomputing, scientific and mathematicalprinciples behind the GENIE system, aswell as starting points for engineeringyour own electrical or electronic circuits.

The final area, ‘FFuurrtthheerr IInnffoorrmmaattiioonn’,provides access to support worksheets forthe various kits and components.

Page 17: GENIE Cuddly Creatures Project · Page 7 of 31 fi GENIE Cuddly Creatures.pdf fi Version 1.1 GENIE Cuddly Creatures Project Creating a hand-held design 7 In addition to mouinting

This worksheet is copyright © New Wave Concepts Limited. All rights reserved.It may be reproduced for classroom or educational use. wwwwww..ggeenniieeoonnlliinnee..ccoomm

Page 17 of 31 ® GENIE Cuddly Creatures.pdf ® Version 1.1

GGEENNIIEE CCuuddddllyy CCrreeaattuurreess PPrroojjeecctt

Programming the GENIE to play sound effects 1177

A model of the GENIEAudio Kit.

You can click on theDDeessiiggnn and FFlloowwcchhaarrtttabs at the bottom ofthe window to switchbetween the differentpages of the design.

Whilst the model is simulating, you can takereadings with the mouse (for example, bymoving over a track or pad) or control theanimation by choosing one of the options fromthe left-hand SSttyyllee toolbar.

The two most common styles to view whenrunning a simulation are:

® CCuurrrreenntt FFllooww. When selected, the softwarewill animate the flow of electrical current inthe circuit.

® LLooggiicc LLeevveellss. Shows the high or low digitallogic levels at each part of the circuit.

A wide range of instruments and tools allow youto check your circuit before building (this alsoapplies to circuits you’ve designed yourself).

In the example above, a virtual mulimeter isbeing used to check the voltage on pin 3 of theGENIE microcontroller. This pin is where theconnection to the light sensor (input ‘A/D4’, seepage 23) comes into the chip.

Simulation is able to show that as the light sensorinput is adjusted (via the interactive control), thevoltage on pin 3 of the microcontroller changes.

Voltage, current, power and charge can all bemeasured and tested on the screen.

RRuunn button

Virtual multimeter

Interactiveinput sensor

SStty yl le eto

olbar

PPaaggee tabs

In addition to simulating just the GENIE flowchart, Circuit Wizard 3 also allows you to also simulate theflowchart in context with the printed circuit board, as can be seen below.

With a GENIE Audio Kitmodel selected ordrawn (as described onpage 13), simply clickon the RRuunn button onthe top toolbar.

When you simulate acircuit, Circuit Wizard 3will model both theflowchart and thecircuit’s electronics.

Page 18: GENIE Cuddly Creatures Project · Page 7 of 31 fi GENIE Cuddly Creatures.pdf fi Version 1.1 GENIE Cuddly Creatures Project Creating a hand-held design 7 In addition to mouinting

This worksheet is copyright © New Wave Concepts Limited. All rights reserved.It may be reproduced for classroom or educational use. wwwwww..ggeenniieeoonnlliinnee..ccoomm

Page 18 of 31 ® GENIE Cuddly Creatures.pdf ® Version 1.1

GGEENNIIEE CCuuddddllyy CCrreeaattuurreess PPrroojjeecctt

Programming the GENIE to play sound effects 1188The first flowchart we will look at is shown on the left. It plays asound and then repeats. The LEDs will flash along with the sound.

All GENIE flowcharts begin with a SSttaarrtt command. When runningthe flowchart, GENIE simply follows the arrows. Each commandthat GENIE encounters while following the arrows will be run.

With most commands, including the two shown here, arrows goboth into and out of the command.

When you create a new flowchart, a SSttaarrtt command will beplaced automatically on the page. To add other commands,you should use the GGaalllleerryy.

If the Gallery is not visibile, click on the GGaalllleerryy tab thatappears to the right of application’s window. From here youcan drag commands onto the page.

For the flowchart above, we will want to locate the SSoouunnddcomand and drag it below the SSttaarrtt command. To locate it,you will need to scroll down through the list of commands.

When you drop a command below (and close by) anotherone, a line and arrow will be placed automatically. To addthe second line (the one looping back to the SSttaarrtt command),you need draw it using your mouse.

Now move the mouse down and to the left. A line will followyour mouse.

Click with the left mouse button to add a bend when you arenot over anything. Keep moving the mouse upwards so that itis level with the SSttaarrtt command. Click again to add a secondbend and then move the mouse right until the square appears.When you are over the square, press the left mouse button afinal time to connect line to the SSttaarrtt command.

Lines can be drawn from any oneof the three squares shown on theSSoouunndd command.

Move the mouse over the bottomsquare then click and release theleft mouse button.

Page 19: GENIE Cuddly Creatures Project · Page 7 of 31 fi GENIE Cuddly Creatures.pdf fi Version 1.1 GENIE Cuddly Creatures Project Creating a hand-held design 7 In addition to mouinting

This worksheet is copyright © New Wave Concepts Limited. All rights reserved.It may be reproduced for classroom or educational use. wwwwww..ggeenniieeoonnlliinnee..ccoomm

Page 19 of 31 ® GENIE Cuddly Creatures.pdf ® Version 1.1

GGEENNIIEE CCuuddddllyy CCrreeaattuurreess PPrroojjeecctt

With the GENIE Programming Editor, you should instead double-click with the left mouse button on the SSoouunndd command.

First you must select the SSaammppllee option.

Next, click on the SSiiggnnaallss so that theymatch the ones shown on the far left. Ifthe signals are currently empty, youshould click on signal number 44 once,followed by signal 22 and then signal 00.

These steps are not needed if you aremodelling the GENIE Audio Kit withinCircuit Wizard 3 because it can selectthe settings automatically, since itknows which printed circuit board youare using.

Once you have added a SSoouunndd command to your flowchart, youmust next select the sound effect that is to be played when thecommand is run (see the next page for more on sound effects).

For those using Circuit Wizard 3, you can select sound effectsthrough the SSoouunndd FFXX CCeennttrree.

Click on the SSoouunndd command that you wish to change (this is notneeded if there is only one command).

Once done, open theSSoouunndd FFXX CCeennttrree andmove the mouse to theright-hand edge to reveala list of available sounds,as shown on the left.

You are not limited to the sounds that come with the software. With bothCircuit Wizard 3 and GENIE Programming Editor, you can import sound effectsfrom audio software such as AAuuddaacciittyy. To import, simply drag a ‘.wav’ file (8-or 16-bit, uncompressed) onto the SSoouunndd FFXX CCeennttrree or SSoouunndd windows.

CCRREEAATTEEYYOOUURROOWWNN

SSOOUUNNDDSS

Click on a sound to select it

Choosing which sound is to be played 1199

Finally, click on theSSoouunndd drop-down box

to reveal a list ofavailable sounds.

Page 20: GENIE Cuddly Creatures Project · Page 7 of 31 fi GENIE Cuddly Creatures.pdf fi Version 1.1 GENIE Cuddly Creatures Project Creating a hand-held design 7 In addition to mouinting

This worksheet is copyright © New Wave Concepts Limited. All rights reserved.It may be reproduced for classroom or educational use. wwwwww..ggeenniieeoonnlliinnee..ccoomm

Page 20 of 31 ® GENIE Cuddly Creatures.pdf ® Version 1.1

GGEENNIIEE CCuuddddllyy CCrreeaattuurreess PPrroojjeecctt

Understanding sound samples and audio 2200

The loudspeaker cone is controlled by amagnet (which is itself controlled by theGENIE microcontroller) that forces thecone to move. This movement generatescompression waves in the air, which areeventually picked up by your ear, formingthe sound you hear.

The GENIE microcontroller at the heart of the GENIEAudio Kit plays sound effects by replicating sound waves.

SSoouunndd wwaavveess

Sound waves are compressions in the air molecules that arepicked up by your ear or a sensor, such as a microphone.

These waves are then ddiiggiittiisseedd by GENIE so that they canbe stored in the microcontroller’s memory (see the middlepicture on the right). This process, known as ssaammpplliinngg,involves determining a numerical value for the amplitude(its height or intensity) at each point along the wave.

The quality of a digitised sound is determined by two mainfactors, (1) the number of separate measurements that aretaken, and (2) the range of numbers that are used to storeeach of those individual amplitude measurements.

For the GENIE microcontroller, it takes 16,000 measure-ments of the wave per second, and records each of thosemeasurements as a value ranging between 0 and 255.

When the GENIE microcontroller is playing back thesound, it takes each of these stored numerical values andthen adjusts the position of the loudspeaker cone toreplicate the compression wave of the original sound.

You can learn more about sound via the followingWikipedia article: hhttttpp::////eenn..wwiikkiippeeddiiaa..oorrgg//wwiikkii//SSoouunndd

CCoommpprreessssiioonn

Digitised sound waves take up a lot of memory. Forexample, to store just one second of a sound recording at16,000Hz with 8-bits per value (giving a range of 0 to255) requires exactly 16,000 bytes of memory.

On a desktop or tablet computer this would be noproblem, but a small microcontroller such as the GENIE 14used on the GENIE Audio Kit only has about 10,000 bytesto store your entire flowchart or BASIC program.

To resolve this, GENIE ccoommpprreesssseess the digitised sound sothat it occupies a much smaller amount of memory, whichis why you can have several different sound effects in yourprograms (the number depending on the sounds used).

Sound waves with different frequencies.The waves shown are pure sine waves.

A digitised section of a sound wave.

Page 21: GENIE Cuddly Creatures Project · Page 7 of 31 fi GENIE Cuddly Creatures.pdf fi Version 1.1 GENIE Cuddly Creatures Project Creating a hand-held design 7 In addition to mouinting

This worksheet is copyright © New Wave Concepts Limited. All rights reserved.It may be reproduced for classroom or educational use. wwwwww..ggeenniieeoonnlliinnee..ccoomm

Page 21 of 31 ® GENIE Cuddly Creatures.pdf ® Version 1.1

GGEENNIIEE CCuuddddllyy CCrreeaattuurreess PPrroojjeecctt

Responding to inputs from the push switch 2211Some types of input signal, such as push switches, can only beeither on or off. These are known as ddiiggiittaall signals.

On the GENIE Audio Kit there is a push switch. It is connectedto the input marked by the text ‘AA//DD00’.

This means that it is the input number 00. The ‘A/D’ prefixindicates that the GENIE pin to which the input is wired allowsboth analogue and digital components to be connected). Whenused for digital within the software, it will be called DD00.

The DDiiggiittaall command allows you to make a decision based onwhether the push switch (or any digital signal) is either pressed(on) or not pressed (off).

When a digital signal is on, it has the value ‘11’ whereas when itis off, it has the value ‘00’.

Double-click on the command to select which digital inputs youwish to check. GENIE will follow the ‘YY’ (yes) path when thedigital signal matches the chosen pattern, otherwise it willfollow the ‘NN’ (no) path. For the GENIE Audio Kit, we suggestclicking on the right-most input until it shows a ‘1’:

Use the DDiiggiittaall command torespond to a digital signals.

Push switch

A view of the GENIE Audio Kit,showing the push switch.

A simple flowchart that plays a tunewhenever the push switch is pressed.The DDiiggiittaall command has two linescoming out of it, unlike the others.

The DDiiggiittaall command should be incorporated into a largerflowchart. The flowchart tells the GENIE microcontroller whataction to take when it reaches the command.

This can be seen on the right. In the flowchart shown, a soundwill be played whenever the switch is pressed.

Page 22: GENIE Cuddly Creatures Project · Page 7 of 31 fi GENIE Cuddly Creatures.pdf fi Version 1.1 GENIE Cuddly Creatures Project Creating a hand-held design 7 In addition to mouinting

This worksheet is copyright © New Wave Concepts Limited. All rights reserved.It may be reproduced for classroom or educational use. wwwwww..ggeenniieeoonnlliinnee..ccoomm

Page 22 of 31 ® GENIE Cuddly Creatures.pdf ® Version 1.1

GGEENNIIEE CCuuddddllyy CCrreeaattuurreess PPrroojjeecctt

Responding to inputs from the light sensor 2222Not all input signals are digital. Some types of signal, such asthose for temperature or light, can be at a number of differentlevels. These are known as aannaalloogguuee signals.

On the GENIE Audio Kit there is a light sensor. It is connected tothe input marked by the text ‘AA//DD44’.

This means that it is the input number 44. As with the pushswitch, the ‘A/D’ prefix indicates that the GENIE pin to whichthe input is wired allows both analogue and digital componentsto be connected. When used for analogue, it will be called AA44.

Light sensor

A view of the GENIE Audio Kit,showing the light sensor.

A simple flowchart that plays a soundwhenever the light level goes low,such as when the sensor is covered.The AAnnaalloogguuee command, like theDDiiggiittaall command, has two out lines.

Use the AAnnaalloogguuee command torespond to analogue signals.

The AAnnaalloogguuee command allows you to check an analogue signalto see if its value lies within a given range.

With GENIE, analogue levels can vary between 00 (the lowestlevel) and 225555 (the highest). For the light sensor, low values arewhen less light is detected, and high values when it is brighter.

Double-click on the command to select a sensor to check and arange. GENIE will follow the ‘YY’ (yes) path when the signal is inrange, otherwise it will follow the ‘NN’ (no) path.

For example, to test if the light sensor on analogue signal A4 isbetween 0 and 100, you should enter the following:

To allow you to fine-tune the sensor values, you can make useof the CCaalliibbrraattee SSeennssoorr command with a real GENIE Audio Kit.

Page 23: GENIE Cuddly Creatures Project · Page 7 of 31 fi GENIE Cuddly Creatures.pdf fi Version 1.1 GENIE Cuddly Creatures Project Creating a hand-held design 7 In addition to mouinting

This worksheet is copyright © New Wave Concepts Limited. All rights reserved.It may be reproduced for classroom or educational use. wwwwww..ggeenniieeoonnlliinnee..ccoomm

Page 23 of 31 ® GENIE Cuddly Creatures.pdf ® Version 1.1

GGEENNIIEE CCuuddddllyy CCrreeaattuurreess PPrroojjeecctt

Controlling the two light-emitting diodes (LEDs) 2233LED connected to output QQ22

LED connectedto output QQ00

A view of the GENIE Audio Kit, showingthe two light-emitting diodes (LEDs).

The GENIE Audio Kit has two lliigghhtt--eemmiittttiinngg ddiiooddee, orLLEEDD,, outputs. These LEDs will light up whenever theappropriate output signal goes high.

Normally the LEDs will flash along with the sound,however when a sound is not playing, you can turn theLEDs on or off yourself via flowchart commands.

Use the HHiigghh command to turna single LED on.

Use the LLooww command to turna single LED off.

Use the OOuuttppuuttss command tocontrol more than one LED.

The two LEDs are connected to the following outputson the GENIE 14 microcontroller:

® The first LED is connected to output QQ00.

® The second LED is connected to output QQ22.

An example can be seen below. In the flowchart, thefirst LED is turned on whenever the push switch ispressed (and turned off again when it is released).

The first LED (connected to output Q0) has anextra significance when programming GENIE.This output is also referred to as the SSTTAATTUUSSoutput because it will flash whenever a programis being downloaded to the microchip (it helpsyou check that everything is working okay).

Controlling the LED connected to output QQ00.

Page 24: GENIE Cuddly Creatures Project · Page 7 of 31 fi GENIE Cuddly Creatures.pdf fi Version 1.1 GENIE Cuddly Creatures Project Creating a hand-held design 7 In addition to mouinting

This worksheet is copyright © New Wave Concepts Limited. All rights reserved.It may be reproduced for classroom or educational use. wwwwww..ggeenniieeoonnlliinnee..ccoomm

Page 24 of 31 ® GENIE Cuddly Creatures.pdf ® Version 1.1

GGEENNIIEE CCuuddddllyy CCrreeaattuurreess PPrroojjeecctt

Playing more than one sound effect 2244The GENIE microcontroller at the heart of theGENIE Audio Kit allows even more complexflowcharts to be programmed.

One example can be seen on the left. Itextends the push switch flowchart so that adifferent sound will be played (from a list ofthree) each time the switch is pressed.

The flowchart works by storing the number ofthe next sound to be played in a vvaarriiaabbllee.

Variables are special parts of the GENIEmicrocontroller’s memory that allow you toperform and remember calculations.

These variables can hold any whole numberbetween 0 and 255 and are referred to bydifferent letters of the alphabet. Here we areusing the first variable, named AA.

The flowchart increases the value stored invariable AA each time the switch is pressed (thisis the IInncc AA command). It then CCoommppaarrees thevalue of AA to select a tune.

A similar approach is taken in the flowchart on theright. Here, instead of playing the next sound inthe sequence, a sound effect is selected based onthe value of a random number between 1 and 3(inclusive) using the RRaannddoomm command.

Because the flowchart does not check to see if thevalue of the random number generated differsfrom the one chosen last time, the flowchart willsometimes play the same sound twice in succession.

You should also note that because sound effectstake up a lot of GENIE’s memory, you may needto select shorter ones when playing several.

Page 25: GENIE Cuddly Creatures Project · Page 7 of 31 fi GENIE Cuddly Creatures.pdf fi Version 1.1 GENIE Cuddly Creatures Project Creating a hand-held design 7 In addition to mouinting

This worksheet is copyright © New Wave Concepts Limited. All rights reserved.It may be reproduced for classroom or educational use. wwwwww..ggeenniieeoonnlliinnee..ccoomm

Page 25 of 31 ® GENIE Cuddly Creatures.pdf ® Version 1.1

GGEENNIIEE CCuuddddllyy CCrreeaattuurreess PPrroojjeecctt

Building the GENIE Audio Kit 2255With the product casing and flowchart done, we are now ready to build the GENIE Audio Kit.

The GENIE Audio Kit consists of a pprriinntteedd cciirrccuuiittbbooaarrdd (PCB, shown on the left) onto which areplaced a number of electronic components.

It is these components that provide the kit with theability to play music.

The components must be placed in specific positionson the PCB. These positions are indicated by a seriesof markings and labels on the upper-side of the PCB.These markings are known as the ssiillkk ssccrreeeenn.

Once placed, components must then be soldered tothe under-side of the PCB so that they make anelectrical contact.

GENIE 14 plusthe chip socket

Downloadsocket

Light-emittingdiode (LED)

Resistor

Transistor

Diode

Push switch

Capacitor

Light-dependentresistor (LDR)

Printed circuitboard (PCB)

The picture below will allow you toidentify the types of components that wewill be placing on the PCB.

A detailed list of the components can befound on the next page.

A view of the components mounted tothe top side of the PCB. Note that theQ1 and Q3 outputs are not used in theGENIE Cuddly Creatures project.

Page 26: GENIE Cuddly Creatures Project · Page 7 of 31 fi GENIE Cuddly Creatures.pdf fi Version 1.1 GENIE Cuddly Creatures Project Creating a hand-held design 7 In addition to mouinting

This worksheet is copyright © New Wave Concepts Limited. All rights reserved.It may be reproduced for classroom or educational use. wwwwww..ggeenniieeoonnlliinnee..ccoomm

Page 26 of 31 ® GENIE Cuddly Creatures.pdf ® Version 1.1

GGEENNIIEE CCuuddddllyy CCrreeaattuurreess PPrroojjeecctt

Building the GENIE Audio Kit 2266A GENIE Audio Kit has the following component parts:

QQttyy.. CCoommppoonneenntt ddeessccrriippttiioonn

1 GENIE Audio printed circuit board (PCB)1 GENIE 14 (14-pin) integrated circuit (IC)1 3xAA battery pack1 Battery clip1 Loudspeaker1 14-pin chip socket1 Download socket2 330 ohm (330Ω) resistor1 1,000 Ohm (1kΩ) resistor2 10,000 Ohm (10kΩ) resistor1 22,000 Ohm (22kΩ) resistor1 100,000 Ohm (100kΩ) resistor1 220 micro-Farad (220µF) electrolytic capacitor1 1N4001 diode1 BC337 transistor1 Push switch1 Light-depended resistor (LDR)2 Green light-emitting diodes (LEDs)

A view of the underside of the printedcircuit board. The component legs willbe soldered to this side of the board.

Most of the components are easy to identify (if you need guidance, seethe picture on the previous page). The seven resistors however are moredifficult. These need to be identified by their different colour bands.

The resistor values and colour bands are:

300Ω Orange, orange, brown and gold1kΩ Brown, black, red and gold10kΩ Brown, black, orange and gold22kΩ Red, red, orange and gold100kΩ Brown, black, yellow and gold

MMoorree IInnffoorrmmaattiioonn!!

More detailed information on the GENIE Audio

Kit and printed circuit board can be found in the

separate GGEENNIIEE 1144 AAuuddiioo PPCCBB pdf.

Ω is the symbol for OOhhmm, which is a measure of how much it resists theflow of electricity. A higher value will result in a smaller elecrical flow.

Page 27: GENIE Cuddly Creatures Project · Page 7 of 31 fi GENIE Cuddly Creatures.pdf fi Version 1.1 GENIE Cuddly Creatures Project Creating a hand-held design 7 In addition to mouinting

This worksheet is copyright © New Wave Concepts Limited. All rights reserved.It may be reproduced for classroom or educational use. wwwwww..ggeenniieeoonnlliinnee..ccoomm

Page 27 of 31 ® GENIE Cuddly Creatures.pdf ® Version 1.1

GGEENNIIEE CCuuddddllyy CCrreeaattuurreess PPrroojjeecctt

Building the GENIE Audio Kit 2277

First, switch on the soldering iron. It will onlytake a few minutes for the iron to reachoperating temperature. Once the soldering iron ishot, carefully clean the soldering iron tip with amoist (but not too wet) sponge.

Melt some solder at the chamfered end of thesoldering iron tip. This is called ‘tinning’ and itwill aid the flow of solder from the solderingiron to the copper track on the printed circuitboard and component pins.

Next, solder each component onto the board.We recommend that you fit them in this order:

1. Resistors2. Diode3. Download socket4. 14-pin chip socket (not the GENIE IC)5. Transistor6. Capacitor7. Light-emitting diodes (LEDs)8. Light-dependent resistor (LDR)9. Push switch

Use the picture on page 25 along with the PCB’ssilk screen as guides when placing the differentcomponents. See on the right for further help.

When fitting components such as resistors, werecommend that you use long-nosed pliers tobend the legs through 90 degrees. This will makethe components easier to place.

Some of the components need to be fitted thecorrect way around:

® The diode should be placed so that the stripeon the diode matches the stripe on the board.

® The 14-pin chip socket should be positionedso that the notch matches the notch shownon the printed circuit board’s silk screen.

® The flat side of the transistor must match theflat side shown on the board.

® When fitting the electrolytic capacitor, youneed to ensure that the positive side of thecapacitor (the side without the stripe) isnearest to the ‘+’ sign on the board.

® The LEDs should be fitted so that the flatedges on the base of the LEDs line up with theflat edges shown on the board.

® So that the LDR and LEDs are visible when apanel for the creature’s face is added on topof the printed circuit board, you shouldmount these components higher than wouldnormally be the case (as shown on the left).

To solder a pin, hold the soldering iron onto theboard for a few seconds, then quickly touch thetip with a small amount of solder.

You should always remember to replace thesoldering iron back into the stand after solderingand repeat cleaning the tip of the iron with themoist sponge before the start of each solderingoperation.

Finally, cut off any excess wire or componentlegs for a tidy finish.

The following instructions describe how to solder the different components to the printed circuit board.

TTaakkee ccaarree wwhheenn uussiinngg aahhoott ssoollddeerriinngg iirroonn!!

The LDR and LEDs are shown mountedabove the base of the printed circuitboard. This is so that they can appear atthe front of the creature’s face.

Page 28: GENIE Cuddly Creatures Project · Page 7 of 31 fi GENIE Cuddly Creatures.pdf fi Version 1.1 GENIE Cuddly Creatures Project Creating a hand-held design 7 In addition to mouinting

This worksheet is copyright © New Wave Concepts Limited. All rights reserved.It may be reproduced for classroom or educational use. wwwwww..ggeenniieeoonnlliinnee..ccoomm

Page 28 of 31 ® GENIE Cuddly Creatures.pdf ® Version 1.1

GGEENNIIEE CCuuddddllyy CCrreeaattuurreess PPrroojjeecctt

With the components mounted on the printed circuit board, the power and loudspeaker connectionscan then be soldered.

The final step required to complete the building of the GENIEAudio Kit is to fit the GENIE microcontroller into the chip socket.

As with the chip socket itself, the GENIE microcontroller must befitted the correct way around. You will notice that the chip hasboth a notch and a ‘dot’ at one end of the chip. These identifywhich of the chip’s pins is number 1. Insert the chip so that thesematch the notch and ‘1’ shown on the printed circuit board.

Care should be taken not to damage the chip’s legs, but you mayneed to bend them gently as you insert the chip. The chip shouldbe seated flat against the top of the socket.

The GENIE chip inserted into the 14-pinchip socket. The pin 1 ‘dot’ is highlighted.

Building the GENIE Audio Kit 2288

Power connectionswired to the board.

Loudspeaker wired to the board.

To wire up the power connections, you need to solder the red(postive) and black (negative) wires coming from the battery clipto the ‘+V’ and ‘0V’ holes on the PCB, pictured on the right.

Before soldering, we recommend looping the wires from thebattery clip through the two nearby holes as shown. This acts as astrain relief, helping to protect the wires from damage.

For the loudspeaker, two wires will need to be soldered to the ‘SPEAKER’ holes on the PCB, as shownabove. The other end of these wires will be soldered to the two solder tabs on the loudspeaker itself.

Refer to pages 8 and 9 to determine the correct orientation of the loudspeaker for your project.

For neatness, you can run the wires through one or more of the sound holes. A wire length of about 4to 5 cm is normally sufficient. Remember to strip the wires at both ends before soldering.

Page 29: GENIE Cuddly Creatures Project · Page 7 of 31 fi GENIE Cuddly Creatures.pdf fi Version 1.1 GENIE Cuddly Creatures Project Creating a hand-held design 7 In addition to mouinting

This worksheet is copyright © New Wave Concepts Limited. All rights reserved.It may be reproduced for classroom or educational use. wwwwww..ggeenniieeoonnlliinnee..ccoomm

Page 29 of 31 ® GENIE Cuddly Creatures.pdf ® Version 1.1

GGEENNIIEE CCuuddddllyy CCrreeaattuurreess PPrroojjeecctt

Powering the GENIE Audio Kit 2299You should now be ready to switch on your circuit.However, for any electrical or electronic circuit to workthere first needs to be a source of ppoowweerr.

Like most electronic toys, the GENIE Audio Kit gets itspower from standard AA power cells, shown on the left.These cells are measured by their vvoollttaaggee (voltage is ameasure of the cell’s electrical potential).

The positive end of anAA cell is usuallymarked by a ‘+’ sign.

With the design completed and the electroniccircuit built, the three cells should then beinserted into the battery box.

As with all power cells, it matters which wayaround the AA cell is inserted: there is appoossiittiivvee end and a nneeggaattiivvee end. The positiveend is usually marked by a ‘+’ sign.

The cells are placed in sseerriieess, meaning that thenegative end of the first cell connects to thepositive end of the second, and so on.

The two pictures on the right show how toinsert the AA cells into the battery box.

These AA power cells typically produce anelectrical potential of about 1.5 volts each.

For the GENIE Audio Kit we will need three ofthese cells, giving a total of 4.5 volts.

On a circuit diagram this would be representedby the following circuit symbols:

Circuit symbol for anindividual power cell.

Circuit symbol for abattery of cells.

Battery box showing all three cells insertedand the battery clip connected.

Spring

An empty battery box before the cellshave been inserted. The negative end ofthe power cell should be against thespring. Notice that the middle spring is atthe other end, which means that the cellmust also go in the other way around:

A power cell.

Page 30: GENIE Cuddly Creatures Project · Page 7 of 31 fi GENIE Cuddly Creatures.pdf fi Version 1.1 GENIE Cuddly Creatures Project Creating a hand-held design 7 In addition to mouinting

This worksheet is copyright © New Wave Concepts Limited. All rights reserved.It may be reproduced for classroom or educational use. wwwwww..ggeenniieeoonnlliinnee..ccoomm

Page 30 of 31 ® GENIE Cuddly Creatures.pdf ® Version 1.1

GGEENNIIEE CCuuddddllyy CCrreeaattuurreess PPrroojjeecctt

Downloading a program to the GENIE microcontroller 3300

As soon as the program has beendownloaded you will see theabove screen (c) and GENIE willstart running your flowchart.

Your GENIE project is now readyto go! You can disconnect thecable and use your GENIE RockStar away from the computer.

üüFFiinniisshheedd!!

Once you have written your flowchart program,you need to store it on the GENIE chip. Here’show you do it:

11 Wire-up the built GENIE circuit board andconnect up a suitable battery power supply.

22 Plug the GENIE cable into the downloadsocket on the GENIE circuit board.

33 Once done, the PPrrooggrraamm panel in thesoftware will then show a ‘Connected’message (see picture a).

44 Click on the RRuunn LLiivvee option. Your flowchartwill be transferred onto the GENIE chip—thisis known as ddoowwnnllooaaddiinngg (see picture b).

The green STATUS LED will flashas the download takes place.

It tells you everything is OK!

If you have problemsdownloading your flowchart,see the fault-finding andtroubleshooting hints and tipson the next page.

((aa))

((bb))

((cc))

Page 31: GENIE Cuddly Creatures Project · Page 7 of 31 fi GENIE Cuddly Creatures.pdf fi Version 1.1 GENIE Cuddly Creatures Project Creating a hand-held design 7 In addition to mouinting

This worksheet is copyright © New Wave Concepts Limited. All rights reserved.It may be reproduced for classroom or educational use. wwwwww..ggeenniieeoonnlliinnee..ccoomm

Page 31 of 31 ® GENIE Cuddly Creatures.pdf ® Version 1.1

GGEENNIIEE CCuuddddllyy CCrreeaattuurreess PPrroojjeecctt

Fault-finding and troubleshooting 3311If you are unable to connect to a GENIE microcontroller or download a program, you should gothrough the following troubleshooting hints and tips.

RRuunn tthhee GGEENNIIEE ttrroouubblleesshhoooottiinngg ttoooollThe GENIE troubleshooter will automaticallycheck your cable and software to ensure thatthe computer can access the GENIE cable.

To run the GENIE troubleshooter, chooseTTrroouubblleesshhoooott GGEENNIIEE...... from the HHeellpp menu ofthe Circuit Wizard or GENIE software.

If that option is not shown in your version ofthe software, you can download it separatelyfrom wwwwww..ggeenniieeoonnlliinnee..ccoomm//ccaabbllee.

Step through the on-screen instructions.

SStteepp tthhrroouugghh tthhee ffoolllloowwiinngg cchheecckklliisstt ooff ccoommmmoonn pprroobblleemmss

CCaabbllee

• Circuit Wizard, GENIE Design Studio and the GENIE Programming Editor software all checkand report problems involving the cable. If given, follow through on the on-screen advice.

• Unplug the cable, wait a few seconds and then plug it back in. Windows can occasionally failto detect that a cable has been inserted.

PPoowweerr

• Check that the voltage of the battery is sufficient. For this project, the battery voltage shouldbe in the range of 4.5 volts. You should never connect batteries totalling 6V or more.

• Check the voltage level across the power connections (+V and 0V) on the board. This canidentify if there is a problem with the battery clip or battery holder. Ensure that the wiringhas not become loose and the batteries are properly seated in the holder.

CCiirrccuuiitt

• Try plugging the cable into another GENIE board if you have one available. When poweringup this circuit, the green STATUS LED should flash once (when properly connected it will flashrepeatedly).

• Try with another GENIE microcontroller if possible.

• Visually inspect the board for bad solder joints or cases where soldering has incorrectlybridged pins together. Note that for the download socket, the two left-most pins should beconnected together, as should the two right-most pins.

For more troubleshooting hints and tips, please read the separate GGEENNIIEE TTrroouubblleesshhoooottiinngg GGuuiiddee.

A

B