Notifications
Clear all

Help play an Audio File with an ESp32

19 Posts
5 Users
1 Reactions
2,083 Views
(@natalieadkins)
Member
Joined: 2 years ago
Posts: 6
Topic starter  

Hello! I would appreciate any help with this problem I am running into. My project is essentially a one way walkie talkie using ESP32s and I am struggling with getting the speaker that is connected to the ESP32 to play audio. I have uploaded the code and included a picture of the circuit. I am trying to upload an audio file to an ESp32 and have it play that audio through a speaker. I am only getting white noise and don't know what isn't working. The code is from the github: https://github.com/atomic14/esp32-walkie-talkie

Soldered receiving side front

   
Quote
Will
 Will
(@will)
Member
Joined: 4 years ago
Posts: 2594
 

@natalieadkins

First let me say that I don't use ESPs and I've never used I2S, so judge the following comments accordingly ...

I don't know if you're still using the same wiring as illustrated in your first post. If you are then your receiver and speaker will never work. That diagram is incorrectly configured.

For instance, you have VIN (by which the module is supposed to receive 3-6 volts) connected directly to the speaker+ wire.

I would suggest that you peek about 21 minutes into Bill's video where he discusses the max98357A and its connection pins.

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 8015
 

@natalieadkins After you watch Bill's video, click the 'more' link under the vid then click on the first link which will be the blog post. Now you can see the wiring diagrams and code and follow the written instructions.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 8015
 

@natalieadkins What is 5 Beats?

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 4 years ago
Posts: 2594
 

@natalieadkins

I think you should abandon both of your original designs (rx and tx) and watch Bill's video and then start again. There are previous errors on both designs.

Anything seems possible when you don't know what you're talking about.


   
Ron reacted
ReplyQuote
(@davee)
Member
Joined: 4 years ago
Posts: 1914
 

Hi @natalieadkins,

   I do not have any I2S modules either, so I can't easily replicate what you are trying to do, so all I can offer is some suggestions that might give some clues. The problem we all face with a new system like this is that there are several different stages which all have to work .. and it tends to be difficult to know which stages are working and which are not. Hence these suggestions are rather general in their scope.

----------

You reference the code as coming from the walkie-talkie project, but clearly an MP3  player is somewhat different. The photo of the code is tricky to read and obviously can't be compiled directly. It might be helpful if you posted your code, either as a listing as described in the forum instructions or by uploading the source file using the Attach Files option at the bottom of the message window.

-----------

Wiring issues are quite common, and can be a difficult issue to track down. It might be helpful to post your actual circuit as a schematic. Photo of a pencil and paper sketch is fine, if that is the easiest for you.

----------

I understand you are trying to use the SPIFFS library code to play an MP3 file that you have previously loaded into the ESP32's internal memory. I have never tried to do this, but my impression from a quick Google is that it is rather tricky, including not being possible with the Arduino 2.0.x. Of course, you may well have achieved it, but I am not sure how you have checked the file has not been corrupted, etc. Perhaps it would be helpful to explain?

-----

The general consensus I found on the web was that it is a lot easier to use an external SD card, which can be directly written and checked using your PC, and of course that is what Bill does in his example. I understand your final system will not need it, but it might be an easier way to get started.

So personally, I agree with @will 's suggestion that you start by following the relevant parts  would recommend following the "MP3 Player Hookup" section of https://dronebotworkshop.com/esp32-i2s/ as a starting point to almost the same goal.

Similarly, Bill's "Testing the Microphone" section could be a useful step for the microphone part of your intended system.

--------

Sorry this is not much more than a list of information requests, but they are all needed to understand your approach. No guarantees, but something useful may emerge.

Best wishes, Dave


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 8015
 

@davee Hi Dave, it looks like you didn't check the OP's posting history. Here is the link they published in their first post of a circuit. You will be shocked at what you see.

https://buckeyemailosu-my.sharepoint.com/personal/adkins_671_buckeyemail_osu_edu/_layouts/15/onedrive.aspx?id=%2Fpersonal%2Fadkins_671_buckeyemail_osu_edu%2FDocuments%2FGroup%2022%20Audio%20Loop%20System%2F4905%2FSchematic%2FSchematic_new_schematic_transmittingandreceiving_2023-03-07%2Epdf&parent=%2Fpersonal%2Fadkins_671_buckeyemail_osu_edu%2FDocuments%2FGroup%2022%20Audio%20Loop%20System%2F4905%2FSchematic&ga=1

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
(@davee)
Member
Joined: 4 years ago
Posts: 1914
 

Hi Ron @zander,

  You are correct in saying I didn't check previous posts.

  The link you provided wanted a sign in to Ohio university, so I didn't (and presumably couldn't) pursue that.

  And unfortunately the search engine on the forum site is giving me an error message each time I've tried it recently (unconnected with this post), so tracking down previous posts from anyone is proving frustrating - perhaps there is an easier way?

So, sorry but I am still in the dark.

Best wishes, Dave


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 8015
 

@davee Strange that you can't use the link. I downloaded the content so you can see what the link reveals.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 8015
 

@davee In order to track down the posts of another user, I use the following technique.

1. Click the person's name/icon

2. Click the Activity tab

OR 

On any of the other person's posts click the down arrow under their name and select the activity icon which is the middle of the 3 revealed.

In either case, go back in time to the very first post. For this particular user, looking at all their posts is instructive.

Good hunting, this is a beauty of a problem.

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 8015
 

@davee I tried a couple of searches and also get a WordPress error. I have informed Bill and mentioned you also had those errors.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
(@davee)
Member
Joined: 4 years ago
Posts: 1914
 

Hi Ron @zander,

 Thanks for the tip on the 'Activity' tab ... I have been to the profile page of several different people over the months and never noticed it!!! .. I think I just read it as a single heading 'Profile Activity'.... and having done that once, it is very difficult to spot the oversight.

-------

The reference in your recent mail seems to have some weird duplication, which is presumably why the Uni's web server got confused.

---------

If you are querying the company reference '5 beats' on the schematic, then I don't know what it means.

I looked up 'Capstone' previously ... and whilst I still don't really know what that means either, I took the optimistic view of presuming this is a shoe-string project, aiming to make life better for a certain group of people, who through no fault of their own, could benefit from a little help  ... e.g. a 'genuine' charitable or similar basis, bearing in mind the different legal meanings of such terms in different countries, not a commercial company looking for some free consultancy, with the sole aim of making lots of money for themselves.

Presently, I shall stick with my presumption, but of course I should like to hear of any solid evidence that I am being taken for a mug.

--------

As it happens, I had previously exchanged notes with Bill on the WP error. I gather he thougt it might be related to another elusive and intermittent bug that affects his website server.

--------

Best wishes,

Dave


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 8015
 

@davee Always glad to help. I think the group is a legit collection of kind folks trying to help, but I fear they may themselves be challenged. Given my hearing loss and attempts to deal with it from the technical aspect, I can speak with some authority on this. As a small example, I recently mentioned the mask situation on my group page, and the only person who 'got it' was my youngest brother, who is so deaf he received a cochlear implant. To paraphrase him, it is almost impossible to explain to the normal hearing person that being hearing impaired is far more complex and just 'amplifying' the sound is not a complete solution. Neither of us knows how to explain it, but we are talking about the apparent loss of the ability to discriminate sounds. In very simplistic words, our aids amplify ALL the sounds to what appears to be the same level. So, for instance, the computer in my ear has a 'restaurant' setting that tries to amplify the human voices emanating from those close to us around the table while suppressing the random human and mechanical sounds from the background. This setting in aids that cost as much as my first new car EACH does improve the situation, but we still struggle to understand what is being said. It might sound weird, but this struggle to understand is physically tiring, so we avoid these kinds of situations. I bet if you ask a random hearing-impaired person how they fared through Covid, they will smile and say it was easy.

I trust you now have a copy of the circuits and can see all the mistakes, like connecting Vin to G and other nonsense connections. They clearly need help but have as yet to enter into a full dialogue with the forum. I suspect that the poster is a sort of mouthpiece for the group and has no technical knowledge whatsoever, so this will be a challenge.

I am obviously interested in this project but am very concerned they are helping at all until I know more about it.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Lee G
(@lee-g)
Member
Joined: 4 years ago
Posts: 78
 

@zander, @davee 

Ron, Dave

I may be mistaken, but a capstone project is usually a senior level project (at the university level) required to pass a particular course or set of courses. I had several of them in the various EE/ComSci courses I took at UT-Austin. In one case, the capstone project was in lieu of the final exam. I'm sure there are other meanings to the term, but that's what immediately came to my feeble mind.

I am also interested in this project as I am hearing-impared, and it’s getting worse. The results of growing old, I guess…


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 8015
 

@lee-g I hope it isn't a course, because they have the 3V3 pin connected to G and the receiver part has no power other than an Amp chip Vin connected to a speaker. Someone asked if this was an April fool's post, and that may be the answer.

Screenshot 2023 04 15 at 10.53.50

 

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Page 1 / 2