So, I have to use such splitter to connect one pin to Arduino and one to a speaker .
The two Speaker pins on DF player mini will perform both function (speaker output and send Audio signal to Arduino).
Is that really possible as I am listening such idea for the first time.
Have you tried it yet? Arduino electronics is a practical hobby, not a seemingly endless conversation.
I am unable to find MKR Zero, so it's not possible for me
I will try this tomorrow and give you feedback if it works
If you have space one nice thing about the Arduino Mega is all the extra hardware serial ports.
Now take this for what it is as I won't claim to be up on all the various Arduino boards since there are so many now. Some, like the ESP32 boards I'm just getting into are much trickier to work with but they offer great features. Still, for your project, I'd avoid them.
Break down your tasks into sections, major tasks. If I were you with no programming experience (and who has other people in the team - why didn't you say that in the first place?), I would break the tasks down into two or three areas and use one central controller to receive input from the mic in or whatever you decide, and use other Arduinos to constantly poll either a digital pin or serial port to perform some associated routine.
If you go this route, remember to pick a logic level (whatever your master input is that the rest of the system will respond to) and stick with that voltage and probably that family of microcontrollers (say Arduino AVR boards).
Your English is good. No trouble understanding you at all.
So if Arduino Mega is better option, then I will go with it.
And as for dividing the project into sections, so I have a plan in my mind. Correct me I am wrong.
I have divided the project into some sections:
- Servo controls for Eyes,jaw, eyebrows and neck movements
- Voice recognition to recognize the person that wants to interact with robot
- Response playback According to the command of person and also jaw movement (open/close) randomly
- Sound localization for determining the direction of person/Speaker and rotate his head toward the speaker.
All I want in my project are these four functions.
For servos controls( using 16 servos), I am using Arduino Mega with PCA9685 module.
For voice recognition, I am using elechouse v3 voice recognition module with Mic.(Supports 7 custom commands simultaneously)
For Response playback, here I am confused about components like I have DF player mini but I am confused that I can do this or not. As I also need to control One servo (jaw) when this player playback some prerecorded audio responses(output) through speaker. I don't know how I will do that Part.
And last one is sound localization or sound source determination, and this is the difficult part of my project. As I really don't have any knowledge about components required and connections. And I am also confused which method of sound localization I can use that is easy and effective.
Here is the breakout of my project.
As Arduino Mega has enough pins to do all these stuff, I don't think that I have to use another microcontroller for some function but as I am beginner in this field, so correct me I am going wrong at any step. If another microcontroller is required with Arduino Mega, then I have Arduino uno Also and I can use that if it is required and make things easier.
I will be very thankful to you I you can guide me about any thing related to my project (like improvements, components, programming, Easy approach etc).
Sure, you could use one Arduino. Ask yourself this: "How confident am I at making Arduino do more than one thing, at one time?"
Real pros around here could make one Arduino do all that (I am not one - I'm an everyday hobbyist - no programming experience outside of Arduino projects and no training at all). Neither do I make my own voltage regulators - I buy buck converters, fast, easy, reliable. Speaking of which, order a ten-pack of step-down buck converters. If you want to do Arduino now and in the future, you'll use them, trust me. Set your overall DC voltage a few volts higher than your highest device and use a screwdriver to a buck converter to dial in the voltage you need.
Make sure your power supply can supply at least 1.5 * the sum of all your device currents at maximum load. Some guys say * 2 and i would if you can. If you're 16 servos at a time to do facial movement, that's going to run a few amps anyway.
Having said all that, and to my original point, instead of sharing resources on one Arduino such as the timers that servos and MP3 and all that need, why not use a few Arduinos and in doing so, buy the timers you need (plus make the coding very simple and scalable). My main Hallowe'en treasure chest uses I think four Arduinos (I like Nano Everys as accessory boards by guys smarter than me like @alto777 recommend just the Nano over the Nano Every) - point is, same 5V logic across boards and let ONE Arduino do ONE job.
Just my two cents
Oh, two more cents. Since you seem committed to your original idea (even with a team, I still think you're really pushing it), you best stop the procrastinating that brought you here (I wasn't born yesterday) and get on it.
Maybe if your audio (analog) input can trigger a servo routine above various thresholds (green for low sound and little movement, red for loud sounds and larger movement).
Ok, I we will look at the 3d design of my robotic head, there is a space for one Arduino Nano and for respberry pi cam module.nbut as I am not using cameras so I can use this space for Another Arduino Nano. So I can place two Arduino Nano in robot Head.
One for Servos and other for Voice recognition and playback etc.
I think that's gonna work fine.
But the question is here how I will find the direction of a person who wants to interact with the robot. Like if I am setting the wakeup command for my robot is "Hello Rob". Then if someone speak "Hello Rob" from left side of robot or from right side or from front, then how my robot will know from where the Audio is coming from So it will rotate his Neck(One servo) towards the direction of person. Ignoring all the other background Sounds.
Can anyone Guide me about the components that can do that?
Please be realistic, you have enough to do already, and you want jam on it.
In other words you could extend your project ad infinitum, you have enough to do without trying to do even more. This is just a displacement activity to justify not actually starting the project.
That in itself is an impossible task. If you could do that.
If you want to control the head to look at the closest person to the head then use a PIR sensor on top of a stepping motor to scan from left to right to find the closest person. BUT given your current state of lack of programming knowledge if you could do just that in two months I would be very surprised.
That is called "blanking" and is used in RADAR systems (for example).
Show us your thinking. Draw, and post a schematic here. Get it reliably built firstly from an electromechanical point of view and at least you'll have something.
Then start programming. I can't tell you what components to use for a few reasons, not the least of which is that I have not built a project that does specifically what yours is supposed to do. I know where I might start prototyping solutions but it's not my project.
I'm just trying to get you on track toward something since I still think that you're up the creek without a paddle.
Using pseudocode, what do you think the "hearing" algorithm will look like? What units will you be measuring? Then how will you translate those units to something an Arduino can use?
Break it down. Start with pseudocode that corresponds to the parts you are purchasing (you must have some idea, or no?). Include any library examples you might be using and how you think those examples will do what you need to do.
Post that schematic too, like a zoomed in section of the overall head.
Try pseudocode for something basic, like detecting a voice and simply opening the eyes.
The, line by line, translate your pseudocode into Arduino code.
So far, @xfpd has done more of your project than it seems you have, with regard to the audio detection portion. It's your turn. If you're going to use the Arduino forum as a resource to get you closer to your goal, you need to post something for us to work with.
I would imagine you've already lost the interest of many of the usual excellent helpers here (much better than me) and I would imagine it's because you aren't posting schematics or code to them them something to work with. Lots of helpers here it seems won't bother helping someone who hasn't posted at least that minimum of code and schematics.
Come back in a few days when you have some preliminary code written and something actually built, even just a servo playground to prove your electrical concept and see that you can get them all moving at the same time.
You said
and I have to ask if it's possible to just wire up the controllers using longer wires down through the neck. Your project moves and how you you plan on mounting the Arduinos and keeping the wiring all in place as the facial "bones" move around?
Wouldn't it be easier to have the Arduinos outside the head altogether?
Ok I will post everything here once I will receive the 3d printed parts.
The 3D printed parts are the least of the schematic because they're just hinged joints mechanically fastened to servos, are they not?
No need to wait until you have those (didn't you say 8-10 days)?
Best you get your schematics and preliminary code down before that.
You are mistaken if you think you will be writing this code in an afternoon or something like that. Maybe you already have someone else's code you're using but even if you do, it's going to take time. Do you even have the IDE set up on your computer? Have you tried a couple of examples?
Maybe take a look at Wokwi to try some simulations if you don't have time and components yet.
So exploring YouTube I have found this
I think this will be good start for me to learn how to Playback Audio and I will also implement @Terrypin have said in post#48 to try to control servos.
Can you provide a link to tutorial on how to make and upload mp3 files on SD card so that it can be played by DF player mini . Here is code also
Df_Player_mini_Arduino.ino (879 Bytes)
Can you suggest me which changes I have to made with code so that the servo will rotate when the audio is playing

Several times by several people over several weeks. You just skip over the suggestions because this project is beyond your understanding. 76 posts and all you have produced is pictures of other people's work and asking for handouts of code, without putting a minute of work into writing. Why not take a breather from social interaction and start producing something, anything, toward the final product?
Who's project is this? Google around - that's what I would do. I will say be sure to buy a fast, quality card such as Sandisk.
No, that's a link to download some code. That's not proper form here. You have to copy the code from the IDE (under Edit > Copy for Forum OR just CTRL+A, CTRL+C and paste in the forum after clicking the CODE button, between the little hash marks whatever they're called.)
And after you copy as ^, no, you have to adapt the code yourself. It's your final year assignment, not mine.
I'm not now as confident about that as I was in my posts 45, 48 and 59. See my edit in 45. Could be misplaced caution though.
Maybe one of the professionals will comment.
He didn't like this thread, or the other three, so he started another one about sound and servos.