Dry ice can be made by releasing carbon dioxide gas into a porous container and collecting the residual solid. Obtain a fire extinguisher, tank or cartridge that contains carbon dioxide, then put on heavy-duty gloves to prevent frostbite, as dry ice is extremely cold. Insert the nozzle into a cloth bag and firmly hold or duct tape it in place. Open the valve to release the gas, which cools and freezes the remaining carbon dioxide into dry ice.
Make sure the fire extinguisher is marked "carbon dioxide." Otherwise, assume it contains something else. Lightly shake the bag to break off any dry ice on the nozzle. Put the dry ice in the freezer to extend its life.
Dry ice can damage skin on contact, so don't touch it without gloves. Don't eat the dry ice or let it touch your mouth if you put in a drink. Dry ice is heavy and tends to pool, so do this experiment in a well-ventilated area. Don't put the dry ice in a sealed container, as it creates pressure when it evaporates.
Purchasing dry ice online or buying it at brick-and-mortar stores, such as sporting goods stores or cookware stores, may be less expensive than making it yourself.