Open Source Mini Video Player (Arduino, ESP32, Electronics, PCB Design)!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi i'm alex and welcome to super make something today we're building a mini video player that can play all of your favorite movies and tv shows on the go from an sd card let's get started [Music] this episode is sponsored by pcb way more on them a little later remember hit clips the tiny audio player from the early 2000s that played 60 seconds of your favorite pop songs coming at you right between the years as hit clips guy who puncher did and recently created his own hit clips compatible cartridges that can store over 5 hours of music on a micro sd card this got me thinking while having all of your favorite songs in a tiny format is cool what if you wanted to watch an entire tv series on the go instead looking online i found a few projects that do this using a raspberry pi zero but while these devices are cool they require a full linux installation and considerable setup time to get the pi up and running which can make getting started pretty scary especially for those new to diy electronics projects but what if you could use a microcontroller instead program it once and then just drag whatever video files that you wanted to watch onto an sd card that's exactly what the mini video player project aims to do so what are we trying to do here the mini video player project is driven by two main ideas one anyone can build it using only a standard soldering iron and two the project is super modular well the first goal is accomplished by making sure that all components are easy to solder by using mostly through-hole components the second goal is accomplished by allowing three different configurations of the video player to be created using the same circuit board one bare bones configuration that only plays video one middle ground configuration that plays audio and video either through a speaker or headphones and an over 9000 configuration that does either of the previous two but eliminates the need for connecting the mini video player to usb power by adding a lithium polymer battery and charging circuit for maximum portability it's over 9 000 to accomplish these things the mini video player consists of the following components one custom breakout pcb one esp room 32 development kit one pam-8403 audio amplifier board two one kilo ohm thumb wheel potentiometers one five pin pcb headphone socket one two watt eight ohm speaker one 1.8 inch st 7735 lcd module with an sd card slot 2 momentary push buttons to change the video file being played 1 2.2 kilo ohm resistor 1 3 millimeter spdt 3 terminal slide switch 110 microfarad capacitor 1 sd card one lipo charger and voltage step up boost module one 3.3 volt lipo battery with a capacity of your choosing one 3d printed mounting plate or other custom housing to attach these components to the mini video player pcb and three m3 button head screws at the heart of this project is the esp room 32 development kit a microcontroller board made by espressive systems and its specs are insane it has a 32-bit dual-core 240 megahertz processor a half a megabyte of ram 30 output pins integrated 2.4 gigahertz wi-fi and bluetooth and a ton of other built-in peripherals best of all it only costs two dollars and can be programmed using the arduino ide making it super easy for anyone to build this project regardless of electronics experience so how does the mini video player work videos are essentially still images that are played back at a specific frame rate these still images are made up of pixels that each have a red green and blue value which when mixed together create groups of colors that form a final image saving each individual pixel color for each frame would take up a lot of storage space so modern video players use video codecs like h.264 that encode videos and hold color values constant over multiple frames which results in smaller video files the drawback is that when these files are played the videos need to be decoded to determine which pixel shouldn't change between frames this takes significant processing power to do quickly enough in order to have smooth video playback which most microcontrollers unfortunately are not able to do a trade-off is to compress each frame by batching colors together and then storing them as individual image files in a sequence which is exactly what the motion jpeg or mjpeg video codec does while this means that the quality of the video is slightly reduced and the resulting file sizes for videos are a bit larger frames are easier to decode which allows a microcontroller to playback videos at a fast enough frame rate while simultaneously also playing mp3 audio drawing pixels to an lcd screen and sensing button inputs now that we know how the mini video player works let's design a circuit board to connect all of the components together like most of my electronics projects the build process begins in electronic computer-aided design or ecad software specifically altium designer while the process of using altium is a bit outside of the scope of this video it essentially boils down to placing the components that you want to use on a schematic and then connecting them together appropriately using virtual wires after this i arranged the components onto a circuit board routed the wire connections and added labels where necessary and exported a set of gerber files which are used for circuit board production compared to other pcb design software i've used all team is great because it allows you to quickly make changes to your board if you're interested in trying the software out for yourself be sure to check out the link in the video description below for a free one month trial once all of the components were laid out it was time to order the pcbs i zipped up my gerber files and headed to pcbway.com who are the sponsor of today's video on the pcb way website i simply uploaded my zip file selected manufacturing options including the quantity of the boards that i wanted to order solder mask and silk screen color and the type of surface finish and clicked submit less than a week later the boards arrived at my front door and they were absolutely perfect since partnering with pcb way i have used them to manufacture boards for all of my pcb projects and i'm always impressed by the quality and delivery speed of their circuit boards pcb way also offers 3d printing cnc machining and injection molding services meaning that it's possible for anyone to prototype entire products even if they don't have access to their own 3d printers cnc machines or local makerspace if you're interested in building this or another project definitely check out pcbway.com where you can also order a board for this project with a single click through their community portal with the pcbs in hand it was now time to solder everything together small size means greater portability so to make the mini video player as compact as possible components need to be soldered in a specific order a neat thing about the esp room 32 development kit is that it doesn't have any components on the underside of the board so it can be mounted flush with a breakout pcb unfortunately unlike a microcontroller like the raspberry pi pico the esp room 32 development kit does not have cast slated edges and there are currently no surface mount versions of this board this means that i instead soldered its through-hole connectors to pads of the breakout pcb using a rather dubious technique that electronics twitter has dubbed surface mount through-hole soldering one piece of advice if you're interested in building this project for yourself is to try to find an esp room 32 development kit and lcd module that don't already have their headers pre-soldered this will save you a bit of time and eliminate any risk of breaking these components when trying to remove the header pins i began the assembly process by aligning each of the development kit's connections to the breakout pcb and then holding it in place using masking tape here i made sure that the board wasn't taped down too tightly so that solder could flow across the whole pad and make a connection with the tin through hole of the board after soldering the first pad and then flooding the esp32 through hole with solder i used the multimeter to verify that everything was electrically connected and continue to solder the remaining pads checking continuity after connecting each pad is definitely recommended since the solder can be easily re-melted at this stage to make sure that everything is making contact like it should be a better way to solder these connections would be to use a hot plate and solder paste but i did not try doing this here since not everyone has one if you do and decide to build this project for yourself please let me know how it turned out by leaving a comment below once the development kit was firmly attached i soldered male header pins for the lcd module and audio amplifier board onto the breakout pcb i then snipped off the pins on the underside and the trickiest bits of soldering for this project were done i next attached the rest of the passive components to the board making sure to save the audio amplifier and lcd breakout for last the speaker can be soldered at any time and isn't necessary if you only plan to use the mini video player with headphones but you may want to save this towards the end as well since soldering everything else is a bit easier without having the speaker hanging off the pcb by its wire leads with the board fully assembled it was now time to program the microcontroller the esp32 is actually programmable using the arduino ide by installing a board definition file and support library which i documented in a youtube short if this is your first time programming in esp32 this way be sure to check it out for step-by-step instructions on how to do this i made all of the code for this project available on github after downloading a zip file of the project repository i extract it into a folder on my desktop and open the minivideoplayer.eno file in the arduino ide shout out to instructables.com user moon on our nation who authored the initial library for playing video and audio on the esp32 that serves as a basis for this project after selecting the esp32 dev module option under tools board in the arduino ide i next click the upload button which compiled the code and transferred it to the esp32 during the upload process be sure to hold down the boot button on the microcontroller until the ide serial output as connecting and then release it to transfer the compiled code with the programming done it was now time to convert some video files the mini video player actually treats video and audio separately so it's necessary to split media files that you want to watch into separate mjpeg video and mp3 audio files to do this i used ffmpeg a free open source cross-platform video converter which can be downloaded at the link in the video description after unzipping ffmpeg i open the encodingcommands.txt file that was included in the zip archive containing the project code this file has two commands that tell ffmpeg to create a separate video and audio file called output.mjpeg and output.mp3 respectively from an input media file named input.mp4 after renaming the file i wanted to convert to input.mp4 i copied it into the bin folder in the unzipped ffmpeg directory next i typed cmd into the address bar of the bin folder which opened a command prompt i then copied both commands from the text file into the command prompt making sure to hit enter after each one which generated the output.mjpeg and output.mp3 files after renaming these to something more sensible making sure that the corresponding video and audio file names matched and re-encoding a whole bunch of other media files i copied everything to an sd card plugged it into the sd card slot of the lcd screen and turned on the power the re-encoded media files now started playing in their full 160 by 128 pixel 44 100 hertz glory ready to be enjoyed on the go i'm honestly still impressed that a two dollar microcontroller can play full motion video and audio while watching tiny movies is definitely cool there are a bunch of other ways that this project can be used as well on the pcb i broke out two of the esp32's unused i o pins plus a five volt and ground line for other peripherals plus the microcontroller has wifi and bluetooth on board making it possible to connect to a ton of other wireless devices or to access the internet if you have a cool idea what this project can be used for please let me know in the comments below or just toss a tv emoji down there to let me know that you made it this far and help with engagement on the video i really appreciate it also if you haven't yet hit the like button you've made it this far so there's a good chance that you liked the video and also be sure to subscribe for more cool diy projects again a big thank you to pcb wave for sponsoring this episode you can find a complete bill of materials links to the github repository with design files and code and a link to where you can purchase a kit version of this project online in the video description below that's really all there is to this one so thanks for watching now go super make something [Music] you
Info
Channel: Super Make Something
Views: 57,939
Rating: undefined out of 5
Keywords: Arduino, ESP32, Mini Video Player, Electronics, Guy Dupont, Hit Clips, PCBWay, Programming, Raspberry Pi Pico, microcontroller, raspberry pi, circuit board, diy project, open source
Id: 67RFm2RMjC4
Channel Id: undefined
Length: 12min 41sec (761 seconds)
Published: Sun Aug 14 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.