Microphone programming on picaxe

Summer is here and I am trying to do as much programming with my robot as possible... so....

Ok I was looking for a forum or something on programming a microphone for picaxe so I can play it back on my speaker but found nothing. If anyone knows of a forum that has done this already please tell me! 

Ohterwise I want to hook up a microphone witch i believe i know how to do- http://www.rev-ed.co.uk/docs/picaxe_sound.pdf

but I do not know how to program it at all. So if anyone has more knowledge than me(which is a good possibility) then please tell me. 




(hint to self- use simple serial resister)

What i found

so what i found out so far is to get this- http://www.electronics123.com/s.nl/it.A/id.1915/.f?sc=8&category=2

I would then hook one of the cords up to my speaker and the other one to my positve and negative pins on my picaxe board


This basic question has come up before.


The reply suggests that you may/should(?) be able to, via a serial resistor, connect the board to the PICAXE pins to control record and playback.

The board you linked to would require the careful removal of the two switches and then I would guess a similar connection to the PICAXE.


ok thanks 

**— nevermind this comment **

— nevermind this comment


**so… **

so for this machine-


I would take out the switch and wire the switches wires to 2 pins on my board and when i send votage to it it would turn on the recording correct?

Look through the datasheet

Look through the datasheet for that module. You will notice that there is a slide switch to select record or playback mode, two pushbuttons to record or playback from one of two recordings, a speaker connector, and of course power and ground.

First the easy stuff:

The ground should be connected to the common ground of your robot. The power will need 5-6V DC, which you may provide from your robot assuming you are running at 5-6V for your power source. 

Connect an 8 ohm speaker to the board. The microphone is built in.

Now the tricky (not very tricky) stuff:

You need to replace the slide switch and push buttons with controls from your Picaxe. To do this, you must desolder those switches and push buttons, and replace them with wires connecting you to the picaxe. Read Picaxe Manual 3 for good advice to connecting to stuff.

Power up the module and use a multimeter to test the connection points where those switches used to be. Determine if they are sending an active high (e.g., 5V) or an active low (e.g., 0V) when pressed. That will tell you how to hook up and program your picaxe.

For example, lets say that pushing one of the buttons sends 5V to the input of the module. You’ll have to test with a multimeter to see which of the two connection points from that button is the input to the module, and which one is just sitting at 5V. The input connection will change when the button is pressed, connecting it to the 5V source. (Note that if the module uses an active low signal, one of the pins will be grounded all the time, instead of at 5V all the time.)

You want your Picaxe to replicate this. There are two ways (at least).

One is to simply connect a digital out from the Picaxe directly to the connection on your module. Set the output high to ‘press the button’. You may want a series resistor (about 330 ohms) in there to limit the current and protect your Picaxe.

The second way is to use a transistor to interface to the button. This isolates the output of your Picaxe better, and allows you to source more current (if needed). If you can measure the current that passes through the pushbutton, you can find out if this is necessary. The Picaxe outputs can only source about 20mA. So if the push button wants more than this, using a transistor will be necessary.

A similar interface will be needed for the slide switch. Determine how the module works in both slide switch positions. It looks like a Single Pole Double Throw (SPDT) switch. The center pin will connect to one of the two side pins, depending on the switch position. Now you need to figure out how the module uses that switch.

It could be the center pin is the input to the module. Then the left may be connected to ground and the right pin to 5V (for example). Changing the position of the switch changes the input at the center pin to 0 or 5V.

OR the center pin could be tied to a constant 5V or 0V, and there are two inputs to the module (one connected to each of the side pins).

OR the switch could be connected as a Single Throw, even though the physical switch is a SPDT. In this case, one side pin of the switch does nothing at all, although it may still be soldered to the board to help hold it in place.

Determine how this switch is used, and once again replace the physical switch to one or two (depending on the above) outputs of your Picaxe. Again, if the required current is below 20mA, you can just use a serial resistor for safety and connect directly. If it is higher than 20mA, use a transistor.

Programming is pretty straight forward. When you want to record, set the appropriate outputs to select record mode, and then set the output to connect either push button 1 or 2 to record. Wait 20 seconds. Stop recording by inverting the Picaxe output connected to the push button. Set the output connected to the slide switch connectors to go to playback mode. Next time you trigger that playback button, it will play whatever you recorded.

finally i get it thanks

ok that helps alot! if I want/can get one in the future I will directly to what u said! thanks so much!