The CellScope works as a so-called fluorescence microscope that can identify the markers of disease.
It is hoped the device will be useful in the developing world, where such medical diagnostics are rare but mobile ownership and coverage are common.
The research is published in the free-access journal PLoS ONE.
The CellScope is made up of conventional microscope optics as well as some equipment to make it function as a fluorescence microscope.
Fluorescence occurs when certain molecules are illuminated with a certain colour and "shine" for a period in a different colour.
Fluorescent "tagging" molecules can be specially designed to latch on to, for instance, the bacteria that are a sign of tuberculosis (TB).
But diagnosing tuberculosis requires a fluorescence microscope, which can illuminate a blood sample that has been treated with "tagging" molecules and detect just the light that those molecules emit with great sensitivity.
However, typical fluorescence microscopes are bulky, expensive devices limited to hospitals and laboratories.
"There are other people who have been working on developing portable fluorescent microscopes," said David Breslauer, a University of California Berkeley researcher and lead author of the study.
"The innovation on our front is that we've integrated that with a cell phone rather than just making a standalone microscope."
The CellScope uses cheap commercial light-emitting diodes as the light source - in place of the high-power, gas-filled lamps used in laboratory versions of the device, and cheap optical filters to isolate the light coming from the fluorescent tags.
The device has a resolution of just over one millionth of a metre, and the team was able to identify tuberculosis bacteria in a sample. Several other tagging molecules are in development to address the diagnosis of other diseases.
Upon the removal of the filters, they were able to use the CellScope as a standard, white-light microscope, identifying malaria parasites and the misshapen cells typical of sickle cell anaemia.
"In many developing world and rural areas, you could be hundreds of miles from hospitals or miles away from power - but the mobile infrastructure is well-established and pretty much blanketing the globe," Mr Breslauer said.
"So if you can have a portable, battery-operated system to take these images, analyse, and transfer them, you're creating a portable healthcare clinic. Your doctor can see your samples without actually having to be present."
The team is now making a more robust, "field-ready" version of the device, which will be used in field testing and clinical trials in the future.