Melody generator IC - Are they still available? - Page 1
Forum section: electronics / general

author: david77
author_rank: Frequent Contributor
timestamp: February 24, 2012, 07:12:37 pm
content: Hi there.Does anybody know of a simple easily available melody generator IC?The only thing I could find that's still in production is the SAE800 but that sounds horribly like school bell, not exactly what I wanted.I got hold of a couple of IC's made by UMC in the 80ies, the UM348x series. That is nearly what I'm looking for. They can each play 16 melodies, drive a small speaker and are low power and easy to implement. The only thing bugging me is you can't select which melody they play. It's either the first or all of them or one after another, etc.And of course they are obsolete.Are there still ICs like that available or does everybody use a micro for things like that? That'd be overkill for my application, I only need something like a Westminster chime or something that plays a few notes of some tune.

author: Bored@Work
author_rank: Super Contributor
timestamp: February 24, 2012, 08:02:02 pm
content: Google says, among other things,http://www.rapidonline.com/Electronic-Components/Melody-generator-IC-34481No idea if that thing does what it says on the tin.

author: Psi
author_rank: Super Contributor
timestamp: February 24, 2012, 10:35:07 pm
content: Digikey list a whole lot. (just search for MELODY TO-92 )They're all non-stock but digikey only list stuff they can get, so give them a call or use the 24/7 online chat and ask what they cost.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: February 24, 2012, 11:15:56 pm
content: Rapid have a fewhttp://www.rapidonline.com/SearchResults.aspx?kw=melody

author: Psi
author_rank: Super Contributor
timestamp: February 24, 2012, 11:40:29 pm
content: could also make your own with a shift register, and 556 timer (for clk and tone generator)Or maybe rip apart a musical birthday card.

author: SeanB
author_rank: Super Contributor
timestamp: February 25, 2012, 06:25:38 am
content: Go down to the card shop and get some musical greeting cards. They run off either a single LR44 or a CR1220 cell, and have a built in strangled chipmunk speaker. Just apply the right voltage to it and use the one output to a smallish amplifier and you have a cheap tune. You can even audition them in store, but most only play the tune a few times then stop until reset.

author: amyk
author_rank: Super Contributor
timestamp: February 25, 2012, 08:43:14 am
content: Quote from: SeanB on February 25, 2012, 06:25:38 amThey still make the ICs and this is where the majority of them end up, they're usually in a bare die for COB mounting.

author: Zero999
author_rank: Super Contributor
timestamp: February 25, 2012, 03:06:17 pm
content: You could use a PIC10F200 as a melody generator.http://www.instructables.com/id/Musical-Greeting-Card/Unfortunately you need to sign up to get the code so I obtained it using bugmenot.Code:;====================================================================;; Christhmas card Beeper using the 10F200/202/204/206/220/222;; GP0 ---v--- GP3; -|1 6|-----------------------+; | Vss | | Vdd |; +--||-(-) -|2 5|-----+(+ 3 to 5 Volts) |; | | | | | | | |; | 3V -|3 4|-----------|[]|--------+; | GP1 ------- GP2 | | |; | | piezo element; +------------------------+;;====================================================================; processor type declarationLIST P=10F200; include file for register file name definitions#include<P10F200.inc>; configuration bits__CONFIG _MCLRE_OFF&_CP_OFF&_WDT_OFF; default radix - hex for compact representation of note tableradix hex;--------------------------------------------------------------------; variables in RAMcblock 10flagscount1count2noteCOUNTERendc;--------------------------------------------------------------------; flag bit definitionsrest equ 0tmrh equ 1;--------------------------------------------------------------------; note equates - loop overhead is 21 counts, so the note delay is; the equated value plus 21;Note equated Delay Chromatic;Name value cycles noteLa equ 0ff ; 276 - A2Le equ 0ef ; 230 - A2#Te equ 0e1 ; 246 - B2do equ 0d3 ; 232 - C2di equ 0c6 ; 219 - C2#ra equ 0ba ; 207 - D2re equ 0ae ; 195 - D2#mi equ 0a3 ; 184 - E2fa equ 099 ; 174 - F2fe equ 08f ; 164 - F2#so equ 086 ; 155 - G2se equ 07d ; 146 - G2#la equ 075 ; 138 - A3le equ 06d ; 130 - A3#te equ 066 ; 123 - B3dO equ 05f ; 116 - C3dI equ 059 ; 110 - C3#rA equ 052 ; 103 - D3rE equ 04c ; 97 - D3#mI equ 047 ; 92 - E3; The above note table is based on data; provided by Don Lancaster at [url=http://www.tinaja.com]www.tinaja.com; "Equally tempered Music"; 116-123-130-138-146-155-164-174-184-195-207-219-232;--------------------------------------------------------------------; Program overhead is 54 instructions leaving 202 locations available; for notes in the pic10f200/204/220.; 255 notes can be fitted into the pic10f202/206/222.; ***** tested with 200 & 206 only.*****;====================================================================; Program code starts hereorg 0goto continue ; program code is placed after table entries; because table entries must be in the first 256 locations;--------------------------------------------------------------------table ; table of values for note delay - 1 = rest, 0 = end.addwf PCL,F;scale Te doh ray mi fa so la te dOh rest end;dt 0e1,0d3,0ba,0a3,099,086,075,066,05f,001, 0;--------------------------------------------------------------------song1;dt mi,mi,mi,mi,ra,mi,fa,fa,mi,mi,mi,ra,do,do,mi,mi;dt ra,ra,ra,do,Te,Te,ra,ra,do,do,do,1;dt so,so,so,la,so,fa,mi,fa,so,1;dt so,la,so,fa,mi,fa,so,1;dt so,la,so,fa,mi,so,fa,mi,ra,ra,do,ra;dt mi,mi,mi,mi,ra,mi,fa,fa,mi,mi,mi,ra,do,do,mi,mi;dt ra,ra,ra,do,Te,Te,ra,ra,do,do,do,1,1,0;--------------------------------------------------------------------song2;dt dO,te,dO,dO,so,1,fa,mi,fa,fa,ra,1;dt mi,fa,so,so,so,fa,mi,ra,mi,mi,1,1;dt ra,mi,fa,fa,fa,1,mi,ra,mi,mi,mi,1;dt do,1,do,mi,ra,1,do,Te,do,do,do,1,1;dt so,so,so,1,so,1,so,so,so,1,so,1;dt fa,fa,la,la,1,la,so,fa,fa,fa,1,1;dt so,fa,mi,mi,mi,1,fa,mi,ra,ra,ra,1;dt mi,ra,do,do,Te,La,Te,do,do,do,1,1,0;--------------------------------------------------------------------song3; dt do,do,ra,ra,1,fa,so,fa,so,so,so,1; dt fa,fa,so,so,1,te,dO,te,dO,dO,dO,1; dt dO,rA,le,le,la,so,so,1,so,la,fa,fa,mi,ra,ra,1; dt ra,ra,so,fa,mi,fa,ra,mi,do,do,do,1; dt do,do,ra,fa,so,fa,so,so,1,la,le,la,la,so,so,1; dt fa,fa,so,so,1,te,dO,te,dO,dO,dO,dO,1; dt fa,fa,so,so,1,te,dO,te,dO,dO,dO,dO,1,1,1,1,0;--------------------------------------------------------------------song4;dt so,so,1,mi,so,dO,te,la,so,so,so,1,1;dt fa,fa,1,mi,ra,la,so,fa,mi,mi,mi,mi,1,1;dt so,so,1,mi,so,mi,so,dO,la,la,la,1,1;dt te,te,1,dO,te,la,so,fe,so,so,so,1,1;dt so,so,so,1,mi,mi,mi,1,dO,dO,dO,1,so,so,so,1;dt mI,mI,1,rA,dO,la,so,mi,ra,ra,mi,mi,fa,fa,fa,1,1;dt mi,mi,1,mi,mi,mi,fa,so,la,la,la,1,1;dt te,dO,so,so,mi,mi,fa,fa,Te,Te,do,do,do,1,1,1,1,1,1,0;--------------------------------------------------------------------song5; Go, tell it on the mountaindt mi,mi,1,mi,ra,do,La,so,so,so,1,do,do,do,1; Over the hills and everywheredt ra,ra,1,ra,ra,do,do,mi,mi,so,so,la,so,so,1; Go, tell it on the mountaindt mi,mi,1,mi,ra,do,La,so,so,so,1,do,do,do,1; That Jesus Christ is born.dt fa,1,mi,mi,1,ra,ra,ra,ra,do,do,do,do,do,1,1,1,1; While shepherds kept their watchingdt do,do,mi,mi,so,1,so,so,la,la,so,so,mi,mi,mi,1,1; O'er silent flocks by nightdt do,do,ra,ra,ra,ra,do,do,ra,ra,mi,mi,1,1; Behold, throughout the heavensdt do,do,mi,mi,so,1,so,so,la,la,so,so,mi,mi,mi,1,1; There shone a holy light.dt do,do,ra,ra,ra,ra,do,do,La,La,so,so,Te,Te,ra,ra,ra,1,0;--------------------------------------------------------------------; Program code continues herecontinuemovwf OSCCALstart; movlw 7 ;******* uncomment for 10F206 **********; movwf CMCON0 ;switch off comparator ******************movlw 0xc7 ;prescaler 256 for timer, pullups disabledoptionmovlw 0 ;all pins outputtris GPIOmovlw 1movwf GPIO ;GP0 high, GP2 and GP3 lowclrf count1 ;clear note countclrf flags ;clear flags register;--------------------------------------------------------------------; initialisation over, endless loop starts hereforevermovlw 5 ; note length in terms of timer0 rollovermovwf count2movf count1,Wcall tableiorlw 0skpnzgoto start ; if note value zero start all over againmovwf notebcf flags,restdecfsz note,wbsf flags,rest ; if note value = 1 set pause flagthirdbcf flags,tmrh ; clear copy of timer high flagdecfsz count2,F ; decrement note length count and loopgoto first ; if it is nonzeroincf count1,F ; increment note count and get next notegoto forever ; if it is zero;--------------------------------------------------------------------; during note duration repeatedly delay and toggle pinsfirstbtfss TMR0,7 ; test MSB of timergoto timerhi ; jump if highbtfss flags,tmrh ; timer MSB is low, so test flaggoto second ; if flag is also low do nothinggoto third ; they don't match, so next interval.timerhibsf flags,tmrhsecondbtfsc flags,rest ; if a rest is wanted don't Beepcall Beepgoto first;--------------------------------------------------------------------Beep ; toggle GPIO pins and delaymovf note,wmovwf COUNTERmovlw 3 ; mask for GP0 and GP1xorwf GPIO,F ; toggle GP0 and GP1;--------------------------------------------------------------------; The delay routine below is from Don Lancaster, [url=http://www.tinaja.com]www.tinaja.com;--------------------------------------------------------------------; Code module to provide a time delay of n instruction; cycles. n can vary from 4 to 255 and is destructively; read from COUNTER. There are 8 or 9 overhead cycles.; The module is easily extended to 9 or 10 bits.DELAYBCF STATUS,C ; clear carry (if needed)RRF COUNTER,1 ; bit 0 into carryBTFSC STATUS,C ; stall one cycle?GOTO EQ1 ; yes, one extra cycleEQ1BCF STATUS,C ; must clear carryRRF COUNTER,1 ; bit 1 into carryBTFSS STATUS,C ; stall two cycles?GOTO LOOP ; no, no extra cyclesGOTO EQ2 ; yes, two extra cyclesEQ2NOPLOOPBCF STATUS,C ; 4*n cycle delay loopDECFSZ COUNTER,FGOTO LOOP ; round and round till doneRETLW 0 ; return to calling routine;--------------------------------------------------------------------end ; end of program;====================================================================

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: February 25, 2012, 04:01:39 pm
content: Quote from: Hero999 on February 25, 2012, 03:06:17 pmThat cct won't work as shown, as RA3 is input only - need to use a different pin.Looking at code it uses GP0,1 for the sounder

author: david77
author_rank: Frequent Contributor
timestamp: February 26, 2012, 12:47:36 am
content: Thanks for your help people.As I'm looking for smallness for this project that TO-92 device looks promising.

author: Zero999
author_rank: Super Contributor
timestamp: February 26, 2012, 08:26:43 pm
content: Quote from: david77 on February 26, 2012, 12:47:36 amWhich one are you talking about?The problem with TO-92 devices is there's no way of selecting which tune is played.The DIL IC sold by Rapid can do that.http://www.rapidonline.com/Electronic-Components/Christmas-Lullaby-melody-ICs-77740/?sid=fae62a15-9827-4168-8a16-f3bfdf8f030eAnother option is a sound recording module.http://www.rapidonline.com/Education/20-Second-Recordable-Sound-Module-For-Greetings-Cards-500248Oh and you can also buy melody modules, complete with a battery and piezo fairly cheaply but they suffer the same problem of you not being able to select the tune.

author: IanB
author_rank: Super Contributor
timestamp: February 26, 2012, 09:05:32 pm
content: I wonder how they make musical doorbells these days, or have they gone out of fashion?

author: Unknown
author_rank: Unknown
timestamp: February 26, 2012, 09:43:39 pm
content: Quote from: IanB on February 26, 2012, 09:05:32 pmThat can only be a good thing for man!

author: TerminalJack505
author_rank: Super Contributor
timestamp: February 26, 2012, 09:50:07 pm
content: Quote from: Uncle Vernon on February 26, 2012, 09:43:39 pmI can't wait until musical car horns are back in fashion!

author: Unknown
author_rank: Unknown
timestamp: February 26, 2012, 10:04:35 pm
content: Quote from: TerminalJack505 on February 26, 2012, 09:50:07 pmConsideration should be given towards fitting a few sticks of gelignite and an electric detonator into a metal canister and marketing it as "Musical Car Horn". It could be a small contribution towards advancement of our species.

author: Zero999
author_rank: Super Contributor
timestamp: February 26, 2012, 10:08:34 pm
content: Quote from: IanB on February 26, 2012, 09:05:32 pmMaplin still stock the full range.http://www.maplin.co.uk/m66t-simple-melody-generator-2462

author: david77
author_rank: Frequent Contributor
timestamp: February 27, 2012, 08:52:01 am
content: I don't really need to choose the tune as such. The M66T range each only play one song that's good enough.The melody modules out of gift cards are a possibility but I really don't want to put a module like that into my own design, that's just not nice.EDIT: All I want is a glorified buzzer, I could use a simple piezo buzzer but they just sound awful and the project I need it in is going to sit in people's kitchens reminding them to take the pizza out. A "bong" sound like Ford use to remind you to switch the lights off would be my preferred choice but I'll settle for what is available.