PWM Writing and Reading Using Separate Arduino DUE's

I am currently completing an engineering design project in which we are creating an optical communications exhibit for a science museum. Unfortunately the processing portion of this project has had much less development on it than we all hoped and we are now faced with either designing our processing around what has already been built, or starting from scratch. The original teammate working on the processing subsystem has left the class and the documentation we have is minimal.

The basis around our project is to record two unique 5 sec long signals from a microphone and store on an Arduino DUE (not sure if this possible or the best option). We then want the user to choose to send both signals at the same time on two different colored LED's. These LED's will be coupled into acrylic light pipes as demonstration of how optical fiber functions. The user will have the option of placing a filter to block one of the signals of their choice. At the back end one signal will be read and pushed through a DAC into a set of laptop speakers.

The original "design" was to bit bang the code out and send it out on a digital I/O pin. We have now realized that is definitely not the way that OOK should be done and that we should instead be using PWM. We are all beginners using Arduino's and essentially wanted to know if this seemed like an attainable goal. I have seen other posts on this forum dealing with LED OOK for signal communication, but felt that this was a unique project since we plan to send two signals at the same time and expect to filter one out. We also expect their to be some variable loss through the optical link so we are not sure whether we could retrieve the signal on a digital pin.

I apologize if this topic has already been dealt with, or if this is the wrong forum to post this on. That said, we are grateful for any advice.

The purpose of this is not at all obvious. If what is sent across the optical link is indeed PWM, then no further digital processing is required, the recovered PWM is simply low-pass filtered in an analog filter and fed to the speaker. A microcontroller is not involved.

The PWM frequency for audio must of course be well beyond the audio range. I am not familiar with the capability of the DUE - I would be using an ESP8266 by preference as it is more readily available and vastly cheaper - but I imagine it would do the job of digitising the audio and regurgitating it on two channels.

Thank you for the feedback, the use of the backend processor does seem unnecessary. The original conceptual design said we would sample an audio signal with a 12 bit ADC and store that sample on the front end arduino. We would then serialize each of the samples and write to a digital output pin. This would require reading this signal back in on a processor and stacking the bits back up to push out a DAC. At the moment, our detector circuit is designed such that it would amplify this bit signal to read on the ADC. If using PWM, I would hope we should be able to just put this low pass filter at the output of our amplification circuit.

I am not familiar with the ESP8266, or devices like it, I will look to see how we might implement it.

The WeMOS D1 Mini is a good start. Cheap on Aliexpress. Buy a handful. :grin:

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