From: Alexandre P. N. <al...@om...> - 2007-03-14 01:14:14
|
Arnar Birgisson wrote: > Hi again, > > On 3/13/07, Arnar Birgisson <ar...@gm...> wrote: > >> I'd like to use one of the PWM outputs on the robostix to play a tone >> on a very small 8ohm 0.1W speaker I pulled from an old modem. I >> figured out the software side and setting up the timers, but I don't >> know how to safely wire up the speaker to the pins. Any pointers to >> some material on this? >> > > I took a leap of faith and wired it through a 470ohm resistor (gnd -> > speaker -> resistor -> pwm signal pin). Should give me ~10mA. Seems > (or rather sounds) to work very nicely - I just played Für Elise on it > with my midi keyboard plugged on /dev/ttyS3 :oD > [cut] That's cool! I'm not an electronics guy, but I think you could put a transistor between the pwm pin and the speaker. The reason is that if a transient surge comes from the speaker (it's an inductance), it would probably burn the transistor and not the robostix. But I'll let those experienced on the subject conclude, perhaps I'm talking nonsense here. - Alexandre |