In the future, taking a pill to treat a headache may seem like a low-tech solution. 

Scientists have built an implantable brain chip that regulates the amount of dopamine in mice using an electrical impulse, a process that could one day be used to treat human patients suffering from various disorders, IEEE Spectrum reports. When dopamine levels fall below a specific level, the chip sends an electrical impulse to neurons that causes them to release more. The device works essentially the same way a thermostat automatically monitors and controls temperature in a room. 

One of the benefits of an implantable chip to regulate chemicals in the brain is customizability. While doctors prescribe Prozac and Ritalin to boost serotonin and dopamine, respectively, drug therapy can be a one-size-fits-all solution to symptoms that vary from person to person, according to IEEE Spectrum.

Dopamine is a neurotransmitter that is deeply involved the brain's reward and pleasure centers, but future brain chips could be used to track and regulate other neurotransmitters,  Pedram Mohseni, an electrical engineer at Case Western Reserve University, told IEEE.

Modern medicine is already using  implantable devices to improve brain functions. Some patients who suffer from Parkinson's disease have tiny machines in their brains that replace the areas destroyed by the disease. These chips communicate wirelessly with computers outside the body. In the future, smaller versions of these chips could be swallowed instead of inserted with minimally invasive surgery.

Some of the challenges for making brain chips that regulate various transmitters include powering the devices and controlling interference from the human body, which has a "tendency to react to implants," according to IEEE. The next step for researchers is to test the device in other animals, including primates, but it could take "years" before human trials are approved.