433Mhz Receiver AND Piezzo Buzzer

Hi,
i’m working an my wireless burglar alert based on an arduino nano v3, an CZS-A 433MHz receiver (data on pin 2) and an piezzo buzzer (on pin 7).
The buzzer works fine (plays a melody), if the receiver’s data pin is removed. But if the data CZS-A data pin is connected to pin2 (for the interrupt) the piezzo only makes a noisy buzzing sound. Why’s that? What am i doing wrong???
PLZ anyone advice! MAY thanks for any reply.

your’s
Peter

What is the receiver supposed to be receiving?
Not possible to even guess what may be wrong.

Where did you buy the receiver (paste the in link in your post).
Do you have a datasheet of the receiver, to see what the pins do.
How are the other pins connected.

Sorry for giving too less information....so here it goes:

The 433mhz receiver is this one: http://www.ebay.at/itm/433Mhz-RF-transmitter-and-receiver-module-Alarm-Set-for-Arduino-ARM-MCU-WL-/200927170639?pt=LH_DefaultDomain_0&hash=item2ec831504f

It receives the signal from several 433mhz wireless door contacts, the 2 button hand sender and a few wireless smoke detectors.

The pins:
arduino digi2 -> 433 Mhz receiver Data pin
arduino digi7 -> Piezzo Buzzer+
arduino gnd -> 433 Mhz reciver gnd AND Piezzo Buzzer gnd
arduino 5V > 433Mhz receiver+

I'm using the fuzzylogic 433mhz arduino library (https://bitbucket.org/fuzzillogic/433mhzforarduino/commits/ea935fbc0499) to decode the messages.

Receiving the wireless messages works fine.
Playing a melody on the buzzer works fine, if i remove the receivers data pin(2).

Could it be, that the data commign from the receiver triggers the interrupt so the other code will be corrupted?
if so, do i need a kind of gate on the data pin?

That is not a CZS-A 433MHz receiver. It is a 'normal' cheap ASK (on/off) receiver.

They have an automatic gain. If nothing is transmitted, they amplify the noise and receive that noise. So the interrupt gets the noise. I get 2000 interrupts per second with those if nothing is transmitted.
The software will try to read the protocol out of that noise.

Do you want to disable the receiver interrupt while playing the tune ?
I think you can disable the interrupt in software.
In most cases a sound/melody chip is used in such cases.

I don't know if the same timers are used in the tone and fuzzilogic code. You should check the documentation or the source code to see which timers are used (the timers inside the ATmega328P chip on the Arduino board).

I didn't know the fuzzilogic code. Interesting.

Many thanks for quick reply!!!
are there any other 433mhz receiver that have something like an noise squelch so i could use them?

i could disable the interrupt, but then i could not stop the alert-sound from playing with my rf remote :frowning:

i thought on using one arduino nano to receive and decode the rf messages and send them by softwareserial to a second arduino that does the further processign and audio. But maybe someone knows an better solution or an receiver that fits better?

I'm working on that with a second Arduino myself.
So I have a dedicated Arduino for the reception of 433MHz.
I use I2C to communicate between the Arduinos.

A noise squelch won't help.
More expensive modules have onboard chips which handle the protocol. Like CC1101 modules. Or you could take a look at XBee boards.

What are you using to play the melody on the buzzer? If it’s pin7, it’s not PWM, so that means your software is bit banging it? Maybe you’re getting so many spam interrupts from the INT0 on pin2 that it is messing with the sound?

If you could put the buzzer on a PWM pin and use a tone library that uses a timer, would that help?

MANY thanks for all your replys!

@TanHadron: Specialy you made my day... iv'e put the buzer to pin 3 and used the tone() function and .... IT WORKS LIKE CHARM!