My New Project And A Quest For Sound
idbruce
Posts: 6,197
Hello Everyone
I am sharing this post, because I am certain that it will interest more than a few.
As some of you may know, I am building several CNC machines, and I am almost finished with two of them, except for the programming. However, one of the machines that is near completion, has a user interface board, and I would like to add sound capabilties to this board before buttoning everything up for programming. I don't want or expect too much, I just want to play a small WAV file to produce a faint but clear and audible sound over a headphone speaker. As discussed in a couple of previous posts of mine, there are several sound amplifiers and headphone amplifier ICs available that will output nice sound, but the problem with these ICs is the fact that they are tiny itty bitty chips and interfacing them to a proto board would be difficult without having some type of adapter. Additionally, I would have to order the chips, pay shipping, and wait for it to arrive, meanwhile designing a PCB etc... I am an impatient man and I want to button these machines up. So here is what I am attempting.
In my quest for sound, I went searching throughout the house looking for items that I knew would contain a desirable headphone amplifier. After tearing apart two CDROM players, I finally found a decent chip to suit my needs. At first, I was going to attempt to desolder the chip, and the support components, but as I previously mentioned, this stuff is tiny. After mulling it over for a couple days, I took another look at the CDROM player. The player contains two circuit boards, with one of course having the chip I desire. The chip is a LM4808M, which is a dual audio power amplifier capable of delivering 105mW per channel of continuous average power into a 16W load with 0.1% (THD+N) from a 5V power supply. The circuit board where the chip resides has two main connection areas for wires, one has a header, and the other has the wires soldered directly to the board. After desoldering the wires, I will attempt to reverse engineer the circuitry going to the headphone amplifier. As I see it, I should only have to find six connections, which are as follows:
I have attached the LM4808M datasheet for your viewing pleasure and I will keep you all apprised of my progress.
Bruce
I am sharing this post, because I am certain that it will interest more than a few.
As some of you may know, I am building several CNC machines, and I am almost finished with two of them, except for the programming. However, one of the machines that is near completion, has a user interface board, and I would like to add sound capabilties to this board before buttoning everything up for programming. I don't want or expect too much, I just want to play a small WAV file to produce a faint but clear and audible sound over a headphone speaker. As discussed in a couple of previous posts of mine, there are several sound amplifiers and headphone amplifier ICs available that will output nice sound, but the problem with these ICs is the fact that they are tiny itty bitty chips and interfacing them to a proto board would be difficult without having some type of adapter. Additionally, I would have to order the chips, pay shipping, and wait for it to arrive, meanwhile designing a PCB etc... I am an impatient man and I want to button these machines up. So here is what I am attempting.
In my quest for sound, I went searching throughout the house looking for items that I knew would contain a desirable headphone amplifier. After tearing apart two CDROM players, I finally found a decent chip to suit my needs. At first, I was going to attempt to desolder the chip, and the support components, but as I previously mentioned, this stuff is tiny. After mulling it over for a couple days, I took another look at the CDROM player. The player contains two circuit boards, with one of course having the chip I desire. The chip is a LM4808M, which is a dual audio power amplifier capable of delivering 105mW per channel of continuous average power into a 16W load with 0.1% (THD+N) from a 5V power supply. The circuit board where the chip resides has two main connection areas for wires, one has a header, and the other has the wires soldered directly to the board. After desoldering the wires, I will attempt to reverse engineer the circuitry going to the headphone amplifier. As I see it, I should only have to find six connections, which are as follows:
- Input A+
- Input A-
- Input B+
- Input B-
- VDD
- VSS
*Of course Output A and Output B are already wired to a 1/8 inch headphone plug.
*And of course volume control is already wired
I am not 100% certain, but it is my hope that after finding these six wires, I should have a nice daughter board capable of producing sound from the proto board.*And of course volume control is already wired
I have attached the LM4808M datasheet for your viewing pleasure and I will keep you all apprised of my progress.
Bruce
Comments
If that doesn't do it for you then do a search for "Chipcorder" by ISD. I use one of them in my R/C submarine project and they are really easy to use. If you don't want to invest in their programming board I would be glad to program a chip for you with mine. I have the 240 second (4 minute) version. Radio Shack sells them also for under $20 if I remember right. With the 240 version you can have up to 240 seconds or 255 .WAV files, which ever limit you reach first.
With ISD's demo board or programming board either one will drive you out of the room with a 3-4 inch 8 ohm speaker..
Mike B.
I have dumped thousands of dollars into these machines and the well has run dry. However that is not the point. The 31316 is way beyond what I need and I would even consider it extravagant for my needs. And besides that, what I am attempting is a learning process and I may possibly save $130. But if you care to donate the chump change, sure I'll buy it and forego the education I may receive.
The speaker is 1" in diameter, but thanks for your response.
Bruce
Mike B.
You can even get that chip in a kit for experimenting: http://www.kitsrus.com/pdf/k27.pdf
http://blog.makerbot.com/2009/05/18/martha-vader-a-makerbot-sings-the-imperial-march-and-makes-a-darth-vader-head/ (You can skip ahead to about 1:00 in the video for the sound.)
Bill
(EDIT: Does anyone else see the "notes." duplicated in my text above? When I edit it, it's not in the text, but when I save it, it's there!)
Yea someone else mentioned the TDA7052 in another post. It would definitely do the trick. However, I want to button up the machines today or tomorrow and start programming. If I can't reverse engineer this board by tomorrow, I will probably just add a four pin header to the proto board, attach a four wire harness for the future addition of an external sound amplifier, and close up the main electronics box. However, I do believe I can whip this board to fit my needs and enclose it inside the electronics box. I hope that I succeed, because I am certain there are a few other people out there that can benefit from my experimentation.
Bruce
I found the inputs and got sound coming out of a set of headphones, however, the sound is very low with the volume turned all the way up. I tested the setup with Lord Steve's sine_to_headphones.spin code, which I have attached below. I know the headphones can put out a lot more sound then what is coming out. I am just wondering if there is any way to increase the volume in the code. If not, then perhaps I am missing a critical connection somewhere.
I will keep you posted
Bruce
Well I changed the code and the speaker now produces high quality sound in an audible range that can be heard with the headphones off my head.
In other words, it was a major success for what I was attempting. I am currently only producing sound out of one speaker, because I am using only 1 pin. If I added another pin, I could add the other speaker to make it even louder.
Bruce
From 35 feet away, I can clearly hear an EEPROM wav file. Good enough for my needs.
I always think it is cheaper in the long run to keep a volume of components around the shop such as op-amp chips and I have LM386s and TDA7052s (per Jon's earlier advice to me) as well as voltage regulators, passives etc. In the past, every time I tried to do a project, it would end up being expensive because of 1-2 parts needed that either had to be purchased locally at high expense or shipped with a high shipping charge/item purchase ratio. After building up a nice library of general components, I have spent hundreds just for that, it may not be cheaper but it sure gives peace of mind and less aggravation.
I definitely agree with you, I also try to buy spare parts when I can afford it and when I am thinking of it. I also have a nice library of parts. Mostly specialized ICs, transistors, leds, resistors, and wire. In my next order with Parallax, I am definitely going to buy several extra chips of EEPROM. But you know how it goes, there is only so much money to go around and there is always the OOOOOPPSS factor. "I should have ordered that!" DUH
Bruce
I did not take the time to evaluate the code very closely, I just knew that the speaker could put out a lot more volume, so I just tried other code. I don't imagine that there was anything wrong with the code, because I definitely got sound from the code. I would probably suspect the frequencies and duration. I am sure the code is fine, it was just low volume.
Bruce