Movie Music has a LOUD PROBLEM! So I fixed that! (Automatic Volume Adjuster)

The Love of Watching Movies: A Passion that Led to a Revolutionary Project

I am a movie buff who has spent countless hours watching films over the years. From classic flicks to modern blockbusters, I have enjoyed them all. However, as time passed, I began to notice a nagging problem with many new movies. The conversation volumes were often low, while the music was turned up to maximum levels. This made it difficult for me to fully immerse myself in the movie experience.

I had no idea who or what was responsible for this issue, but I knew it was affecting my enjoyment of films. Other people also seemed to notice this problem, and I began to wonder if I was the only one experiencing it. Despite my frustration, I decided that there must be a solution to this issue, and so, I embarked on a journey to create a device that would solve the problem once and for all.

To tackle this challenge, I turned to Brilliant, an online learning platform that offers courses in various subjects, including electronics and programming. I began by studying the basics of electronics, learning about components such as resistors, capacitors, and transistors. I also delved into the world of programming, familiarizing myself with languages like C++ and Arduino.

As I progressed through my studies, I started to design a project that would address the issue of low conversation volumes in movies. My goal was to create a device that could adjust the volume levels based on the audio input from the soundbar. To achieve this, I needed to develop an algorithm that could detect changes in the audio signal and make adjustments accordingly.

The Algorithm: A Key Component of the Project

After conducting extensive research and experimentation, I came up with a basic algorithm that would form the basis of my device. The algorithm worked as follows: it first set a default volume level for conversation, which was typically lower than music. It then used a deadband potentiometer to adjust the volume based on changes in the audio signal.

When the loudness reached a certain threshold, the circuit sent out a "volume down" code to reduce the volume level. Conversely, when the audio signal returned to its normal range, it sent out a "volume up" code to increase the volume level. The algorithm also included a timer that would wait for a certain amount of time before checking if the loudness had changed again.

The Circuit: Bringing the Algorithm to Life

With the algorithm in place, I turned my attention to designing the circuit that would bring it to life. I chose to use an Arduino board, which is a popular platform for DIY electronics projects. The Arduino board features a range of built-in components, including timers and analog-to-digital converters (ADCs).

To implement the algorithm, I used two timers: Timer 1 and Timer 2. Timer 1 was responsible for reading in voltage dividers that were not essential to the main function, while Timer 2 created an interrupt every 16-32 milliseconds, which was crucial for analyzing the audio signal.

The Circuit's Performance

Once I had designed the circuit and programmed it with the algorithm, I was eager to test its performance. I connected the device to my soundbar and started playing a movie. At first, the volume levels were erratic, but as I fine-tuned the circuit, I began to see improvements.

When the conversation parts came on, the volume levels adjusted automatically, while when the music kicked in, they remained steady. The circuit's performance was impressive, and I knew that I had created something special.

The Future of the Project

While my device has solved the issue of low conversation volumes in movies, it is far from perfect. There are still some limitations to its design, such as the need for a proper enclosure to house the components.

However, I believe that this project has the potential to be taken to the next level by adding an enclosure and improving the code. Perhaps someone out there will take up where I left off and create a device that is even more advanced and user-friendly.

For now, I am content with having created something that has made a positive impact on my movie-watching experience. If you are as passionate about movies as I am, I hope that this project has inspired you to explore the world of DIY electronics and programming.

In conclusion, my journey to create a device that adjusts volume levels in movies was a challenging but rewarding one. It taught me the importance of perseverance, creativity, and collaboration. While there is still much work to be done, I am proud of what I have accomplished so far, and I look forward to seeing where this project will take me next.

WEBVTTKind: captionsLanguage: enSo I love watching movies and I think manyout there who enjoy watching movies too.Over the years I watched good flicks and badflicks but at some point I started to noticea rather big problem especially with newermovies.My prime example for this is Bladerunner 2049which is a pretty good sci-fi movie withouta doubt but maybe you can spot the problemI have with this movie while I was re watchingit?If you guessed that I had to constantly lowerand rise the volume while watching then youare absolutely correct.I have no idea who does it and why but itoften feels like the conversations are keptat a very low volume while the music is basicallyat the maximum and I hate that.And no I am not crazy, other people noticedsuch problems too.So I guess there is nothing we can do aboutthis and we should get used to constantlyaltering the volume up and down, right?WRONG!Here is the solution I came up with and letme tell you that after a lot of blood, sweatand tears it finally works decently.So sit back and enjoy the journey of how Ibuilt it and thus fixed the modern movie industry.Let's get started!This video is sponsored by Brilliant and youmay be familiar with them by now because Imentioned them once or twice before.But let me tell you that Brilliant recentlyupped the interactivity on their platformto a new level which I think is fantasticbecause in order to properly learn and understandsomething, you have to do it yourself.For example you can shift around pseudocodein order to playfully learn how algorithmsand coding syntax works.And that is just one example, you can learnso much more with Brilliant when it comesto STEM topics.You can try it out for free and even get 20%off your first year by visiting Brilliant.org/GreatScott.First off; let's talk about the electricalfundamentals when it comes to adjusting thevolume and how we can measure the sound level.Now the remote for my soundbar uses an InfraredLED for communication whose sent out datawe can have a look at by utilizing an IR receiver.As you can see It sends out a bunch of 1 and0 that form together different code wordsthe soundbar can understand.But we are only interested in the code forVolume Up and Volume Down which we shouldbe able to send out on our own with an infraredled as well.And for the sound measurement all we needis such an electret microphone which in combinationwith a suitable amplifier circuit can spitout the sounds it is currently hearing.That means we got an input in the form ofa voltage signal and two possible outputsin the form of voltage signals as well andall we now need is something in the middlethat processes the input audio informationand decides when to lower or raise the volume.And of course I went with a microcontrollerfor this job; an Arduino Pro Mini to be specific.Next we have to consider how to power thisproject on the go for which I initially wantedto use my LiPo Charge/Protect/Boost circuitthat can output 5V.The only problem is that the circuit usesa switching regulator which naturally willalways come with a bit of noise and that canpotentially lead to unwanted noise in theaudio amp segment.So I ditched that idea and instead went witha LiPo battery + suitable charge and protectcircuit which I will combine with this linear3.3V regulator.Not only does it obviously spit out stable3.3V but it also does that down to an inputvoltage of around 3.35V because it comes witha very low dropout voltage.This is mandatory because our battery onlycomes with a max voltage of 4.2V; so normallinear regulators are out of the questiondue to their high voltage drop.And as a bonus I also added a voltage dividerand red LED to the final circuit which willlight up when it is time to charge the battery.And speaking of final circuit, here is theschematic for it and while we already talkedabout most of the components, there are stillsome left.For example the amplifier circuit which ishonestly nothing special; just your typicalinverting op-amp configuration.But then there are also 2 potentiometers whichI will call deadband and react but more aboutthem during the programming part.So all in all the hardware aspect is prettystraightforward and simple and so was theconstruction of the circuit on a perfboardwhich took me around 2 hours in total.And after wiring everything up it seems likenothing explodes and we are good to go forthe programming part.I started off easy though; by soldering theIR receiver to another Arduino and using theIRremote library in order to extract the codefor volume up and volume down.Next we have to think about the audio signalwe want to sample whose frequency can be ashigh as around 20kHz.The problem is that the ADC of our microcontroller,which converts our analog voltage into digitalvalues the microcontroller can work with,clocks with a frequency of 4.8kHz.To increase this frequency we have to changethe prescaler of the ADC to something like16 which we can do by adding these lines ofcode.After then outputting the ADC readings tothe serial monitor or in my case the serialplotter we can see that everything seems towork just fine, awesome.And that was the point I positioned the circuitnext to my soundbar, started a movie and hada look at lots of different audio waveformswhen there were conversations and when therewas music.I did this in order to come up with an effectivealgorithm which goes something like this.First off we have to manually set the perfectvolume for the conversation volume level whichcan look something like this.Then we use the deadband potentiometer inorder to obviously adjust the deadband.In this area the circuit does not care whenthe loudness changes which is important becausevolume fluctuations are essential even whenit comes to simple talks.But if the measured values leave the deadbandthen the circuit will notice that and waita certain amount of time before checking ifthat will happen again.I did this because a loud sound can alwaysbe something like a scream or something similarand we do not want the circuit to lower that.But if the Arduino keeps noticing spikes aftercertain time intervals then it knows thatit is time to lower the volume.And by the way you can change the timer intervalswith the react potentiometer which lets thesystem obviously react faster.But anyway now the circuit will send out thevolume down code until the audio signal isno longer exceeding the dead band and it willalso remember how often it sent out the command.Next the system will wait until we reach quietermoments of the movie again at which pointit assumes that the music is over and it willsend out the same amount of volume up codesso that we are once again at the sweet spotfor conversations.Of course I didn't explain every little detailhere but overall I thought this control schemeseemed suitable which is why next I transformedit into an Arduino sketch an oh boy was itcomplicated for me since I am honestly notthe best programmer.Now I think explaining every single line wouldget a bit out of hand but let me tell youthat the timer1 and timer2 of the Arduinowere the key player in this code.Timer1 creates an interrupt every second whichI use to read in all the not so importantvoltage dividers and Timer2 creates an interruptevery 16 to 32ms which I used for everythingtime related when it comes analyzing the audiosignal.And don't think my code worked the first time,I spent a few hours on the floor trying tomake it work and luckily eventually it did.And with that being said I think you all wantto see how this thing performs, so let mejust start up the Bladerunner movie and havea listen.It's getting quite loud....yes, yes it isdimming it....perfect.Ok now we're getting to a quieter moment andnow it should go up again.Yes, yes it works.Perfect!Now of course this project is not perfectnor complete since all that complex programmingstole a lot of time from me which I otherwisewould have invested in a decent enclosure.But maybe you are interested in such a deviceand thus not only build it yourself, but maybeeven add an enclosure and improve the codewhich you will hopefully share.With that being said thanks for watching,if you enjoyed this project then considersupporting me through Patreon so that I canmake more world changing projects like this.As always don't forget to like, share, subscribeand hit the notification bell.Stay creative and I will see you next time.