![]() |
Sound!
We have a burnout Robot that does burnouts (smokebombs!) and we wanted to add sound (simple fixed pitch, squealing sound) to our robot (IFI system). I did a tad of research, and it appears that all I would need is a 5v speaker and hook it up to a relay and every loop send it forward and next loop send reverse. Am I correct or would i have to use the pwm? I would have to use the fast loop, and execute it with a counter to change the pitch and like.
|
Re: Sound!
Are you referring to hooking the speaker directly into the relay output, or hooking the relay output to a relay hooked to the speaker?
|
Re: Sound!
An alternative: Record a burnout sound on one of those Radio Shack 20-second solid-state record/playback thingies (under $20), use an amplifier for the speaker to make it as loud as you want (e.g., a boom box using external audio input), and use the relay (momentary closure) to trigger playback.
A very realistic sound for little $ and effort. Plus, you can swap out sounds. Like "moo" - now that would be funny. |
Re: Sound!
Quote:
|
Re: Sound!
Quote:
It may be theoretically possible to do it with a CAN enabled Jaguar - after all, the Segway makes its vooOOOIIIIIP start up noise this way. However, I can't guarantee it is possible, and even if it is it will be hard. I really like Don Rotolo's suggestion. I used one of those for a project in college - very quick and simple to get it working. It handles all the quick stuff, so you can ignore everything I said in the first paragraph. |
Re: Sound!
Quote:
If you wish to pursue this idea, I suggest you use a digital output rather than a relay output. The update rate on the relay pins is way too slow for the kind of sound you're aiming for. |
Re: Sound!
I have done this before as a project on another microcontroller (an HCS12 to be exact). I hooked up a speaker and amplifier to a PWM output and modulated the PWM period to generate different tones (granted, the square PWM wave sounds a little strange, but with a simple RC filter you can get a roughly sinusoidal, single pitch sound).
I suspect that if you were to look at some of Kevin Watson's code on how to use PWM ports 13-16 with custom frequencies, you could probably do something very similar. |
Re: Sound!
Quote:
|
| All times are GMT -5. The time now is 01:08. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi