Convert "Sound" digital output into controllable voltage


New Member
My Tai Chi metronome works using a digital10k potentiometer to select and display timings of 2 to 5 seconds beats.

My problem is to increase the "sound" output.
I have tried OpAmps and Darlington pair with little effect, once using a 100R preset to reduce volume.
I looked at using the "sound" digital pause pulse to trigger a 555 to allow me to control the volume but it does not like the trigger pulse to be held on for too long.
The trigger/reset pulses are the wrong polarity.

DAC digital to analog is a solution but I cannot see what and how this is achieved with Picaxe.
First thing is to read the "Sound" output as an eigth bit binary code. ( My 8 bit led display uses %00001100 to light a led bar.)
I know the voltage will be in steps and not continous which is similar to the digital potentiomenter as it has 64 resistor steps. This is not a problem.
I have read many articles with nothing applicable to my needs.

Sound b.1, (50,50) : Pause 2106 :

How can Picaxe help?

Thanks Tony


Senior Member

It depends what type of loudspeaker or "transducer" you're using to convert the electrical signal into "sound". But if it's a conventional loudspeaker of between about 4 and 32 ohms (mounted in a suitable enclosure) then I'd probably use a PAM8403. I discussed it here as a stepper-driver, but it's intended to be used as an audio amplifier. With its H-bridge output(s), it gives double the (supply) drive voltage, with no need for any coupling capacitors. For low power battery operation you might want the PCB version that gives access to the standby pin (the one I linked does not, and would be very difficult to modify).

In principle you could use the PICaxe's DAC output (using the SOUND output pin as its Reference input), or drive narrow (PWM) pulses into a low-pass filter (R-C), to control amplitude and tone.

Cheers, Alan.