Between the cost of doctor’s visits, hospital stays, and medication, it can sometimes feel like the treatment of a condition is as painful as the condition itself. But one man has a solution for the cost of medication – he has developed a 3-D printer that can print it out.

Lee Cronin, a professor at Glasgow University, calls it a “chemputer.” When he heard about 3-D printers, which now can print things as diverse as toys, food, and body parts, he wondered if it could be used to print pharmaceuticals. He assembled a 45-person team and set to work.

He admits that the technology is in its infancy, but its ramifications could completely revolutionize the pharmaceutical industry. He and his team use a $1,800 printer that they have outfitted to perform chemistry. The machine uses bathroom sealant to print material of specific dimensions, connected with tubes of various lengths and diameters. When the tube became hard, the printer can inject it with “inks” to create chemical reactions.

Cronin points out that most drugs are made up fundamentally of basic elements, like oxygen, carbon, and hydrogen, as well as vegetable oils and paraffin. The inks are made up of simple reagents, which would combine to make more complex compounds. Cronin realizes that it would not be feasible to simply store oxygen and hydrogen in the printer, so if you want to make a sugar, for example, you would combine base sugars.

The prototype not only combines the compounds, but controls the environment in which they take place. The blueprint would control the compounds themselves, in addition to the quantity, speed and ratio at which they are combined.

In the near future, Cronin wants to use the prototype to create ibuprofen and other common household drugs.

While it would be tempting to use the printer for selfish means, Cronin hopes to use it specifically in the developing world, where there some countries are plagued with counterfeit drugs for tuberculosis and HIV. With the printer, Cronin hopes that nuisance will no longer be a problem, and he does not worry that counterfeit drugs would be made using his technology. The printer would also allow drugs to be made as there is a need and, Cronin hopes, would democratize complex chemistry.

Video: Lee Cronin gave a TEDTalk on inorganic chemistry in 2011.