Who doesn't love getting a bottle of bubbles to have fun with friends and pets? What's that? You get tired of all that blowing?

Circuit Playground Express comes to the rescue. Along with the Crickit robotics controller, you can build a simple robot that dips the wand in bubble solution and blows the bubbles for you! Great at parties!

This guide will show you how to build your own bubble blowing robot.


1 x Circuit Playground Express
Adafruit's popular multisensor learning board
1 x Adafruit CRICKIT for Circuit Playground Express
The easiest way to use motors, servos, and other electromechanical and blinky things.
1 x Standard servo - TowerPro SG-5010
High-torque standard servo can rotate approximately 180 degrees (90 in each direction)
1 x 3-Bladed Trifoil Propeller Fan for DC Motor
3-Bladed Tri-foil Propeller - it snaps on like a breeze (pun intended!) perfect for making a fan
1 x DC Toy / Hobby Motor - 130 Size
Standard '130 size' DC hobby motor, 4.5 to 9VDC
1 x DC Motor Plastic Mount - 130 Size / 20mm Diameter
The plastic is just flexible enough you can press-fit a DC motor with 20mm diameter inside
1 x 3 x AA Battery Holder with 2.1mm Plug
A holder for three (3) AA batteries! It's got an 8" long power cable with a 2.1mm DC jack at the end
1 x Alkaline AA batteries (LR6) - 3 pack
Battery power for your portable project!
1 x Small Alligator Clip to Male Jumper Wire Bundle - 6 Pieces
Connect your Crickit to the wires of your DC motor with these handy cables.


You'll want to go to your local store and pick up the following:

2 x Bubble Solution
Liquid Bubbles with 1" (2.5 cm) bubble wands
1 x Container
2" x 4" (5 cm x 10 cm) or so, deep enough to dip bubble wand in sideways, 1.5" (2.5 cm) or so.
1 x Legos or other parts mounting items
Legos make for a flexible way to mount the fan and servo for the project
1 x Super Glue
For gluing mounts to bases. Hot glue may also work.

There are a number of bubble solution recipes on the Internet if you would like to mix up your own. If you decide to make your own bubble wand also, note that the container will need to be deeper than the diameter of the bubble wand.

Electrical Connections

Use the assembly instructions for attaching the Circuit Playground Express to the Crickit.

The servo plugs into the Crickit board in the block of pins marked Servo at the first spot marked 1. The lightest color (yellow/orange) connects to the signal pin near the board edge. The connector side with the black wire faces the center of the board.

For the DC motor, use alligator clips to the motor wires, connect the pin ends to the Motor 2 pins (the ground and Motor 1 pins are unused). The clips will connect to the motor connection wires. If you ever find the fan running backwards, power off the project and swap the alligator connections which will reverse the direction of the motor.

The Wand

If you have very long bubble wand handles, you may need to trim them. About 8 cm / 3" works well but you'll want to check the mechanics of your setup to ensure things will work.

Select a servo horn from the package that comes with the servo. I used the X shaped horn but the double inline one is fine. The wand will be connected to the servo horn using the long pointy screws that come with the servo.

Drill two holes using a tiny drill bit that matches holes in the horn. Take the horn and using a short screw, connect the horn to the servo.

Screw the wand onto the horn.  Alternatively you can try to hot glue or super glue the wand onto the horn. Gluing will not allow removal of the wand and since the wand covers the horn attachment screw, the horn is permanently attached. Screws would be best.

Attach the horn to the servo body with the short screw provided. If you use the longer screw it might damage the servo. The longer screws are used to attach items like the wand to the horn.
The wand screwed onto the horn and flat top Lego pieces glued onto the motor mounts.

Mounting the Motor and Servo

I chose Lego to build mounts for this project. It allowed for positioning both the servo and the fan motor in many different ways to find the best configuration.

To make the DC motor Lego compatible, I super glued two pieces, one 2x1, another 2x2 - both with flat heads. For the Servo, I used two 2x2 flat head pieces. If you do not have these pieces in your Lego box, they can be obtained from https://shop.lego.com. If you need additional "standard" pieces to mount the motor and fan, plan on picking those pieces up at the same time.

Super glue two 2x2 tiles onto the servo and one each 2x2 and 2x1 onto the DC Motor Mount. Allow to dry.

You can now snap the DC motor into the motor holder and press on the fan blades.

Your Bubble Container

Your container with all the bubble solution in it should preferably be square and deep:

  • A bit deeper than the diameter of the bubble wand so the servo can fully dunk the wand into the solution and coat the surface. Less than a full dunk does not guarantee the wand has the full amount of solution to produce bubbles.
  • Square helps fit against the base of the servo. When the wand is moved by the servo up and down, you need to ensure the wand does not hit any part of the bubble mixture container, bottom or sides.

Leftover food containers and takeout containers might work. The one below came as a craft container from Michaels.

Check your plastic container selection for a somewhat deep rectangular or square container, a bit deeper than the diameter of your bubble wand.

You can code this project in either Microsoft MakeCode or CircuitPython, both are super easy.


Time to tell the bot what to do in Microsoft MakeCode. If you are new to using MakeCode and Circuit Playground Express, see this guide to demonstrate how to get things going.

The program for the bubble machine only takes a few code blocks:

When the boards power on, on start is run. The DC motor with the fan is set to 100% speed. Feel free to adjust this if it is too strong for your setup and solution - a lower value might prevent bubbles popping immediately when the wand comes up.

The forever loop lifts the wand out of the solution (angle 30 degrees), waits two seconds, then dips it down again waiting 2/5ths of a second in the solution before repeating.


The CircuitPython code is very similar to the MakeCode. Motor 2 for the fan is turned on and the servo is told to move up and down at timed intervals. I had to adjust one angle from 165 in MakeCode to 145 in CircuitPython to get the movement the same as the MakeCode.

# SPDX-FileCopyrightText: 2018 Anne Barela for Adafruit Industries
# SPDX-License-Identifier: MIT

# CircuitPython 3.0 CRICKIT dMake It Bubble
import time
from adafruit_crickit import crickit

motor_2 = crickit.dc_motor_2
motor_2.throttle = 1  # full speed forward

while True:
    print("servo up")
    crickit.servo_1.angle = 30
    print("servo down")
    crickit.servo_1.angle = 145

Possible Modifications to the Code

If the servo angles do not correspond to your setup, they should be adjusted accordingly. It might be easier to remove the servo horn, twist it to the area you want the wand to move and resecure it if the horn screw is accessible.

The pauses between actions are adjustable to your setup. You may need more than 2 seconds to have the fan blow all of the bubble fluid off the wand. If it is blowing bubbles at too fast a rate, adjust the 400 milliseconds up.

If the fan is blowing too hard, you can do two things:

  1. Adjust the fan further back from the wand
  2. Adjust the fan speed in the sketch to be lower

The fan does not need to be at 100% (CircuitPython 1). Probably you do not want it much below 75% (CircuitPython 0.75), the factor here is the viscosity/thickness of the bubble solution. If it is real thick, more air will be needed.

We will need to give both the fan and the servo some height:

  1. The servo is placed high enough so the wand can dip down into the bubbles, then back up to catch the breeze of the fan.
  2. The Fan to have the air stream plow through the center of the wand to have the bubbles come out.

You can see the Lego pieces I used, your configuration may be different (this is why I chose Lego, fast prototyping, no sawing of wood or fiddling with metal).

Both the fan and the servo have a base to lift them to the correct heights.

Below is the final bubble blower assembled. It uses a base that is 10x10 and I used one that was one block high to give the fan and servo more lift when placed against the container of bubbles.

I originally had the fan back to provide a weaker blowing force for my first bubbles. I think adding additional solution made my mixture harder to blow so the fan was carefully moved close to the wand. This is the beauty of Lego and other methods of mounting, if you find your configuration isn't ideal, you can quickly change it. Everyone's situation is different.

Connecting the Crickit

Make sure the DC motor and the servo are connected to the Crickit per the diagram on the previous page, just in case you had to disconnect things to get them placed together. The final setup is pictured below:

Be sure the bubble solution doesn't get on the Crickit.


You will want a good quantity of bubble solution. I went to Wal-Mart and they had a six-pack of large bubble bottles. Each has a wand in it.

Fill the Container

Fill your container so that the bubbles cover the end of the wand every time the wand is dipped down by the servo. If you try the machine out and the servo is not moving the wand correctly you can either take the servo horn off and twist it or change the angles in the code to the two locations you need.

Location, Location, Location

Consider using this project outside. the bubble solution may spill and the bubbles popping will make things wet and soapy.

Have Fun!

Have fun with your project! 

This guide was first published on Aug 22, 2018. It was last updated on Feb 19, 2024.