Fraction Collector for Chromatography (Lego Wedo and "Scratch")




Introduction: Fraction Collector for Chromatography (Lego Wedo and "Scratch")

Siderits R, Swift M, Lecorchick W, Ouattara O, Siderits I, Malik F.

We demonstrate how to make a reliable and useful scientific instrument called a "Fraction collector" for use with column chromatography applications or educational science projects.

We used the free downloadable "Scratch" graphical programming language and the Lego WeDo robotics kit to make this Auto Sampler/Fraction collector.  The only cost is for the Lego WeDo robotics components and the Lego pieces used for the apparatus.  We have taken the system through hundreds of cycles and it works reliably.  In a nutshell, the scratch program gets input from a sensor and controls a servo motor.  The motor turns a sample wheel that holds empty tubes until the sensor "detects" a tube in front of it.  It then tells the program to stop the motor for a certain amount of time, then repeat the process for the next empty tube.  Each tube stops under a sample outflow to collect a few drops then moves on to the next empty tube to collect the next sample. 

The program that we wrote to control the Servo Motor and Sensor is also downloadable from the Scratch Website and you can easily change it for your own use.

We'll explain what a fraction collector does and how its used with column chromatography.

To start with, If you wanted to sample the outflow from something over time or collect timed samples then you might want to use a fraction collector.  It stops a sample bottle or vial for a given amount of time to collect some drips from an outflow tube and then moves the next empty sample container into position.  Another variation on this theme would be to start with sample containers that had something in it, for example "algae" and stop in a magnetic field (between two magnets) for specific amounts of time or in front of an LED to give the sample different amount of light at a specific wavelength.  You can stop the sample for a constant amount of time or program the sampler to stop at the magnets, fro example, for increasing or decreasing amounts of time for each sample.  It would do this for 1-40 samples.  This project can be easily reconfigured to include a proximity switch and light sensor with an LED circuit.  You can even have multiple sites contributing sample to the containers as they stop and start at different positions.

OK, back to the project, a Fraction collector can cost 4,000-15,000K$, ours cost less than 150$ and has a "build time" of less than 30 minutes (if you have the Lego and WeDo parts and you download our program script from the "Scratch" website).  

Out apparatus can accept from 1-40 small sample vials or up to 10 larger sample bottles.  The prototype is so easy to work with that you can do much more than we've described.

Here are a few websites for reference as we go along.

Scratch graphical programming website:

Bionicle website:

WeDo website:


If you have a child who likes Lego or you have a friend with kids who like Lego then just ask them to put this together for you. 

The main Lego parts (aside from the WeDo kit are: the gear box, 3 axles, generic building pieces and some Bionicle joints.

Step 1: Video of Working System:

This video segment shows the Fraction Collector in action.
The Audio segments were taken from an online Text-To-Voice site sponsored by AT&T.
You input your text and it generates an MP3 for you to download for your project.

Step 2: Setting Up the Drive Tower (Gear Box and Servo Motor):

First steps Steps:  The "Drive Tower"  will support and turn the sample holder.

The key pieces that you'll need for this entire build are the Lego gearbox, some gears, 3 axles to go in the Lego gearbox, assorted generic Lego building pieces and some Bionicles joints (to hold the column/sample outflow tube over the sample bottle/vial as it move into position under the outflow tube).


Connect the WeDo Servo motor to it' Hub and then to the computer with a USB cable.

Start the Scratch Program

Reveal the “Motor” blocks

Drag the “Motor on for 1 sec” block onto the canvas and click it.

Watch the motor spin for 1 Sec

Next build the "Drive Tower"!

Step 3: Building the Proximity Sensor Tower:

Make a simple block tower and stick the sensor on top.
Don't worry too much about the height yet since we can change that easily after we get everything else set up. 

The sensor is positioned at a level below the surface of the sample "holder" (just a plate with holes that hold the sample vials) so that as each tube passes in front of it, the tubes can be detected by the sensor.

Even if we put larger clear glass sample contained on an upper level, the sensor still detects the tubes that hang down since they bounce the IR signal back to the sensor.  That way we can use these to trigger the sensor to stop the rotation of the sample holding disk so that the clear glass sample bottles stop where we want them to stop. 

Step 4: Make the Chromatography Column Outflow Positioning Arm:

We used Bionicles joint pieces because they interconnect, turn and lock in position.  This gives us the ability to easily position the specimen outflow over the collection vials as they pass underneath and stop for collection.  It really give you a lot of flexibility for positioning the arm.

Step 5: Making the Sample/vial Holder:

We used a Laser cutter but this is NOT necessary (it just looked nice).  The placement of the holes just needs to be at a constant distance from the sensor. 

You can use a small "Dollar Store" plastic plate and drill a few holes. 
Take a compass and find the center of the plate (remember high school geometry) and then mark a circle from the center for the holes to be drilled.  "Step" around the circle with a compass or use a protractor to measure where you want the holes to be drilled.

This holder just sits on top of the drive tower spindle.  If you don't glue the spindle to the plate you'll have to make an "X" for the drive spindle to fit into.

Step 6: Writing the "Scratch" Contoller Program:

Here are the program graphics.  Literally the graphic representation of the program/script.  You drag and drop these blocks that represent code into the program and run it.  They snap together automatically.  You can even share a program over the internet.

Don't worry, you can download the program that I wrote for this project form website and run it on your computer.  Feel free to change and improve on it.  It will even play voices to tell you whats happening while the program is running.

You'll need to install the free Scratch program on your computer so that you can run the program locally.  Here is the "Scratch" website so you can get the program.

Here is the link to my online Scratch programs.  Download it to your computer.
Remember it will run but not do anything unless you have the proximity sensor and motor hooked up to your computer.

Text-to-Voice audio files for this project were made at ATT Voice DEMO website.

Approach to writing "pseudo-code" in Scratch for this project:

Step One:

- Connect the WeDo hub to the USB port
- Then connect the Servo motor and proximity sensor to the Hub
- Go into scratch to reveal the motor block to see the motor functions
- Now look at the sensing group and find the distance sensor
- Make the motor move and the sensor report distance to the screen
Step Two:
- Build the system as in the images
- Put a tube into a hole so that it can rotate into the distance sensor path
- Make the motor stop for a set period of time
- Make the motor start again until the next sensor interrupt
Step Three:
- Make the program ask how many tubes have been loaded
- Make the program ask how many minutes to stay on each sample tube
- Add a graphic that shows whats happening
- Add some sounds so that you know whats going on during the run
Next step adding functionality:
- Using the PicoBoard interface add a photosensor and an LED
- Cover the top of the other container to keep them clean during run.

Step 7: Adding Larger Sample Collection Capabilities:

We added an upper level which sits on top of a spacer between the upper and lower plates. 

We used the original tubes that hang down to trigger the proximity sensor since the IR signal would go through the glass bottles and not bounce back to the sensor.

Notice how the tube that hangs down is place in front of each glass bottle.
This assures that the glass bottle will stop under the sample delivery arm.

Step 8: Why Is This a Useful Approach to Prototyping Different?

This is an interesting project and fits well with other projects that we've submitted in the past.
Each of these projects began with a "challenge statement". 

For example:  Challenge statement - "We can make an automatic fraction collector that is cheap, reliable, would support "chronobiologic" applications, can be upgraded easily, includes a control program that we write and revise in real time and put it together in an hour from parts available for under 100$ (including Ebay purchases and left over Lego pieces). 

Our team is the Experimental Pathology Rapid Prototyping team in the Investigational Pathology Section of the Laboratory.  Its multidisciplinary and includes medical students, bioengineering majors, laboratory technicians, technologists, high school science students and doctoral prepared experimentalists.  Everyone takes a part and everyone learns from each other. 

For example, our Lego "specialist" is a 13 year old 7th grader (no kidding he's our "goto" guy for Lego constructs).  Our best Scratch programmers happen to be juniors in high school ( outstanding in their science classes), our University Bioengineering  major handled the questions that dealt with "Chronobiology"  and our medical student answered questions on Dry Column Chromatography (DCC).  Everyone played a part.

Our next step for his project will be have the tubes feed in a straight line or follow a chained/belt/track  driven system instead of a circular disk.  We'd also like to add a solenoid to temporarily close the outflow when the sample containers swap out and a "sample capper" to close each tube.  We'll also add a drain function to the software so that it can stop over and empty space to drain the remaining column into a waste bin.  We also had a suggestion that this could be used to expose algae for different periods of time to a magnetic filed (between two magnets.

Step 9: The Following Will Provide More Information on Key Topics:

The following will provide additional information and specific details relating
to the key areas of this project.

- See video of the system in action (with programed voice outputs)
- What is a Fraction collector and why make one?
- What is Dry Column Chromatography and what does it do?
- What is "Scratch" graphical programming and why use it in this project?
- What is Lego WeDo robotics and how does it control the sensor and motor?

Step 10: What Is a Fraction Collector?

Here is an image of a real fraction collector: Gilson    

This information about Fraction collection is from the online "Library for Science"

"Fraction Collector
A fraction detector is a device that allows regular or specified samples to be taken from a column eluate and stored in a retrievable form. The storage vessels are usually small sample tubes or vials that are oriented in a rotating disk or in a moving belt, there movement usually being controlled by a microprocessor. On receiving a signal from the microprocessor, the next vial is placed under the column outlet and the eluate collected until receiving another signal from the computer. Once the properties of the chromatogram that describes the separation has been ascertained, then the collection program can be defined. The fractions can be collected on a basis of time either at regular intervals or a specific times to collect specific peaks. Alternatively the fractions can be collected by monitoring the detector output and when a peak starts to elute the fraction collector is activated and the peak collected in a specific vial. When the peak returns to base line the column eluate is then directed to waste until the next peak starts eluting. Fraction collectors are in common use with most liquid chromatographs. They are used to collect samples for further purification, subsequent examination by spectroscopic techniques or for biological or organoleptic testing."

Step 11: What Is Dry Column Chromatography?

Here are two excellent sites that talk about this technique:

Microflash DCC:

Column video:

Step 12: What Is "Scratch" Graphical Programming?

  Computer programming is often viewed as a tedious, specialized activity, accessible only to those with advanced technical training. Traditional programming languages like C++ and Java are difficult for most people to learn. The main goal of “Scratch”, created at MIT,  is to change that circumstance. Scratch uses the advancement of graphical interface design to make programming more engaging and easy to understand. Some key features of Scratch include:

    1. Building-block programming – To create a functioning program in Scratch, the user simply has to snap graphical blocks into stacks. In most programming languages the user would need to create a large amount of code, and this code might have numerous errors. With Scratch, this is not the case. The graphical blocks are designed to fit together only in ways that make syntactic sense, so there are no syntax errors. The best feature of Scratch is the ability to make changes to a program while it is running; it is easy to experiment with new ideas incrementally and iteratively.  

    2. Media manipulation – With most programming languages it is quite difficult to create programs that control and mix graphics, animations, music, and sound. With Scratch the user can collaborate graphics, animations, music, and sound very easily.

   3. Sharing and collaboration – After creating a program with Scratch, it is easily accessible for other people. The creator can upload their program to the Scratch website, where anyone can view the program. This is excellent if one needs immediate feedback.

What is a Pico Board?

The Pico Board was also developed by MIT. This is a small yellow board that has 4 resistors, a sound sensor, a light sensor, a button, and a slider. This board is connected to the computer through a USB cable, and the information that it reads can be accessed through Scratch.

Step 13: What Is Lego WeDo Robotics?

Excerpt from Lego WebSite:

"The LEGO® Education WeDo™ Robotics Construction Set is an easy-to-use set that introduces young students to robotics. Your students will build LEGO models featuring working motors and sensors and program their models using the LEGO Education WeDo Robotics Software (900095). When the set is combined with the WeDo Robotics Activity Pack (909580), students will explore a series of cross-curricular, theme-based activities while developing their skills in science, technology, engineering, and mathematics, as well as language and literacy. The set contains more than 150 elements including a motor, tilt sensor, motion sensor, and LEGO USB Hub.

$129.95 Complete Kit
$44.95 Hub separate
$19.95 Sensor 15 cm in mm separate
$ 7.95 Motor separate

Kit includes:

When the motion sensor, designed for the LEGO® Education WeDo™ Construction Set, is attached to the LEGO USB Hub, it can detect objects within a 15 cm range and is automatically detected by the WeDo Software.

Use the Power Functions M-Motor with the new power function connector to bring your LEGO® models to life. The Power Functions M-Motor is compatible with both LEGO building systems and can be used with the LEGO Education WeDo™ Robotics Construction Set and the Simple and Motorized Mechanisms Set."

Both Motor and sensor work with the Scratch program.

Step 14: Discalimer:

WE urge you to follow all of the manufactures instructions for all Power-tools (that you never read in the first place)This project may require obtaining some of your child’s toy’s we suggest this is done after they are sleeping.  We will not be held responsible for any damage caused during a temper tantrum (you or the child).

As always use extreme caution when using anything that heats up, pinches, cuts, and squeezes or causes traumatic, caustic or thermal injury.

This project is presented for demonstrative purposes.  Therefore safety devices and procedures may have been removed or circumvented.  This is purely for this instructable and not advised for personal use.

We are sharing our experience, not telling you what to do or to do it.

If you choose to try this, then it is at your own risk!
No really, we're not kidding about this.

Son of disclaimer:

This is an example of how we constructed a prototype system for educational or quick test prototype applications.

We make no claims about it's functions or use in research.

Although it functions reliably for illustrative and demonstrative purposes and may be ideal for a quick fix, or a "chronobiological" prototype application or even educational/classroom purposes we take neither credit nor responsibility for your actions.

Biological stuff is really dangerous!  Especially some of the things that you might put into a chromatography column or the solvents that might be used in such a column.

Be careful, read instructions, don't smoke, eat healthy, get exercise, do not stand on apparatus etc..

Good luck.

Step 15: Project Description:

A collaborative project of the:

Center for Parabiotics Research and the Investigational Pathology Department

Be the First to Share


    • Bikes Challenge

      Bikes Challenge
    • Remix Contest

      Remix Contest
    • Make it Move Contest 2020

      Make it Move Contest 2020

    7 Discussions


    9 years ago on Introduction

    A truly ingenious application of WeDo and Scratch I have seen. Very creative. Keep up the good work. Thanks for sharing.


    10 years ago on Introduction

    I like the Lego-build.
    I'm slightly concerned that for normal-phase chromatography, the plastic is going to suffer from the solvents though - your thoughts?



    Reply 10 years ago on Introduction

    Excellent point!

    Methylene chloride, for example, "welds" plastic.  Although this fraction collector has many uses that don't require plastic-melting solvents, we do have a few interesting options, if need be.

    Both the sample disc and the "trigger" tubes for the IR sensor would be at risk.  We used non reactive tubes for our sensor trigger but you could use glass tubes and put a sticker on the outer surface to reflect the IR signal from the sensor. 

    Here are a few thoughts on protecting the disc:

    1) cover the plastic disc with a sheet of aluminum foil and poke holes. 
    2) design a cut out (groove)  with a few wrapped supports so that any solvent that comes through during a momentary bottle rotation would drip straight down into a waste container. 
    3) cut the sample holder plate out of thin aluminum sheeting.
    4) use wire spokes with a central hub instead of a flat disk with holes
    5) add a solenoid to cut off (pinch) the sample flow during rotation.  This would require a quick 5 minute modification in the scratch program, a battery, a magnetic switch and a solenoid.
    6) Cut the sample disc out of wood (I know its hard to think of scientific instruments made out of wood but it is cheap and usable)
    7) Use a glass plate and set the bottles in "glued on rings" to hold them in place (E600 glue is magic for this) while the underlying disc rotates a new tube into place.
    8) tie the tubes to the outside of a shallow central metal can / drum (line the outside)
    9) line the inside of a shallow can / drum with tubes for the upper deck plate
    10) spray-paint the disc with a non-reactive or rubberized surface

    BTW, Thanks very much for your comment.



    Reply 10 years ago on Introduction

     instead of using a ir sensor it might be easier to use a micro-switch, they come with a lever most of the time, so the only problem would be positioning the switch...


    Reply 10 years ago on Introduction

    Great idea, the motor could trigger the microswitch, or the tube could do it directly, or we could use a magnetic proximity switch that would trigger a solenoid at the same time!  Excellent thinking.


    Reply 10 years ago on Introduction

    There's some good thinking.
    Ye-olde "DCM" is vicious nasty-stuff...
    But I do like the Lego.



    Reply 10 years ago on Introduction

    Thanks.  I'm doing a rack feed version now.