View Full Version : Tin Tune

07-10-2009, 08:51 AM
Hello again http://forums.parallax.com/images/smilies/smile.gif

I have a new project that I am working on. It is a music/media player based on the propeller that fits inside of an altoid's tin. It has an old sparkfun serial controlled nokia lcd (to be upgraded to a spi driven color lcd later), an sd card port, an audio jack, and the guts of a wii nunchuck (for accelerometer input and buttons). It all just barely fits in the tin (i had to modify the hinges a bit though :S), including the 9v battery it runs on.

My problem is this, for some reason the audio does not work at all. I have the left and right channels of an audio port connected to pins 19 and 20 (P14 and P15), with the ground pin just connected to the ground of the board. I thought that should work, but it isn't. Is there something i am missing here? I am not a hardware person, and have a basic understanding of electronics.

I am leaving on vacation the day after tomorrow, and i would love to have the hardware working before i leave so i can experiment with software for it.

I've attached three pictures of it for a general understanding of the layout, it is rather cramped! Also, forgive me for the blurriness, don't have a good camera at my disposal at the moment.

Not the fish.
sites.google.com/site/bitwinproject/ (http://sites.google.com/site/bitwinproject/)

07-10-2009, 08:57 AM
Not much I can help you with in those pictures.

Are you using the demo board drivers and electronics hookup?

If so make sure you followed their electrical diagram exactly. The sound outputs need to be put through a lowpass filter.


07-10-2009, 06:41 PM
Sorry, I wish I had a circuit diagram.

I am not using the demo board circuit diagram because I don't want the added head phone amp. The way it is set up now the pin just connects to the speaker and then through to ground. I have used that kind of direct connection to the speaker before on atmega micros and it worked fine, what is the difference between them and the prop?

Not the fish.
sites.google.com/site/bitwinproject/ (http://sites.google.com/site/bitwinproject/)

Post Edited (SciNemo) : 7/10/2009 11:46:33 AM GMT

Bob Lawrence (VE1RLL)
07-10-2009, 09:33 PM
You can't hook a audio speaker directly to a Prop output pin.

Use this guide(go to the audio section) ucontroller.com/Propeller%20Protoboard%20Designs%20for%20the%20Beg inner.pdf (http://ucontroller.com/Propeller%20Protoboard%20Designs%20for%20the%20Beg inner.pdf)

You'll still need audio amplification with either a opamp, transistor etc. or use amplified multi-media speakers.

Aka: CosmicBob

07-10-2009, 09:39 PM
Thanks, that makes sense. But still, why can't you just connect a speaker to the pin? Is it just to weak a signal for you to hear, or is there some sort of electrical thing I don't understand that prevents from this from working?

Not the fish.
sites.google.com/site/bitwinproject/ (http://sites.google.com/site/bitwinproject/)

Oldbitcollector (Jeff)
07-10-2009, 09:59 PM
Radio shack carries a very nice little amp on a chip.
I can't remember which part number, but it should handle the
amplification issue.

There was a thread on it recently... Perhaps someone will
remember and post the link.


New to the Propeller?

Visit the: The Propeller Pages (http://www.warrantyvoid.us/tiki-index.php?page=Propeller) @ Warranty Void.

07-10-2009, 10:19 PM
SciNemo: "But still, why can't you just connect a speaker to the pin?"

If for some reason the pin get stuck high, software bug say, then you have a short circuit to ground through the speaker coil. Quite likely blowing the pins output driver.

Even when working correctly the pin will have a DC output level of half the supply voltage. Quite likely blowing the pins output driver.

There should at least be a capacitor between the pin and the speaker.

Now we are in the AC only realm. Still driving a max to max PWN signal out of the pin into an 8 ohm speaker is quite likely to pop the pin as well.

For me, the past is not over yet.

Clock Loop
07-11-2009, 11:28 AM
SciNemo said...
Thanks, that makes sense. But still, why can't you just connect a speaker to the pin? Is it just to weak a signal for you to hear, or is there some sort of electrical thing I don't understand that prevents from this from working?

I use a really small computer speaker or smaller. I use a 1k resistor before i hook up the + side of the speaker. If your speakers small enough, you will hear the sound fine.

No idea if this will trash the prop. (but the 1k res, seems to protect it)

Of coarse you can't use just a speaker, its res is too low. try hooking a 8 ohm resistor to your output pin and ground, then pwm that output, and eventually with a low enough pwm, that pin will fry. speakers have 8 ohms of resistance, thats why you can't hook up a speaker directly.

You need to be in the safe range of the props output current. try 1k,or 560ohm with a really small pc speaker.

Connect speaker - to gnd, and + thru your 1k to your pin.

I did this, its not that loud, unless you can find a very very small wattage speaker. (some kids toys, cell phone speakers, computer internal speaker..etc...

07-11-2009, 09:29 PM
Thanks, now I get why that isn't a good idea (wish I'd known that for some of my atmega projects though). I have a little amp on a chip somewhere, I'll set that up so I don't fry the pin.

Not the fish.
sites.google.com/site/bitwinproject/ (http://sites.google.com/site/bitwinproject/)