Author Topic: Generating a sound  (Read 7255 times)

0 Members and 1 Guest are viewing this topic.

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Generating a sound
« Reply #25 on: June 22, 2016, 05:31:06 am »
I have some more details now what I am to do. I need to reproduce the sound of a clicker you know the sort of thing you hold in your hand and press and release and it goes click click. I'm guessing there is a membrane that his bent which generates a sound pulse.
Which can be modelled and reproduced with a few passives and an opamp or transistor, if a click is the only thing needed why complicate it with a micro?

I was almost thinking that myself. If I use PWM 8 bit is fine I'm also thinking that a low pass filter at the frequency of the few oscilations required would make it much easier as I can just supply the low/high points and let the filter produce the rest.
 

Offline MK14

  • Super Contributor
  • ***
  • Posts: 4527
  • Country: gb
Re: Generating a sound
« Reply #26 on: June 22, 2016, 06:06:09 am »
Here's a single IC (probably very cheap jellybean) click generator + passives.

http://www.discovercircuits.com/DJ-Circuits/click-sound-gen.htm
 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Generating a sound
« Reply #27 on: June 22, 2016, 06:33:56 am »
yes that would work. I'd actually need two clicks to simulate a clicker because you press it and release it and because it's one of those things with a sprung diaphram that flips from one side to the other it clicks when you press and clicks "back" when you release. I suppose if i put a capacitor across the speaker it woud help round the edges off or just sightly low pass filter it and put it through a small amplifier to a speaker.
 

Offline nhw888

  • Newbie
  • Posts: 1
  • Country: fi
Re: Generating a sound
« Reply #28 on: June 22, 2016, 09:41:05 am »
Here is a application note about the subject for AVR devices.

https://www.adestotech.com/wp-content/uploads/doc1456.pdf

You can leave the recording part out from the final product, but use it for testing.
« Last Edit: June 22, 2016, 09:43:46 am by nhw888 »
 
The following users thanked this post: MK14

Offline MK14

  • Super Contributor
  • ***
  • Posts: 4527
  • Country: gb
Re: Generating a sound
« Reply #29 on: June 22, 2016, 12:13:15 pm »
yes that would work. I'd actually need two clicks to simulate a clicker because you press it and release it and because it's one of those things with a sprung diaphram that flips from one side to the other it clicks when you press and clicks "back" when you release. I suppose if i put a capacitor across the speaker it woud help round the edges off or just sightly low pass filter it and put it through a small amplifier to a speaker.

As a rule of thumb, if you want a single/simple sound effect, almost 100% fixed (the customer WON'T change their minds) etc etc. Then a discrete solution (such as what I previously linked to, or what other(s) have mentioned), may be a viable alternative to an MCU.

But if it/its (specifications) might change (especially a lot), needs to be of high quality (even if you think it does NOT need to be, but all this talk of extensive filtering, makes it sound like it needs to be fairly high quality), multiple (different) sound effects, and/or other complications. Then really the MCU based solution, is probably the best way forward.

If there is any kind of quantity involved ?, pics/microchip (although you want to NOT use them), offer a pre-programmed service (at reasonable cost, and not that high volume requirements, when I last looked), which can save hassle, especially for surface mount parts, which are harder to program by hand.

If it is only a ONE-OFF, then the quickest prototype you can come up with, is probably best.

EDIT:
Obviously a discrete solution CAN handle multiple sound effects and/or high quality, with (usually) extra components. But at some point, it makes much more sense to use an MCU, which can handle a huge range of options, with little or no change in hardware or its costs.
Pics are just one type of MCU which could do it. Using the ones you are familiar with is ok, as long as the volumes are not so high and/or costs need to be so low, that it would be problematic.
« Last Edit: June 22, 2016, 12:34:30 pm by MK14 »
 

Offline SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17814
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Generating a sound
« Reply #30 on: June 22, 2016, 04:52:34 pm »
At the moment I need a prototype in a hurry and to actually come up with some knowledge of what I'm doing in terms of producing this sound. Quality is not paramount as the customer wants a cheap product and volumes will be low I don't think they would order more than 50 at a time.

What I'm thinking is to have a lowpass filter with the same frequency as the PWM so it will in effect resonate and produce a virtually sinusoidal sound. Potentially yes they could change their mind so having a microcontroller is ideal.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf