Project tutorial

Open Vortexer © GPL3+

AKA how to build your own laboratory vortexer without spending a lot of money.

  • 1,993 views
  • 0 comments
  • 11 respects

Components and supplies

Necessary tools and machines

09507 01
Soldering iron (generic)
Highly Suggested
3drag
3D Printer (generic)
Highly Suggested
Hy gluegun
Hot glue gun (generic)
Highly suggested

Apps and online services

About this project

Introduction

Have you ever used a vortex mixer in your laboratory? It is an handy tool used to mix solutions. When you get used to it you will use it every time you can without regrets.

Since this kind of device is quite expensive but it is not strictly necessary inside a laboratory, I decided to make my own version. By following this guide you will learn how to make your own version too. I hope you will enjoy this reading.

Breadboard prototype

I will start saying that, even if the part list is quite long, this device can be built with things found around, if you look for spare part in broken objects you will find most of the component needed without spending money.

The device can be schematized as follow.

We will use a vibrating motor in order to vortex a sample of our interest. The vibration will start only if we hold a sample onto the motor. This kind of recognition will be achieved with a piezo sensor. Once a pressure is revealed an analog signal controlled by a rotary potentiometer will be sent to the motor driver and thus it will vortexing our sample.

The first thing we want to do is preparing our Arduino on a breadboard and connect the piezo sensor in order to be sure that this guy will work (figure 1)

Figure 1. schematic of the arduino with piezo sensor for pressure detection.

NOTE: you can use both UNO or Nano, I used UNO for breadboard testing and then I made the real prototype using Nano.

In order to make this sensor work really few lines of code are necessary (figure 2).

#define PRESSURE A0             
[...]            
        
void pressure_baseline (int *baseline);        
        
[...]        
        
int baseline = 0;        
int *ptr_baseline = &baseline;        
             
void setup() {            
 [...]            
 pressure_baseline(ptr_baseline);        
}            
[...]        
void pressure_baseline (int *baseline) {        
 for(int i = 0; i <10; i++){        
   *baseline = *baseline + analogRead(PRESSURE);        
   delay(500);        
   if (i == 9){*baseline = *baseline/10;}        
   }        
 }        

Figure 2. Code necessary for sensor base value calculation.

In order to avoid differences in the response of the piezo sensor at rest at each powering of the device and among sensors (I had three sensors giving different values at rest!), the code call the baseline calculation function. This lines calculate the mean of ten values of piezo sensor and this will be used as threshold for pressure detection. Another piece of hardware you will need is the motor and its controller. Figure 3 shows the wiring you will need to set it up. We can't wire directly the motor to a digital pin due to the maximum current output this would supply (20-40mA max depending from the board you are using), but the 5V pin is capable of supplying up to 500mA, which is enough for the vibrating motor!

A potentiometer was also added in order to control the vibration speed.

Figure 3. Schematic of the system with vibrating motor and controlling board.

The code is then modified in order the make the motor work as a function of the of the pressure applied with your sample (figure 4).

#define POTMETER A1        
#define MOTORPIN 9        
#define ten_to_eight(x) (map(x, 0, 1023, 0, 255))        
[...]        
void pressure_check (int *baseline);        
int *motor_speed (void);        
void speed_control (int *speed);        
void baseline_drift (int *baseline);        
[...]        
int counter = 0;    
int speed = 0;        
void setup() {        
 pinMode(MOTORPIN, OUTPUT);        
 [...]        
}        
void loop() {        
 pressure_check(ptr_baseline);        
 baseline_drift(ptr_baseline);        
}        
[...]        
int *motor_speed (void){        
 speed = analogRead(POTMETER);        
 speed = ten_to_eight(speed);        
 return &speed;        
 }        
void motor_control (int *speed){        
 analogWrite(MOTORPIN, *speed);        
 counter++;        
 }        
void pressure_check (int *baseline) {        
 if (analogRead(PRESSURE) > (*baseline + 10) && counter < 20){        
   while(counter < 20){        
     int *speed = motor_speed();        
     motor_control(speed);        
     delay(500);        
     }        
   } else if (counter > 19) {        
     analogWrite(MOTORPIN,HIGH);        
     delay(1000);        
     counter = 0;        
     }        
 }        
void baseline_drift (int *baseline){        
 if ( millis() % 3600000 == 0 && counter == 0){pressure_baseline(baseline);}        
 }        

Figure 4. Code for motor control.

Lets take a closer look to the code and what it does. First you will need to define the motor and potentiometer pins needed and to set the motor pin as output (figure 5).

#define POTMETER A1        
#define MOTORPIN 9             
              
void setup() {            
 [...]            
 pinMode(motorPin, OUTPUT);            
 [...]            
}            

Figure 5. Initialization code.

The rest of the code actually control how the system behave. Four functions are needed. It starts calling pressure_check(), this function check if there is pressure on the piezo sensor and if the answer is positive in calls motor_speed(). This will calculate the output for the motor pin from the potentiometer, a macro function ten_to_eight will map the value for the eight bit output (with a maximum of 180 in order to avoid a massive slowdown of the motor). The last part needed is motor_control() to activate the motor. A counter variable is increased every 0.5s up to a total of 10s then the system stop for 1s and wait for further pressure for a new cycle. A final function baseline_drift() will work every hour and calculate a new base value for the piezo sensor, thus avoiding drifts.(figure 6).

void loop() {        
 pressure_check(ptr_baseline);        
 baseline_drift(ptr_baseline);        
}        
[...]        
int *motor_speed (void){        
 speed = analogRead(POTMETER);        
 speed = ten_to_eight(speed);        
 return &speed;        
 }        
void motor_control (int *speed){        
 analogWrite(MOTORPIN, *speed);        
 counter++;        
 }        
void pressure_check (int *baseline) {        
 if (analogRead(PRESSURE) > (*baseline + 10) && counter < 20){        
   while(counter < 20){        
     int *speed = motor_speed();        
     motor_control(speed);        
     delay(500);        
     }        
   } else if (counter > 19) {        
     analogWrite(MOTORPIN,HIGH);        
     delay(1000);        
     counter = 0;        
     }        
 }        
void baseline_drift (int *baseline){        
 if ( millis() % 3600000 == 0 && counter == 0){pressure_baseline(baseline);}        
 }        

Figure 6. Loop code and functions definitions.

In figure 7 is shown the device assembled on a breadboard.

Figure 7. Device on a breadboard.

As you can see I did put the pressure sensor between two anti static foam sheets. So the motor will not stand directly on the sensor and neither this will stand directly on a rigid surface. Some glue was used to fix the rubber crutch to the motor head. This piece of rubber will be used as sample support while the vibration is on. This will avoid any contact metal/glass (in case you are using a glass container for your sample to be mixed).

And for the final touch you will need to add a switch and a power supply to your device and turn on your 3D printer (figure 8).

Figure 8. Schematics with power supply and switch.

EDIT: NOTE if you use an external supply of 12V could be a good idea to use a voltage converter to supply 5V instead of 12V. This is important since we use the 5V pin to supply current to the vibrating motor. The internal regulator may overheat fast and blow your board!

Real prototype

Lets now move on to the real prototype. For this part you will need to print the three necessary pieces. Figure 9 shows them, you can find the .obj files at the end of the page.

Figure 9. 3D components for vortex prototyping.

The assembly part of this tutorial is pretty straight forward. Your will need to position all the electronic component in the base. Probably a glue gun will be necessary in order to fix all the component and avoid unnecessary movement. In the central part will be fixed the anti-static foam. Figure 10 shows the base component with every component fixed with glue.

Figure 10. Prototype base.

As you can see a female jack for 12V power supply was added and soldered to the Vin pin and ground. If you don't have one of those you can always cut the wires of the supplier and use the bare wires. However this way is not clean and thus not suggested!

For the final touch just grub a couple of screw and fix the motor to the base. Plug in your 12V supply and you are ready (figure 11).

Figure 11. Complete device.

And we are done. The final device is complete and ready to use. You can further customize your device by adding some weight to the base part if the vibration is too strong in order to avoid the device movement!

I hope you enjoyed building with me this useful device for everyday life in laboratory.

See you in the next tutorial.

Code

Open Vortexer codeArduino
This code use the value of pressure calculated using a piezo sensor to trigger the vibration of the vibrating motor. Such vibration is kept for 20 seconds and then it stop in order to avoid any possible over heating of the system.
#define PRESSURE A0
#define POTMETER A1
#define MOTORPIN 9

#define ten_to_eight(x) (map(x, 0, 1023, 0, 180))

void pressure_baseline (int *baseline);
void pressure_check (int *baseline);
int *motor_speed (void);
void speed_control (int *speed);
void baseline_drift (int *baseline);

int baseline = 0;
int *ptr_baseline = &baseline;
int counter = 0;
int speed = 0;


void setup() {
  pinMode(MOTORPIN, OUTPUT);
  analogWrite(MOTORPIN, 254);
  pressure_baseline(ptr_baseline);
}

void loop() {
 
  pressure_check(ptr_baseline);

  baseline_drift(ptr_baseline);
  
}

void pressure_baseline (int *baseline) {
  
  for(int i = 0; i <10; i++){
    
    *baseline = *baseline + analogRead(PRESSURE);
    
    delay(500);
    
    if (i == 9){*baseline = *baseline/10;}
    
    }
  
  }

int *motor_speed (void){

  speed = analogRead(POTMETER);

  speed = ten_to_eight(speed);

  return &speed;
  
  }

void motor_control (int *speed){
  
  analogWrite(MOTORPIN, *speed);

  counter++;
  
  }

void pressure_check (int *baseline) {
  
  if (analogRead(PRESSURE) > (*baseline + 20) && counter < 20){
    while(counter < 20){
      
      int *speed = motor_speed();
      
      motor_control(speed);
      
      delay(500);
      
      }
    
    } else if (counter > 19) {

      analogWrite(MOTORPIN, 254);
      
      delay(4000);
      
      counter = 0;
      
      }
  }

void baseline_drift (int *baseline){
  
  if ( millis() % 3600000 == 0 && counter == 0){pressure_baseline(baseline);}
  
  }

Custom parts and enclosures

Top part of the device
uploads2ftmp2f97b67a8d-7f80-419a-9b2a-bfe6e343980b2ftop_psw3ddFddM.obj
Bottom
Bottom part of the device
uploads2ftmp2fd0b11ed9-2a5b-4467-bb42-91cabab8edf52fbottom_ua065jey3E.obj
Holder
Motor holder of the device
uploads2ftmp2f60b37f7b-c6ed-4e43-9169-4d021d05581b2fholder1_uam9t8Y6XO.obj

Schematics

Vortexer schematics without external power
The final device, encapsulated in a 3D printed box, will require a 12V power supply. NOTE: supply 12V ONLY through the VIN pin of the arduino nano!
Uploads2ftmp2f7edce53b 3b51 4ad7 8b6f ff7b5a9d18522fschematics schem potentiometer 0vm0qyljpz
Vortexer schematics with external power supply
12V must be supplied to Vin pin
Uploads2ftmp2ffb57028d ad10 4df4 9ad9 5744f7fc4ff72fschematics schem externalsupply gsmhaort0d

Comments

Similar projects you might like

Portable Range Detection Device

Project tutorial by Viktor S

  • 8,449 views
  • 5 comments
  • 20 respects

Open LED Race

Project in progress by Gerardo Barbarov Rostan

  • 16,243 views
  • 25 comments
  • 79 respects

This Device Will Never Get You Heat Stroke

Project tutorial by Hemesh chadalavada

  • 3,192 views
  • 2 comments
  • 13 respects

IoT for Coins

Project tutorial by Erik Moran

  • 10,039 views
  • 1 comment
  • 49 respects

Ultrasonic Glasses for the Blind

Project tutorial by Team GardnerTech

  • 9,393 views
  • 20 comments
  • 63 respects

Programmable Pocket Power Supply with OLED Display

Project tutorial by Shahariar

  • 8,562 views
  • 8 comments
  • 39 respects
Add projectSign up / Login