Building sound box in industrial control panel for kid's toy - Help? - Page 1
Forum section: electronics / beginners

author: victorhooi
author_rank: Regular Contributor
timestamp: August 29, 2023, 01:42:45 am
content: Hi,I'm trying to put together a little sound machine for my son's birthday =).The electronics will be mounted inside a cheap industrial control box with the buttons the kid's really love pressing e.g.:(If the image attachment doesn't work - you can search on Aliexpress for "control box with start stop emergency")(I know there are better ones you can get from say,SchneiderorEaton- I know those two brands through my work. And RS-Onlinehas some for sale. However, this is for a 2yo kid's toy, and I figured a cheap $10-20 enclosure would be OK, versus getting a $200 enclosure - unless you think durability will be an issue with kids?)The sound playing will be handled by theDFRobot Promodule - which is a small, low-cost MP3 module. (It's the slightly upgraded version of theDFRobot Mini MP3 Player- the main change is it has an inbuilt 128MB storage versus MicroSD card. I figured that's one less thing to go wrong for the kid's toy).This will let me mix up the different song's we play over time, and we can link play/pause/skip to the various buttons on the control box.Output will be to a single 4Ω , 3W speaker module -PUIaudio AS07104PO-WR-R(Digikey Link).The whole thing will be controlled by a small microcontroller - either aArduino Uno R4, or theESP32-S3-based ProS3from UnxpectedMaker. (The ESP32 board was recommended by somebody from work). I'm not super familiar with either platform, to be honest, but I'm not afraid to learn - my Python is definitely better than my C, though.Power will be provided by a lithium-ion battery inside the enclosure - either a small pouch-style LiPo battery like they use in RC planes, or possibly a cylindrical LiPo cell like the18650.Questions:1. Battery SelectionFor the battery - I was originally thinking of a small pouch-style LiPo battery. However, theGetting Started Guidefor the ProS3 board recommends that you should use batteries with charge protection built in - and that the board won't stop you from over-discharging lithium battery, which can kill them.From my research, it seems like most consumer pouch-style batteries don't have protection circuits built - whereas you can buy "protected" 18650 batteries.Does this mean that I am better off getting protected 18650 batteries, a battery holder, and crimping on a Molex PicoBlade connecter to it?Or are there any advantages to going with the pouch-style batteries? And how would I avoid over-discharging'?2. Mounting ComponentsHow do you recommend I physically mount the components inside the control box?I've read somewhere online about using standoffs, but that seems to be more for PCBs - in this case, I'll need to mount are:MP3 Module- how would you secure this to standoffs?Arduino Uno R4orESP32-S3(No way to mount to standoffs?)Speaker- this does have 4 x screw holes at the cornersLiPo pouch-style battery or plastic 18650 battery holder - is there some secure/safe way, that's still removable?3. Speaker Grille/CutoutThe speaker will be inside the control box - I assume I will need to cut out some kind of grille or cutout for the sound to come out, right? Or is there another way to let the sound out?Also, is there any way to ingress protection that grille or cutout? Would it be very hard to provide some kind of liquid protection? (The kids are probably going to spill water or juice into it....or try to).4. Arduino vs ESP32As mentioned above, I'm thinking of going with either a Arduino UNO R4 or ESP32-S3 based microcontroller to link up all the buttons, and provide all the logic for the MP3 board.The ESP32-S3 board I picked has an integrated buck-boost converter to use the 3.7V LiPo batteries - which is converterHowever, I've heard that Arduino is an easier environment to get started with for beginners?What do you guys think?Is there anything else I should keep in mind for the above?

author: Stephen_Pejak
author_rank: Newbie
timestamp: September 13, 2023, 09:53:29 am
content: Well, I hope you are getting an answer on time. It's very nice what you are trying to do. Regarding the battery I reccomend 18650 due to it being safer. When it comes to charging, overdischarging and stuff, there are very cheap protection boards(1-2$) and I also suggest getting a TP4056 or a better alternative would be IP2312 for charging. And also get some cheap battery level indicator(or make one if you have some basic parts(you have a lot of tutorials online)).Second: reggarding mounting: Use some M3 bolts nuts and washers, drill holes and thats it. It's very simple. If you don't have required tools use double sided tape. When it comes to speaker gril, driling couple of holes where the speaker is mounted will do the trick. Also if you don't have a drill you can make holes with hot soldering iron and the just cut the excess with a knife. Regarding water proofing the only thing you can do is to put some resin/silicon on ICs and parts that are close together. When it comes to waterproofing charging board, I recommend covering it with cheap thermal grease(must be non-conductive and should be silicon based, I reccomend HY-510) that way you will waterproof it, but it will still dissipate heat well(those boards get very hot(about 80°C). Regarding the microcontroler, arduino is more begginer friendly.

author: jwet
author_rank: Frequent Contributor
timestamp: September 14, 2023, 05:37:01 pm
content: Agree with last poster 100% , a couple of other tips.I build a lot of quick and dirty stuff like this and I generally put .1" headers on all the module type boards and mount them to perfboard. I like the stuff with solderable pads at each hole. I use small hardware 3mm metric or 4-40 us and female sockets mounted on the perfboard for easy swapping- one end will be on the header and the other will be on standoffs. The circuits are point to point wired- it look nicer if you do it on the back only but it doesn't matter. Run power and ground separately and keep it stiff. Maintain digital and analog rails and grounds and return them to the battery. (more below). This will make a pretty sturdy assembly. (photos attached)I'd use a 3.3v Arduino nano, they're small and do all you need. You can breadboard, etc with a standard arduino during development and then go to a nano for the final.Finally, maintain a star ground and a star main power rail close to the battery. The digital noise from the arduino will get on the power rails for amp and MP-3 player and give you little hum and beep artifacts that your kid might not notice but you will.Attached are some pics- self explanatory mostly. These little marine speakers are surface mounting, rugged as hell and splash proof at least. They're about $10 new and sound good. The speaker is mounted to a clear plastic clone of an otter box- clear might be fun and you could add some flashing LED's with some extra port pins and resistors. The busiest picture is an SDR I played with based on the Teensy micro and sound card. In front is a Teensy 3.0 with its audio hat on top (Arduino like but 100x faster with DSP, not required for your app). It use the perfboard with male and female headers and standoffs. To the right above the volume know and next to the SMA is an SI-5351 and crystal mounted on a little SIP type board that I made. This radio has been scavenged a bit but should give you the idea. The hole in the top is for a 2" display that I started with, I went to larger display but left all the little display stuff there.Have fun and enjoy your kids!

author: WimWalther
author_rank: Regular Contributor
timestamp: September 15, 2023, 07:27:23 am
content: Why not a knockoff Arduino Pro Mini (5V, 16MHz) for controlling? They're like $2 + ship, and have all the functionality of an Uno.

author: jwet
author_rank: Frequent Contributor
timestamp: September 15, 2023, 02:18:56 pm
content: I was just saying stick with 3.3v to keep it simple. He's running from a single Li Cell. I'm also talking about clone Nano's for a couple of bucks- just 3.3V