Musical Greeting Card

 by neelandan
Featured
H:\upld\Xmascard01.jpg
A small six pin processor is programmed with a melody to be played back through a piezo speaker. A lithium button cell provides the power and a leaf switch closes when the card is opened, turning the music on.
 
Remove these adsRemove these ads by Signing Up

Step 1: The circuit diagram

H:\upld\Xmascard02.gif
The circuit is very simple and consists of just four components: the battery, microcontroller, piezo speaker and switch.

The switch (not shown in the diagram) is just two strips of metal pressed together, with a piece of paper in between. As the card is opened, the paper is pulled away and the two contact each other, thus closing the circuit.

A fragment of the code is shown, too. The program takes up 56 locations in memory. The PIC10F200 has 256 such locations available. A melody consisting of 200 notes or so can be fitted in to this chip.

This should be sufficient for a musical greeting card.
1-40 of 52Next »
dheadz says: Dec 4, 2011. 5:03 AM
neelandan:
Congrats for this tiny project - I have been listening it for many-many minutes non- stop :)
However, I would have 2 small corrections:
1. You connected the piezo to the ports 2 and 3, but in the program they are at 0 and 1 (and the latters are the correct - GPIO0, GPIO1);
2. I built with PIC10F222 - in this type of ICs , to disable the extra functions on the pins, the ADCON0 register has to be cleared(CLRF ADCON0).
And 1 idea: if I connect one wire of the piezo to the GND, it will result a little bit lower volume.
greets
nodoubtman in reply to dheadzDec 25, 2012. 10:19 AM
thanks for pointing that! :)
much appreciated!
Merry Xmas! :)
marC:)
RYUNOROBERT in reply to dheadzJan 18, 2012. 10:37 PM
I got this whit MPLAB

Build C:\PRUEBA\Prueba for device 10F200
Using driver C:\Program Files (x86)\HI-TECH Software\PICC\LITE\9.60\bin\picl.exe

Executing: "C:\Program Files (x86)\HI-TECH Software\PICC\LITE\9.60\bin\picl.exe" -C C:\PRUEBA\Prueba.asm --chip=10F200 -P --opt=default -q -g --asmlist "--errformat=Error [%n] %f; %l.%c %s" "--msgformat=Advisory[%n] %s" "--warnformat=Warning [%n] %f; %l.%c %s"
Error [141] C:\PRUEBA\Prueba.asm; 19.21 can't open include file "P10F206.inc": No such file or directory

********** Build failed! **************
Numbuh1Nerd says: Jul 8, 2012. 6:28 PM
Is there any way to make this function with an mp3 or .wav file? Size and shape won't be an issue, since I'm trying to make my door play a specific sound when opened.
mwilson213 says: Feb 15, 2012. 6:57 PM
Cool DIY. We actually make and sell musical sound chips and sound modules for crafts, hobbies, education, and DIY projects through our online store at http://store.bigdawgspromo.com. We also have light sensor, motion sensor, push button, and slide tongue greeting card modules (making musical greeting cards). However ours are programmed through USB using an MP3 file.

We also put video lcd screens in cards, and USB flash drives webkeys, but these are for our commercial customers such as printers, marketing agencies, etc. http://www.bigdawgspromo.com

I liked this posting very much. Looking eager to the next one!
BARE-PUSH_small.jpg
techxpert says: Sep 23, 2011. 6:13 PM
the pic10f206 is apparently an 8 pin microcontroler
Brickmodder in reply to techxpertNov 11, 2011. 12:10 PM
Try looking at the SOT-23 size. That's a 6 pin chip. The other package sizes of this chip are 8 pin.
yonsje says: Sep 19, 2008. 8:03 AM
hi, could anyone please give me the compiled hex? I tried doing it myself, bur i can't seam to figure out MPLab:s I use proton. I found a way to make a hex file out of it but that didn't work, my programmer program couldn't load it:s
nodoubtman in reply to yonsjeNov 4, 2011. 9:01 PM
see in the beginning of the page... thanks!
neelandan (author) in reply to yonsjeSep 19, 2008. 9:29 AM
Which processor do you intend to use?
yonsje in reply to neelandanSep 19, 2008. 11:20 AM
10F200 but i found it, i diden't see it in the instructable at first
yonsje in reply to yonsjeSep 19, 2008. 11:45 AM
now it won't program :s i keep getting an error message saying: rom programming error at adress 0x0000 Good 0x0A84 Bad 0x0FE I'm using the 8 pin DIP version instead of the 6 pin SMD version
nodoubtman says: Nov 4, 2011. 9:00 PM
i cannot get it to work.. can someone help me out please... with pic10f206..

THanks !:)
schorhr says: Apr 18, 2010. 6:22 AM
I picked up a few (ebay, 3*25, about 30 cents each) pic10f202 and it worked like a charm :-) Using a detector radio's headset though for testing. With the help of a friend I somewhat got "popcorn" playing, but in university I lost the darn microcontroller on the carpet ;-)
Once I got the thing back running, I'll post again. Thanks for this instructable.
urbanmari says: Mar 24, 2010. 11:16 AM

One day, maybe, when I become experienced with electronics, I'd like to try this out.  Sorry you caught so much relative flak but this really cool instructable. 

locofocos says: Nov 26, 2007. 1:45 PM
I've always wanted to learn to use those little tiny processors. Some1 should make a little kit with instructions about them. I know some of you had those that would let you make a little magnet, or a light, or maybe a little buzzer or somethin.
Scoticus1 in reply to locofocosFeb 21, 2010. 4:27 PM

The data sheets from the manufacturers are usually the best instructions that there are, just google the chip name followed by data sheet, and (with a little understanding of digital devices) you can do whatever you want.

kamlesh2012 says: Feb 7, 2010. 8:41 PM
can nyone oplz tell me whether i can do this project on atmega 16 microcontroler or not?i have a little knowledge on PIC10F.so can i write d program in my atmega 16 microcontroller?what will be d exart code 4 this??urgent,valentine day is coming nearer..n i have 2 complete it b4..plz understand d situation.... 
vinoth thyagarajan says: Dec 26, 2009. 2:43 AM
 want to make my own musical greeting card.
i have try to search it on google but i was getting only sites of dealers & greeting card sellers.

i have read like that they are using either voice recorder IC or micro-controller.

how can i load music files or my own voice in that chip.
is there any software for loading file in it then which format it supports.??

can anyone please tell me how i can get detail of circuit of musical greeting card.

thanking you all in advance...!!
preethikadinesh says: Dec 16, 2009. 8:49 AM
can i write program to tell the names.is it possible.
khushboo says: Sep 10, 2009. 9:06 AM
i would like to see the circuit diagram but im not able to acess it.
shawnelec says: Aug 12, 2009. 10:36 PM
nice project!!! can you tell me where can I buy this microcontroller ??
neelandan (author) says: Nov 28, 2008. 8:41 AM
Joellsays: Hello there,... sorry but I just needed to ask you something about your musical greeting card project,... how do you convert the hex file of the melody into the 'do re me fa...' notation that you've used in your program? And further, can the output of the piezoelectric speaker be polyphonic? As in, if i were to convert or use the hex version of an mp3 file would it play it decently or would i play a distorted monophonic version. Actually, it goes the other way around. First you convert your melody into the tonic sol-fa notation - get the help of somebody who knows music. Second, these notes are incorporated into an Assembly Language program - the example shows a few tunes. Third, the program is converted to the hex file used for programming the chip. This simple processor, with a simple program inside, is limited to playing a monophonic melody. That is, one note at a time.
Derin says: Aug 3, 2008. 10:59 AM
doe,a deer,a female deer,ray,a drop of golden sun,me,a name I call myself,far,a long long way to ruuuuuun,sew,a needle pulling thread,la,a note to follow sew,tea,a drink with jam and bread,and that brings us back to dooooooooooooooo!
Joell in reply to DerinOct 23, 2008. 8:33 AM
Dude you have to wonder, the line 'la, a not to follow so' .... doesn't it seem just a tad bit lame? A little bit unfinished like? Like as if the writer of the song was getting into the flow of things nicely with the whole song and then suddenly had, like, a stroke or something and when he got back to it he couldn't remember what he wanted to write!! Seems wrong somehow, yea? lol :)
The Jamalam in reply to DerinAug 4, 2008. 1:15 PM
... you truely disgust me
Gaark in reply to The JamalamDec 18, 2008. 11:16 AM
Im happy to see the lyrics, reminds me of my Grandmother and how she used to sing it to us as kids *sigh*
Derin in reply to The JamalamAug 20, 2008. 2:03 PM
thats the whole thing,if you like it or not
Joell says: Oct 23, 2008. 8:24 AM
Alright so this might seem like a silly doubt: If i wanted to program a complex tune into this chip, like a full mp3, can i basically just generate the hex file of that mp3 and program it onto the chip? Or is there a tweak to be made to allow me to do this.
Can't see a reason why it shouldn't be possible but then again, i've been wrong before :)

I'll be using filealyzer to generate the hex file; it just gives it to you... download it and try it with an mp3 if you like.

Filealyzer
GorillazMiko says: Nov 26, 2007. 4:15 PM
always wanted to know how these were made. cool instructable, looks way too hard for me. im only 13 hahaha
DYLEGO in reply to GorillazMikoOct 16, 2008. 7:08 PM
im 13 and i can make it. so u can too
tyroonelove85 says: Jul 16, 2008. 3:13 PM
What are all the pieces i need for the musical card from start to finish including the micro chip,leads and wires? and where can i buy them all at to start building my card?
neelandan (author) in reply to tyroonelove85Jul 17, 2008. 12:17 AM
You are looking for a Bill Of Materials (BOM). Sorry, it is like going to the art store and asking for "enough paint for two hills, five trees and a sunset". This instructable is intended for persons already into electronics as a hobby. The average hobbyist will have the bits and pieces needed for this project (except maybe the PIC) lying around. If you are trying to make one, the best course of action will be to buy a musical greeting card from a store, and replace the chip inside that with one you have programmed yourself. You will need a PIC programmer, too.
Derin in reply to neelandanAug 20, 2008. 1:59 PM
BOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOM!
indian99 says: Aug 17, 2008. 7:37 PM
okay...i need some help on this topic (i.e musical greeting cards) i have a programmer and the voice modules ....i have to types...the recordable and the non recorable. This is it... the came from a foreign country and i have been trying to duplicate the voice module/re=program the chips i have already purschase from overseas... is there anyone who can duplicate pc board?
neelandan (author) in reply to indian99Aug 17, 2008. 10:26 PM
Talk to any PCB shop.
smudge121 says: Jul 17, 2008. 9:06 AM
if i ad a high end programable chip nd a pic programer cud this idea b converted 4 other applications ie. making my own small alarm clock wiv my own tunes
3XTR3M1ST says: Dec 16, 2007. 2:21 AM
where can i get the software and hardware to reprogram my musical module from a greetings card?
neelandan (author) in reply to 3XTR3M1STDec 16, 2007. 10:46 PM
Nowhere. You can't reprogram the module in a greetings card. What you can do is to get a six pin PIC from Microchip, program it to play the melody you want and stick it in place of the module in a greetings card.
DesertE in reply to neelandanFeb 11, 2008. 12:33 PM
Do you know if those pins can be programmed with more than a simple melody. I am thinkin of a full 3-5 minute song with vocals and all.
1-40 of 52Next »
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!