let's make... sound!

Pasquale's picture

hi.. I've just take a little speaker from a radio. there are 2 little cables, one for ground, pin for the other.. when I connect them there's a noise sound that stops when there are properly connect.. I've connect it on pin 1. but when I upload some code.. like

main: let b0=b0+1
sound 1,(b0,50)
goto main

nothing happen.. can anyone help please? ._.

http://img123.imageshack.us/my.php?image=speakergj9.jpg

 

there is a little mistake on this photo... ground is pin and pin is ground  ... ground is on left.. I know.. xD .. it doesn't work T_T T_T

fritsl's picture

I need a picture to make

I need a picture to make sure all is right.

And Labels ("Main:") should always be on a line by themselves, nothing after ":"

And I would start with

sound 1,(b0,5)

(5 instead of 50) 

Ant's picture

Hi Pasquale Are you using

Hi Pasquale

 Are you using the darlington on the output? I don't think that would work with a speaker. You would need to take output from the pin holes between the picaxe and the darlington. If youre not using the darlington, and have a jumper in where the dalington goes, I don't know whats wrong.

 

Ant

fritsl's picture

Wrong! you can / should use

Wrong! you can / should use the darlington :)
Ant's picture

Ahh, crap..... I just took

Ahh, crap..... I just took mine out from the start as I'm not driving anything that needs high current, and assumed you wouldn't be able to get the frequency thru it. But know I think about of cousre you can, its like an amp.

 Ignore everything I've ever said. :)

 

Ant

Pasquale's picture

if I use the darlington I

if I use the darlington I can't use the servo.. T_T
Pasquale's picture

I've posted some pictures..

I've posted some pictures..
Ant's picture

I can't make out the photos,

I can't make out the photos, but is it hooked up like this?

 

speaker2.jpg

Pasquale's picture

this is my way .. but I've

this is my way .. but I've triend many other

http://img93.imageshack.us/my.php?image=speaker2tq7.jpg

Ant's picture

Hi Pasquale Then row of

Hi Pasquale

 

Then row of pins you have the black wire on is the negative (gnd) rail, and the red one is the positive rail (V). so hooked up like this is like connecting the speaker directly to the battery. Unfortuanatly that might mean the speaker is fried.

 try like this, the black one is to negative (ground) the red one is to the output from picaxe

 

speaker3.jpg

BaseOverApex's picture

Picaxe R not Us

Dunno anything at all about the picaxe hardware. (I suppose I should learn, but it seems like a backward step.)

One thing I would say, though: The speaker (is it ACTUALLY a speaker or is it a peizo sounder?) is probably 8ohm. Your pic is 5V. V=IR. So your current might be of the order of 5/8 = 625mA. The PIC output can oly sink 25mA. You'll need a drive transistor. (I suppose this is the darlington mentioned above.)

HOWEVER, bear in mind that the tranny will be configured to pull up or down the input of the speaker. If it's configured to pull down (as would be sensible, since transistors tend to sink more current than they source) then there is noting to pull up the input to the speaker.

In effect, it seems possible that you have a system where one side is connected to ground and the other is being rapidly connected from ground to nothing by the PIC.

Can you validate any of this by looking at the user manual for picaxe?

Pasquale's picture

success!!!I've tried to

success!!!

I've tried to connect it with the darlington and there was a very very.. very little sound (must close the ear on the speaker). than I took a transistor (random xD) from the radio and put it in.  and it works. xD.. but may I need to take volume up :/ ... sorry for my english ._. thanks all. here's the correct way to connect 

http://img75.imageshack.us/my.php?image=speaker21nj8.jpg

Ant's picture

well done, good to hear its

well done, good to hear its workin.

 

fritsl's picture

Crazy setup - cool that it

Crazy setup - cool that it works, bu way over done IMHO :)

It must be the speaker.. Try another, it is just adding it to the digital output, straight up, after the darlington - completely normal business.. And you will get sound!

With some speakers, you will even get

EXTREMELY LOUD SOOUUNNNDDSS! BEEEEP!! 

CaptainTuna's picture

but is there a way (maybe

but is there a way (maybe using some kind of ISD) to play multiple recorded sounds? I'm looking for something like the board the YDM has, but i want it to play and store multiple sounds. Also, is there a way you can record without the microphone (eg: can you bypass the microphone and make that board record the line out of your pc?
fritsl's picture

If you want more sounds

If you want more sounds playing at the same tme with this board, you will have to get as many boards as you's like simultanious sounds :)

Yes, you can record line out from your PC. However, make sure to turn the volume almost all the way down.

CaptainTuna's picture

actually i didn't want to

actually i didn't want to play simultaneous sounds, but just different sounds i can play at different times (pre recorded and non-volatile). but i guess the same idea applies... thank you :)

 

PS: it doesn't have to necessarily be that board. is there any other cheap( :D ) option?

fritsl's picture

(No subject)

VMusic2 MP3 module

Order Code: USB030

The VMusic2 MP3 player module is a product which not only lets you add USB Flash disk interfacing to your PICAXE project, but also allows you to play back MP3 and other popular digital music formats directly from a USB flash disk. Only four signal lines plus 5V supply and ground are required to be connected. Commands allow you to play a selected file, as well as control the volume, balance, etc. of the sound channel, and monitor the status of the file being played. Serial or SPI connection.
 
 
CaptainTuna's picture

isn't there another

isn't there another solution? the vmusic2 module is both quite big and quite expensive. I have seen that other projects use ISD sound boards which have some kind of "adressing" which i don't know what it is, but it sounds like playing the audio a certain spot.

This way you could use a single ISD chip to play different sounds.

EG: i record 3 sounds, the 1° is starts at t=0s, the second one starts at t=30s. If i want to play the second sound i "adress" the ISD to 30 seconds. Got what i mean? 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.