1

I have an Arduino Leonardo that can turn a relay off and on and the click is audible on the relay -this is simply done by making one of the control wires HIGH in the program code to turn the relay on and make the same control wire LOW to turn the relay off. In this way it can turn a set of relays on and off. By varying the patterns of on and off timings to the relay it make distinct sounds-it reminded me of a piezoelectric speaker for some of the programmed values. At fast on or off puling this 6V relay makes a buzzing noise. I was wondering if the sound emitted from the relay could be used as a crude speaker- I'm not talking about a quality speaker- just good enough to recognise a melody or speech. So my question I was thinking the problem maybe be simplified if a set of relays is used buzzing at a certain frequency-corresponding to tones heard in the human voice to make it sound like speech. Im no expert in acoustics.

My questions are

1) is it theoretically possible to use the clicking noise from a set of relays only to act as a a crude speaker (so hear a crude known melody or a crude speech)?

2) Is there such a circuit (if so what is it exactly and the theory of how it works) that can be built with an arduino?-so it only used the noise from a relay to act as a crude speaker.

I personally think it possible it would be an interesting circuit to build as I have not seen a relay used like this before. I just think it sounds interesting that music or speech can possible be made by a circuit without using a speaker type component. Maybe there's another non-speaker component (i.e. a component that was not originally designed to make a sound) that can be used instead of a relay.

I'd love to know the answers.

Update I started on this. And the relays do make different tones-thats as far as I got. So music seems to be possible; something like a famous melody of a song. I havent got any ideas yet for a another component instead of a relay.

  • It sounds like you have a good idea of the basic circuit and theory of how it would work. If you have the components you should try it out! – dlu Jan 30 '16 at 18:09
  • You will break the relay, simple as that. They are not designed to be switched on and off rapidly. – CharlieHanson Jan 31 '16 at 0:29
  • I dont care if I break the relay I have lots of them-too many. Actually they can relaibly buzz to the same tone. Im happy to break few realy too keep myself entertained and learn something new ttrying out my idea. I just want to know if I can use them to create an organised sound-even if it for a few seconds. Your answer to my question seems to be no as you seem to be saying -without proof - that the rapid switching will break them. I'd like to see a mathematical based proof of that. – Karlie Kloss Jan 31 '16 at 0:45
  • The operate/release time for a typical relay is 10ms/4ms - that means it takes 14ms for the contacts to close and open again. 14ms equates to a maximum 'click' frequency of 71Hz. You will not achieve anything worthwhile with that. – CharlieHanson Jan 31 '16 at 0:49
  • Why the down vote? This is a good, well-written question – Keith M Feb 1 '16 at 21:38
3

Sound happens because of a disturbance in the air (or other conducting medium). So the short answer is an unqualified "yes." To start making a recognizable "tune" or "voice" you would need to vary the frequency at which you create the disturbance. In the case of a relay, you'd be varying the rate at which you activate it. This would be very possible on the Arduino.

To get recognizable sounds out of a relay you'd need one that can respond in the range of a few hundred Hz (which would give notes around middle C (roughly 260 Hz) up to a few KHz. From what is posted in @CharlieHanson's comments and answers, it doesn't seem like common relays can do that.

A function that takes agreements of pitch and duration, something like:

 note(hz, ms)

would give you a fairly easy way to describe the music you wanted to play.

Just for fun, here are a few examples of "speakerless devices" making music:

2

The operate/release time for a typical relay is 10ms/4ms - that means it takes 14ms for the contacts to close and open again. 14ms equates to a maximum 'click' frequency of 71Hz.

Typical rates of cycles-before-failure are in the region of 100,000 minimum - but at a rate of 5 cycles per second. This will rapidly decrease as you increase the switching rate.

Furthermore, as alluded to in the above datasheet, must-operate and must-release voltages increase as the number of completed cycles moves into the tens-of-thousands. Thus, if you were to find a relay that switched fast enough you will eventually (and maybe only after a 100 seconds of non-continuous operation) run its operating voltage above a level that can be achieved.


Due to the maximum switching frequency of a relay you cannot use one, or many, to synthesise speech. Speech is an incredibly complex mixture of frequencies, the majority of which are well above those that can be produced by switching a relay on and off.


Music is a loose term. Simply switching the relay on and off once per second is technically a rythym, and therefore music. Different relay models will have different 'clicks' - the smaller the contacts the higher the click will be in pitch (logically speaking, that is). A collection of different relays could definitely create music, akin to percussion, but by their individual clicks and not by the rapid switching thereof.

  • 1
    Music: no, not with any meaning. Speech: absolutely no. – CharlieHanson Jan 31 '16 at 1:05
  • For sure the realy emits some organised sound that is why I asked the question if (yes or no) music or speech was possible. I have not concluded anything definite yet. – Karlie Kloss Jan 31 '16 at 1:08
  • How do you plan on synthesising speech if you can only operate the relay at around 70Hz? "Telephone quality speech" consists of frequencies between 34Hz and 3.4kHz. – CharlieHanson Jan 31 '16 at 1:11
  • I dont know how to synthesize speech or music obviously which is why I asked it in the question to ask if the reader knew how to do it (thus answering that it is possible). I was going to copy it from the ideas in the other answer (the floppy disk drive or Lotus car) if I can get further information on how they did it. – Karlie Kloss Jan 31 '16 at 1:15
  • 1
    The numbers in a datasheet are always conservative because they are intended to guarantee reliable operation. But the OP is not interested in reliable operation of the relay, only in hacking some notes out of it. From this perspective, it is definitely worth trying frequencies beyond the specifications. She can also transpose the tunes a couple of octaves down, they should still be recognizable. – Edgar Bonet Feb 1 '16 at 14:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.