Arduino NANO walkie talkie

Hi. I was working on a project called "Arduino NANO walkie talkie". i had connected all the sensors and i uploaded the code. heres my main code:

#include <RF24.h>

#include <SPI.h>

#include <RF24Audio.h>

#include "printf.h"    // General includes for radio and audio lib

RF24 radio(7,8);    // Set radio up using pins 7 (CE) 8 (CS)

RF24Audio rfAudio(radio,0); // Set up the audio using the radio, and set to radio number 0

int talkButton = 3;

void setup() {      

  Serial.begin(115200);

  printf_begin();

  radio.begin();

  radio.printDetails();

  rfAudio.begin();

  pinMode(talkButton, INPUT);

  //sets interrupt to check for button talk abutton press

  attachInterrupt(digitalPinToInterrupt(talkButton), talk, CHANGE);

  //sets the default state for each module to receiver

  rfAudio.receive();

}

//void talk()

//Called in response to interrupt. Checks the state of the button.

//If the button is pressed (and held) enters transmit mode to send

//audio. If button is release, enters receive mode to listen.

void talk()

{

  if (digitalRead(talkButton)) rfAudio.transmit();

  else rfAudio.receive();

}

void loop()

{

}

And the printf.h file :

/*
 Copyright (C) 2011 J. Coliz <maniacbug@ymail.com>
 
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 version 2 as published by the Free Software Foundation.
 */
 
/**
 * @file printf.h
 *
 * Setup necessary to direct stdout to the Arduino Serial library, which
 * enables 'printf'
 */

#ifndef __PRINTF_H__
#define __PRINTF_H__

#ifdef ARDUINO

int serial_putc( char c, FILE * ) 
{
  Serial.write( c );

  return c;
} 

void printf_begin(void)
{
  fdevopen( &serial_putc, 0 );
}

#else
#error This example is only for use on Arduino.
#endif // ARDUINO

#endif // __PRINTF_H__

Heres my circuit diagram:

So when i turned on my boards, they werent transmitting but instead they were making sounds like "tik tik tik " and i coudnt hear my voice on the other speaker.

That box that says Mic - does this include an amplifier, because a microphone can't supply enough voltage to drive an Arduino analogue input. Also is the signal from the S connect biased at a mid rail value of 2.5V?

I also notice you have something connected to A1. Reading this will cut down the sample rate and you have not increased the normal sample rate.

As to the code I can't see how this would work seeing that you have a blank loop function. Should not at least be calling the talk function from the loop function.

Did you write this code yourself? If so can you explain exactly what it does please.

Yes, the mic comes as a pre-made sensor as shown in this picture:
ky-038_LM393_Sound_Detection_Module_Sound_Sensor_Module
and it is a push button used for PTT function connected to A1
Sorry the code isnt written by me.
the signal from the S is 2.5V after some adjustment but before that it was 4.48V

OK.
That type of sensor has two outputs, a digital threshold on DO and an analogue signal on A0. The ten turn pot adjusts the digital threshold only.

OK what were the adjustments and how did you measure them?
Have you got an oscilloscope to see the signal you are getting?

I made the adjustment for the digital threshold to 2.5v and measured with a Volt meter. (sorry im just a starter) and i havent connected the push button right now

Hi,
Where did you get the code?
Is it your own program or is it from another source?

If so can you please post a link to the project, it must have more than just some code?

Can you please tell us your electronics, programming, arduino, hardware experience?

Also a circuit diagram with All powersupplies, component names and pin number. Including the controller will also help.
The one you have posted is okay, but it needs to show all components.

What are your 3V3 and 5V supplies?

Have you used the NRF units before?

Thanks.. Tom... :smiley: :+1: :coffee: :australia:

HI,
this is the project that i was following : Arduino walkie talkie with nRF24L01 – Cassiopeia Ltd
im using All the components mentioned in it but instead using a premade mic sensor.
Im using an Arduino Nano V3 board.
im completely new to arduino and NRF units and this is my first ever project

Which will be a big problem as the original microphone module - now apparently a dead link - was supposed to be amplified, while this module as Mike notes is not amplified. :roll_eyes:

Mind you, using an Arduino for audio communication is pretty daft anyway. :grin:

(Yes, I know there is an "audio" forum here. One day I really should take a look at it to see what it is about. :thinking:)

1 Like

That is a mistake. You need to make a few simpler ones before you can do this yourself. Unless, you are some kind of savant.

1 Like

In the link to your project it says :-

the MIC is an amplified electret [microphone]

Also on that page in the comments section someone says they are getting symptoms like yours and the author asked if the are using an amplified microphone, to which the reply is "sorry my bad".

Have you read the comments section, often this is more important that the information given in the main text.

So it was not your diagram at all it was some one else's. It would have been good to know that without you trying to pass it off as yours.

Conclusion- you are not getting an sufficient large enough audio signal for your project to sta d a chance of working.

1 Like

We've seen this user problem lots of times before - in fact, without AGC a mic gain level setting is based on expectations of the actual audio input level. That is completely unknown in the case of an experimenter's module, since people would use them for different purposes. Likely, complaints come up when the expectation is that room sounds would be nominal, when the designer has decided to play it safe and avoid clipping by setting the gain level so that speaking near the mic is nominal. Also cost cutting since they don't have to build in a preamp, or a very good one.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.