My kid loves bubbles, so I decided to make a bubble machine for him.
This project includes a Python script for your PC if you want the music to play and don't have the proper shield for Arduino. You will need to have your PC connected to Arduino via USB to have both parts work. If you have an Arduino with WiFi, you could manipulate the connection portion of the code in both scripts to facilitate the same process without using a USB connection.
The basic rundown is as follows:
When powered on, the servos initialize to the specifications set in the code. Once the button is pushed, it sends a command to your python script running on the PC, It will move the wand down, dip it into the bubble liquid, pull the wand out of the liquid, pause to let excess liquid drip into the bowl, move the wand to in front of the fan, at which point the fan will turn on and the base servo will sweep the machine left and right blowing bubbles.
NOTE: The bubble wand will need to be adjusted for maximizing bubble output. For my home made fan blades, I found having the wand slightly canted instead of flat produced more bubbles. If making your own fan blades, you will need to tinker with the design of the blades, and both the angle of the motor and distance of the motor from the bubble wand.
I enclosed everything in tupperware containers and sealed everything with clear silicone. Since everything is in a plastic container, the L298 is not properly grounded. You will need to connect the ground wire from the motor to the GND connector on the L298 instead of putting it in OUT3/OUT4 in order to get the motor to work.
Video:
WARNING: USING HOT GLUE AS A SEALANT IS NOT RECOMMENDED because it won't flex with the container and the seal will break causing leaks that can destroy your components.
Comments