Magnetic micro and nanoparticles are very useful as supporting materials within microfluidic chips for biomedical applications because they can be used to capture and manipulate biomolecules in a very efficient manner. Understanding and mastering collective phenomena of microparticles inside microfluidic channels can help to optimize biomedical devices and can also allow for novel applications. However, the collective behavior of a granular packing inside a container has been well studied at macroscopic scales but has received little attention at microscales. With a background in the physics of macroscopic granular materials, I now study granular packings at a micrometric scale for biomedical applications. In this seminar I will talk about a microfluidic magnetic trap based on the use of magnetic micro and nanoparticles. I will talk about our ability to reversibly vary the density of the packing of the microparticles and its relation to nanoparticles capture capacity. I will also show results of immunoassays performed in this device where we have managed to detect antibodies at a concentration of the order of pg/ml in very short times thanks to the adequate functionalization of the surfaces to minimize non specific interactions. Finally, I will talk about the design of monolithic acrylic (PMMA) valves and pumps which allow for the automatization of this kind of microfluidic devices and are compatible with mass production.