Backyard Brains Logo

Neuroscience for Everyone!

+1 (855) GET-SPIKES (855-438-7745)

items ()

The Taste Preferences of Fruit Flies

Hello everyone! It’s a been over a month since my project began on studying the diet and attempting taste manipulation of the Drosophila melanogaster.

Before my experiments could begin I faced many software and hardware issues. The flyPAD itself is an extremely thin 0.6mm PCB board so every slight bend of it can result in a breaking of the soldered connections with each channel’s circuits.

I transfer flies by sucking them up…don’t worry there’s a cotton stopper. Human Sips.

In order to change my flies’ taste perception, the light-sensitive proteins which were inserted into their ‘sweet’ tasting neurons had to be stimulated by an intense red light. For a proper response, this light stimulation has to happen almost exactly when the flies take sips of the target food. To make this happen, a code was programmed into Bonsai so that an LED is turned on nearly instantaneously to when food is touched by a fly, triggered by a change in capacitance between the electrodes. This is how the flies’ taste neurons are activated at the same instant they sip certain foods to influence their food choice preference.

The instant the fly’s proboscis (mouth) touches food, intense red light shines

To get to the finalized rig I use today, I experienced firsthand just how much debugging and problem-solving is involved in research. Below is a pictorial formula of how I got to my final experimental setup:

Got my flyPAD

Integrate circuit and solder under a microscope… this is what was breaking every time the .6mm boar bent… whch was all the time

Creating circuit and code for LEDs to sink up with each channel

I soldered a shield for easy LED plugin

LEDs set up with flyPAD

soldered LEDs to their drivers, which increase the light intensity        

Another arduino programmed to pulse 100 Hz light to give flies recovery time of 900 ms

Painted acrylic to avoid unwanted light penetration of neighboring LEDs

The fruit!

The bonsai workflow for LED stimulation

Over many hours of adjusting my setup and learning how to insert the food, I finally got everything working so that experiments could get underway.

To see if the flies’ taste can be changed, I had to determine what their natural food preference was. I chose banana and avocado to compare. The cumulative number of sips showed banana was preferred over avocado, as avocados have almost no sugar in them.

To see if food choice preference can be altered, LEDs were activated upon contact with avocado. This fired the gr5a sweet neurons in the flies.

As predicted, the light stimulation successfully activated the flies’ sweet neurons to alter what they perceive as sweet tasting.

To verify these results, I ran a positive and negative control. The positive, showing the desired effect which is expected from the independent variable, was the proboscis extension (seen with the green arrow) from a gr5a fly upon stimulation from the 625nm red LED light.

Fly 1

Fly 2

As for the negative control, which does not produce the desired outcome of the experiment, I put gr5a flies that had not been feeding on all trans-retinal, under the same LED treatment targeted on avocado. All trans-retinal must be ingested to activate the proteins in the flies’ neurons, otherwise light stimulation will not fire the neurons. As expected, these flies still preferred the more sugary banana over the bland avocado.

Now that I know that the alteration of Drosophila taste preference is possible, I plan to study the nutrients within the flies’ diet.

It’s easy to eat sugar, but when offered your favourite sweet snack and a healthy food, it’s hard to eat what you know is better for you. I will create this scenario for my flies. Specifically, I am interested to see if the flies will eat protein after being deprived of it, even when a tasty, sugary apple is also up for grabs.

When deprived of protein, it has been found in the past that females will eat more protein when offered it again as opposed to males since they have to produce eggs. I want to see if this is still the case with natural foods rich in protein. I hypothesize that the flies will still prefer to eat a more sugary food as opposed to the nutrient they are deprived of. If this is the case, I will use optogenetics once again to see if I can make them eat the food they require the most. Are flies’ instincts to eat the nutrients they require stronger than their pickiness of taste? This is an interesting comparison to humans – as so many of us are more than willing to indulge in decadent desserts rather than eating our veggies any day of the week. Will optogenetics one day make its way into the human realm to revolutionize eating and health forever?

Thank you for taking a look at my post! I can’t wait to see what response I get out of my flies in the near future.

Optogenetics with the FlyPad

Hey everyone!

Angling in Halifax

My name is Spencer and I just finished my freshman year at Dalhousie University in Halifax, Canada (yes, where the maple syrup and igloos are). I’ll be studying Neuroscience and Immunology there for the next three years.

I’m originally from Vancouver but ended up all the way on the other coast to study in Halifax. Having relatives in Florida and a lot of friends on the west coast, I’ve visited the US quite a bit but have never lived here. I am thrilled to be in Ann Arbor this summer interning with Backyard Brains!

Spenc: Coast to Coast

In the two weeks I’ve been here I’ve already had some awesome experiences. I love the food here, playing basketball at local outdoor courts, and the trees and streams that make the city vivacious. It takes me 20 minutes to bike to work, which might sound worse than what I get to look at each day:

My Morning Commute

Isn’t summer a great time? Sun, flowers, ripe fruit, and…those pesky fruit flies are all over them… Fruit flies may be tiny and annoying, but they happen to be one of the most important model organisms for the past 100 years. In spite of over a century of research, the feeding behavior of fruit flies, specifically the Drosophila melanogaster, has not been fully understood. Knowing how animals feed gives us insight into things like how they learn, reproduce, and physically function. Unfortunately, the Drosophila is so small and moves so quickly that its rapid sips of food cannot be caught with the human eye.

Fruit.. Fly… Fruitfly. (Images courtesy a Google Images search)

Fingertip for Scale

That’s why Dr. Pavel Itskov helped create a device called the flyPAD (proboscis activity detector) to measure how often the flies take sips of food with an accuracy of 100 samples per second. The flyPAD is so accurate because it uses capacitive sensors, the same type of technology iPads use to track touch responses. With food on one electrode and a fly on the other, the number and duration of sips the fly takes can be recorded and studied. I got my hands on one of these new gadgets this summer to study what natural foods Drosophila prefer to eat, what nutrients they require, and see if I can alter their food preference with neural stimulation.

The FlyPad in its Full Glory

 To see what natural foods my flies prefer to eat, I will offer them a variety of commonly liked and disliked foods to see which ones they visit and eat from more. I am interested to see if the food choice preferences they make are based on the macronutrients (proteins, carbohydrates, fats) which are crucial to their diet. I will deprive flies of specific nutrients to see if, when offered those again, they spend more time eating to regain those nutrients. One application of this is to test the dietary requirements for reproduction. An example of this is to see if adult female flies eat more protein than males since they produce eggs and if virgin flies (which don’t make eggs) eat little protein. I am still doing research into more of such hypotheses to test, as well as the effect which ripe or rotten fruit has on their eating.




How the FlyPad Works



How the FlyPad works

After figuring out what foods my flies like, would it be possible to override their decision-making abilities and alter what they perceive as tasting good or bad? Well, I will be putting this question to the test with optogenetics – a tool which can activate neurons with light stimulation.

Light Sensitive Ion Channels Activate Neurons

An Example of a FlyPad Recording

I visited a local fly lab at the University of Michigan to order genetically modified flieswith the opsin ReaChR in their gr5a and gr66a neurons. These neurons control the flies’ gustatory reception – what they perceive as tasting sweet (gr5a) and bitter (gr66a). Through stimulation of ReaChR with light at certain frequencies, I should be able to activate these taste responses to give the flies virtual taste realities. If a fly loves banana but I activate its bitter taste receptors each time it tries to eat it, they should learn to stay away from banana. Likewise, I will try to make them love eating the foods they once abhorred through stimulation of their ‘sweet’ neurons. I am excited to see how Drosophila learn and remember, by measuring if their food choice preferences can be changed after multiple days of stimulation.


How powerful is optogenetics? Can I alter the free will of what Drosophila choose to eat? This is what I aim to discover in the upcoming weeks! Stay tuned.

Mind Control. With Lasers.

Coming soon to a backyard near you.

At least, that’s the idea. We’re sure the technology will catch up if we give it enough prodding and throw an intern or two its way. And hey if not? There’s still lasers, sounds like a win/win to me. Wait we don’t get lasers either? This is really going downhill fast. Apparently the higher ups don’t think beams of focused high energy photons wantonly sprayed at the brains of schoolchildren is good science.


I don’t see why anyone would have a problem with this

Ok you know what, how about beams of somewhat lower energy photons, and brains of something whose parents won’t send us more angry letters after little Johnny tattletale has another run in with the burn ward. How about LEDs and a bug? Well then.

Mind control.

Coming soon to a backyard near you.

And it is. Technically. So long as the mind you want to control is our tough lil buddy Drosophila Melanogaster AKA the fruit fly. And so long as the nefarious deeds you want your insatiable army of insect minions to thoughtlessly carry out is…sticking out their tongue. THEN YES. We’ve got mind control.


It’s called optogenetics, and it’s pretty crazy stuff, really. Long story short, we can stick a gene into the fruit flies that makes certain neurons, say, the sweet taste receptor Gr5a, sensitive to certain wavelengths of light-in this case, red light, because it is capable of passing through their exoskeleton into the neurons beneath. That way, if you set the little guys in front of an LED and blast away, they think the Kool Aid man just suplexed their face. And what is a fruit fly’s reaction to opening the floodgates of sugary heaven? They stick out their tongue.

It turns out you can rig up an LED with a microcontroller so that when two wires from the circuit come in contact with the fly, it completes the circuit, treating the fly as a resistor, and activates the LED. This lets us time contact with the fly to when the fly receives light (and therefore sweet-tasting) stimulation.

If that was a little hard to see, here’s an up close and personal version of the events.

And of course, nothing is truly scientific until we’ve mechanized it

It might sound trivial, but there’s actually a lot to getting a response like this without any invasive action other than light stimulation. Optogenetics really opens a lot of possibilites up for experimentation that just weren’t feasible before. It took the world of neuroscience by storm just a few years ago and is on the short list for the Nobel Prize, and we‘ve got a crack team of top scientists working to bring this technology to your own backyard.

Ok, slight exaggeration again, maybe, they’re actually interns working on it. Well, an intern. But we’ve stuck him in our basement with a steady supply of mountain dew and cheetos, and if that’s not science, I don’t know what is.



I’ve just been told that in fact its not actually science. According to them, “good science” involves some sort of method, and numbers, and repeatable experimentation. Apparently blood, sweat and cheeto dust just aren’t enough for some people. We’ll have the intern fill you in on the details.