Making Windshield Wipers Move to the Beat of a Song
This project by YouTuber Cranktown City lets windshield wipers dance to music all on their own.
Inspiration
While driving in the rain and listening to a favorite song, many people find great enjoyment in watching the windshield wipers rocking back and forth in near-perfect synchronization with the tune being played. To recreate this effect, YouTuber Cranktown City decided to create a small device that listens to the currently playing music in real-time and make the wipers swing according to how strong the beat is.
The initial setup
To being this project to life, he began by cracking open his early-2000's era truck and ripping out the windshield wiper drive motor along with its associated control unit. Ordinarily, the controller works by reading the value of a variable resistor, so a resistor divider circuit was attached to an Arduino Uno that could measure this value — which is set by turning the end of the left stock.
Moving the wipers
The motor that drives the wiper blades is quite "dumb" on its own, as it features a basic internal drive train that oscillates the external arm with a frequency determined by the attached driver. This setup was improved upon by adding a rotary encoder in order to track the absolute position of the arm and thus, treat it like a servo. Once the wiper is in the known home position thanks to a limit switch, the BTS7960 motor driver receives PWM signals from the Arduino Uno that uses it to spin the motor up to a certain point in either direction. Finally, a PID loop was included in the code, and it helps increase accuracy and smoothness when it comes to positioning the motor quickly.
Analyzing songs
Once the wiper situation was figured out, the next step was to determine when a beat has occurred in a song so that the wipers can react accordingly. The MSGEQ7 is a tiny module that is able to perform frequency analysis by splitting up an incoming analog signal, in this case audio from the truck's stereo system, into seven distinct bins. Once the lower drum frequency has an average above a preset threshold, a flag is set in the code to move the wipers.
Assembly
The motor and encoder were sandwiched together in the original enclosure and sealed with ample amounts of epoxy and glue in order to prevent water ingress. Once finished, it was placed back into the truck and had wires run to it for power, music, and controls from the steering wheel stock. Although a small section of the hood had to be cut to make room for the larger assembly of components, Cranktown City plans on covering it with a 3D-printed cover, eventually.
Listening to some music
Now in his truck with some music going, the wipers were able to successfully dance back and forth in sync with the beat. To see this in action, you can watch Cranktown City's video below!