Jarrod ShiltsOm Patange
Published

The Oscillostat

Our device, the Oscillostat, continuously evolves bacteria while oscillating between selective pressures to mimic fluctuating environments.

IntermediateWork in progress3,039
The Oscillostat

Things used in this project

Hardware components

Futaba S3110 servo motor
×1
Farnell MC02068 perisaltic pump
×1
Koge RP9879 air pump
×1
Digikey 1528-1402-ND red laser
×1
Mouser 856-TSL235R-LF light sensor
×1
Digikey 259-1461-ND CPU fan
×1
Arduino UNO
Arduino UNO
×1
Versilon SPX-60 FB silicone tubing (4mm)
×1

Story

Read more

Custom parts and enclosures

Valve shaft

Valve base

Tube housing

Code

PinchValv_PerisPump.ino

Arduino
Simultaneous control of the peristaltic pump and pinch valve, under control of potentiometers and switches for demonstration purposes
#include <Servo.h>

//Pins for peristaltic pump
const int OUT6 = 6; //1EN
const int OUT10 = 10; //2A
const int OUT11 = 11; //1A
int IN0 = 0; //Analog IN, potentiometer
int IN4 = 4; //Digital IN 4, pushpin

//Pins for pinch valve
int potPin = 1;
int servoPin = 9;
Servo servo;


void setup() {
  //Peristaltic pump setup  
  pinMode(OUT6,OUTPUT);    //sets dpin as output
  pinMode(OUT10,OUTPUT);    //sets dpin as output
  pinMode(OUT11,OUTPUT);    //sets dpin as output
  pinMode(IN4,INPUT_PULLUP);    //sets dpin as output

  //Pinch valve setup:
  servo.attach(servoPin);

}

void loop() {
  //Peristaltic pump with potentiometer for speed and reverse button
  int speed = analogRead(IN0) / 4;
  boolean reverse = digitalRead(IN4);
 
  analogWrite(OUT6,speed); //Motor turn
  digitalWrite(OUT10,reverse); //Motor turn
  digitalWrite(OUT11,!reverse); //Motor turn

  //Pinch valve operation with potentiometer:
  int reading = analogRead(potPin);     // 0 to 1023
  int angle = reading / 6;              // 0 to 180-ish
  servo.write(angle);
}

Credits

Jarrod Shilts

Jarrod Shilts

2 projects • 3 followers
Om Patange

Om Patange

1 project • 1 follower

Comments