NRF24L01 +RF24Audio from github

Hello there. If anyone managed to use RF24Audio library from github.

Is there anyway to output the audio in analog instead of digital? I get the signal digitized when I view it on oscilloscope


Your post was MOVED to its current location as it is more suitable.

Could you also take a few moments to Learn How To Use The Forum.

Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.

Sorry about that. Time is kind of short for me but thank you kindly.

The Arduino doesn't have a digital to analog converter so it simulates analog outputs with PWM. To get an audio signal from your Arduino outputs, use a low-pass filter to average out the pulses. Then use a voltage divider to get the signal level down to what your audio equipment expects.

low-pass filter, as in RC circuit for example? and what values should I use or how do I design the filter so i can have a smooth output similar to the input?

RC and LC are the most common passive low-pass filter types.

Take the SAMPLE_RATE you set in userConfig.h and divide by 2 to get the bandwidth. The default seems to be 24000 so 12 kHz.

Then use this calculator to pick a combination of components to get the desired cutoff frequency:

Thanks alot for the help but I have another inquiry. Is it possible to output the audio signal in analog form using arduino duo? without needing to change much of the RF24 Code?

The analog output will still be quantized at the sample rate. Have you thought of changing the sample rate? The userConfig.h talks about the various trade-offs (data rate vs range, sample rate vs sample size).

I expect the library would take a fair amount of work to switch from PWM output to D/A output.

If i increase the sample rate and data rate will the signal get smoother? because i'm planning to have a smooth output similar to the input.. I doubt it will do much difference but I will give it a try

Consider that you need the output rate to equal the sample rate in order to have the output match the input.

I'll probably end up using a Low pass filter most likely. Is there anyway to access the analog output from the NRF24 Directly without needing to access arduino pins? I have no idea how does SPI Communication works but there is MISO and MOSI which I think are responsible for data transmission?

Thank you

I don't see any analog outputs on the nRF24L01 chip.

Thank you kindly. I managed to output a signal similar to analog signals

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