Mini Project Documentation:
Bacterial Growth Monitor
By: Rohan Sharma
Concept Development/Background:
 The idea for the use of my device came about from a recent
experiment we did in Bio Lab
Basic idea of experiment was to insert a gene (luciferase) into a
strain of bacteria (E. coli) in order to allow them to glow in the
Students were asked to take plates of the mutated bacteria home
and record the time they initially displayed luminescent properties
The problem: this process can take anywhere from 48-96 hrs(!)
Since it wasn’t realistic to expect students to simply sit around and
stare at their cultures and wait for them to glow during this
period, all of the students’ recorded times became rough
estimates, resulting in less accurate experiment documentation…
The Solution:
A device which could sense precisely when
the bacteria began to glow + trigger a
mechanism that would alert the student
Instructions for use:
Simply put the test tube containing bacteria into box and wait!
Basic Breakdown of how it works:
START: Photocell detects brightness of Bacterial Culture (or LED controlled by
DC Motor was programmed to switch on after photocell detected certain
 Mechanism was attached to DC Motor to convert rotational motion to linear
Wooden stick travelling in linear motion rings alarm/bell/wakes up student
through poking
 FINISH: Student knows exact time culture is ready
-Arduino + Breadboard + USB Cable
-Box or vessel to hold test tube of bacteria
(must be closed to prevent external light from
entering and invalidating results)
-DC Motor + H-bridge
-Mechanism for converting rotational motion
into linear motion
-(For demonstration purposes) an LED +
Potentiometer to simulate when the bacterial
culture was dark and when it reached a certain
Other Materials That
Were Used:
-Electrical Tape
-Wood Glue
-Plastic Lid
-X-acto Knife
-Velcro Stickers
-Wooden Sticks
Building Instructions:
1.Once you have all the critical components, a hole must be cut out of the
back of the box in order to connect the USB port. Other smaller holes
must be cut into the front of the box to allow motor and potentiometer
wires to be attached. The last holes I made were used to put 2 small
wooden sticks through the sides of the box in order to prop up the
breadboard (see side view)
2.Next, I cut out two ‘arms’ out of cardboard, and glued them to both
sides. Then, after poking a wooden stick at the end of both arms to
support mechanism later, I glued a paperclip to the end of the stick
whose side the mechanism would later be attached to. This was done in
order to prevent stick from sliding off when motor is turned on.
3. The next step was to actually make the mechanism for converting the
rotational motion of the DC motor into a linear motion which could
ring a bell, etc. In order to do this, I used a plastic lid and simply cut a
hole at its center. A wooden stick was then attached to the edge of the
plastic container by inserting a paper clip through both. This was crucial
for allowing free rotation of the wooden stick. The end of the paper clip
was then bent in order to prevent the stick from falling off.
Building Instructions (cont’d):
4. After this, I attached the plastic lid onto motor simply by
sticking end of motor through the hole I had cut. Next, I
used Velcro stickers to attach the DC motor to the box.
The same method was used to attach the potentiometer
to the front of the box as well.
5. I then cut the box open along 3 edges and unfolded them
slightly. The Arduino attached to breadboard was then
placed inside (refer to following slide for wiring
schematic), using the two wooden sticks as support.
Next, I plugged in USB port through back and taped
edges of box back together.
6. Lastly, I turned on potentiometer to watch the motor
Wiring Schematic:
Here is what the Arduino +
Breadboard looks like before
being placed inside box:
Programming Code:
int motorPin1 = 8; // left motor pin wired to Digital Pin 8
int motorPin2 = 7; // Right motor pin wired to Digital Pin 7
int photosensor = A1; //Photocell hooked up to Analog Pin 1
int ledpin = 13; // LED connected to Digital Pin 13
int sensorValue = 0; // initial sensor value
int potPin = A3; //Potentiometer wired to Analog Pin 3
int potentiometerValue = 0; //Initial Potentiometer Value set to 0
void setup()
pinMode(photosensor, INPUT); //declares Photocell as Input
pinMode(motorPin1, OUTPUT); //declares left motor pin as Output
pinMode(motorPin2, OUTPUT); //declares right motor pin as Output
pinMode(13, OUTPUT); //declares LED as Output
void loop() {
int brightness = analogRead(photosensor); // defines photocell output as a function of LED brightness
int speed = map(brightness, 0, 400, 125, 255); //defines motor as a function of photocell output + maps output values
analogWrite(motorPin1, speed);
analogWrite(motorPin2, 0); //allows only the left motor pin to rotate , corresponding to photocell output
digitalWrite(13, HIGH); // sets LED to ON position as default
potValue = analogRead(3); // defines potentiometer value as value coming from Analog Pin 3
analogWrite(13, potValue/4); //Made LED dependant on potentiometer value (value was divided by 4 to allow to fit into byte)
speed = constrain(photosensor, 0, 100); // constrains motor to run on photocell output of ’20’ or higher
Serial.println(analogRead(photosensor)); // prints current output of photocell
Biggest Problems Encountered:
-Initially light from Arduino board kept setting off motor when
placed inside box, so electrical tape was used to cover up
these lights
-Putting all the components inside the box was too difficult, so
edges had to be cut and folded back to allow more room to
work, then later taped back
-Calibrating the photocell to produce an OUTPUT value that
was low enough to detect an LED when it was switched on
by the potentiometer, but high enough not to have the motor
be set off too easily, required some playing around with the
‘map’ and ‘constrain’ functions; eventually a value of ‘20’ was
found to work
Possible Improvements/Future Ideas to
Play Around With:
 Have speed of motor correspond to brightness/number of
luminescent bacterial cells
 Wire LED’s to outside of box and program to brighten or
dim in relation to culture growth
 Have sensor output send wireless signal as text message or
email when cultures are ready

Mini Project Documentation