Hi,
I have a 433mHz transmitter and receiver and was going to try and connect them up to my microphone sensor to transmit the signal to another arduino wirelessly. I looked online and found that RadioHead is the program to use for it, but the issue is that it runs too slow for it to be used for audio, as it is only sending around 20 packages per second compared to the 100s-1000s that is required for audio. Is there a way to transmit the anaglogue signal of the microphone wirelessly through them that is fast or do I need a different transmitter and receiver?
The 433 MHz radios in the link are far too slow for audio. Most radios for the unlicensed ISM bands are intended for short data packets and low power transmissions.
Its not to transmit the sound data so it blares it out in a speaker but more so as a volume meter to see how loud it is in that place. I was using it with the microphone wired to the arduino and worked fine. Really, I just want it to transmit data at a very high speed.
It is a single number, and the faster the better. I tried it at 20 times a second but it wouldn't pick up a clap as it was running too slow. 100 would be fine but 1000 is preferable
If you want to pick up a clap, have the transmitting Arduino detect the clap, and send notification.
Your ideas are pretty vague at the moment. You need to experiment with the radio and decide what it is capable of doing. Then set up the project to match.
A typical data rate for packet radios used with Arduino is around 20k bytes per second, in small packets. But the 433 MHz TX/RX pairs in the tutorial you linked can't do that.
Then analyze the signal where it originates, on the Arduino, and send summary reports by 443MHz digital radio.
If this is for any kind of ongoing use, you need to obey the strict regulatory requirements for TX duty cycle in that band. I really hope you're not sending 20 packets a second...
Please post your entire sketch, in code tags please. Then we can talk about specifics.
Its more live situation, (this is a simplier version of the project) where you have the microphone detect a clap, which then in turn turns on an LED and then off again when the clap finishes. But as a clap lasts around 1-10ms, 20 times a second only gives max 50ms range. So is it possible to do it with the components or would I need better ones?
Code for receiver:
#include <SPI.h> // Not actualy used but needed to compile
RH_ASK driver;
void setup()
{
pinMode(13, OUTPUT);
Serial.begin(115200); // Debugging only
if (!driver.init())
Serial.println("init failed");
}
void loop()
{
uint8_t buf[3];
uint8_t buflen = sizeof(buf);
if (driver.recv(buf, &buflen)) // Non-blocking
{
int i;
// Message with a good checksum received, dump it.
Serial.print("Message: ");
Serial.println((char*)buf);
digitalWrite(11, buf);
}
}
Code for Transmitter:
#include <RH_ASK.h>
#include <SPI.h> // Not actually used but needed to compile
RH_ASK driver;
void setup()
{
pinMode(A0, INPUT);
Serial.begin(115200); // Debugging only
if (!driver.init())
Serial.println("init failed");
}
void loop()
{
int volume = analogRead(A0);
const char *msg = volume;
driver.send((uint8_t *)msg, strlen(msg));
driver.waitPacketSent();
Serial.println(volume);
}
The circuit is the same as in the tutorial except with the microphone input in A0 and an LED plugged into 11 on the other board
The Arduino would detect the clap. Then, instead of turning on an LED, send a single byte message to the other Arduino. Doable with any Arduino, and those 433 MHz radios.
But using the RadioHead library, it runs the 'sending' function meaning that it is no longer detecting the sound and so only detects sound every 20 times a second not when there is a clap. It has to be a live feed